ReplyDak

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

CheckDomain it authenticatesWhere to see it
SPFReturn-Path / MAIL FROMsmtp.mailfrom= in Authentication-Results
DKIMd= in DKIM-Signatureheader.d= / header.i=
DMARCcompares both with the From domainheader.from=

Worked examples

FromSPF passes forDKIM passes forRelaxed DMARCStrict DMARC
acme.comacme.com-PassPass
acme.combounce.acme.com-PassFail
acme.comsendgrid.netacme.comPass (via DKIM)Pass (via DKIM)
acme.comamazonses.com-FailFail
acme.comvendor.comvendor.comFailFail
news.acme.com-acme.comPassFail

Fixing alignment for third-party senders

  1. 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. 2

    Add a custom Return-Path where offered

    SES custom MAIL FROM, Postmark's pm_bounces CNAME and SendGrid's em#### CNAME make SPF pass for a subdomain of yours, which aligns under relaxed mode.

  3. 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. 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.

Sources

Related

Microsoft 365 mailboxes are coming soon. Until then, new orders use Google Workspace mailboxes.