DMARC fails but SPF or DKIM passes: alignment explained
Updated 10 November 2026 · 6 min read
Short answer
DMARC passes only when SPF or DKIM passes *and* the domain they passed for aligns with the From address. SPF checks the Return-Path (envelope) domain, DKIM checks the d= domain; under default relaxed alignment they must share the From domain's organisational domain (bounce.acme.com aligns with acme.com), under strict (aspf=s, adkim=s) they must match exactly. So spf=pass for sendgrid.net or dkim=pass for vendor.com does not help a From of acme.com.
Which domain each check uses
| Check | Domain it authenticates | Where to see it |
|---|---|---|
| SPF | Return-Path / MAIL FROM | smtp.mailfrom= in Authentication-Results |
| DKIM | d= in DKIM-Signature | header.d= / header.i= |
| DMARC | compares both with the From domain | header.from= |
Worked examples
| From | SPF passes for | DKIM passes for | Relaxed DMARC | Strict DMARC |
|---|---|---|---|---|
| acme.com | acme.com | - | Pass | Pass |
| acme.com | bounce.acme.com | - | Pass | Fail |
| acme.com | sendgrid.net | acme.com | Pass (via DKIM) | Pass (via DKIM) |
| acme.com | amazonses.com | - | Fail | Fail |
| acme.com | vendor.com | vendor.com | Fail | Fail |
| news.acme.com | - | acme.com | Pass | Fail |
Fixing alignment for third-party senders
- 1
Prefer aligned DKIM
Authenticate your domain in the tool (SendGrid, Mailchimp, HubSpot, Postmark) so it signs with
d=yourdomain.com. DKIM survives forwarding; SPF doesn't. - 2
Add a custom Return-Path where offered
SES custom MAIL FROM, Postmark's
pm_bouncesCNAME and SendGrid'sem####CNAME make SPF pass for a subdomain of yours, which aligns under relaxed mode. - 3
Don't switch to strict without reason
Strict breaks the subdomain return-paths above. Google suggests strict mainly when outside parties manage your subdomains.
- 4
Use reports to find the gaps
DMARC aggregate reports list each source IP with its SPF/DKIM results and alignment; anything failing is a sender to fix or a spoofer.
Gmail's alignment error
When neither check aligns, Gmail can respond 4.7.32 or 5.7.32: the From header isn't aligned with the authenticated SPF or DKIM organisational domain. See Gmail 5.7.32.
Check the result
DNS checks show whether the records exist; alignment shows in each message's Authentication-Results. Run the domain through the free ReplyDak deliverability check: it reads MX, SPF, DKIM and DMARC live from public DNS, counts SPF lookups and checks the main blocklists, with no sign-up. If your DKIM selector is not a common one, type it into the optional selector box.
More setups and errors: SPF, DKIM and DMARC by provider, DNS host and error.
FAQ
Why does DMARC fail when SPF passes?
SPF passed for the Return-Path domain, which is a different organisational domain from your From address, so it isn't aligned.
What is relaxed alignment?
The default: the authenticated domain and the From domain share the same organisational domain, e.g. mail.acme.com and acme.com.
Do I need both SPF and DKIM aligned?
DMARC needs one. Gmail's bulk-sender rules also expect both SPF and DKIM to pass, and aligned DKIM is the more robust of the two.