Email

Microsoft 365 error 550 5.7.23: the message is rejected for an SPF violation

In short. You send from Microsoft 365 (Exchange Online) and an email bounced with error 550 5.7.23. The recipient's server refused the message because your SPF, the DNS record that lists who may send for your domain, does not allow it. Only your organization's email administrator can fix it. Plan about an hour of checks and changes, then a test email.

550 5.7.23 is the code of a permanent refusal tied to SPF (Sender Policy Framework). Microsoft describes it in the Exchange Online list of non-delivery report codes: the destination email system uses SPF to validate inbound mail, and an issue affects your SPF configuration.

Last verified: November 29, 2026, in Microsoft Learn's official documentation.

The message you receive

The non-delivery report (NDR) sent back to the sender contains:

550 5.7.23 The message was rejected because of Sender Policy Framework violation

The report also contains a Diagnostic information for administrators section: it repeats the original error message received when Microsoft 365 tried to deliver the message to the external server. That is the first place to read.

Who is affected

Organizations that send with Microsoft 365 or Office 365. Microsoft is clear: if you received this report, only an email administrator in your organization can resolve the problem. Give them this text. If you are the administrator, read on.

Expected values

CheckExpected value
SPF of the sending domaina single TXT record, containing include:spf.protection.outlook.com
End of the record-all (recommended by Microsoft for Microsoft 365, together with DKIM and DMARC)
On-premises serverstheir public IP addresses as ip4: or ip6: if they send for the domain
DNS lookups10 at most
Domainsall your domains registered in Microsoft 365

Common case, Microsoft 365 only (public cloud domains):

v=spf1 include:spf.protection.outlook.com -all

According to Microsoft, the value differs for the GCC High and DoD government clouds (include:spf.protection.office365.us) and for Microsoft 365 operated by 21Vianet (include:spf.protection.partner.outlook.cn).

Step 1: read the published SPF

From a terminal (replace example.com with the domain of the sending address):

dig +short TXT example.com

You must see one line starting with "v=spf1. No line: no SPF. Two SPF lines: SPF returns a permanent error (permerror), so merge them into one. On Windows: nslookup -type=TXT example.com. Microsoft also recommends a public SPF checker to read the record back.

Step 2: declare all your domains

Microsoft asks you to provision all the domains you own: the number of emails a tenant can send with unprovisioned domains is limited. In the Microsoft 365 admin center, add and validate each domain you send from.

Step 3: add your on-premises servers

If on-premises servers, or a relay, send for your domain, add their public IP addresses to the SPF record of each domain concerned, including unprovisioned domains you relay through Microsoft 365. Microsoft's example:

v=spf1 ip4:192.168.0.10 include:spf.protection.outlook.com -all

(192.168.0.10 comes from Microsoft's example; use your server's public address.)

Step 4: rule out an outbound spam case

Microsoft flags another cause: if Microsoft 365 judged an outbound message to be spam, it sends it through the High Risk Delivery Pool. Messages in that pool do not pass SPF and are therefore refused by the recipient. Check whether the message was classed as outbound spam. If wrongly, contact Microsoft support.

Step 5: fix third-party services

A newsletter or invoicing tool that sends with your domain must be in your SPF (its include: as given by the service), or send with a subdomain that has its own SPF. Microsoft advises using a subdomain for services you do not control, each subdomain having its own record. See our SPF guides, including the one for Microsoft 365.

Step 6: resend and check

Send a test message and check for spf=pass in the Authentication-Results header. Our free SPF checker, DKIM checker and DMARC checker read your records from the Internet.

Check your domain for free. AttackScout reads your SPF, DKIM and DMARC from the Internet and tells you which one is the problem. In one minute, no account. Check my domain

To keep watching your records over time, see the pricing.

Frequently asked questions

550 5.7.23: is SPF enough?

No. Microsoft recommends also setting up DKIM and DMARC. A DMARC in "take no action" mode helps spot email sources and SPF failures.

550 5.7.23: how is it different from 550 5.7.515?

5.7.23 is about SPF, at an external recipient that refuses your outbound message. 5.7.515 is an Outlook.com refusal aimed at high-volume senders whose domain does not meet the required authentication level: see 550 5.7.515.

550 5.7.23: messages to Gmail are refused too.

Gmail has its own codes: see 550 5.7.26.

Sources

Accessed on 11/29/2026.

Get the free alerts