For an organisation's SPF records, how do you as the lead decide whether each domain should end in -all or ~all?
answer
- a statement, not a command
- fail may be refused, softfail scored
- how complete is the sender inventory?
- DMARC only counts a pass
- rejection at MAIL, before DKIM
basics
~20 s-all makes unlisted hosts fail; ~all makes them softfail, which RFC 7208 says should not alone cause rejection. Decide per domain from how complete the sender inventory is, how much mail is forwarded, and whether DMARC enforcement and DKIM carry protection.
solid answer
~50 sNeither ending is required by RFC 7208; it is the domain owner's statement, and each receiver still decides. `-all` produces `fail`, an explicit statement that the host is not authorized, which some receivers reject during the SMTP transaction; `~all` produces `softfail`, which receivers SHOULD NOT reject on alone. I publish `-all` wherever the sender list is complete and stable: domains that send no mail, host names, and dedicated sending subdomains. For the main domain I ask three things: is every outside service inventoried, how much of our mail reaches people through forwarders that keep the envelope, and is DMARC at enforcement with DKIM on every stream. Under DMARC both results are simply not a pass, so with enforcement in place `~all` gives up little and avoids receivers refusing forwarded mail on SPF at the `MAIL` command, before its intact DKIM signature is seen. Without DMARC enforcement, `-all` is the strongest statement SPF can make.
go deeper
Recall that -all gives fail and ~all gives softfail, and that receivers, not the record, decide whether either leads to rejection.
Explain the RFC 7208 handling guidance for fail and softfail and why the ending changes forwarded mail's result without making it pass.
Show the operational evidence you would gather first: the sender inventory, the share of forwarded mail, DMARC reports, and where receivers reject during the transaction.
Own the decision per domain class, document why, and tie it to DMARC enforcement and DKIM coverage, accepting the cost to forwarded mail as an explicit tradeoff.
## What the two endings actually say An SPF record (RFC 7208, April 2014) normally ends with an `all` term that matches every host not listed earlier. Its qualifier decides the result for those hosts, and that result is all the domain owner gets to say; the receiver decides what happens next. | Ending | Result for an unlisted host | Meaning in RFC 7208 | Handling guidance in section 8 | Plainly forwarded mail | |---|---|---|---|---| | `-all` | `fail` | An explicit statement that the host is not authorized | Local policy; may be rejected with `550` | Fails, and may be refused outright | | `~all` | `softfail` | A weak statement that the host is probably not authorized | SHOULD NOT reject based solely on it; MAY scrutinise | Softfails, usually accepted and scored | RFC 7208 mandates neither ending. Section 10.1.2 does give `v=spf1 -all` as the standard record for a domain that sends no mail; the record details are covered with SPF record syntax. The other endings are not options here: `?all` yields `neutral`, which receivers MUST treat like `none`, so it protects nothing, and `+all` authorizes every host; what each qualifier yields is covered with SPF mechanisms and qualifiers. ## Where the decision is easy - **Domains that send no mail**, including parked and defensive registrations: `-all`, because there is no legitimate sender to break. - **Host names used in `HELO`**: a record authorizing only that host, ending `-all`, which also covers its bounces. - **Dedicated sending subdomains**, such as `news.example.com` used by one outside service with a known set of hosts: `-all`, because the inventory is small and owned. ## The main domain: questions to answer first 1. **Is every legitimate sender known?** Any forgotten service, office device or partner sending as the domain gets `fail` under `-all`, and some receivers will refuse it. DMARC aggregate reports, covered with DMARC reporting, are the usual way to find them before tightening. 2. **How much of our mail is forwarded?** Alumni addresses, professional associations and personal forwarding rules resend mail from hosts we never listed. RFC 7208 section 10.2 names this as a known source of `fail` for legitimate mail. The ending changes the result from `fail` to `softfail`, not to `pass`; what it really changes is how many receivers refuse rather than score the message. 3. **Is DMARC at enforcement, with DKIM on every stream?** RFC 9989 (May 2026) uses only an SPF `pass` as an authenticated identifier, so `fail` and `softfail` count the same for DMARC. A plainly forwarded message may keep a valid DKIM signature, and that is what can carry it through DMARC. 4. **Where does the receiver reject?** RFC 7208 places the check at the `MAIL` command, and Appendix G.2 notes that rejection can happen before the content is transferred. A receiver that refuses SPF `fail` at that point never sees the DKIM signature that would have passed DMARC. 5. **How exposed is the domain to forgery?** Section 11.7 warns that receivers delivering `fail` admit mail the domain explicitly disowned. For a domain without DMARC enforcement, `-all` is the strongest signal SPF can send. ## The university's debate, worked through A university's alumni service forwards to personal mailboxes, and mail from senders publishing `-all` starts failing at those mailboxes. A proposal follows to move the university's own record to `~all`. - The failures belong to **other domains' records**, the ones the alumni receive mail from; the university's own ending does not change how those are judged. - The fix for the alumni flow is on the **forwarder**: rewriting the envelope sender of forwarded mail, or narrowing what is forwarded. - The university's own ending is a separate decision, driven by its own sender inventory, how often its staff's mail is forwarded elsewhere, and its DMARC posture. Separating "mail we forward" from "mail we send" is usually what settles the argument. ## A defensible default, and how to get there - Publish `-all` on non-sending domains, host names and single-purpose subdomains now. - On the main domain, inventory senders first; during that period `~all` limits the damage from a forgotten sender. - Move the main domain to `-all` once the inventory is complete, or keep `~all` deliberately where DMARC enforcement with DKIM on every stream already carries the protection, and record which reasoning was used. - Revisit the choice whenever a new outside sender is added, and move high-volume outside senders to their own subdomains so the main record stays short. ## What neither ending does - Neither makes forwarded mail pass SPF. - Neither obliges a receiver to do anything; RFC 7208 leaves handling to local policy. - Neither authenticates the `From` header a reader sees; that link is DMARC's job.
- Why might a domain at DMARC enforcement still choose ~all for its main record?For DMARC, `fail` and `softfail` are equal: neither is a pass. The difference only matters at receivers acting on SPF alone, and there `fail` can mean a refusal at the `MAIL` command before an intact DKIM signature is seen. With DKIM on every stream and an enforcing DMARC policy, `~all` keeps forwarded mail flowing at little cost to protection.
- Should a domain that sends no mail at all use ~all to be safe?No. There is no legitimate sender to protect, so the softer ending only weakens the statement. RFC 7208 section 10.1.2 gives `v=spf1 -all` as the standard record for a domain that sends no mail, and forging such a domain should produce the strongest signal available.
- RFC 7208 requires every SPF record to end in -all.
- Switching to ~all makes forwarded mail pass SPF.
- Under DMARC, softfail counts as a partial pass.
- A domain that sends no mail should use ~all to avoid breakage.
- ?all is a safe middle ground between -all and ~all.