Troubleshoot SPF, DKIM, and DMARC Failures in Exchange Online
Guide tools
Before You Start
Use the original message or securely exported headers, the known sender, and message trace access where available. Use an approved test mailbox to repeat the exact mail path. The example DNS names are placeholders.
Troubleshooting Steps
Establish the trusted receiving hop
Start hereCapture the UTC time, Internet Message-ID, actual sender, and recipients. From the original message, identify Authentication-Results added by the trusted receiving system. Upstream or sender-supplied copies can differ. Correlate message trace when the message was redirected or quarantined.
Map SPF, DKIM, and DMARC to domains
Compare smtp.mailfrom with header.from for SPF and header.d with header.from for DKIM. DMARC needs at least one successful aligned result. Alignment depends on policy and may allow the same organizational domain. This illustrative header passes SPF for a vendor domain but fails DMARC because the From domain differs and there is no DKIM pass.
Authentication-Results: mx.receiver.example; spf=pass smtp.mailfrom=bounces.vendor.example; dkim=none; dmarc=fail header.from=example.comVerify the published DNS records
Query the actual envelope domain for SPF, From domain for DMARC, and selector plus signing domain from the DKIM-Signature header. DKIM can use a TXT record directly or a CNAME to a provider-managed selector. Follow the alias when present.
Resolve-DnsName -Name 'example.com' -Type TXT -DnsOnlyResolve-DnsName -Name '_dmarc.example.com' -Type TXT -DnsOnlyResolve-DnsName -Name 'selector1._domainkey.example.com' -Type TXT -DnsOnlyCompare direct and relayed paths
Send an approved test through the expected path and compare with a direct test where appropriate. Forwarding can change the connecting IP used by SPF, and message modification can invalidate DKIM. Read Microsoftβs composite authentication result separately. It does not establish whether the message is legitimate by itself.
Fix the confirmed sender or gateway configuration
Have the sender owner configure an aligned signing domain or supported envelope domain. Coordinate with the gateway owner if modification breaks signatures. Save existing DNS records before changes and account for TTL and cache delays. Avoid adding a second SPF policy to a domain.
Verify a fresh message and the delivery decision
VerifySend a new test through the same route after propagation. Confirm the intended aligned pass in the receiving header and follow the message trace to verify its disposition. If an approved change breaks another sender, restore the recorded settings through the domain owner.
References
Your feedback keeps these production procedures accurate and battle-tested.