SPF ~all (SoftFail) vs -all (HardFail) Under DMARC Enforcement: RFC Truth & Forwarding

Compare SPF ~all SoftFail, -all Fail, and ?all Neutral under RFC 7208 and RFC 7489 DMARC, including why forwarded DKIM-signed mail interacts differently with -all.

RFC 7208 §8.4 (Fail '-all') & §8.5 (SoftFail '~all')RFC 7489 §4.1 & §6.6.2 (DMARC Evaluation of SPF Fail & SoftFail)M3AAWG Best Practices for SPF & DMARC Enforcement

Incident Symptom & RFC 7208 Root Cause

SMTP & Deliverability Symptom

After switching a domain's SPF record from ~all to -all, legitimate customer emails forwarded through university/alumni auto-forwarders or corporate Exchange rules get rejected at the SMTP envelope stage BEFORE the receiving MTA even verifies a valid DKIM signature!

DNS Resolver & RFC 7208 Mechanics

Under pure DMARC (RFC 7489), BOTH ~all (SoftFail) and -all (Fail) produce the exact same DMARC SPF result ('fail'), allowing a surviving aligned DKIM signature to pass DMARC! However, RFC 7208 §8.4 explicitly permits pre-DATA SMTP receivers to issue an immediate 550 5.7.23 rejection on -all during MAIL FROM/RCPT TO—before the message body and DKIM-Signature header are even transmitted!

Broken vs Verified DNS Configuration

BrokenNever-Ending ?all Neutral (Zero Spoofing Protection) vs Blind -all Without DKIM
; DANGEROUS: '?all' (Neutral) or '+all' (Pass-Everyone!) grants spoofers free rein!
; '+all' gets domains blocklisted immediately!
example.com. 3600 IN TXT "v=spf1 include:_spf.google.com ?all"
Verified FixTwo Verified Production Configurations (~all + DMARC Reject vs -all Parked/Strict)
; Strategy A (M3AAWG Recommended for Human Mailboxes with Forwarding + DKIM + DMARC p=reject):
; '~all' fails DMARC SPF identically to '-all', while letting SMTP servers read DATA + verify DKIM!
example.com.        3600 IN TXT "v=spf1 include:_spf.google.com ~all"
_dmarc.example.com. 3600 IN TXT "v=DMARC1; p=reject; sp=reject; rua=mailto:dmarc@example.com"

; Strategy B (Strict '-all' for Non-Sending / Parked Domains or Transactional Subdomains):
; Zero forwarding ambiguity; reject unauthorized IPs at the earliest possible SMTP gate!
parked-brand.com.   3600 IN TXT "v=spf1 -all"
notify.example.com. 3600 IN TXT "v=spf1 include:spf.mtasv.net -all"

Protocol Mechanics & Operational Deep Dive

For years, generic security checklists mechanically docked a grade point if an active domain used ~all instead of -all, without understanding the multi-layer interaction between SMTP stages, SPF, DKIM, and DMARC. During an SMTP transaction, MAIL FROM:<alice@example.com> arrives BEFORE the DATA phase (which carries headers and DKIM-Signature). If Bob forwards mail from bob@alumni.edu to bob@corp.com without SRS (Sender Rewriting Scheme), alumni.edu's relay IP is NOT in example.com's SPF record.

With -all, an aggressive receiver running an early SMTP milter rejects the forwarded email right after RCPT TO with 550 SPF Fail—never reading DATA, never verifying Alice's intact 2048-bit DKIM signature, and bouncing legitimate mail! With ~all paired with DMARC p=reject (or p=quarantine), the receiver accepts DATA, sees SPF=SoftFail (which DMARC treats as SPF fail!) AND DKIM=Pass (aligned!), so legitimate forwarded mail passes DMARC while spoofed unsigned mail hits DMARC p=reject!

Where SHOULD you enforce -all unconditionally? On three high-certainty surfaces: (1) every parked domain, defensive typo domain, and non-mail subdomain (v=spf1 -all); (2) domains that do NOT yet enforce DMARC p=quarantine/reject (where ~all alone leaves spoofed mail in the inbox or spam without hard rejection); and (3) high-security transactional subdomains where every message is DKIM-signed and compliance policy favors hard envelope rejection.

SPF 'all' Qualifiers Behavior Across SMTP & DMARC

Mechanism / CaseRFC 7208 EvaluationProduction Remediation
+all (or bare 'all' without prefix!)Authorizes EVERY IPv4 and IPv6 address on the internet to send as your domain (SPF Pass)!NEVER publish +all or bare all (bare 'all' defaults to '+all'!). Replace immediately with ~all or -all.
?all (Neutral)Asserts nothing (equivalent to having no policy); fails DMARC SPF alignment.Upgrade ?all to ~all during initial discovery, then enforce DMARC.
~all (SoftFail)Fails DMARC SPF evaluation; avoids premature pre-DATA SMTP rejection so DKIM can rescue forwarded mail.Ideal on active corporate domains ONCE paired with 100% DKIM signing and DMARC p=quarantine/reject.
-all (Fail / HardFail)Fails DMARC SPF evaluation AND signals receivers they may 550-reject at SMTP envelope before DKIM.Mandatory on all parked/non-sending domains (v=spf1 -all) and strict automated subdomains.

Edge Cases & Engineering FAQs

Wait: what does writing bare 'all' with NO prefix ('v=spf1 include:_spf.google.com all') do?

CRITICAL SECURITY BUG! Per RFC 7208 §4.6.2, omitting a qualifier prefix defaults to '+' (Pass)! Writing bare 'all' at the end of an SPF record means '+all', authorizing every botnet IP on Earth to pass SPF and pass DMARC for your domain!

Does Microsoft Defender for Office 365 treat -all and ~all identically?

Both fail DMARC SPF checks, though Microsoft's anti-spoofing composite authentication heuristics historically weighted -all slightly stricter when a sender lacked DMARC enforcement (p=none). Once DMARC p=reject or p=quarantine is active with DKIM, DMARC policy governs disposition.

Why does Gmail still pass forwarded -all mail while some enterprise gateways block it?

Gmail purposefully defers SPF action until after DATA so it can evaluate DKIM, ARC, and DMARC holistically; older Postfix policyd-spf or Exim ACLs configured with reject_fail_spf=true reject -all before DATA.

Aligned Transactional Delivery Infrastructure

Transactional Email InfrastructurePostmark →

Dedicated transactional delivery streams with custom Return-Path subdomain SPF alignment and 2048-bit DKIM signing.