I'm finally fixing up my dns zone files in Gandi, which has a handy feature that lets me use the same zone file for several domains. So I can keep 1 zone file for a single domain and all its tld's.

But normally, when you set up the SPF record for eg domain.com, you don't actually add "mx:domain.com", because it's implied.

Will this thrown an error if you do?

Here's an example SPF record for domain.com.

The "correct" one:

v=spf1 mx mx:domain.info mx:domain.net mx:domain.org ~all

And here's the one I would like:

v=spf1 mx mx:domain.info mx:domain.net mx:domain.org mx:domain.com ~all

Is that allowed, or not?

  • 3
    You should consider switching "~all" to "-all". That tilde lets everyone know you don't really know what you're configuring and some servers (like the ones I run) will hold it against you when raking your e-mail for spam. – Chris S Aug 10 '12 at 2:10

It's not implied. There's nothing implicitly assumed about what systems you want to authorize.

You're explicitly setting mx:domain.com by setting mx at the start of the record - they're functionally identical when the SPF entry is on domain.com.

That said, you should not run into any validation errors simply because you specify the same thing twice.

| improve this answer | |
  • 1
    +1 But note that only 255 characters can be in a single SPF record... So if you own example.com for every TLD you'll run into problems. But that's somewhat unusual. – Chris S Aug 10 '12 at 2:08

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.