Email Security DANE_SOFTFAIL_ENABLED

Silent Failures in DANE: Why Softfail Configuration Enables Mail Interception

Published August 29, 2026 Updated August 29, 2026

Silent Failures in DANE: Why Softfail Configuration Enables Mail Interception

Introduction

DANE (DNS-based Authentication of Named Entities) defends against man-in-the-middle attacks on email delivery. By publishing TLSA records in DNS, domain operators pin their SMTP servers' TLS certificates cryptographically, making certificate forgery harder for attackers. Yet organizations deploy DANE regularly only to undermine its security with a single configuration choice: telling their mail transfer agents (MTAs) to continue delivery when certificate validation fails.

This misconfiguration, commonly called softfail or opportunistic DANE, creates a silent vulnerability. The TLSA records publish the intended security posture. Monitoring dashboards report DANE deployment as complete. But when an attacker intercepts mail traffic or poisons DNS, the MTA delivers anyway. The security investment becomes theater.

How DANE Softfail Works

DANE defines three validation modes for SMTP clients:

  • DANE-Only (DNSSEC + TLSA mandatory): Fail delivery if TLSA validation fails or DNSSEC is missing.
  • DANE-Preferred (DNSSEC + TLSA preferred, fallback to unauthenticated TLS): Attempt DANE validation; if it fails, negotiate standard TLS without certificate pinning.
  • Opportunistic (best effort, fallback to plaintext): Attempt DANE; fall back to TLS; ultimately allow plaintext SMTP.

Many organizations configure their inbound MTAs with a softfail policy: "If the remote server has a TLSA record and it validates, use it. Otherwise, proceed with standard TLS negotiation or unencrypted SMTP." The intention is graceful degradation. The result is security that depends entirely on the attacker not interfering.

Consider this Postfix configuration, common in production:

smtp_tls_security_level = may
smtp_tls_dane_protocols = TLSv1.2, TLSv1.3
smtp_tls_dane_required_protocols = TLSv1.2, TLSv1.3
smtp_tls_mandatory_protocols = TLSv1.2, TLSv1.3

The smtp_tls_security_level = may directive instructs Postfix to encrypt if the server supports it, but continue unencrypted if encryption fails. Some MTAs ship with DANE disabled by default. Sendmail, Exim, and other MTAs offer similar softfail configurations. The administrator publishes TLSA records believing DANE is "enabled," never realizing their MTA continues delivery regardless.

Attack Scenario: DNS Spoofing or Poisoning

An attacker positioned on the network path between two mail servers, perhaps via BGP hijacking, ARP spoofing on a shared network segment, or DNS cache poisoning, observes outbound mail from a domain protected by DANE.

The attack unfolds:

  1. Reconnaissance: The attacker queries DNS for the victim domain's TLSA records. They exist and are valid. DNSSEC signature verification passes, or DNSSEC is absent but not checked due to softfail policy.

  2. Interception: The attacker intercepts the TCP connection to the destination MTA's port 25 (or 587/465). Modern MTAs offer TLS; the attacker presents their own certificate, whether self-signed, stolen, or issued by a compromised CA.

  3. Silent Failure: The receiving MTA's TLSA validation fails. The certificate does not match the pinned certificate from the TLSA record. But because softfail is configured, the MTA logs a warning and accepts the connection anyway, completing the SMTP handshake with the attacker's certificate.

  4. Exploitation: The attacker reads, modifies, or redirects the email before forwarding it to the legitimate destination (if forwarding at all). Credential reset links, payment confirmations, multi-factor authentication codes, and sensitive business communications flow through the attacker's proxy undetected.

The victim domain's logs show successful TLS delivery. DANE monitoring reports healthy TLSA records. The breach may go unnoticed for months.

Organizational Impact

The cost of this misconfiguration compounds:

Data Breach: Email is the primary vector for credential theft and lateral movement. Interception of password resets, OAuth tokens, or MFA codes leads directly to account compromise. Supply chain attacks can be staged through vendor communications.

Regulatory Exposure: HIPAA, PCI-DSS, SOC 2, and emerging privacy regimes expect organizations deploying DANE to enforce it. Softfail policies undermine the intent of these standards. Breach disclosures often reveal that "DANE was deployed but not enforced," inviting regulatory scrutiny.

Reputation Damage: Once discovered, a mail interception incident damages business relationships and customer trust. The discovery that TLSA records were published but ignored erodes confidence in the organization's security practices.

Silent Attack Window: Unlike TLS certificate warnings that alert administrators to revocation or expiration, a softfail DANE attack produces no alerts. The attacker can operate for months without triggering incident detection.

Detection and Monitoring

Effective monitoring catches softfail misconfigurations before they become liabilities:

TLSA Record Audit: Regularly verify that all published TLSA records correspond to deployed TLS certificates. A mismatch indicates either a stale record or, worse, an attacker's injected record.

# Query TLSA records
dig +short _443._tcp.mail.example.com TLSA

# Extract certificate fingerprint and compare to deployed cert
openssl s_client -connect mail.example.com:25 -starttls smtp </dev/null | \
  openssl x509 -noout -fingerprint -sha256

MTA Configuration Compliance: Audit MTA configurations against a baseline that enforces DANE. For Postfix:

smtp_tls_dane_required = yes  # Enforce DANE-only mode

For Exim:

tls_verify_certificates = ${if exists{/etc/exim/dane_required}\
                           {DANE}\
                           {system}}

DNSSEC Validation: Verify that DNSSEC signing is enabled on your authoritative nameservers and that resolvers validating TLSA records perform full DNSSEC validation. A TLSA record without DNSSEC protection can be forged.

Mail Flow Monitoring: Monitor outbound mail delivery logs for TLSA validation failures. A sudden spike in "DANE validation failed, continuing anyway" messages indicates possible active attacks or recent configuration drift.

Third-Party DANE Validation: Services like checkmx.io and MXToolbox offer DANE assessment. Use them to verify that remote servers attempting to deliver mail to your domain will enforce TLSA validation.

Remediation and Implementation

Correcting softfail misconfiguration requires both policy change and operational planning:

1. Prepare Your TLSA Records

Before enforcing DANE, ensure your TLSA records are correct and will remain valid through certificate rotation:

_25._tcp.mail.example.com. 3600 IN TLSA 3 1 1 \
  d2abde240d7cd3ee6b4b28c54df034b7 \
  7d0c2f631e973e55a8b6a2599d3c4a0b

The format is TLSA usage selector match-type cert-fingerprint:

  • Usage 3: DANE-EE (domain-issued, end-entity only)
  • Selector 1: Public key (survives certificate renewal)
  • Match-type 1: SHA-256 hash

Using selector 1 (public key) rather than selector 0 (full certificate) allows certificate rotation without TLSA updates, provided the private key remains the same.

2. Enable DNSSEC

Ensure DNSSEC is enabled on your authoritative nameservers:

dnssec-keygen -a RSASHA256 -b 2048 example.com
dnssec-signzone -A -3 -N INCREMENT -f example.com.signed example.com

3. Update MTA Configuration

For Postfix, move from softfail to DANE-Preferred or DANE-Only:

# Enforce DANE for outbound mail
smtp_tls_dane_required = yes

# For inbound mail (receiving), enforce DANE on DNSSEC-signed domains
smtpd_tls_dane_required = yes

For Exim:

smtp_tls_try_dane = yes
smtp_tls_require_dane = yes

4. Gradual Rollout

Roll out enforcement gradually:

  • Phase 1: Enable DANE-Preferred for small recipient domains; monitor for delivery failures.
  • Phase 2: Extend to 50% of mail volume; watch for false positives caused by misconfigured TLSA records at recipient domains.
  • Phase 3: Roll out to 100%, with exceptions for domains known to have broken DANE or missing DNSSEC.

5. Alert on Configuration Drift

Implement automated checks to ensure DANE enforcement remains enabled:

# Verify Postfix configuration
postconf smtp_tls_dane_required | grep -q 'yes' || alert "DANE not enforced"

Key Takeaways

  • DANE without enforcement is security theater. Publishing TLSA records while configuring softfail policies enables mail interception without triggering alerts.
  • Softfail is a choice, not a default requirement. Modern MTAs support full DANE enforcement. Graceful degradation undermines security.
  • DNSSEC is mandatory. TLSA records without DNSSEC signatures can be forged. Verify DNSSEC validation is active on inbound mail resolvers.
  • Monitor constantly. TLSA record validation failures, certificate mismatches, and configuration drift often precede active exploitation.
  • Enforce at scale. Organizations handling email at any volume should require DANE-Preferred or DANE-Only policies and audit remote senders for compliance. Opportunistic encryption combined with certificate pinning is a contradiction; resolve it in favor of pinning.