550 5.7.23 SPF Validation Failed: Causes and How to Fix It
550 5.7.23 means your email failed the receiving server's SPF check. Learn why SPF fails, how to fix your record and what Microsoft 365 admins should check.

You send an email and it bounces with "550 5.7.23". The text often says the message was rejected because of a Sender Policy Framework (SPF) violation. Your mail left your server, but the receiving server refused it.
The receiving server ran an SPF check on your message, and the check failed. It did not trust that your server was allowed to send for your domain. This guide explains why that happens and how to fix it, with extra steps for Microsoft 365.
What 550 5.7.23 means#
The bounce has two parts. 550 is the SMTP code for a permanent failure. 5.7.23 is the enhanced status code. The 5.7 group covers security and policy problems. This one points at SPF.
SPF is a DNS record on your domain. It lists the servers that may send mail for it. When a message arrives, the receiving server looks up that record. It then checks the address of the server that delivered the message. If that address is not on the list, and the record ends in a strict rule, the check fails. The server can then reject the message. RFC 7208 defines how all of this works.
You may see wording like:
The message was rejected because of Sender Policy Framework violation
Some servers add the domain they checked or a link to their own help page.
Why the SPF check fails#
These are the common causes:
- A sender is missing from the record. You added a new tool, such as a CRM, a help desk or a newsletter platform. It sends as your domain, but your record doesn't list it.
- The record has an error. A typo, a missing space or two separate SPF records make the whole record fail.
- Too many lookups. SPF allows at most 10 DNS lookups. Each include adds to the count. Past 10, the check fails.
- The mail was forwarded. The recipient's server forwards mail to another one. That second server sees the forwarder's address, not yours.
- Microsoft 365 sent it through a risky pool. More on this below.
How to fix 550 5.7.23#
Only an email admin can fix this. If you're a user, send the bounce to your admin, including the diagnostic part at the bottom.
Step 1: Read the diagnostic details#
The bounce ends with technical details. They show which server rejected the message and the exact reason it gave. Note the sending address and domain shown there. That's the domain whose SPF record you need to check.
Step 2: Check the SPF record#
Look up the domain's SPF record with any public SPF or DNS checker. Confirm three things:
- There is exactly one SPF record. Two records count as an error.
- It lists every service that sends as your domain.
- It stays within the 10-lookup limit. Our guide to the SPF lookup limit shows how to count and trim them.
Step 3: Add the missing senders#
For each tool that sends as your domain, find the include or IP range in its own help docs. Add it to the record. If you run mail servers on site, add their public IP addresses too.
A record for a domain on Microsoft 365 that also uses one other service might look like this:
v=spf1 include:spf.protection.outlook.com include:example-sender.com -all
Change one thing at a time. DNS changes can take a while to spread.
Step 4: Send a test#
Once the record is live, send a message to an outside mailbox you control. Open the message headers and look for "spf=pass".
Extra steps for Microsoft 365#
Microsoft's guide to fixing NDR error 550 5.7.23 says this bounce most likely points to an SPF setup issue in your tenant. It lists these steps:
- Check the SPF record with a public SPF or DNS checker.
- Add all the domains you own to the tenant. Microsoft limits how much mail a tenant can send from domains it hasn't added.
- Add your on-site IP addresses to the SPF record of every domain you send for. That includes domains you relay through Microsoft 365.
- Check the High Risk Delivery Pool. If Microsoft marks an outgoing message as spam, it sends it through this pool. Mail from that pool won't pass SPF checks, so the other side rejects it.
To see which outgoing messages are marked as spam, set up Bcc copies in your outbound spam policy. If Microsoft marked a message as spam by mistake, contact Microsoft support.
Our step-by-step guide to SPF, DKIM and DMARC in Office 365 covers the full setup.
When forwarding is the cause#
Sometimes your SPF record is fine, and the bounce still comes back. Check whether the person you wrote to forwards mail to another address. The next server checks SPF against the forwarder, so the check fails.
You can't fix this from your side. Ask the recipient to send to the final address directly, or to change their forwarding. DKIM signing helps here too, because a DKIM signature survives most forwarding. For forwarding blocked by Microsoft itself, see 550 5.7.520 access denied.
How it compares to similar codes#
| Code | What it usually means | Who fixes it |
|---|---|---|
| 550 5.7.23 | The message failed the SPF check | Sender's admin |
| 550 5.7.26 | Gmail found no SPF or DKIM pass | Sender's admin |
| 550 5.7.509 | DMARC policy rejected the message | Sender's admin |
| 550 5.7.520 | Microsoft blocked external forwarding | Recipient's admin |
Our list of email bounce codes covers the rest.
Checklist#
- Diagnostic details read and domain noted
- One SPF record, under 10 lookups
- Every sending service listed
- On-site IP addresses added
- Microsoft 365: all domains added, spam Bcc set up
- Test message shows spf=pass
FAQ#
What does 550 5.7.23 mean?#
It means the receiving server checked your SPF record and found that the server that sent your message was not allowed to. It rejected the message.
Can a user fix this?#
No. Only an admin who manages the domain's DNS or mail settings can fix it.
Will the message be sent later?#
No. A 550 is a permanent failure. Fix the SPF record, then send the message again.
Why does it fail for one person only?#
That person's mail is likely forwarded to another server. The SPF check runs against the forwarder, not you.
Does a valid SPF record mean my mail lands in the inbox?#
No. SPF is one check among many. A clean list helps too: verify addresses with the Tomba Email Verifier so bounces don't hurt your sender reputation.
// start free
See who Tomba finds at any company
Type a company's domain to see its people, their roles and verified work emails, each with the pages it was found on. Free account, no card.
Free plan · No credit card required · GDPR & CCPA
// about the author