3

Is this possible? Like a wildcard TXT record of some sort?

7

Yes, it is possible to define a wildcard TXT record. Notice that you should define both a TXT RR and a SPF RR.

Example
In my home I run a local DNS server with the .fbh domain extension, I have created this record:

*.email         IN  TXT "v=spf1 mx -all exp=bad.example.com"

And this gives me the same response for all queries to *.email.fbh:

$ dig +short TXT test.email.fbh
"v=spf1 mx -all exp=bad.example.com"

$ dig +short TXT smth.email.fbh
"v=spf1 mx -all exp=bad.example.com"
5

You can, however, include a central spf record in the invidual subdomain spf records.

Each individual spf records for the subdomains could look like this:

v=spf1 include:_spf.domain.tld ~all

And then add a TXT record for _spf.domain.tld with the actual spf values:

v=spf1 ip4:1.2.3.4/30 200.298.100.1/24 ~all

This way, you only need to maintain _spf.domain.tld, and not the records for the individual subdomains

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.