~all to -all because it looked stricter. A few days later, invoices from your billing platform start bouncing, or contact form notifications stop arriving and nobody can say why. The DNS change is small, but it changes how receivers treat every message your record does not cover. Whether -all is safe depends on who sends mail as your domain, and many site owners only find that out after something breaks.
This walkthrough starts at the symptom, follows the message back to the sender, and ends with a qualifier you picked on purpose rather than by guessing.
What the last word of an SPF record actually changes
all mechanism, with its qualifier, says what to do when nothing earlier matched:
-allreturns fail: the sender is not authorized.~allreturns softfail: probably not authorized, but not certain.?allreturns neutral, which is close to having no policy.+allauthorizes the whole internet. Never use it.
-all, the likely cause is a legitimate sender missing from the record. Before, it soft-failed and was tolerated. Now it fails and at least one receiver rejects it.
Start with the failing message, not the DNS record
include: entries. Look at evidence first. Get a copy of an affected message: a bounce with the original attached, a message from the spam folder, or a test sent to a mailbox you control. Then read its headers.
Two headers matter most. Return-Path shows the envelope sender (also called MAIL FROM), and SPF checks this domain, not the From: address the recipient sees. Authentication-Results shows what the receiver concluded for SPF, DKIM, and DMARC.
TEXT
# Illustrative output format (example domains, not real values)
Return-Path: <[email protected]>
From: Billing <[email protected]>
Authentication-Results: mx.receiver.example;
spf=pass smtp.mailfrom=mail.sender-platform.example;
dkim=pass header.d=sender-platform.example;
dmarc=fail header.from=yourdomain.examplesender-platform.example, because the platform uses its own bounce domain. Your SPF record was never consulted, so changing it to -all had no effect on this message, and adding the platform's include: would not help either. DKIM also passed, but signed by the platform's domain. Neither result matches yourdomain.example, so DMARC fails on alignment. The fix here is in the platform's settings: a custom return-path domain, DKIM signing with your domain, or both.
Compare that with a message where smtp.mailfrom shows your own domain and spf=fail appears. That sender really does use your domain in the envelope and is missing from your record. That is the case -all breaks.
This split is the most common source of confusion. Customers see a failing third-party service and assume SPF is the culprit, when the real gap is DKIM alignment. A support engineer usually reads smtp.mailfrom and header.d before touching DNS.
Build the sender inventory from DMARC aggregate reports
rua tag. Each report lists source IPs, message counts, SPF and DKIM results, and whether they aligned with your domain.
If you do not have a DMARC record yet, publish one in monitoring mode. You can check what is already live in DNS with read-only lookups:
BASH
# Current SPF record (look for the TXT value starting with v=spf1)
dig +short TXT yourdomain.example
# Current DMARC record, if any
dig +short TXT _dmarc.yourdomain.example
# A minimal monitoring-only DMARC record looks like this (published as TXT at _dmarc):
# v=DMARC1; p=none; rua=mailto:[email protected]p=none tells receivers not to act on failures, only to report them. If the rua address lives on a different domain, that domain has to publish an authorization record, or many receivers will not send reports there.
Give the reports a couple of weeks, long enough to catch monthly invoices, newsletters, and occasional system alerts. Then sort the sources into three groups:
- Your own mail servers and hosting servers. These should pass SPF directly.
- Third-party services sending with your domain in the envelope, such as a helpdesk, CRM, or a website's SMTP plugin pointed at an external relay. These need an
include:or IP entry in SPF, or aligned DKIM, ideally both. - Sources you do not recognize. Some are forwarders or mailing lists relaying real mail. Others are spoofing attempts, which is what you want to block.
How receivers treat fail and softfail once DMARC is involved
From: domain. For DMARC, softfail and fail are the same thing: SPF did not pass. If your domain has DMARC at p=quarantine or p=reject, a receiver that follows DMARC handles unaligned mail through that policy whatever your SPF qualifier says.
So with a strong DMARC policy, -all adds little protection on top. What it can add is risk. Some receivers act on an SPF hard fail during the SMTP session, before DKIM and DMARC are evaluated. A message that would have passed DMARC through a valid DKIM signature is rejected anyway. The DMARC specification itself notes this interaction.
Forwarding makes it worse. When a message is forwarded, for example from an old address to a personal mailbox, the forwarding server's IP is not in your SPF record, so SPF fails at the final hop. DKIM usually survives forwarding if the body and signed headers are not modified. Under ~all, DKIM can still carry the message through DMARC. Under -all, a receiver that rejects on SPF fail early never reaches that point.
Without DMARC, the picture flips. The SPF qualifier is one of the few signals you are sending, and -all gives receivers a clearer instruction against spoofers. It also means any forgotten sender is treated as forged.
Choosing between ~all and -all
- If you have no DMARC yet, publish
p=nonewith reporting first, regardless of the SPF qualifier. Changing~allto-allblind is the move that causes the breakage described at the start. - If the reports show unlisted senders using your domain in the envelope, stay on
~alluntil each one is added to SPF or signs with aligned DKIM. - If every legitimate source passes aligned DKIM and DMARC is at
quarantineorreject,~allis a reasonable rule of thumb. DMARC already does the enforcing, and you avoid early rejections of forwarded mail. - If the domain sends no mail at all, such as a parked domain,
v=spf1 -alltogether with a DMARCp=rejectrecord is the clean choice. There is no legitimate sender to break. - If you have a narrow, fully known set of senders and a reason to want hard fails, such as a domain that is a frequent spoofing target,
-allis defensible once the reports have been clean for a while.
include:, a, mx, exists, and redirect costs a lookup, and SPF allows at most 10. Adding services one by one can push you over, and the result is a permerror that breaks SPF for everyone, regardless of the qualifier.
After changing the record, verify it the same way you diagnosed it. Run the dig lookup to confirm the new value is live. Then send a message from each known source to a mailbox you control and read Authentication-Results on each. Keep watching the aggregate reports for a full reporting cycle so new failures show up before users report them.
The takeaway is simple. The qualifier at the end of SPF is the least interesting part of your email authentication. Find out who sends as your domain, make each of them pass aligned DKIM, and let DMARC carry the enforcement. Once that is in place, ~all versus -all is a small, informed choice instead of the change that silently broke your invoices.