01 · SPF
Which servers may send as you
SPF (Sender Policy Framework) is a single TXT record on your domain listing the servers allowed to send email that uses your domain in the envelope (the hidden “return path” address). Receiving servers check it on every message.
How to fix it
- List every service that sends email as your domain. Your email platform, newsletter tool, donor or client database, website forms, finance and payroll systems. Ask each team; they often signed up on their own.
- Add each service the way it documents. Most give you an
include:to add. Publish exactly one TXT record on the domain itself, startingv=spf1and ending~allor-all. - Keep to one record. Two records starting
v=spf1is an error and receivers treat SPF as broken. Merge them into one. - Stay within ten DNS lookups. Every
include,a,mx,ptr,existsandredirectcounts, including those inside the services you include. Over ten, SPF fails for every message. Remove services you no longer use; for a bulk sender, ask whether it can send from a subdomain such asnews.yourdomain, which has its own record and its own limit. - End with
~allor-all, never+allor?all. Both~all(“soft fail”: treat other servers as suspicious) and-all(“fail”) say that unlisted servers are not authorized. Once DMARC is enforcing, receivers act on DMARC and the difference matters less; the UK NCSC’s own examples use~all. Move to-allonly when you are sure every legitimate sender is listed.+allauthorizes the whole internet. - For a domain that never sends email, publish
v=spf1 -all.
Example records
v=spf1 include:[your email provider’s SPF domain] ~allv=spf1 -all (a domain that sends no email)