What SPF is
SPF (Sender Policy Framework) is a TXT record that lists the servers allowed to send email for a domain. A receiving mail server looks it up and compares it with the server that delivered the message.
v=spf1 include:_spf.google.com ip4:203.0.113.25 ~all
This one says: allow Google's servers, allow the address 203.0.113.25, and treat mail from anyone else as suspicious.
The parts of an SPF record
| Part | Meaning |
|---|---|
v=spf1 | Marks the record as SPF. It must come first. |
include:name | Also allow whatever that domain's SPF record allows. Used for mail providers. |
ip4: / ip6: | Allow one address or a range. |
a / mx | Allow the servers in the domain's A or MX records. |
-all | Everyone else fails. Receivers may reject the mail. |
~all | Everyone else soft-fails. The mail is accepted but marked. |
+all | Everyone passes. Never use it: it allows the whole internet. |
What this checker flags
- No SPF record. Anyone can send mail claiming to be from the domain.
- More than one SPF record. Receivers treat this as a permanent error, and the check fails for all mail.
- More than 10 lookups. Each
include,a,mx,existsandredirectcosts a DNS lookup. Above 10 the check fails. This tool counts the top level only, and included records add their own. - No
allat the end. The record does not say what to do with other senders. +all. It cancels the protection.