Diagnosing a DMARC failure when both SPF and DKIM pass

A billing message can show [email protected] in the From field while its relay uses [email protected] as the envelope sender and example.net as the DKIM signing domain. In this synthetic example from Ramesh Choudhary, CEO of Sarv, the receiver reports spf=pass, dkim=pass and dmarc=fail. Both passes are valid, but neither authenticates a domain aligned with example.com.

DMARC needs only one aligned pass. Under RFC 9989, the receiver compares the visible From domain with the domain authenticated by SPF or by a valid DKIM signature. The useful diagnostic question is not just whether a check passed, but which domain passed it.

Compare the domains in a trusted header

Send a test message to a mailbox you administer and open its raw headers. Use the Authentication-Results field added by a service the receiver trusts, as described in RFC 8601. Compare the From domain with the domain in smtp.mailfrom for SPF and the header.d value for each passing DKIM signature.

In the billing example, changing only the relay’s signing domain from example.net to example.com is enough to change the outcome. Verify the signing selector, then send another message along the same route to the same receiver. If the new signature passes, it authenticates the exact From domain. DMARC now passes through DKIM even though SPF still authenticates relay.example.net.

An exact match is required under strict alignment. Relaxed alignment compares organizational domains as determined by the receiver, so a valid signature from mail.example.com can align with a From domain of example.com. Check adkim for the DKIM alignment mode and aspf for the SPF mode. If the receiver reports a temporary error, check its DNS or evaluation logs and repeat the test rather than treating the error as an alignment failure.

Separate forwarding from changes to the message

Forwarding can change the connecting IP, causing SPF to fail even when the envelope sender stays the same. A DKIM signature can survive that change if the signed content remains intact. Choudhary’s offline test used reserved IP addresses and a temporary signing key. The SPF and DKIM columns below are test results; the DMARC column shows the expected outcome given an applicable policy and exact alignment for each passing identity.

Delivery path SPF DKIM Expected DMARC result
Direct, unchanged Pass Pass Pass through either method
Forwarded, unchanged Fail Pass Pass through DKIM
Forwarded, footer added after signing Fail Fail Fail
Direct, footer added after signing Pass Fail Pass through SPF

A forwarder can also rewrite the envelope sender. In that case SPF may pass for the forwarder’s domain without aligning with the original From domain, a scenario described in RFC 7960.

Confirm the change in aggregate reports

In the aggregate reports defined by RFC 9990, auth_results records authentication results, while the SPF and DKIM fields under row/policy_evaluated record alignment. Compare the same reporting organization, policy domain, sending IP and From domain across reporting windows.

In Choudhary’s synthetic report, all 12 messages in the 8 November UTC window passed raw SPF and DKIM checks, but neither domain aligned and the reported disposition was quarantine. In the 9 November UTC window, all nine messages again passed both raw checks. This time the DKIM signing domain was example.com, so DMARC passed through DKIM alone.

Keep the trusted header, authenticated domains, policy domain, route and test time together when comparing results. Delivery alone is not proof of a pass: a policy of p=none still permits alignment evaluation, and the receiver’s final handling decision is separate from the published policy.