How the message looks
550 5.7.1 Message rejected due to SPF check failure 550-5.7.1 SPF check failed: domain of sender does not designate this server Received-SPF: fail (domain does not designate 203.0.113.5 as permitted sender)

What happened

The receiver checked the connecting IP against the sender domain's SPF record and found no match. The record ends in -all (“hardfail”), which effectively says: anything I have not explicitly listed is a forgery. The receiver acted on exactly that.

Important for diagnosis: what gets checked is the IP that actually opens the SMTP connection, and the domain from the envelope-from (return-path) — not the one in the visible From: header. The two can differ.

The four usual causes

  1. A sender was forgotten. By far the most common case. Newsletter tool, CRM, ticketing system, shop, invoicing or monitoring send from their own IPs that never made it into the record.
  2. Sending moved to another provider. After a migration the record still points at the old infrastructure.
  3. IPv6 is missing. The record only contains ip4: entries while the server delivers over IPv6. To the receiver that is an unknown address.
  4. The mail was forwarded. With classic forwarding the forwarding server sends under the original envelope address — SPF then fails by design. No SPF entry fixes that; ARC exists for it (and SRS on the forwarder's side).

How to proceed

First extract the sending IP from the error or the bounce — it is usually right there, or in the Received: header of the returned message. Then look at your own record and check whether that IP appears in it, directly or via an include:.

yourdomain.com. IN TXT "v=spf1 include:_spf.google.com ip4:203.0.113.5 -all"

If the IP is missing, add it — preferably through the provider's include:, since they maintain their own addresses, and only otherwise as a fixed ip4:/ip6: value.

Watch the lookup limit while extending: more than ten DNS-querying mechanisms invalidate the entire record. That is the second most common way a supposed fix makes things worse.

What not to do

Dropping the record back to ~all or ?all makes the message disappear without solving anything — and weakens your domain's protection against spoofing. When a legitimate source is rejected, that source belongs in the record; the record does not belong watered down.

Find the cause in the actual message

Send or forward the affected email to hello@analyzemy.email. For that exact message the report shows which IP sent it, how SPF, DKIM and DMARC turned out, and where the chain breaks.

Analyze your email now

Last updated: · All error messages