MTA-STS, or SMTP MTA Strict Transport Security, is a standard defined in RFC 8461 that lets a domain publish a policy requiring sending mail servers to deliver email only over TLS with a trusted certificate. If a server cannot make a secure, authenticated connection, it must not deliver the message in enforce mode, which blocks STARTTLS downgrade and interception attacks.
Key takeaways
- MTA-STS forces sending servers to use authenticated TLS when delivering mail to your domain, closing the STARTTLS downgrade gap.
- It needs two parts: a _mta-sts DNS TXT record and a policy file served over HTTPS at mta-sts.yourdomain.com.
- Start in testing mode, watch TLS reports, then move to enforce mode so a failed check blocks delivery instead of warning you.
Most email travels over TLS today, but that encryption is usually optional. If an attacker on the network path strips the STARTTLS offer, the sending server quietly falls back to plain text — and nobody notices. MTA-STS closes that gap by letting your domain say, in advance, that unencrypted delivery is not acceptable.
What is MTA-STS?
MTA-STS is a standard, defined in RFC 8461 in September 2018, that lets a domain declare it can receive TLS-secured SMTP connections and tell sending servers to refuse delivery to mail servers that do not offer TLS with a trusted certificate.
The full name is SMTP MTA Strict Transport Security. Think of it as HSTS for email: just as HSTS tells browsers to use HTTPS only, MTA-STS tells mail servers to use authenticated TLS only. It does not replace SPF, DKIM or DMARC. Those check who sent a message; MTA-STS protects how the message travels between servers.
It matters because email delivery is opportunistic by default. A sending server tries STARTTLS, and if the other side does not offer it — or an attacker removes the offer — it sends the message in plain text anyway. MTA-STS turns that silent fallback into a policy decision your domain controls.
Why is MTA-STS needed if email already uses TLS?
STARTTLS is vulnerable to downgrade attacks because the upgrade to encryption is negotiated in plain text. An active attacker can delete the STARTTLS advertisement, so the sender believes the receiver does not support TLS at all.
That attacker can then read the message, change its contents, or harvest credentials and reset links inside it. RFC 8461 describes this directly: MTA-STS exists to protect against an active attacker trying to intercept or tamper with mail between hosts that support STARTTLS, as set out in the full RFC 8461 text.
The protection only works if the sender already has your policy cached. A first-time sender with no cached policy has nothing to enforce, which is why MTA-STS is a strong layer, not a complete fix. It also cannot help if an attacker holds a valid certificate for your mail servers — certificate validation is only as strong as the certificate authority system.
How does MTA-STS work?
When a sending server that supports MTA-STS delivers mail to your domain, it first checks for your policy, fetches it over HTTPS, and then connects to your mail servers only if they match the policy. If the check fails in enforce mode, it refuses to deliver.
Here is the sequence in detail. First, the sender queries the TXT record at _mta-sts.yourdomain.com. That record says whether a policy exists and gives its ID. Second, the sender fetches the policy file over HTTPS from https://mta-sts.yourdomain.com/.well-known/mta-sts.txt.
Third, the sender compares your MX hosts and their TLS certificates against the policy. The policy lists the mail servers allowed to receive mail for your domain, using mx: entries that can be exact hostnames or wildcards. Finally, the sender delivers over authenticated TLS, or refuses if the check fails and the mode is enforce.
What are the MTA-STS policy modes?
MTA-STS has three modes: testing, enforce and none. Testing mode tells senders to deliver mail even when the TLS check fails, but to send a report about the failure. Enforce mode tells them to refuse delivery when the check fails.
| Mode | What the sender does on a failed TLS check | When to use it |
|---|---|---|
| testing | Delivers the message anyway and reports the failure | Rollout and monitoring, for at least a few weeks |
| enforce | Refuses to deliver the message | After testing shows no legitimate failures |
| none | Ignores the policy and deletes any cached copy | Retiring MTA-STS for a domain |
Always start in testing mode. A typo in the MX list, an expired certificate, or a mail server you forgot about will show up in TLS reports instead of blocking real mail. Only switch to enforce when the reports are clean. The none mode is for removal: it tells senders to discard the cached policy.
Two other fields matter. max_age sets how long senders cache the policy, in seconds — a common value is 604800 (one week) at first, rising to 2592000 (30 days) or more once stable. The id in the DNS record must change whenever you change the policy, so senders know to fetch a fresh copy.
How do you set up MTA-STS?
Setup has three parts: publish the DNS record, host the policy file over HTTPS, and set up TLS reporting so you can see failures before you enforce. Do them in that order, and stay in testing mode first.
- List your real MX hosts. Check your MX records with our free MX lookup and write down every host that receives mail for your domain, including any backup or third-party inbound servers.
- Create the policy file. It is plain text, served at
https://mta-sts.yourdomain.com/.well-known/mta-sts.txt, and looks like this:version: STSv1 mode: testing mx: mail.yourdomain.com mx: *.mailprovider.com max_age: 604800
- Host it with a valid certificate. The
mta-stssubdomain needs a trusted TLS certificate. A certificate error means senders cannot fetch the policy at all. - Publish the DNS TXT record at
_mta-sts.yourdomain.com, for example:v=STSv1; id=20261125; - Add a TLS-RPT record so senders report failures to you, for example:
_smtp._tls.yourdomain.com TXT "v=TLSRPTv1; rua=mailto:[email protected]" - Monitor for a few weeks, then switch to enforce. Change
mode: testingtomode: enforcein the policy file and update the DNSidto match.
If your mail provider offers managed MTA-STS, use it. A good walkthrough of the mechanism is DMARCwise's introduction to MTA-STS. Many hosted providers publish the policy host for you or offer a setup guide in their admin console. Managed setup removes the riskiest part: keeping the policy host and its certificate alive.
What does a real MTA-STS policy look like?
A finished policy is short. The example below is for a fictional domain, example.com, whose mail is handled by two hosts. The DNS record and the policy file must agree, and the ID must change on every update.
Notice the wildcard mx: entry. It covers every host under a provider subdomain, which is useful when your provider rotates mail servers. But a wildcard that is too broad weakens the policy, because it accepts more hosts than you actually use. List only the hosts and subdomains that really receive your mail.
Also note the max_age of 2592000 seconds, or 30 days. A long cache means senders keep enforcing your policy even if your policy host has a brief outage. A short cache means policy changes spread faster. Start short, lengthen once you are confident.
MTA-STS vs DANE: which should you use?
MTA-STS and DANE solve the same problem — authenticating the TLS connection for mail delivery — with different trust roots. MTA-STS trusts the web certificate system; DANE trusts DNSSEC. Your choice depends on whether you already run DNSSEC.
| MTA-STS | DANE | |
|---|---|---|
| Defined by | RFC 8461 | RFC 6698 (TLSA records) |
| Needs DNSSEC? | No | Yes, to be trustworthy |
| Policy location | HTTPS policy file | TLSA records in DNS |
| Protects first contact? | No, needs a cached policy | Yes, if DNSSEC validates |
| Setup effort | Moderate: DNS plus a web host | Moderate: DNSSEC plus TLSA records |
| Reporting | TLS-RPT (RFC 8460) | No built-in reporting |
If you already run DNSSEC, DANE is the stronger option and you can run both together — they complement each other. If you do not run DNSSEC and do not plan to, MTA-STS is the practical choice. Either is far better than relying on opportunistic STARTTLS alone.
Neither replaces DMARC. MTA-STS and DANE protect the transport; DMARC, SPF and DKIM authenticate the sender. A complete email security setup uses all of them. Our guide to what DMARC is explains the sender-authentication side.
What is TLS reporting, and why pair it with MTA-STS?
TLS reporting, defined in RFC 8460 as TLS-RPT, is the feedback channel for MTA-STS. Sending servers that encounter a TLS failure send a report to the address in your _smtp._tls DNS record, so you can see what went wrong before it blocks mail.
Without TLS-RPT, enforce mode is a leap in the dark. You would only learn about a problem when someone tells you their email bounced. With it, you get structured reports showing which sending domains failed, which MX host was involved, and what the error was — an expired certificate, a hostname mismatch, or a missing MX entry.
Read the reports weekly during rollout. A single failing sender is usually their problem; a pattern across many senders points at your policy. Fix the policy, update the DNS ID, and wait for the cache to refresh before judging the result.
What are the common MTA-STS mistakes?
Most MTA-STS failures are self-inflicted, and most are avoidable. The expensive one is switching to enforce mode before testing, which can block legitimate incoming mail for days while the cached policy expires.
- Going straight to enforce. Always run testing mode first and read the TLS reports.
- Forgetting an MX host. A backup mail server, a third-party spam filter or a provider you use for one department must all be in the
mx:list. - Letting the policy certificate expire. If the
mta-stshost certificate lapses, senders cannot fetch your policy. Monitor it like any production certificate — our free SSL checker can verify it. - Not updating the policy ID. Change the DNS
idevery time you edit the policy file, or senders will keep enforcing the old version. - Using a wildcard that is too broad. A wildcard MX entry that covers hosts you do not control weakens the whole policy.
- Publishing MTA-STS but no TLS-RPT record. Without reporting you have no visibility into failures.
- Assuming it encrypts message content end to end. It protects mail in transit between servers, not from the servers themselves.
Who should use MTA-STS?
Any organization that sends or receives sensitive email should consider it: finance, healthcare, legal, government, and any business whose customers reset passwords or receive invoices by email. Those messages are exactly what an attacker wants to intercept or alter in transit.
For a small business on a hosted mail provider, the effort is small — often a support ticket or a toggle in the admin console. For a company running its own mail servers, it is a modest project with a real payoff: a policy that turns a silent downgrade into a refused delivery.
It is less urgent if your mail provider already enforces strict TLS for your domain through its own controls, or if you have DANE with DNSSEC in place. Check what your provider already does before adding your own policy, so you do not create two conflicting rules.
The bottom line
MTA-STS is a small standard with an outsized effect: it takes email encryption from a polite request to a rule your domain enforces. Publish the DNS record, host the policy file, watch the TLS reports in testing mode, and only then enforce.
Pair it with DMARC at p=reject and TLS reporting, and your domain stops being an easy target for downgrade attacks. You can see how your domain scores today with the free email security score tool, then work through the gaps it finds.
Frequently asked questions
What does MTA-STS stand for?
MTA-STS stands for SMTP MTA Strict Transport Security. MTA means mail transfer agent, the server that sends and receives email. The name mirrors HSTS for websites: it is a strict transport security policy, but for mail servers instead of browsers.
Is MTA-STS the same as STARTTLS?
No. STARTTLS is the mechanism that upgrades a plain SMTP connection to encrypted TLS, but it is optional and can be stripped by an attacker. MTA-STS is the policy layer on top of STARTTLS that tells senders they must use TLS with a trusted certificate, and what to do when they cannot.
Do I need DNSSEC to use MTA-STS?
No, and that is one of its main advantages. RFC 8461 states that MTA-STS was designed to provide transport security even when deploying DNSSEC is undesirable or impractical. The policy itself is fetched over HTTPS, so its authenticity comes from the web certificate, not DNSSEC.
What happens if my MTA-STS policy expires?
Sending servers cache your policy for the max_age period you set, usually weeks or months. After it expires they fetch it again. If your policy host is down or your certificate is invalid when they try, senders in enforce mode may refuse to deliver mail to you, so keep the policy host and certificate healthy.
Does MTA-STS encrypt the content of my emails?
No. MTA-STS encrypts the connection between mail servers in transit, so nobody on the network path can read or alter the message while it travels. It does not provide end-to-end encryption: the message is still readable by the sending and receiving mail servers themselves.
Should small businesses use MTA-STS?
Yes, if you run your own domain and your mail provider supports it. Most hosted providers handle the policy host for you or offer a one-click setup. If your provider does not support it, ask them, because a misconfigured policy can block your incoming mail.
How is MTA-STS different from DANE?
Both aim to authenticate TLS for mail delivery. DANE uses DNSSEC-signed TLSA records to pin the certificate a mail server must present. MTA-STS uses a policy fetched over HTTPS and does not need DNSSEC. DANE is stronger when DNSSEC is in place; MTA-STS is easier to deploy without it.
How long does it take to set up MTA-STS?
The DNS record takes minutes, and the policy file is a few lines of text. The safe rollout takes longer: run in testing mode for at least a few weeks, read the TLS reports, fix any certificate or MX mismatch, and only then switch to enforce mode.
Sources
The engineers and analysts who build Cysoro's domain scanner, email-authentication checks and free security tools. We test what we write about every day — SPF, DKIM, DMARC, certificates, look-alike domains and phishing — and check each guide against the relevant standards, government guidance and vendor documentation.
Checked against RFC 8461 (MTA-STS) and RFC 8460 (SMTP TLS Reporting).
How we write and fact-check →