Skip to content

SPF softfail vs fail: pick ~all or -all after you find the cause

SPF softfail vs fail decides spam folder or bounce, not whether a message passes. Find why Gmail shows spf=softfail, then pick ~all or -all to match your DKIM and DMARC setup.

Offensly Team··5 min read

An invoice from your own domain lands in a colleague's Gmail spam folder instead of bouncing, which is the whole SPF softfail vs fail difference in one message. Show original has this near the top:

Authentication-Results: mx.google.com;
       spf=softfail (google.com: domain of transitioning billing@example.com does not designate 203.0.113.10 as permitted sender) smtp.mailfrom=billing@example.com;
       dkim=none;
       dmarc=fail (p=QUARANTINE sp=QUARANTINE dis=QUARANTINE) header.from=example.com

"Domain of transitioning" is Gmail's wording for softfail: your SPF record ends in ~all, and 203.0.113.10 is not in it. The usual reflex is to change ~all to -all. That does not make this message pass. The same IP now gets fail instead of softfail, and at some receivers a bounce instead of the spam folder.

What receivers do with ~all and -all

RFC 7208 defines both results. On fail, a receiver that rejects during the SMTP session should answer with code 550 and, where supported, 5.7.1 (RFC 7208, section 8.4). On softfail, it should not reject on that result alone, but may look at the message more closely (section 8.5). In practice that means a spam score penalty.

DMARC does not tell them apart. A message passes DMARC with an aligned SPF pass or an aligned DKIM pass (RFC 7489, section 4.2); softfail and fail are both just "not a pass".

The difference shows up at receivers that run SPF before DMARC. RFC 7489 warns that such receivers can reject a -all failure early, before any DMARC processing (section 10.1). A message that would have passed on its DKIM signature never gets that chance. Forwarded mail is the usual casualty.

Find why the message failed before you touch the qualifier

The header gives you three things to compare: the IP in parentheses, smtp.mailfrom, and the headers above Google's own. Microsoft 365 shows the same facts in a different format:

Authentication-Results: spf=softfail (sender IP is 203.0.113.10)
 smtp.mailfrom=example.com; dkim=none (message not signed)
 header.d=none;dmarc=fail action=quarantine header.from=example.com;compauth=fail reason=000

The IP is a sender nobody added. It belongs to a CRM, a helpdesk tool or a multifunction printer that sends as your domain. Reverse DNS or a whois lookup on the IP usually names the provider. Add the provider's include: to your one SPF record. Do not publish a second v=spf1 TXT record for it; two records give permerror for every message, see multiple SPF records.

The message was forwarded. The IP belongs to a forwarding host or a mailing list, and you find X-Forwarded-To, List-Id or an ARC-Authentication-Results: i=1 block above Google's lines. No SPF record can list every forwarder, so leave SPF alone. DKIM carries forwarded mail, unless the list edits the body; that case is covered in DKIM body hash did not verify.

The domain that failed is not yours. If smtp.mailfrom reads bounces.example.net, the SPF result belongs to the vendor's record, not to example.com. Your ~all or -all played no part. Either set up the vendor's custom return-path on a subdomain you control, or rely on aligned DKIM from that vendor.

SPF softfail vs fail: which ending to publish

Use ~all when every service that sends as your domain signs with aligned DKIM and your DMARC policy is quarantine or reject. DMARC already refuses spoofed mail, and ~all keeps forwarded mail clear of receivers that hard-reject on SPF before reading DKIM.

Use -all when some senders do not sign with DKIM, or when you have no DMARC enforcement yet. Then the SPF result is the only thing a receiver can act on. Microsoft makes the same argument: its docs say the DMARC policy is effectively ignored for ~all failures on messages without DKIM signatures, and recommend -all (Microsoft Learn). Treat that as a reason to fix DKIM, not as a permanent state.

For a domain that sends no mail, publish v=spf1 -all and stop there. Never publish ?all or +all.

The two big providers disagree in their own setup pages. Microsoft's examples end in -all, Google's in ~all (Google Workspace Admin Help). Neither is wrong for its assumptions, and neither admin console has a switch for it: the record lives at your DNS host.

Move from ~all to -all without bouncing your own mail

  1. Read at least two weeks of DMARC aggregate reports. Every legitimate source that shows an SPF failure needs to be added to the record or covered by aligned DKIM. If you have no reports yet, start with DMARC p=none as a reporting phase.
  2. Count lookups after any additions. Each include:, a, mx, exists and redirect costs one, nested includes count too, and more than 10 gives permerror.
  3. A day before the change, lower the TTL of the SPF record to 300, so you can revert within minutes.
  4. Change only the last term:
example.com.  300  IN  TXT  "v=spf1 include:_spf.google.com include:spf.example.net ~all"
example.com.  300  IN  TXT  "v=spf1 include:_spf.google.com include:spf.example.net -all"
  1. Watch reports and bounces for a week, then raise the TTL back. Microsoft recommends at least 3600 for SPF records.

Going the other way, from -all to ~all, is safe at any time. It cannot cause a bounce.

Who notices a wrong choice

With -all and a forgotten sender, password resets or invoices from that tool bounce at strict receivers, and only the tool's admin sees the bounce. With ~all and no DKIM or DMARC enforcement, spoofed mail in your name still reaches recipients, just in spam. The record change costs nothing; the work is the sender inventory in step 1.

Check what receivers see now

$ dig +short TXT example.com | grep spf1
"v=spf1 include:_spf.google.com include:spf.example.net -all"

One line only, ending in the qualifier you chose. Then send a message from each service that sends as you to a Gmail address and open Show original. You want spf=pass with smtp.mailfrom on your own domain, or dkim=pass with header.i=@example.com. A fail that remains points back to one of the three causes above.

Our free SPF check reads your record without an account, together with DKIM, DMARC and MX, so you can see the qualifier and the senders it covers in one place.

Check your SPF record with Offensly

Check your own domain in seconds

The free check reads your SPF, DKIM, DMARC and MX records and tells you exactly what to fix. No sign-up.