Microsoft 365 / Outlook

Microsoft 365 error 5.7.23 — SPF validation failed

550 5.7.23

Microsoft's own guidance for this code points specifically to an SPF configuration issue in the sending organization's Microsoft 365 setup — most often a missing or incorrect SPF include for Microsoft's own sending infrastructure, or a record that doesn't cover the actual sending path.

How to fix it

  1. 1

    Verify your SPF record includes Microsoft's range

    For Microsoft 365 mail flow, your SPF record needs include:spf.protection.outlook.com. Check with the SPF checker.

  2. 2

    Check for a second SPF record

    A domain migrated onto Microsoft 365 sometimes ends up with a leftover SPF record from a previous provider — a domain can only have one, and two makes SPF fail entirely.

  3. 3

    Confirm the sending path matches

    If mail is relayed through a third-party service before or after Microsoft 365, that service's IPs or include also need to be in the same SPF record.

Meaning current as of 2026-07-14, cross-checked against the provider's own documentation. Providers do occasionally redefine codes — if this doesn't match what you're seeing, the source link is the authoritative reference.

Common questions

I have SPF set up — why is this still failing?+

Check for exactly what's published, not just that something is published: a stale record from before migrating to Microsoft 365, a typo in the include, or a second competing SPF record are all common and each looks like "SPF is fine" at a glance.

More free checks