SPF records for multiple domains with same MX

I realize that SPF records have been covered very well a few times on these forums, but I'm still not perfectly clear on my particular situation. It's a simple scenario: different domains that use the same MX (the MX is a subdomain of one of the domains).

Domain MX

–---------- --------------------

host1.com mail.host1.com

host2.net mail.host1.com

host3.org mail.host1.com

This is what I originally thought the TXT record for "host1.com" would look like:

__host1.com - v=spf1 a mx ptr ip4:xxx.xxx.xxx.xxx mx:mail.host1.com mx:host2.net mx:host3.org ?all

mail.host1.com - v=spf1 a ?all__

Mail would originate from each domain, but the MX are all "mail.host1.com".

Any input on the correct way of setting this up would be most helpful. I feel like I'm getting something backwards or putting unnecessary information in the records.

1 Reply

Ultimately the SPF record will be interpreted as a list of IP addresses, and it is unnecessary to list the same IP address more than once, even if it is known by different names.

So if all host1.com email is going to be sent from the same host, you probably should pick just one mechanism to specify its IP. Which mechanism to use is up to you - I would choose whichever is most likely to stay constant over time and over all your domains.

For me, whenever I add a domain to my mailserver and that server is the only handler of both incoming and outgoing mail for that domain, I go with this: > v=spf1 mx -all

Reply

Please enter an answer
Tips:

You can mention users to notify them: @username

You can use Markdown to format your question. For more examples see the Markdown Cheatsheet.

> I’m a blockquote.

I’m a blockquote.

[I'm a link] (https://www.google.com)

I'm a link

**I am bold** I am bold

*I am italicized* I am italicized

Community Code of Conduct