I came across a confusing SPF record while troubleshooting some spam issues. The record includes the standard entries for a few external services, but it also has "+a +mx," which I haven't encountered before. I'm looking for clarification on why these entries might be included in the SPF record. This setup is for a Microsoft 365 client using Sophos, and they have valid includes for external senders. Can anyone explain the purpose of having +a and +mx in the SPF record and why someone might have added them?
5 Answers
The "+a" mechanism allows any IP that resolves from the A record of your domain to send emails. Similarly, "+mx" covers any IPs that come from the MX records. This is especially useful for smaller domains with basic web and email hosting setups, where they rely mainly on those IPs for sending emails.
If anyone's interested in checking SPF records, there are some helpful validity checkers available online. For example, the DMARCian SPF survey tool can provide insights into how SPF records are configured.
To clarify further, when you check the A record using a command like `host domain.com`, you're identifying the IP for that domain. In the past, it was typical for both the website and email services to run off the same IP, hence the relevance of including these types in SPF records. These days, with sophisticated hosting solutions, it’s somewhat outdated.
The "+a" and "+mx" entries in an SPF record are used to authorize the IP addresses associated with the A and MX records of your domain to send emails. This was more common in the past, especially for on-premises mail servers that handled both sending and receiving mail from the same network. Nowadays, with many hosted services managing emails, it’s less relevant.
Imagine a simple setup: if your domain has A and MX records pointing to hosts that send and receive mail, then it makes sense to include these in the SPF. It's straightforward and requires little maintenance, which is optimal for smaller environments not heavily reliant on cloud services.

Exactly! Older setups would commonly link their web hosting IPs with their email delivery, hence the use of these records. It's more about keeping things manageable for small operations.