Enhanced SMTP status code · RFC 3463 · IANA
5.7.23 SPF validation failed
The SPF check returned fail: the sending server is not authorised in the domain's SPF, and the recipient's policy rejects that (RFC 7372, RFC 7208 §8.4).
- Class: Permanent failure
Class 5: a permanent failure. Resending the same message will not help: something about the message, the sender or the destination must change (RFC 3463 §3.1).
Also seen as:
4.7.23 - Subject: X.7 · Security and policy
Policies (per-host or per-recipient filters) and cryptographic operations; up to the sender, the recipient or both.
- Associated basic codes (IANA registry)
How 5.7.23 appears at providers
The exact text from the provider's documentation, as you see it in the bounce, and what it means.
Gmail
-
451 4.7.23
ip-address The sending IP address for this message doesn't have a PTR record, or the PTR record's forward DNS entry doesn't match the sending IP address. To protect users from spam, your email has been temporarily rate limited.
The sending IP address has no PTR, or the PTR name does not lead back to the same address, so Gmail limits or blocks its mail. The PTR is set by whoever holds the IP address. Check with SMTP server check.
Microsoft 365 / Exchange Online
-
5.7.23
The message was rejected because of Sender Policy Framework violation
The message was rejected because it fails the sending domain's SPF. Make sure the server is authorised in SPF. Check with SPF generator.
What you can check here
Have the whole error message?
Sources: RFC 5321 · RFC 3463 · RFC 3464 · IANA · Gmail · Microsoft 365 · read on 26 September 2026