The choice between using ~all (softfail) or -all (hardfail) in your SPF record is a common point of discussion, especially with the widespread adoption of DMARC. Historically, -all was considered the more secure option, explicitly telling receiving servers to reject mail from unauthorized sources. However, in today's email ecosystem, where DMARC provides a more robust framework for defining how mail from unauthorized sources should be handled, the distinction between ~all and -all in SPF has become less critical for domains actively using DMARC.
Key findings
DMARC primacy: With a DMARC policy of p=reject or p=quarantine, the specific SPF qualifier (~all vs. -all) often has minimal impact on enforcement actions, as DMARC dictates the ultimate outcome.
Receiver behavior: Many mail receivers treat ~all the same as neutral, and some even treat -all as a softfail, especially if DMARC is not configured.
Spoofing protection: SPF alone does not fully prevent email spoofing, particularly of the From: header, which is addressed by DMARC alignment.
Ease of deployment: Using ~all can be safer during initial SPF setup or when changes are frequent, as it is less likely to cause legitimate emails to be rejected if configurations are not perfect.
Outdated advice: Recommendations to strictly use -all without considering DMARC may be based on older security practices.
Key considerations
DMARC implementation: If you have a strong DMARC policy (e.g., p=reject), the choice of ~all or -all for SPF typically doesn't affect the final delivery outcome, as DMARC will enforce the policy.
No DMARC: If DMARC is not implemented, -all offers stricter enforcement for unauthorized senders. However, it carries a higher risk of legitimate mail being rejected if your SPF record is incomplete or incorrect. Review the Word to the Wise article for more insights.
Domain reputation: Regardless of the qualifier, having a published SPF record is considered a best practice for email deliverability and domain reputation.
Testing: Always thoroughly test your SPF record, especially when making changes, to ensure proper authentication and prevent legitimate emails from being flagged as spam or rejected.
Email marketers often navigate practical concerns when configuring SPF records, balancing security with the need for reliable email delivery. While the theoretical implications of ~all and -all are important, the real-world experiences with different email service providers (ESPs) and hosting platforms heavily influence their choices. Many prioritize avoiding deliverability issues over strict enforcement, especially when dealing with complex sending infrastructures or relying on DMARC for ultimate policy enforcement.
Key opinions
DMARC mitigates SPF differences: Many marketers believe that with DMARC in place, the distinction between ~all and -all becomes largely irrelevant for email deliverability.
Avoiding hard fails: Some marketers prefer ~all to reduce the risk of legitimate emails being hard-rejected due to misconfigurations or unexpected changes from hosting providers.
Third-party services: Integrating SPF with multiple third-party sending services (like marketing automation platforms) can introduce complexities, sometimes leading to unexpected SPF verification failures if not carefully managed.
Consultant skepticism: Some marketers express caution regarding unsolicited advice from security specialists or consultants who may overstate issues to sell their services.
Key considerations
SPF record management: Ensure your SPF record is correctly formatted and includes all legitimate sending sources to avoid deliverability problems, regardless of the all qualifier used.
DMARC integration: If you are concerned about spoofing and strict enforcement, focus on implementing DMARC with a policy of p=quarantine or p=reject.
Hosting provider nuances: Be aware that some web hosting services or email providers may interpret -all differently or apply stricter rules than expected, potentially leading to delivery issues.
Test before deploying: Always conduct thorough testing when modifying SPF records to prevent unintended consequences on your email campaigns.
Marketer view
Marketer from Email Geeks notes that a security specialist recommended switching from ~all to -all, though they believe DMARC negates the practical difference in modern email security.
29 Dec 2021 - Email Geeks
Marketer view
Marketer from Salesforce Trailblazer Community reports SPF verification failures occurring due to the inclusion of an ESP, Pardot, within nested entries of their primary SPF record.
01 Jan 2022 - Salesforce Trailblazer Community
What the experts say
Email deliverability experts generally agree that the significance of ~all versus -all in SPF has evolved considerably with the introduction and widespread adoption of DMARC. While SPF still serves as a foundational authentication mechanism, DMARC now provides the overarching policy layer that dictates how receiving servers should treat emails that fail SPF or DKIM checks. Experts often emphasize a pragmatic approach, considering the full authentication stack rather than focusing solely on SPF's all qualifier.
Key opinions
Minimal difference with DMARC: Many experts state that if DMARC is properly implemented with a strong enforcement policy (like p=reject), the choice between ~all and -all in SPF largely becomes negligible.
SPF's primary role: SPF is crucial for authenticating the Return-Path domain, but alone, it doesn't fully prevent header spoofing.
Safety of ~all: Some recommend ~all as a safer default, especially if there's any uncertainty about the completeness of the SPF record or how various receiving servers will interpret a hardfail.
Receiver variation: Mail receivers' actual treatment of ~all and -all can vary, with some treating softfail like neutral and hardfail like softfail.
Non-sending domains: For domains that should not send email, a strict v=spf1 -all is the recommended best practice to prevent unauthorized use.
Key considerations
Align with DMARC: If DMARC is already at p=reject, using ~all in SPF is often the pragmatic choice, as DMARC will enforce the rejection policy anyway.
Publish SPF records: Regardless of the qualifier, publishing an SPF record is a fundamental step for email authentication and is now considered a general best practice.
Assess current infrastructure: Before switching to -all, especially without DMARC, ensure all legitimate sending IP addresses and includes are accounted for to prevent deliverability issues. Read more about SPF qualifiers.
Use for non-sending domains: For domains that should never send email, v=spf1 -all is the appropriate and most secure SPF record configuration, as discussed in the context of DMARC, SPF, and DKIM for non-sending domains.
Expert view
Expert from Email Geeks states that the choice between ~all and -all in SPF often doesn't make a significant difference in email deliverability outcomes in modern contexts.
29 Dec 2021 - Email Geeks
Expert view
Expert from Word to the Wise explains that SPF, defined by RFC 7208, is an authentication protocol designed to link the Return-Path address to authorized sending IP addresses for a domain.
13 Jun 2014 - Word to the Wise
What the documentation says
Official documentation, primarily RFC 7208 (Sender Policy Framework), defines the technical specifications and intended behavior of SPF records, including the all mechanism and its qualifiers. While these RFCs provide the foundational rules, they often describe ideal behavior rather than the nuances of real-world implementation across diverse mail systems. The documentation distinguishes clearly between a fail (hardfail) and a softfail (softfail), outlining the different levels of certainty regarding a sender's authorization.
Key findings
SPF definition: SPF enables domain owners to explicitly define which IP addresses are authorized to send email from their domain, as specified in RFC 7208.
Fail (-all): A -all result is an explicit statement that the sending client is unauthorized to use the domain in the given identity, indicating a strong recommendation for rejection.
Softfail (~all): A ~all result indicates that the SPF validator has doubts about the message's authenticity, but it's not a definitive fail, suggesting a soft rejection or further scrutiny.
All mechanism: The all mechanism is a common way to end an SPF record, indicating that all other mechanisms have been evaluated, and this final mechanism matches any remaining IP addresses.
Key considerations
RFC compliance: Adhering to the specifications in RFC 7208 is crucial for proper SPF implementation and interoperability across mail systems.
Interaction with DMARC: While RFC 7208 defines SPF, the interaction of SPF results with DMARC policies (RFC 7489) is what truly determines the ultimate delivery action for unauthenticated mail.
Error handling: Using -all without DMARC p=reject can lead to hard rejections of legitimate emails if your SPF record has any omissions or errors.
Policy enforcement: The RFC states the intended meaning of ~all and -all, but how receiving servers interpret and act upon these recommendations can vary in practice.
Technical article
Documentation from RFC 7208, Sender Policy Framework, defines SPF as a mechanism for domain owners to specify which IP addresses are authorized to send mail from their domain, providing a foundational layer of email authentication.
Apr 2014 - RFC 7208
Technical article
Documentation from RFC 7208, Sender Policy Framework, clarifies that a "fail" result explicitly states the client's unauthorized use of the domain for the given identity, signaling to receiving servers that the email should likely be rejected.