Ran into this today and figured I’d share since it caught us off guard.
Symptom: Users replying to external Hotmail/Outlook.com addresses got an NDR. The NDR itself said 550 5.7.23 SPF validation error, which sent me down the wrong path at first.
What I checked:
SPF record: v=spf1 include:spf.protection.outlook.com -all. Single record, correct, and the same on public DNS (8.8.8.8).
No outbound connectors or smart hosts in EAC. Mail goes straight out of EXO.
“From IP” in message trace was just the user’s client IP, so nothing weird there.
Actual cause (from Message Trace, not the NDR):
550 5.7.1 Message rejected: Message lacks SPF/DKIM/DMARC Auth Records
Our domain had SPF only, with no DKIM and no DMARC. Outlook.com is now enforcing all three. Comparing with a couple of other government agencies on the same platform, they all had DMARC published; we didn’t.
Fix (in progress):
Generated DKIM keys in Defender portal (Email authentication settings → DKIM). Note the new CNAME format: selector1-<domain>._domainkey.<tenant>.q-v1.dkim.mail.microsoft
Requested DNS provider to add both DKIM CNAMEs + DMARC TXT record
Created a shared mailbox for DMARC aggregate reports (rua)
Enable DKIM signing once CNAMEs propagate
Lessons:
Check Message Trace, not just the NDR. The NDR said SPF; the trace showed the real reason.
If you’ve been running M365 for years with “just SPF”, go check your DKIM/DMARC now before users start complaining.
Quick PowerShell check I used to compare domains:
powershell
$domains = "yourdomain.com","otherdomain.com"
foreach ($d in $domains) {
$spf = (Resolve-DnsName $d -Type TXT -Server 8.8.8.8 -EA SilentlyContinue | ? {$_.Strings -like "v=spf1*"}).Strings
$dmarc = (Resolve-DnsName "_dmarc.$d" -Type TXT -Server 8.8.8.8 -EA SilentlyContinue).Strings
$dkim = (Resolve-DnsName "selector1._domainkey.$d" -Type CNAME -Server 8.8.8.8 -EA SilentlyContinue).NameHost
[pscustomobject]@{Domain=$d; SPF=[bool]$spf; DKIM=[bool]$dkim; DMARC=[bool]$dmarc}
}
Will update once DNS is in and I’ve confirmed delivery. Question for others: did you go straight to p=quarantine or start at p=none?