SPF passes but DMARC fails

Quick fix

Turn on DKIM signing with your own domain in the sending service: an aligned DKIM pass is enough for DMARC. If the service supports it, also set a custom bounce (Return-Path) domain under your domain.

How to fix it

  1. Turn on DKIM signing with your own domain in the sending service. An aligned DKIM pass is enough for DMARC and survives forwarding better than SPF.
  2. If the service supports it, set a custom bounce (Return-Path) domain such as bounces.example.com, so SPF passes for a domain that aligns.
  3. Keep relaxed alignment (leave out aspf and adkim) unless you have a reason for strict.
  4. Read the DMARC aggregate reports to find each source that passes SPF without alignment.

Learn more: DMARC explained: policy, alignment and reports

How to check

The DMARC check shows the DMARC record that applies to the From domain and its tags. Then compare the smtp.mailfrom and header.d domains in a failing message's Authentication-Results header with the From domain.

The DMARC check opens with your domain filled in; it runs when you press Check.

Tools to check it

What the error means

SPF passes but DMARC fails because DMARC does not ask whether SPF passed. It asks whether SPF passed for a domain that matches the From address. SPF checks the envelope sender (MAIL FROM, shown as Return-Path), and most email services use their own bounce domain there. SPF then passes for their domain, not yours, and DMARC fails unless DKIM passes for your domain.

RFC 9989 section 4.4.2: "DMARC relies solely on SPF validation of the MAIL FROM identity." and "Only an SPF-Authenticated Identifier that has Identifier Alignment with the Author Domain is enough to validate the authorized use of the Author Domain." The Author Domain is the domain in the From header. The same rule applies to the DKIM d= domain (section 4.4.1). DMARC passes if either SPF or DKIM passes with alignment.

Authenticated domainFrom domainAlignment
bounces.example.comexample.comRelaxed: same organizational domain
example.comexample.comStrict: identical
mail.esp.example.netexample.comNone: SPF passes, DMARC fails

Relaxed alignment is the default; aspf=s or adkim=s in the DMARC record demand strict alignment, so a subdomain no longer counts. In the Authentication-Results header you see spf=pass smtp.mailfrom=... next to dmarc=fail header.from=... with two different domains.

Sources

All findings