Skip to content

Troubleshoot SPF, DKIM, and DMARC Failures in Exchange Online

Admin
November 29, 2026
5 min read
Intermediate
πŸ’» Target OS: Microsoft 365 (Exchange Online)
Guide tools
Guide tools
0/0 Steps (0%)

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

01

Establish the trusted receiving hop

Start here

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

02

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.com
03

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

Terminal window
Resolve-DnsName -Name 'example.com' -Type TXT -DnsOnly
Resolve-DnsName -Name '_dmarc.example.com' -Type TXT -DnsOnly
Resolve-DnsName -Name 'selector1._domainkey.example.com' -Type TXT -DnsOnly
04

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

05

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.

06

Verify a fresh message and the delivery decision

Verify

Send 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

Comments