Suped

Summary

The consensus is that the choice between '~all' (soft fail) and '-all' (hard fail) in an SPF record hinges primarily on DMARC implementation. When DMARC is correctly configured with a 'reject' policy, the choice becomes less critical, as DMARC handles SPF failures. Without DMARC, the decision requires more nuance. '-all' offers stricter security by instructing receiving servers to reject unauthorized emails, but risks blocking legitimate emails if SPF is misconfigured. '~all' is more forgiving, accepting emails but potentially marking them as spam. Some experts recommend starting with '~all' for safety. It's also crucial to remember that SPF only prevents forgery of the envelope sender address and doesn't address all forms of spoofing. Therefore, SPF is a component of a broader email authentication strategy, and publishing an SPF record is generally considered a best practice.

Key findings

  • DMARC Dominance: DMARC with a 'reject' policy makes the '~all' vs. '-all' decision less impactful.
  • Hard vs. Soft Fail Defined: '-all' rejects failing emails; '~all' accepts but may mark as spam.
  • Configuration Risks: Misconfigured SPF with '-all' can lead to legitimate email rejections.
  • SPF Limitations: SPF solely addresses envelope sender forgery, not all types of spoofing.
  • Best Practice: Publishing an SPF record is a generally accepted best practice.

Key considerations

  • DMARC Prioritization: Implement and correctly configure DMARC (especially 'reject' policy).
  • SPF Accuracy: Ensure SPF record accuracy to avoid unintended consequences from '-all'.
  • Start with '~all'?: Consider beginning with '~all' as a safer starting point.
  • Comprehensive Authentication: View SPF as part of a wider email authentication strategy (DKIM, DMARC).
  • Testing is Essential: Test and monitor SPF setup to avoid deliverability issues.

What email marketers say

8 marketer opinions

The choice between using '~all' (soft fail) and '-all' (hard fail) in an SPF record depends largely on whether DMARC is implemented and configured correctly. '-all' instructs receiving servers to reject emails that fail SPF, offering stricter security but risking deliverability issues if SPF is misconfigured. '~all' is more lenient, allowing emails to be accepted but potentially marked as spam. With DMARC properly configured (especially with a 'reject' policy), the choice becomes less critical as DMARC dictates how SPF failures are handled. Experts recommend prioritizing proper DMARC setup and thorough testing of SPF configurations. Some favor '~all' initially for safety, while others advocate for '-all' for stronger authentication once confident in their SPF setup.

Key opinions

  • Hard vs. Soft Fail: -all (hard fail) rejects emails failing SPF; ~all (soft fail) accepts but may mark as spam.
  • DMARC Impact: With DMARC 'reject' policy, the choice between ~all and -all is less critical.
  • Configuration Matters: Misconfigured SPF with -all can cause legitimate emails to be rejected.
  • Initial Setup Recommendation: Starting with ~all provides a safety net during initial SPF setup.

Key considerations

  • DMARC Implementation: Ensure DMARC is properly configured to handle SPF failures effectively.
  • SPF Accuracy: Thoroughly test and monitor SPF configuration to avoid deliverability issues with -all.
  • Security vs. Deliverability: Balance the need for stricter security (-all) with the risk of blocking legitimate emails.
  • Host Requirements: Some email hosts may have specific requirements or behaviors regarding SPF policies.

Marketer view

Email marketer from Mailhardener shares that using '-all' can potentially cause issues with legitimate email if SPF is not perfectly configured. '~all' is more forgiving but might result in more spam reaching inboxes if DMARC is not in place. They recommend proper testing and monitoring when implementing SPF.

24 Mar 2024 - Mailhardener

Marketer view

Email marketer from StackOverflow answers that '~all' provides a safety net, allowing for potential misconfigurations without immediately blocking legitimate emails, while '-all' is stricter and ensures that only authorized sources are accepted. Recommends starting with '~all' and transitioning to '-all' once confident in the SPF setup.

11 Mar 2024 - StackOverflow

What the experts say

5 expert opinions

The choice between '~all' and '-all' in an SPF record is less critical when DMARC with a 'reject' policy is implemented; in this scenario, '~all' is often preferred. Without DMARC, the decision is more complex, with some still favoring '-all'. While SPF helps prevent forgery of the envelope sender address, it doesn't prevent all types of spoofing and is just one component of a comprehensive email authentication strategy. Publishing an SPF record is now considered a best practice.

Key opinions

  • DMARC Impact: DMARC p=reject makes the choice between '~all' and '-all' less significant.
  • No DMARC: Without DMARC, the decision between '~all' and '-all' requires more consideration; some prefer '-all'.
  • SPF Scope: SPF prevents envelope sender forgery but not all spoofing methods.
  • Best Practice: Publishing an SPF record is now a recommended best practice.

Key considerations

  • DMARC Configuration: Prioritize implementing and correctly configuring DMARC, especially with a 'reject' policy.
  • Spoofing Protection: Understand that SPF alone does not provide complete protection against spoofing.
  • Authentication Strategy: View SPF as one part of a broader email authentication and security strategy.
  • Testing: Ensure your setup doesn't cause issues.

Expert view

Expert from Word to the Wise explains that SPF prevents forgery of the envelope sender address, which is used for bounce processing. It does not prevent display name spoofing, content spoofing, or reply-to spoofing. She concludes that SPF is a piece of the puzzle, but not the whole answer.

28 Jun 2023 - Word to the Wise

Expert view

Expert from Email Geeks explains that SPF does not prevent spoofed emails and publishing SPF records is now a best practice.

20 Sep 2022 - Email Geeks

What the documentation says

4 technical articles

The documentation indicates that '-all' (hard fail) in an SPF record tells receiving servers to reject emails that fail SPF checks, signifying that the sender is not authorized. '~all' (soft fail) instructs servers to accept such emails but potentially mark them as suspicious. The significance of this choice diminishes with DMARC adoption, as DMARC policies then govern SPF failure handling. RFC 7208 specifies the technical details of the 'all' mechanism and its qualifiers. Microsoft documentation adds that '~all' provides leniency for misconfigurations, while '-all' is a stricter declaration. Therefore, DMARC implementation becomes a key consideration.

Key findings

  • Hard Fail vs Soft Fail: '-all' rejects emails failing SPF; '~all' accepts but may flag as suspicious.
  • DMARC Supersedes: DMARC configuration largely determines the handling of SPF failures.
  • RFC Specification: RFC 7208 defines technical details of the 'all' mechanism.
  • Lenient vs Strict: '~all' is lenient for potential misconfigurations; '-all' is a stricter declaration.

Key considerations

  • Implement DMARC: Ensure DMARC is implemented to effectively manage email authentication.
  • SPF Accuracy: Maintain an accurate SPF record to avoid false rejections with '-all'.
  • Testing and Monitoring: Monitor email deliverability after SPF configuration changes.
  • Understand Implications: Know the implications of hard vs soft fail on deliverability and security.

Technical article

Documentation from Google Workspace Admin Help explains that -all (Fail) indicates that emails from a domain that do not match the SPF record should be rejected. ~all (Softfail) indicates that emails from a domain that do not match the SPF record should be accepted but marked.

31 Aug 2021 - Google Workspace Admin Help

Technical article

Documentation from RFC 7208 defines the 'all' mechanism in SPF records. It explains that 'all' always matches and can be qualified with '+', '-', '~', or '?' to specify the desired result. '-all' results in a 'fail' result, while '~all' results in a 'softfail' result. This document highlights the technical specifications of the 'all' mechanism.

14 Mar 2023 - RFC Editor

Start improving your email deliverability today

Sign up