Unauthenticated email is not accepted due to domain's DMARC policy (550 5.7.26): SPF passes, but DMARC fails
What does the rejection look like?
A message to a Gmail address does not arrive; the sending server gets a rejection. Google’s SMTP error list has the case under 550 and 5.7.26 (domain-name replaced by example.com; code and text sit in separate columns, the line is assembled):
550 5.7.26 Unauthenticated email from example.com is not accepted due to domain's DMARC policy. Contact the administrator of example.com domain if this was legitimate email.
Two more messages under 5.7.26 (unauthenticated sender; SPF hard fail with -all) are different cases.
And on Microsoft 365?
On Microsoft 365 and Exchange Online it is 5.7.509 (list of non-delivery reports):
5.7.509 Access denied, sending domain [example.com] does not pass DMARC verification and has a DMARC policy of reject.
SPF passes - so why is the mail rejected?
You check SPF: the record is there, the header says spf=pass. You conclude DMARC is fine and the rejection a mistake by the receiver. That is wrong: DMARC does not ask whether SPF passes, but whether it passes for the From-header domain the recipient sees.
A newsletter, CRM or ticketing service sends with your address in the From header but uses a domain of its own as the envelope-from (also called the return path), e.g. bounces.service.example. SPF is checked against that domain and passes. That says nothing about your domain; your own SPF record is not even queried.
DKIM has the same mix-up: the signature is valid, but d= names the service’s domain, not yours.
What does DMARC actually require?
Under RFC 7489, section 3.1, DKIM authenticates the domain that attached the signature, and SPF authenticates the domain in the envelope-from (MAIL FROM) or in HELO. The RFC notes: "These may be different domains, and they are typically not visible to the end user."
DMARC adds that the RFC5322.From domain must match (be aligned with) one of those authenticated domains.
DMARC passes (section 4.2) if at least one of the two mechanisms produces a pass and bases that result on an aligned domain. In the default relaxed mode both domains must share an organizational domain, in strict mode be identical.
Why does the receiver reject, then?
For the service above, SPF and DKIM pass for the service’s domain; nothing is aligned. Under p=none the receiver need not reject anything, as that policy requests no specific action. p=reject asks receivers to reject such mail, and the RFC expects the rejection during the SMTP transaction.
How do I find the cause?
What does the record say?
dig +short TXT _dmarc.example.com
Example (constructed):
"v=DMARC1; p=reject; rua=mailto:dmarc@example.com"
Read p (policy), rua (where reports go), adkim and aspf. If the last two are absent, RFC 7489 defaults to r, relaxed.
What does the header say?
A rejected message has no header at the receiving end, so check a delivered test message from the same service: to a mailbox of your own that accepts it despite dmarc=fail, or with a sender address on a test subdomain that has its own p=none record (RFC 7489, 6.6.3: the From domain is queried first).
In Gmail: More, Show original. Look for Authentication-Results; a constructed example after RFC 8601:
Authentication-Results: mx.example.net;
dkim=pass header.d=service.example header.i=@service.example;
spf=pass smtp.mailfrom=bounces.service.example;
dmarc=fail header.from=example.com
smtp.mailfrom is the domain SPF was checked against, header.d the domain of the DKIM signature (header.i the signer’s identity), header.from the domain DMARC refers to. If neither smtp.mailfrom nor header.d fits header.from, the line says dmarc=fail although SPF and DKIM say pass.
What does the aggregate report show?
Reports only arrive if the record carries a rua= (RFC 7489, 7.2). The report is XML, as .xml, .xml.gz or .zip, depending on the sender:
gunzip -c report.xml.gz | xmllint --format -
unzip -p report.zip | xmllint --format -
A <record> groups messages evaluated alike, <count> is their number (constructed example, documentation values):
<record>
<row>
<source_ip>203.0.113.7</source_ip>
<count>12</count>
<policy_evaluated>
<disposition>reject</disposition>
<dkim>fail</dkim>
<spf>fail</spf>
</policy_evaluated>
</row>
<identifiers>
<envelope_from>bounces.service.example</envelope_from>
<header_from>example.com</header_from>
</identifiers>
<auth_results>
<dkim><domain>service.example</domain><result>pass</result></dkim>
<spf><domain>bounces.service.example</domain><scope>mfrom</scope><result>pass</result></spf>
</auth_results>
</record>
How does the report show the misalignment?
In the RFC’s schema (Appendix C), policy_evaluated holds the results after DMARC has been applied, while auth_results holds DKIM and SPF "uninterpreted with respect to DMARC". For DKIM, a pass in auth_results next to a fail in policy_evaluated means the signature passes but is not aligned.
For SPF, each entry in auth_results can carry a scope. Under RFC 9990, section 3.1.1.13, DMARC uses only the MAIL FROM identity, and mfrom is the only valid value. Its predecessor RFC 7489 (Appendix C) required the element and also allowed helo. So if a report shows a pass with helo, it does not show a passed MAIL FROM check.
How do I fix it?
Aligning one of the two mechanisms is enough.
How do I have DKIM sign with my own domain?
Register your own domain for signing in the sending service; it gives you a selector and target values to publish in DNS under selector._domainkey.<your-domain>, as a CNAME or a TXT record. Under RFC 6376 every DKIM key lives in a _domainkey subdomain, queried as selector._domainkey.domain. Example (target value from your service):
s1._domainkey.example.com. CNAME s1.domainkey.service.example.
After that the service signs with d=example.com, and the signature is aligned.
How do I align SPF with a return-path domain of my own?
You can do this instead of DKIM or in addition to it. The service can use a subdomain of yours as envelope-from, such as bounce.example.com, pointing to it in DNS. In relaxed mode it is aligned, as it shares the organizational domain (RFC 7489, section 3.1.2).
Alignment alone is not enough: under section 4.2 SPF must pass too. The subdomain therefore needs an SPF answer permitting the service’s servers, usually via a CNAME to its bounce domain or a TXT record as the service specifies.
What if adkim or aspf is set to strict?
If your record says s for strict, a subdomain is not enough: go back to the default r or use exactly the same domain.
When do I tighten the policy?
Only after observing. Google’s admin help recommends starting with p=none, collecting reports through rua and raising the policy over time to quarantine (or reject) - that concerns the rollout. Turning an existing p=reject back to p=none ends the rejections but removes the protection: a stopgap, not a fix.
How do I check that it worked?
Send a new test message through the service: the header must say dmarc=pass.
Then wait for an aggregate report whose period (date_range, Appendix C) lies entirely after the fix and DNS change: reports typically arrive daily (Google: "daily report"), and one that begins earlier still contains failures from before.
In it, check all records for the service’s source IPs: in each, dkim or spf in policy_evaluated must be pass. A fail record’s count shows how many messages are still affected.
Can a tool help?
The steps above work with dig, gunzip, unzip, xmllint and a text editor. To avoid reading the aggregate report by hand, use our tool DMARC RUA Report Viewer: it shows the SPF and DKIM evaluation per source IP in its aligned form and opens the raw values behind it. It reads .xml, .xml.gz and .zip, runs entirely in the browser without an upload, and does not resolve source IP addresses.