What is MTA-STS?
MTA-STS (Mail Transfer Agent Strict Transport Security) is a DNS and HTTPS-based security standard that forces sending mail servers to use authenticated TLS encryption when delivering email to your domain. It eliminates the STARTTLS downgrade vulnerability that has existed in SMTP since opportunistic encryption was introduced.
Without MTA-STS, SMTP email delivery uses opportunistic TLS — the sending server advertises TLS support during the SMTP handshake, but an attacker between the two servers can strip the STARTTLS command from the unencrypted greeting, forcing the sender to deliver mail in plaintext. MTA-STS blocks this attack by delivering the policy requirement over a separate, trusted HTTPS channel that the attacker cannot manipulate.
Published as an RFC 8461 standard, MTA-STS is supported by all major sending MTAs including Gmail, Microsoft 365, Yahoo, and most enterprise mail systems.
Check your MTA-STS configuration: Validate MTA-STS policy and mode →
Why STARTTLS is not enough: the downgrade attack problem
When SMTP was designed, email was transmitted in plaintext. STARTTLS was added later as an opportunistic upgrade — the sending server proposes TLS, the receiving server accepts, and the connection upgrades. This works well in the absence of active attackers.
The vulnerability: the STARTTLS command itself is transmitted in the initial plaintext greeting, before any encryption is established. An attacker on the network path (malicious ISP, compromised router, BGP hijacker) can intercept the connection and silently remove 250-STARTTLS from the server's capability list. The sending MTA sees no TLS offered, assumes the receiving server does not support it, and delivers the email in plaintext to the attacker — who then forwards it along to the real mail server.
This is not a theoretical attack. STARTTLS stripping has been documented in state-actor-level network interception. MTA-STS eliminates the attack by providing TLS requirements through an out-of-band channel (HTTPS) that cannot be stripped from an SMTP session.
The three MTA-STS policy modes
| Mode | Sender Behavior | When to Use |
|------|----------------|-------------|
| mode: none | Policy is announced but not enforced — senders ignore it | Effectively disabled; not recommended |
| mode: testing | Senders report TLS failures but still deliver mail | Rollout phase — 30-60 days minimum |
| mode: enforce | Senders refuse to deliver if TLS validation fails | Production — after confirming zero TLS failures in reports |
The transition from testing to enforce is where most implementations go wrong. Teams rush to enforcement without monitoring TLS-RPT reports, resulting in inbound mail delivery failures from senders who correctly refuse to deliver to misconfigured MX hosts.
Required DNS TXT record + HTTPS policy file
MTA-STS requires two components working together:
DNS TXT record at _mta-sts.yourdomain.com:
_mta-sts.example.com. IN TXT "v=STSv1; id=20260101T000000;"
This signals to senders that a policy exists and provides a version identifier for cache invalidation.
HTTPS policy file at https://mta-sts.yourdomain.com/.well-known/mta-sts.txt:
version: STSv1
mode: enforce
mx: mail.example.com
mx: mail2.example.com
max_age: 604800
The policy file lists the exact MX hostnames that senders should connect to and the TLS enforcement mode. The max_age value (in seconds) tells senders how long to cache the policy — longer cache periods provide protection even when the HTTPS server is temporarily unreachable, but also slow down policy updates.
How to deploy MTA-STS safely
MTA-STS vs DANE: choosing the right approach
Both MTA-STS and DANE address SMTP downgrade attacks, but they operate differently:
| Feature | MTA-STS | DANE | |---------|---------|------| | Trust mechanism | Web PKI (CA certificates) + HTTPS | DNSSEC + TLSA records | | DNSSEC required | No | Yes — mandatory | | Sender adoption | High (Gmail, Microsoft, Yahoo) | Limited (Comcast, some European providers) | | Certificate pinning | No — any valid CA cert works | Yes — pins specific cert or key | | Operational complexity | Moderate — maintain HTTPS server + DNS | High — requires DNSSEC expertise | | Best for | Most organizations | High-security environments with DNSSEC |
For most organizations, MTA-STS offers the better balance of security improvement and operational feasibility. DANE provides stronger cryptographic guarantees but demands DNSSEC on your domain and has less sender support outside of specialized environments (particularly required by BSI TR-03108 for German government communications).
Deploying both MTA-STS and DANE simultaneously is valid and recommended for the highest protection level — DANE enforces for senders that support it, MTA-STS enforces for the broader sender ecosystem.
Common MTA-STS errors
Stale policy file (MX mismatch): If you change your MX records but forget to update the policy file and increment the DNS id, senders in enforce mode will refuse delivery because your MX hosts no longer match the policy. Always update the policy file and increment id before changing MX records.
Expired certificate on mta-sts subdomain: The HTTPS web server hosting the policy file must have a valid TLS certificate. If it expires, senders cannot fetch the policy — behavior depends on their cache: senders with cached policy continue enforcing it; senders without cache may skip enforcement or treat the fetch failure conservatively.
MX hostname mismatch: The mx: values in the policy file must match your actual MX DNS records exactly. If DNS says aspmx.l.google.com and the policy file says smtp.gmail.com, enforcement fails.
Going direct to enforce: Never deploy mode: enforce without first running mode: testing for 30-60 days and reviewing TLS-RPT reports. Even a single misconfigured MX host with an expired certificate will cause inbound mail failures from enforce-compliant senders.
Technical Architecture
MTA-STS is defined in RFC 8461 and fundamentally changes the email trust model from opportunistic to strict:
Legacy model (vulnerable): Sending MTA trusts the initial plaintext SMTP greeting from the receiving server. Attacker strips 250-STARTTLS → sender delivers in plaintext.
MTA-STS model (secure): Sending MTA fetches TLS policy from a separate HTTPS endpoint (authenticated by Web PKI). Policy says enforce → sender must establish valid TLS to listed MX hosts with valid certificates or refuse delivery.
version: STSv1
mode: enforce
mx: mx1.example.com
mx: mx2.example.com
max_age: 604800
DNS TXT record:
_mta-sts.example.com. IN TXT "v=STSv1; id=20260701T120000;"
Security Risks Without MTA-STS
- STARTTLS Stripping: Network-path attackers strip
250-STARTTLS, forcing plaintext delivery — full message content visible to attacker - BGP Hijacking: Attacker hijacks MX prefix routing, accepts delivery without TLS, captures message content
- Compliance Failures: HIPAA, GDPR, and CJIS require encrypted email transit — relying on opportunistic TLS provides no enforceable guarantee
Compliance Impact
- CISA Guidance: Strongly encourages MTA-STS for all federal .gov domains
- HIPAA: Covered entities must protect ePHI in transit — opportunistic TLS is insufficient; MTA-STS provides the enforceable guarantee
- GDPR Article 32: State-of-the-art technical measures for data security — STARTTLS stripping vulnerability makes opportunistic TLS increasingly non-compliant for sensitive communications
Best Practices for MTA-STS in 2025/2026
- Always deploy TLS-RPT first — you need failure visibility before you can safely enforce
- Never skip the testing phase — 30-60 days minimum before
mode: enforce - Automate certificate renewal on
mta-stssubdomain — an expired policy file certificate breaks policy delivery - Update
idwhenever you change the policy file — senders use this to invalidate their cache and re-fetch - Set high
max_agein enforce mode — long cache duration (30 days) provides protection even during brief outages of your policy web server
Tools to check your MTA-STS
Use the CyberFurl MTA-STS checker to validate your full MTA-STS deployment — DNS record syntax, policy file reachability, HTTPS certificate validity, MX hostname accuracy, and mode. After any change to your MX records or TLS certificates, re-run the checker to confirm the policy file remains accurate. For deployment guidance and continuous posture monitoring, the checker pairs with TLS-RPT analysis.
How CyberFurl Helps
Automated monitoring. Zero manual work.
CyberFurl validates your full MTA-STS deployment end-to-end: DNS record syntax, policy file reachability, TLS certificate validity on the mta-sts subdomain, MX hostname accuracy, and enforcement mode. Combined with TLS-RPT report analysis, CyberFurl provides continuous visibility into whether enforcement is causing delivery failures - giving teams the evidence to reach enforce mode safely.
