Opens in a new tab

SMTP 5.7.23: SPF validation failed — the fix

5.7.23 means the message failed SPF: the sending server is not in the SPF record of the domain in its Return-Path. Microsoft 365 uses it in that sense. Gmail’s temporary 4.7.23 means something else — a missing PTR record.

Code5.7.23
MeaningSPF validation failed
KindPermanent failure — the sender gives up
Sent in reply toWith 550
What the sender doesReturns the message to the sender
Defined inRFC 7372

Paste your bounce

Paste the line with the code — or the whole bounce: we explain each code in it, say whether the sender will try again, and link the service’s own page where it has one. It is read in your browser; nothing is sent.

What causes it

  • A new sending service or server not yet added to the SPF record.
  • Mail forwarded by a server that is not in your record.
  • At Microsoft 365: mail routed through its High Risk Delivery Pool, which does not pass SPF.

What to do

  • Add the sending service’s include, or the server’s address, to your SPF record — and stay within ten DNS lookups.
  • Sign with DKIM too, so mail still passes DMARC when SPF breaks in forwarding.

What each provider means by it

WhoWhat they say
Microsoft 365550 5.7.23 The message was rejected because of Sender Policy Framework violation.
GmailReports SPF failures as 5.7.26 or 5.7.27; its 451 4.7.23 is about a missing PTR record.

Bounces with this code

Related: 5.7.26, 5.7.24, 5.7.27.

Sources

Checked on 27 September 2026 against these official sources:

See every bounce before your customers do

Add your domain and send us a test message: we show what a receiving server saw — authentication, reverse DNS, blocklists, TLS — and monitor the servers you send from for blocklistings every day. Free for your first domain.

Create a free account