SPF, DKIM and DMARC explained
Mailbox providers decide within milliseconds whether a message really comes from the domain in the From line. Three DNS records answer that question: SPF, DKIM and DMARC. Since 2024 Gmail and Yahoo require all three for anyone sending in bulk, and most other providers follow the same logic.
SPF: who may send
SPF (Sender Policy Framework) is a TXT record on your domain that lists the servers allowed to send mail for it. The receiver looks at the IP that connected, then at the domain in the envelope sender (the return-path), and checks whether the IP is on that domain’s list.
example.com. TXT "v=spf1 include:_spf.sendtrix.net include:_spf.google.com ~all"
- One record per domain. Two v=spf1 records make SPF fail entirely.
- Ten DNS lookups at most. Every include, a, mx, exists and redirect counts, including the ones inside includes.
- End with ~all or -all. Never +all, which authorises the whole internet.
Because SPF checks the return-path domain, not the visible From, SendTrix gives each sending domain a branded return-path (for example bounce.mail.example.com) so SPF aligns with your domain for DMARC.
DKIM: a signature on every message
DKIM (DomainKeys Identified Mail) adds a cryptographic signature to the headers of each message. The public key sits in DNS under a selector; the receiver fetches it and checks that the signed headers and body were not changed.
st202612._domainkey.mail.example.com. TXT "v=DKIM1; k=rsa; p=MIIBIjANBg..."
- Use 2048-bit keys.
- Rotate keys yearly: publish a new selector, switch, then revoke the old one.
- SendTrix signs every message twice: with your domain’s key, and with an account identity key, which keeps reputation steady when IPs change.
DMARC: the policy that ties them together
DMARC tells receivers what to do when a message fails both SPF and DKIM alignment, and where to send reports. Alignment means the domain that passed SPF or DKIM matches the visible From domain (or its parent, with relaxed alignment).
_dmarc.example.com. TXT "v=DMARC1; p=none; rua=mailto:[email protected]; adkim=r; aspf=r"
Rolling out DMARC safely
- Publish p=none with a rua address and collect reports for two to four weeks.
- Find every service sending as your domain (CRM, helpdesk, billing) and authenticate it.
- Move to p=quarantine, optionally with pct=25, then 100.
- When reports are clean, move to p=reject.
BIMI and beyond
With DMARC at quarantine or reject you can publish BIMI to show your logo in supporting inboxes. Some providers require a Verified Mark Certificate for that.
Check your setup
Use our free SPF, DKIM and DMARC checkers. Inside SendTrix, Send readiness checks all records plus the route each domain sends on, and DNS is re-checked every 5 minutes.