All tools

SPF checker

The SPF record, its include tree and the limit of 10 DNS lookups. Optionally test an IP.

Guide: SPF checker

SPF (Sender Policy Framework) is a TXT record on your domain listing the servers and services allowed to send mail as that domain. Receivers compare the sending IP with this list.

The end of the record says what to do with other servers: -all means reject, ~all means mark as suspicious. A record may need at most 10 DNS lookups (include, a, mx, ptr, exists, redirect); more makes SPF fail.

Common mistakes

Questions

-all or ~all?

Use -all once every sender is listed. With DMARC at p=reject, ~all is fine because DMARC makes the final decision.

How do I stay under 10 lookups?

Remove unused includes, use ip4 instead of a and mx, and write fixed providers' IP ranges directly.

Is SPF enough on its own?

No. SPF breaks when mail is forwarded; set up DKIM and DMARC as well.