Email was designed without sender verification. SPF, DKIM and DMARC bolt it on through DNS, and together they decide whether a criminal can send mail that appears to come from your domain.
SPF — who may send
SPF is a TXT record listing the servers allowed to send mail for your domain.
example.com. TXT "v=spf1 include:spf.protection.outlook.com -all"
Common mistakes:
- More than 10 DNS lookups. Every
include,a,mx,ptr,existsandredirectcounts, including nested ones. Exceeding 10 causes a permerror and SPF fails entirely. - Multiple SPF records. Only one
v=spf1record is allowed per name. - Ending in
+allor?all, which authorises the whole internet.
DKIM — was the message altered
DKIM signs outgoing messages with a private key; the public key is published at selector._domainkey.example.com. Microsoft 365 uses selector1 and selector2; Google Workspace uses google by default.
DMARC — what to do on failure
DMARC ties SPF and DKIM to the visible From domain (alignment) and tells receivers what to do when both fail.
_dmarc.example.com. TXT "v=DMARC1; p=reject; rua=mailto:dmarc@example.com"
A safe rollout path
- Publish
p=nonewith aruaaddress and collect aggregate reports for a few weeks. - Fix every legitimate sender that fails alignment.
- Move to
p=quarantine, optionally withpctto ramp up. - Finish at
p=reject.
Run our free Email security check to grade your domain in seconds.