Bouncewise

Bouncewise › Guides › SPF fail, softfail and neutral: what they mean

Email delivery guide

SPF fail, softfail and neutral: what they mean

By the Bouncewise team · Updated · 3 min read · How we check guides

Short answer

SPF fail means the server that sent the message is not listed in the SPF record of the envelope sender's domain (the Return-Path), and that record ends in -all, a firm "not authorised". Softfail is the same finding with ~all, a weaker "probably not authorised"; neutral (?all) makes no claim either way. SPF checks the Return-Path domain, not the From address, so with an email provider the record that matters is the one on its bounce domain.

The seven SPF results

RFC 7208 defines every result an SPF check can return. The qualifier in front of the mechanism that matched (usually the final all) decides between pass, fail, softfail and neutral.

ResultFromMeaning (RFC 7208)What receivers do
pass+ (default)The IP is authorised for the domainCounts for DMARC if the domain aligns
fail-allExplicit statement that the IP is not authorisedMay reject. Gmail: The (E)MAIL FROM domain [domain-name] has an SPF record with a hard fail policy (-all) but it fails to pass SPF checks with the ip: [ip-address]. (5.7.26)
softfail~allWeak statement that the IP is probably not authorisedThe RFC says receivers should not reject on this alone, but may look closer
neutral?allThe domain explicitly makes no statementMust be treated exactly like none
noneno recordNo SPF record, or no usable domainNothing to go on
temperrorDNSA transient DNS errorOften deferred; a retry may pass
permerroryour recordThe record could not be interpretedTreat as broken until you fix DNS

Which domain SPF actually checks

SPF checks the domain of the envelope sender: the SMTP MAIL FROM, which the receiver records as Return-Path and reports as smtp.mailfrom. It never looks at the From header people see. (For bounces, which have an empty envelope sender, it checks the HELO name.)

Return-Path: <[email protected]>
Authentication-Results: mx.example.net;
  spf=softfail smtp.mailfrom=bounces.example.net;
  dkim=pass header.d=example.com;
  dmarc=pass header.from=example.com

Here SPF was checked against bounces.example.net, the provider's domain, not example.com. Adding the provider's include: to the SPF record on example.com would change nothing, because that record is not consulted. This is why transactional providers ask for a Return-Path subdomain instead: Postmark's pm-bounces.example.com CNAME, SendGrid's em1234.example.com CNAME, Resend's send.example.com. The provider maintains the SPF record behind it, and it aligns with your From domain for DMARC. See custom Return-Path domain.

Message source with the Return-Path header and an Authentication-Results line showing the spf result and smtp.mailfrom domain
smtp.mailfrom shows which domain's SPF record was used.

Causes of SPF fail and permerror

  1. A sending service is missing from the record. Common for office mail, CRMs and helpdesks that use your root domain as the envelope sender. Add the service's include:, or better, give it its own subdomain.
  2. The message was forwarded. The forwarder's IP is not in your record, so SPF fails at the final mailbox. You cannot fix this in SPF; aligned DKIM is what keeps DMARC passing.
  3. More than 10 DNS lookups (permerror). RFC 7208 limits the terms that cause lookups (include, a, mx, ptr, exists and redirect) to 10 per check, counting nested includes. ip4, ip6 and all do not count. Remove services you no longer use and move bulk senders to subdomains.
  4. Two SPF records on one name (permerror). Only one v=spf1 record is allowed per name; merge them.
  5. Lookups that return nothing. RFC 7208 says checks should allow at most two "void lookups" (no answer or a non-existent domain) before returning permerror, so an include: for a retired service can break the whole record.
$ dig +short TXT example.com
"v=spf1 include:_spf.google.com include:mailgun.org include:spf.helpdesk.example.net ~all"
"v=spf1 include:servers.mcsv.net -all"     <- a second SPF record: permerror

SPF fail, DKIM pass, DMARC pass

This combination is normal and usually fine. DMARC needs one aligned pass, and DKIM signed with your domain provides it. You see it most with forwarded mail, and on providers where the Return-Path is still the provider's domain (SPF then often passes, but for the wrong domain).

It is not fine for bulk senders to Gmail, which requires SPF and DKIM both to be set up and can block on SPF alone: This message was blocked because it didn't pass SPF authentication. Gmail requires bulk email senders to authenticate their email with SPF. (5.7.27). Gmail also has a separate error for records it distrusts: The SPF record of the sending domain has one or more suspicious entries. (5.7.24). The opposite case, SPF passing but DMARC failing, is an alignment problem.

Questions

What is the difference between SPF fail and softfail?

Fail (-all) states the IP is not authorised; softfail (~all) says it probably is not. RFC 7208 says receivers should not reject on softfail alone, while a fail can be rejected.

Is softfail worse than neutral?

Yes. Softfail says the IP is probably not authorised. Neutral (?all) makes no statement and must be treated exactly like having no SPF record.

What does SPF permerror too many DNS lookups mean?

Your record needs more than 10 DNS-querying terms, counting nested includes, so the check stops with permerror. Remove unused includes or move senders to their own subdomains.

Should I use -all or ~all?

Use ~all while you are still finding every service that sends as you, and -all once the record is complete. DMARC aggregate reports show which sources would fail.

Sources