What problem does SMTP STS actually solve?
Business email is delivered between mail servers over SMTP. While most modern servers support STARTTLS, classic SMTP is largely opportunistic: the sending server will try TLS, but if the receiving side doesn’t negotiate it (or if something interferes), delivery may continue without encryption. That leaves room for downgrade attacks where an attacker strips STARTTLS from the connection, or for scenarios where certificate validation isn’t enforced consistently.
SMTP Strict Transport Security (commonly referred to as MTA-STS) lets a domain publish an expectation: “When you send email to us, use TLS and validate it properly.” It does this via a small DNS signal record and a policy file served over HTTPS. The result is a more predictable, enforceable baseline for transport encryption to your inbound mail infrastructure.
How SMTP STS works: a two-part mechanism
SMTP STS relies on two components that work together:
- A DNS TXT record published at _mta-sts.yourdomain. This tells sending systems that your domain uses SMTP STS and provides a policy identifier (id) so senders know when the policy changes.
- An HTTPS policy file served from https://mta-sts.yourdomain/.well-known/mta-sts.txt. This file defines the mode (none/testing/enforce), the valid MX hostnames, and how long the policy should be cached.
At a high level, a sender checks your DNS record, fetches and caches the policy via HTTPS, then uses it to decide whether it should require TLS and strict certificate validation when delivering mail to your MX hosts.
Policy modes: none, testing, and enforce
mode: none
This mode typically provides little operational value beyond signaling that STS exists. It does not meaningfully raise the bar for delivery security because it doesn’t ask senders to enforce TLS requirements. It may be used in niche cases where you want the structure in place but don’t want any enforcement behavior.
mode: testing
Testing mode is designed for safe rollout. It allows STS-aware senders to evaluate your policy and, where supported, generate reports or internal telemetry about failures—without necessarily blocking delivery. For many organizations, this is the right first step before moving to enforce.
mode: enforce
Enforce is the “make it real” mode. With enforce enabled, STS-capable sending systems are expected to:
- Successfully negotiate TLS to the receiving MX host (STARTTLS must work).
- Validate the certificate correctly and ensure it matches the hostnames allowed by the policy.
If these requirements are not met, some senders will defer delivery and retry later, and others may fail delivery outright. That’s why enforce should only be enabled after you’ve confirmed hostname, certificate, and MX consistency end-to-end.
Understanding the policy file (mta-sts.txt)
The policy file is plain text with a simple structure. The most common fields are:
- version: Typically STSv1.
- mode: none, testing, or enforce.
- mx: One or more lines listing the acceptable MX hostnames. In practice, being explicit is safer than relying on patterns or assumptions.
- max_age: How long, in seconds, senders should cache the policy.
The critical operational detail is that the mx lines must match the MX hostnames that senders will actually connect to. SMTP STS is about hostnames and certificate validation; it is not an IP-based allowlist.
Common misconfiguration traps (and why they matter)
1) MX records and policy mx lines don’t match
If your DNS MX records point to mx1.mail.example.com but your policy lists a different hostname (or still contains a legacy hostname from before a migration), STS checks can fail. This commonly happens during infrastructure changes, when you add a gateway, or when you switch providers but forget to update the policy.
2) Certificate hostname mismatch
Even when TLS negotiates successfully, enforcement can still fail if the certificate presented by the receiving server doesn’t match the hostname the sender is connecting to. Ensure the certificate includes the right names (SANs) for the inbound MX endpoints. A “valid certificate” is not enough; it has to be valid for the right hostname.
3) The HTTPS policy endpoint is missing or broken
Publishing the DNS record but not serving the policy file correctly is a classic mistake. The URL must be reachable, must serve the correct content type as a simple text response, and must use a valid HTTPS certificate. Misrouted virtual hosts, missing intermediate certificates, or TLS configuration errors can all prevent senders from fetching the policy reliably.
4) max_age is too long during early rollout
A long max_age improves stability once everything is correct, because senders don’t need to refetch the policy frequently. But if you publish a flawed policy and max_age is very large, many senders will keep using the cached broken policy for days. A safer pattern is to start with a shorter max_age, validate behavior, then increase it gradually.
5) Switching to enforce too early
Enforce mode can create “silent” inbound delivery issues: mail simply doesn’t arrive from some senders, or it arrives late due to retries. Before enabling enforce, you want high confidence that every inbound path (including failover MX, gateways, and regional endpoints) supports TLS with the correct certificates and hostnames.
Is “SMTP STS” the same as “MTA-STS”?
In day-to-day operations, people often say “SMTP STS” when they mean “MTA-STS.” The standardized naming you’ll most often see is MTA-STS, and the DNS record is _mta-sts. The concept is the same: strict transport security expectations for SMTP delivery to your domain.
A practical rollout plan for organizations
1) Build an inbound inventory
List every MX hostname your domain uses, including backups, failover records, filtering gateways, or hybrid routing. Your policy must cover the real hostnames senders will attempt to deliver to, not just the primary path.
2) Validate TLS and certificate hygiene
Confirm STARTTLS works for each MX endpoint and that certificate chains are presented correctly. Also confirm that certificate renewal processes won’t unintentionally change names or break chain delivery. STS enforcement makes certificate quality operationally critical.
3) Start with testing
Enable mode: testing with a modest max_age (for example, a few days) and observe. During this period, fix any hostname mismatches, certificate issues, or routing edge cases. Treat STS as part of your change management rather than a one-time checkbox.
4) Move to enforce in a controlled way
Once testing shows stable results, increase max_age and transition to enforce. After that, any MX changes, gateway changes, or certificate changes should include an STS policy review step, because STS assumes a stable, coherent inbound identity.
What SMTP STS does not guarantee
SMTP STS strengthens transport encryption between servers; it does not provide end-to-end message encryption. It also doesn’t protect you from compromised mailboxes, phishing that tricks users, or unsafe retention and access practices on the receiving side. Think of STS as one defensive layer that reduces certain network-level risks, not as a complete email security program.
Final checklist and operational tips
- Keep MX hostnames and policy mx lines aligned, especially during migrations and failovers.
- Ensure the mta-sts subdomain serves HTTPS correctly with a valid certificate and predictable routing.
- Use a short max_age early, then increase it once stable.
- Don’t skip testing if you plan to enforce; enforce is where small mistakes become delivery incidents.
- Include STS in change management for DNS, certificates, and inbound routing changes.
Used thoughtfully, SMTP STS helps organizations raise the baseline for TLS on inbound delivery and reduce downgrade risk. If you manage business email with a platform like MX1Mail, it’s still important to treat SMTP STS as an infrastructure discipline: DNS accuracy, hostname design, and certificate lifecycle management all need to move together for a smooth, interruption-free rollout.