On this page
- Find out which check failed
- Error messages: cause and fix
- Rejections from Gmail and Microsoft
- Failures in headers, checkers and reports
- Per-service gotchas: SendGrid, Amazon SES, Mailgun, Postmark, Resend and Mailtrap
- Fixes at your DNS host: records that don't show up
- After the fix: confirm it worked and keep watching
- FAQ
Fix SPF, DKIM and DMARC Failures
A DMARC failure means neither SPF nor DKIM passed with a domain aligned to your From domain, so check the message's Authentication-Results header to see which of the two failed and why, then fix that record or the sending service that signs the mail.
You have an error message, a failing line in a header or a checker warning, and you want the cause and the fix. The tables below go from message to cause to fix, and each row links to the page that explains the concept. Start with the first section to find out which check failed; it saves you guessing.
Key takeaways
- Read the
Authentication-Resultsheader first. It tells you whether SPF, DKIM or alignment is the problem, and the fix differs for each. - "DMARC policy not enabled" and "No DMARC record found" are messages from DMARC checkers, not SMTP errors. The main rejections are Gmail's 5.7.26 and Microsoft's 5.7.509 and 5.7.515.
- SPF permerror has two usual causes: more than 10 DNS lookups, or more than one SPF record.
- SPF and DKIM can both pass while DMARC fails. That is an alignment problem: they authenticated the service's domain, not yours.
- Most per-service failures come from the same few things: an unverified domain, a default return path, a proxied CNAME or a DNS host that appends the domain.
Find out which check failed
To find out why DMARC failed, look at three places: the Authentication-Results header of a received message, the SMTP bounce text, and your DMARC aggregate reports. The header is the quickest.
- The header. The
Authentication-Resultsfield (RFC 8601) listsspf=,dkim=anddmarc=results with the domains checked:smtp.mailfromfor SPF,header.dfor DKIM andheader.fromfor DMARC. In Gmail, open the message, choose More, then Show original (Gmail Help), and paste the header into Google's Messageheader tool if you want it parsed. - The bounce text. A rejection carries an SMTP code and a sentence. The table below translates the ones Google and Microsoft document.
- Aggregate reports. They show failing sources over a whole day, not one message. See DMARC reports.
Example for example.com (synthetic header, not from a real message):
Authentication-Results: mx.example.net;
spf=permerror smtp.mailfrom=bounce.example.com;
dkim=pass header.d=example.com header.s=s1;
dmarc=pass header.from=example.com
A three-line rule for reading it:
spf=is notpass: go to the SPF rows. If DKIM aligns, DMARC can still pass.dkim=is notpass: go to the DKIM rows. If SPF aligns, DMARC can still pass.- Both
passbutdmarc=fail: go to the alignment row.
In the example above, SPF has a permerror but DKIM passes and aligns, so DMARC passes. Fix the SPF problem anyway, because Google and Yahoo ask bulk senders for both.
Error messages: cause and fix
Each error below has a cause and a fix. The first table has the SMTP rejections that Google and Microsoft publish; the second has the results you see in headers, checkers and reports. Error strings are quoted as published, checked November 2026.
Rejections from Gmail and Microsoft
| SMTP error | What the receiver says | Cause | Fix |
|---|---|---|---|
| Gmail 550 5.7.26 | "This email has been blocked because the sender is unauthenticated. Gmail requires all senders to authenticate with either SPF or DKIM." | Neither SPF nor DKIM passed | Set up and verify SPF or DKIM at your sending service. See what is DKIM and SPF record |
| Gmail 550 5.7.26 (SPF) | "The (E)MAIL FROM domain [domain-name] has an SPF record with a hard fail policy (-all) but it fails to pass SPF checks with the ip: [ip-address]." | Your SPF record ends in -all and the sending IP is not authorised |
Add the service's SPF include or fix the return path; see the per-service table below |
| Gmail 550 5.7.26 (DMARC) | "Unauthenticated email from domain-name is not accepted due to domain's DMARC policy." | The mail failed DMARC and the domain's published policy asked Gmail to refuse it | Make SPF or DKIM pass and align; find the source in your reports. What the policies do: DMARC policy |
| Gmail 451 4.7.26 | "Unauthenticated email from domain-name is not accepted due to domain's DMARC policy, but temporary DNS failures prevent authentication." | Gmail could not finish the check because of a temporary DNS failure | It is a temporary error, so the sender retries. Check that your DNS answers reliably |
| Gmail 421 4.7.26 | "This email has been rate limited because it is unauthenticated. Gmail requires all senders to authenticate with either SPF or DKIM." | Same as 5.7.26, applied as a temporary limit | Same fix as 5.7.26 |
| Gmail 5.7.27 | "This message was blocked because it didn't pass SPF authentication. Gmail requires bulk email senders to authenticate their email with SPF." (4.7.27 is the rate-limited version) | SPF did not pass for a bulk sender | Add the sending service to SPF, or use its custom return path |
| Gmail 5.7.25 and 4.7.23 | 5.7.25: "This message was blocked because the sending IP address doesn't have a PTR record". 4.7.23: the same cause, "temporarily rate limited" | The sending IP has no reverse DNS (PTR) record. This is not an SPF, DKIM or DMARC check | Set a PTR record for the sending IP. On a service's shared IPs the service owns the IP, so contact its support |
| Microsoft 550 5.7.509 | "Access denied, sending domain [$SenderDomain] does not pass DMARC verification and has a DMARC policy of reject." | The domain in the 5322.From address doesn't pass DMARC and the policy is p=reject |
Make SPF or DKIM pass and align for that source |
| Microsoft 550 5.7.515 | "Access denied, sending domain [SendingDomain] does not meet the required authentication level." | Outlook.com's rule for senders of more than 5,000 messages a day: SPF and DKIM must pass, and DMARC must be at least p=none and align. Rejected since May 5, 2025 |
Set up SPF, DKIM and a DMARC record with aligned results; see how to set up DMARC |
Sources: Google's SMTP error reference and sender requirements FAQ; Microsoft's Exchange Online NDR table, 5.7.515 support article and high-volume sender announcement. Google and Microsoft document other authentication codes too; these are the ones we verified. Yahoo documents only a generic 553 or 554 for failed DMARC or DKIM checks (Yahoo SMTP error codes), so no Yahoo row.
Failures in headers, checkers and reports
The wordings in this table are descriptions and checker labels, not fixed SMTP strings: receivers and tools word them differently.
| Message or symptom | Cause | Fix | Owner page |
|---|---|---|---|
dmarc=fail in the header |
Neither SPF nor DKIM passed with a domain aligned to the From domain | Find which check failed (section above), then use the matching row | SPF, DKIM and DMARC explained |
| "DMARC policy not enabled" | A message from DMARC checkers, not an SMTP error. It means the checker found no DMARC record, or a record that doesn't ask for quarantine or reject |
Publish a record if there is none, read your reports, then move toward quarantine and reject. It is a warning, not a delivery failure |
DMARC policy, How to set up DMARC |
| "No DMARC record found" | A message from DMARC checkers, not an SMTP error. The checker found no TXT record at _dmarc.yourdomain.com: wrong host, record on a different domain, not published yet or DNS not propagated |
Publish one record at the _dmarc host, then query it again |
How to set up DMARC, DMARC record |
Two DMARC records, or a record that does not start with v=DMARC1 |
A record whose v tag is missing or not first is ignored (RFC 9989, section 4.7); if more than one DMARC record is returned, all are discarded (section 4.10) |
Keep one record, with v=DMARC1 first and semicolons between tags |
DMARC record |
spf=permerror, too many DNS lookups |
include, a, mx, ptr, exists and redirect count toward a limit of 10 DNS lookups; past it, SPF returns permerror (RFC 7208, section 4.6.4) |
Remove includes for services you no longer use; reduce the rest | SPF record |
spf=permerror, more than one SPF record |
A domain must not have multiple SPF records that would be selected for one check (RFC 7208, section 3.2) | Merge all include: entries into a single v=spf1 record |
SPF record |
spf=softfail or spf=fail |
The sending IP is not authorised. ~all gives softfail, "a weak statement" that the host is probably not authorized; -all gives fail (RFC 7208) |
Add the service's include or use its custom return path. A softfail alone does not fail DMARC if DKIM passes and aligns | SPF record |
spf=none or a missing SPF record |
The domain checked has no SPF record. Often the return-path domain, not your From domain | Publish SPF at the domain the service uses as return path, or set up a custom return path | SPF record |
dkim=fail, body hash mismatch |
The signature includes a hash of the body (bh=, RFC 6376). If the body changes after signing, the hash no longer matches. Usual culprits: a footer added by a gateway, a list or a tracking rewrite |
Find what changes the message after signing and stop it, or make the signing happen after it | What is DKIM |
dkim=fail, signature does not verify, or no key for the selector |
The public key cannot be found or does not match: record missing, wrong selector, truncated TXT value, CNAME not published | Republish the service's DKIM record exactly as shown; check the selector in the s= tag against the host |
What is DKIM |
dkim=fail, key too short |
RFC 8301 requires at least 1024-bit RSA keys and says signers should use 2048; rsa-sha1 must not be used (RFC 8301) |
Generate a 2048-bit key or let the service rotate to one | What is DKIM |
SPF and DKIM both pass, but dmarc=fail |
Alignment. They authenticated the sending service's domain, not yours. DMARC needs the authenticated domain to match the From domain (RFC 9989, section 4.4) | Publish a custom DKIM domain or return path at your domain; the per-service fix is below | SPF, DKIM and DMARC explained |
| Mail passed before, fails after a forward or a mailing list | See the forwarding note under this table | Keep the signature intact; for forwarders you control, consider ARC | What is email authentication |
| A subdomain fails, the parent passes | A subdomain with no record of its own is covered by the parent's record: sp for an existing subdomain, np for a non-existent one, or p if neither is set (RFC 9989, section 4.10.1); or it has its own record |
Check the header.from domain, then the sp tag and any subdomain record |
DMARC record |
| Unknown sources in the reports | A sender you forgot, or someone spoofing your domain | Identify the IP; add legitimate senders to your setup; leave spoofers to enforcement | DMARC reports |
Forwarding sends your message from the forwarder's server, which isn't in your SPF record, so SPF often fails at the final receiver; DKIM signatures usually survive if the message isn't changed (RFC 7208, section 10.3 and Appendix D; RFC 6376). A mailing list that adds a footer breaks the DKIM body hash, and receivers that spot a list can record it in the report's reason as mailing_list (RFC 9990, section 3.1.6). ARC (RFC 8617, an Experimental RFC) lets forwarders pass along the original results; Microsoft documents trusted ARC sealers. The details are on what is email authentication.
Per-service gotchas: SendGrid, Amazon SES, Mailgun, Postmark, Resend and Mailtrap
With services whose default return path or DKIM signature uses the service's own domain (Postmark's default return path, Amazon SES's default MAIL FROM), nothing aligns until you add your own records; SendGrid, Resend, Mailtrap and MailerSend set the return path at your domain as part of setup. The table lists the gotcha from each service's own docs, checked November 2026; "not documented" means we didn't find it. Services appear in our usual order.
| Service | Gotcha | Source |
|---|---|---|
| SendGrid | SPF is covered by the return-path CNAME. If automated security is off, you add include:sendgrid.net yourself. DNS hosts that append the domain or reject underscores break the records |
SendGrid docs |
| Amazon SES | The default MAIL FROM is an amazonses.com subdomain, so SPF is implicit for Amazon's domain; a custom MAIL FROM (1 MX + 1 TXT) is opt-in. DNS hosts that append the domain or reject underscores break the records | Amazon SES docs |
| Mailgun | Only one SPF record per domain: merge include:mailgun.org into your existing record |
Mailgun docs |
| Postmark | A default return path at Postmark's domain means SPF can't align until you set a custom Return-Path CNAME. Strict SPF alignment (aspf=s) can't pass with Postmark's return path on a subdomain |
Postmark docs |
| Resend | Newer domains may get CNAME records instead of MX + TXT. Resend's docs say its CNAME records must not be proxied | Resend docs |
| Mailtrap | The From domain must match the verified domain, and subdomains are verified separately | Mailtrap docs |
| Brevo | CNAME flattening on the DKIM CNAMEs breaks them, per Brevo's docs. A 2048-bit TXT key can exceed 255 characters and must be split at some DNS hosts | Brevo docs |
| Mailjet | Strict SPF alignment (aspf=s) fails with the default return path; a return path at your domain is opt-in on paid plans (a CNAME plus a support ticket). Long DKIM keys must be split into strings |
Mailjet docs |
| MailerSend | Only one SPF record per domain: merge include:_spf.mailersend.net into it |
MailerSend docs |
From each service's own docs and product pages, checked November 2026. "Not documented" means we didn't find it in the vendor's docs. The setup per service is in the master table, and each review has an authentication section. Choosing between services: best transactional email services.
Fixes at your DNS host: records that don't show up
If a record is correct on paper but fails the checker, the DNS host is usually the reason. Check these, in this order:
- The domain appended twice. Some hosts add your domain to whatever you type, so
selector._domainkey.example.combecomesselector._domainkey.example.com.example.com. Enter only the prefix. SendGrid's and Amazon SES's docs warn about hosts that append the domain. - Underscores rejected. Some hosts refuse names that start with an underscore, which blocks
_domainkeyand_dmarc; SendGrid's and Amazon SES's docs warn about this too. - A proxied CNAME. On Cloudflare, Resend's docs say its CNAME records must not be proxied (the orange cloud) and Brevo's say CNAME flattening breaks its DKIM CNAMEs; Cloudflare recommends DNS only for records that don't serve web traffic (Cloudflare).
- Quotes and long values. TXT content is quoted strings. A single string holds up to 255 characters (RFC 7208, section 3.3; Route 53 docs), and a longer value, such as a 2048-bit DKIM key, must be split into strings of 255 or fewer at some hosts; Brevo's and Mailjet's docs say so for DKIM keys. The receiver joins the strings back together.
- Propagation. Changes take time to reach every resolver. Query the record directly before you decide it is wrong.
Per-host steps for Cloudflare, Route 53 and GoDaddy are on how to set up DMARC.
After the fix: confirm it worked and keep watching
Send a fresh message, read the Authentication-Results header again, and watch the next aggregate reports to see that the failing source now passes. Do not move to p=reject until every legitimate source passes and aligns; the plan is on DMARC policy. Reading the reports: DMARC reports.
SPF, DKIM and DMARC failures: FAQ
Why does DMARC fail when SPF and DKIM pass?
Because of alignment. SPF and DKIM can pass for the sending service's domain while the visible From domain is yours, and DMARC needs the authenticated domain to match the From domain. Publish a custom DKIM domain or return path at your domain. See the alignment row.
How do I fix "DMARC policy not enabled"?
It is a message from DMARC checkers, not an SMTP error. It means the checker found no DMARC record, or a record that doesn't ask for quarantine or reject. Nothing is being blocked by it. Publish a record if there is none, read your aggregate reports, fix failing sources, then move toward quarantine and reject. See DMARC policy for the plan.
How do I fix "No DMARC record found"?
Publish one TXT record at _dmarc.yourdomain.com starting with v=DMARC1, then query it again after DNS propagates. Common causes are the wrong host name, a record on a different domain, or two records. See how to set up DMARC.
What does "not accepted due to the domain's DMARC policy" mean?
It is Gmail's 550 5.7.26 DMARC message: unauthenticated mail was refused because of the sending domain's published DMARC policy. Microsoft's equivalent is 550 5.7.509. Make SPF or DKIM pass and align for that source. See DMARC policy.
What does SPF permerror mean?
SPF found an error it cannot recover from. There are two usual causes: the record needs more than 10 DNS lookups, or the domain has more than one SPF record. Remove unused includes in the first case and merge the records in the second. See SPF record.
Why does forwarding break SPF but not always DKIM?
Forwarding sends your message from the forwarder's server, which isn't in your SPF record, so SPF often fails at the final receiver. A DKIM signature travels in the message, so it usually survives if nothing changes the message. A list footer or rewrite breaks it.
What does "DKIM body hash did not verify" mean?
The DKIM signature contains a hash of the message body, and the receiver computed a different hash. Something changed the body after signing, such as a footer added by a gateway or list. Find the change and remove it, or sign after it. See what is DKIM.
What does DMARC stand for?
DMARC stands for Domain-based Message Authentication, Reporting, and Conformance, the title of RFC 9989, the current standard. It is a DNS record that tells receivers what to do with mail that fails DMARC. More in what DMARC is.