SPF, DKIM & DMARC
Check SPF (with a lookup-count tree), discover DKIM keys, read the DMARC policy and see MTA-STS, TLS-RPT and BIMI, with a grade and the fixes that matter.
The three records that stop spoofing
- SPF: a TXT record at the domain, starting
v=spf1, listing the servers allowed to send its mail. It may trigger at most 10 DNS lookups (include,a,mx,ptr,exists,redirect); more than that is a permanent error and SPF fails for everyone. MtrXTools shows the lookup tree so you can see which include uses them up. - DKIM: a cryptographic signature on each message. The public key lives at
selector._domainkey.example.com. Selectors can't be listed, so MtrXTools tries the common ones (Google, Microsoft 365, Zoho, Mailjet and others) and any you add. - DMARC: a TXT record at
_dmarc.example.comthat tells receivers what to do when a message fails:p=none(monitor),quarantine(spam folder) orreject. A message passes DMARC when SPF or DKIM passes for a domain that matches the visible From address.
How the grade works
Out of 100 points, the largest share goes to an enforced DMARC policy (reject 30, quarantine 22, none 5) and a valid DKIM key (25). The rest covers a valid SPF record within the lookup limit and ending in -all or ~all, a DMARC record, and a rua address for reports. A+ needs 95.
Getting to p=reject safely
- Publish
v=DMARC1; p=none; rua=mailto:dmarc@example.comand collect reports for two to four weeks. - Open the reports in the DMARC report analyser and fix every legitimate sender that fails: add it to SPF, or turn on DKIM signing in that service.
- Move to
p=quarantine, watch for a week or two, thenp=reject.
The extras
MTA-STS and TLS-RPT make other servers deliver to you over verified TLS and report failures. BIMI shows your logo in supporting inboxes once DMARC is at quarantine or reject.
Example records
- SPF for Google Workspace plus one other service:
v=spf1 include:_spf.google.com include:servers.mcsv.net -all - DMARC while monitoring:
v=DMARC1; p=none; rua=mailto:dmarc@example.com - DMARC fully enforced, subdomains included:
v=DMARC1; p=reject; sp=reject; rua=mailto:dmarc@example.com - A domain that never sends mail: SPF
v=spf1 -alland DMARCv=DMARC1; p=reject.
Questions
- Do Gmail and Microsoft require this?
- Yes for bulk senders. Since 2024 Gmail and Yahoo require SPF, DKIM and a DMARC record from anyone sending more than 5,000 messages a day, and Outlook.com added the same rule in May 2025. Smaller senders get junked or rejected far less often with all three in place.
- Why can't MtrXTools find my DKIM key?
- Your provider uses a selector that isn't on the common list. Open a message you sent, find the
s=value in its DKIM-Signature header (the Email header analyser shows it), and enter it in the DKIM selectors box. - How do I fix "too many DNS lookups" in SPF?
- Remove includes for services you no longer use, replace an include with the service's IP ranges where it publishes stable ones, or move some senders to a subdomain with its own SPF record.
- My domain doesn't send email. Do I need any of this?
- Yes, because spammers spoof unused domains too. Publish
v=spf1 -all, a DMARC record withp=reject, and optionally a null MX record (0 .) to say the domain accepts no mail.
Related tools
- SPF & DMARC record builderBuild SPF and DMARC records, with a live DNS lookup count.
- MTA-STS & TLS-RPTIs mail to your domain forced over TLS, and does the policy cover every MX?
- BIMI checkerWill inboxes show your logo? Record, SVG, mark certificate and DMARC.
- DMARC report analyserWho sends as your domain, and what fails.
- Email header analyserPaste raw headers; see each hop and the verdicts.
- DNS lookupAny record type, from any resolver or the authoritative servers.
- Status badgesLive TLS, DMARC, IPv6 and custom badges from any API.
- Error explainerPaste an error; get the cause, the fix and the right check.
Errors this tool helps with
- 550 5.7.26 Unauthenticated email is not accepted · Gmail rejected mail that failed DMARC
- 550 5.7.1 Relaying denied / Message rejected · The receiving server refused the message on policy grounds
- 421 4.7.0 Try again later · Temporarily deferred by the receiving server
- 550 5.7.515 Access denied, sending domain does not meet the required authentication level · Outlook.com rejected unauthenticated bulk mail
- 550 5.7.23 SPF validation failed · The message failed the SPF check
- 550 5.7.509 Access denied, sending domain does not pass DMARC verification and has a DMARC policy of reject · Microsoft 365 rejected mail that failed DMARC
- 421 4.7.28 Our system has detected an unusual rate of unsolicited mail originating from your IP address · Gmail is rate limiting mail from your IP
- 550 5.7.1 Our system has detected that this message is likely unsolicited mail · Gmail blocked the message as spam
- 421 4.7.26 This mail has been rate limited because it is unauthenticated · Gmail deferred mail that passed neither SPF nor DKIM
- 421 4.7.27 Your email has been rate limited because SPF authentication didn't pass for this message · Gmail deferred or blocked mail that failed SPF