
How SPF works
A receiving server takes the domain from the envelope sender, reads its SPF record and checks whether the sending IP is on the list. Mechanisms ip4 and ip6 list addresses, include pulls in the record of a mail service, and the final all rule decides what happens to everyone else.
Each include, a, mx, ptr, exists and redirect costs one DNS lookup, and nested includes count too. Past 10 lookups the check stops with an error, and mail from the domain fails SPF even from allowed servers.
When you need it
- Check the sender domain before a mail campaign
- Find out why mail from a new service lands in spam
- Clean up a record that grew past 10 lookups after you added services