On this page
MTA-STS Explained
MTA-STS (SMTP MTA Strict Transport Security) is a standard that lets a domain publish a policy, in a DNS record and a file on an HTTPS site, asking other mail servers to deliver its incoming email only over a validated TLS connection (enforced in enforce mode), which blocks downgrade and interception attacks on mail sent to that domain.
MTA-STS is the odd one out among the email authentication standards. SPF, DKIM and DMARC protect your outgoing mail from forgery. MTA-STS protects incoming mail from being read or redirected on the way to you. This page covers what it does, the policy file and DNS record, the testing and enforce modes, TLS-RPT reports, and whether you need it if you only send through a sending service.
Key takeaways
- MTA-STS protects mail sent to your domain. You publish the policy as the receiver. It does nothing for the mail your app sends.
- It needs two pieces: a TXT record at
_mta-sts.<domain>and a policy file athttps://mta-sts.<domain>/.well-known/mta-sts.txt. - Start in
testingmode with TLS-RPT turned on, read the reports, fix MX or certificate problems, then switch toenforce. - TLS-RPT is a separate record that makes senders report TLS failures to you. Publish it before MTA-STS.
- If you only send through a service and don't receive mail on the domain, you can skip MTA-STS. None of the nine services we checked documents honoring recipients' MTA-STS policies (checked November 2026).
What is MTA-STS?
MTA-STS is a standard, RFC 8461, in which the domain that receives mail publishes a policy saying "deliver to me only over TLS, to these mail servers, with a valid certificate." Its stated aim, in the RFC's own abstract, is to let providers declare that they can receive TLS-secured SMTP connections. The standard is a Proposed Standard from September 2018 (RFC 8461).
The direction matters. You publish the policy as the receiver, so MTA-STS protects mail sent to your domain. It does not protect the mail your app sends out. Other servers read your policy and follow it when they deliver to you.
A short note on the name. An MTA, a mail transfer agent, is the server software that moves mail between servers. SMTP is the protocol it speaks. So "SMTP vs MTA" compares a protocol with the software that uses it. For SMTP basics see what an email API is.
Why MTA-STS exists: TLS in SMTP and downgrade attacks
MTA-STS exists because SMTP encryption is opportunistic: servers try TLS, and fall back to plain text if it fails. TLS on SMTP is negotiated with the STARTTLS command (RFC 3207). RFC 8461 explains the weak spot: an attacker who can delete the server's "250 STARTTLS" response, or redirect the session by overwriting the MX record, can force a downgrade or intercept the mail.
The fix is a policy that says TLS is required, with a valid certificate, for these MX hosts. A sender that honors it won't fall back to plain text.
Four questions come up around this, so here are short answers:
- Are emails encrypted in transit? Often, but only when both servers agree to TLS (STARTTLS, RFC 3207), and without MTA-STS an attacker can stop that agreement. That gap is what the standard closes.
- Is TLS obsolete? No. TLS 1.0 and 1.1 are: RFC 8996 (March 2021, a Best Current Practice) formally deprecates them. TLS as a protocol is current.
- Should I use TLS or SSL for SMTP? TLS. Ports and modes for sending are in the SMTP settings table.
- Are Gmail emails TLS encrypted? Google's sender guidelines list "Use a TLS connection for transmitting email" as a requirement for all senders to Gmail (checked November 2026).
How MTA-STS works
When a server sends mail to a domain that uses MTA-STS, it follows four steps:
- Look up the TXT record at
_mta-sts.<domain>. It signals that a policy exists and carries anid. - Fetch the policy over HTTPS from
https://mta-sts.<domain>/.well-known/mta-sts.txt(RFC 8461 §3.1 and §3.2). - Cache the policy for up to
max_ageseconds. - Deliver only over TLS to MX hosts listed in the policy, with a certificate that validates for the host. In
enforcemode, the sender must not deliver to hosts that fail the MX match, the certificate check, or that don't support STARTTLS (RFC 8461 §5).
Both sides have a job. The receiving domain publishes the record and the policy file. The sender's mail server has to support MTA-STS to act on them. Support among the big providers, from their own docs (checked November 2026):
- Gmail complies with MTA-STS for messages sent to external servers with an MTA-STS policy in enforced mode (Google Workspace Admin Help).
- Exchange Online validates all outbound messages to MTA-STS-protected recipients, with nothing for admins to configure. For inbound, customers publish their own policy (Microsoft Learn).
- Yahoo: we found no Yahoo page on MTA-STS, so we make no claim.
The MTA-STS policy file
The policy file is a plain-text list of fields, served over HTTPS at https://mta-sts.<domain>/.well-known/mta-sts.txt. The required fields are version, mode, max_age and at least one mx (except in none mode), per RFC 8461 §3.2.
Example for example.com, in testing mode:
version: STSv1
mode: testing
mx: mail.example.com
mx: mx2.example.com
max_age: 604800
versionis alwaysSTSv1.modeistesting,enforceornone(next section).mxlists the allowed MX hosts, one per line. A leading wildcard such as*.example.netis allowed. The names must match the MX records you actually publish.max_ageis how long, in seconds, senders may cache the policy. The maximum is 31557600. RFC 8461 expects it to be in the range of weeks or more, and its example uses 604800 (one week).
The file must be served from the mta-sts subdomain over HTTPS with a valid certificate. Senders should also check that the media type is text/plain. In practice that means a small web host or any static hosting with a custom domain and a certificate. One thing to know up front: Microsoft says Exchange Online can't host MTA-STS policy files on behalf of customers, so a Microsoft 365 domain still needs an HTTPS host of its own. We name no hosted MTA-STS services because we haven't compared their docs.
The MTA-STS DNS record
The DNS part is one TXT record at _mta-sts.<domain> with two fields: v=STSv1 and an id. The id is a short string of up to 32 letters and digits that identifies this version of your policy.
Example for example.com:
_mta-sts.example.com. IN TXT "v=STSv1; id=20261123000000Z"
Change the id whenever you change the policy. Senders compare the id with the one they cached to learn that the policy was updated, and RFC 8461 §3.1 requires it to uniquely identify a given policy. Update the HTTPS file first, then the TXT record, so senders don't cache the old file under the new id (RFC 8461 §8.1).
Any DNS host can publish this. Check how yours handles quotes: Cloudflare's docs say TXT content is one or more strings in double quotes and that it adds the quotes if you leave them off.
MTA-STS testing vs enforce mode
MTA-STS has three modes, set in the policy file's mode field. They decide what a sender does when TLS or certificate validation fails (RFC 8461 §5).
| Mode | Meaning | Effect on mail |
|---|---|---|
none |
The domain has no active policy | Senders treat the domain as if it had none. Used to switch MTA-STS off cleanly |
testing |
Validation failures are reported, not enforced | Mail is delivered as if nothing failed; senders that also support TLS-RPT send a report |
enforce |
Validation failures block delivery | Senders must not deliver to hosts that fail the MX match, the certificate check, or lack STARTTLS |
The rollout:
- Publish TLS-RPT first, so you get reports.
- Publish the policy in
testingmode. Google recommends amax_agebetween 604800 and 1209600 (one to two weeks) for testing, and its allowed range is 86400 to 31557600 (Google Workspace Admin Help, checked November 2026). - Read the reports and fix MX or certificate problems.
- Switch to
enforceand raisemax_age.
How long should you stay in testing? No source we checked gives a number. Google's guidance is to check the daily reports before enforcing, so the honest answer is: until the reports are clean.
What can go wrong in enforce: an expired certificate on an MX host, or an MX missing from the policy, stops senders from delivering. RFC 8461 tells senders to treat such failures as transient and retry later, so mail is queued first and may bounce if you don't fix the problem in time. To remove MTA-STS, RFC 8461 §8.3 suggests publishing mode: none with a small max_age (for example one day) and waiting out the old policies before deleting anything.
TLS-RPT: reports for TLS problems
TLS-RPT (SMTP TLS Reporting, RFC 8460) is a TXT record that asks senders to report how TLS connections to your domain went, including failures. It is published at _smtp._tls.<domain> and uses v=TLSRPTv1 and a rua address that can be a mailto: or an https: URL.
Example for example.com:
_smtp._tls.example.com. IN TXT "v=TLSRPTv1; rua=mailto:tls-reports@example.com"
Reports are JSON documents (RFC 8460 §4.4). They hold the date range, the policy applied, counts of successful and failed sessions, and failure details with a result type, such as certificate-expired, starttls-not-supported or validation-failure in the RFC's example. Google's docs refer to the reports as daily.
How is this different from DMARC reports? DMARC reports cover authentication of mail that claims your domain, whoever receives it. TLS-RPT covers the TLS connection when other servers deliver mail to your domain. Different records, different data. Publish TLS-RPT before MTA-STS, so the testing phase has something to read.
MTA-STS vs DANE
MTA-STS and DANE solve the same problem, upgrading plain or unauthenticated TLS to authenticated and downgrade-resistant delivery, but they trust different things. DANE publishes TLSA records and requires DNSSEC. MTA-STS uses an HTTPS policy file and certificate authorities, and doesn't need DNSSEC, at the cost of a risk of malicious downgrades, as RFC 8461 puts it.
Provider support (checked November 2026): Google documents MTA-STS for Gmail. Microsoft documents both: Exchange Online validates MTA-STS outbound, and outbound SMTP DANE with DNSSEC is on by default for all Exchange Online customers (Microsoft Learn). They are not the same thing, and this page isn't a DANE guide.
How to test MTA-STS
Three checks cover it, then you read the reports.
1. Fetch the policy in a browser or with curl, and look for the fields and a valid HTTPS certificate:
curl -i https://mta-sts.example.com/.well-known/mta-sts.txt
2. Query the TXT records with dig:
dig +short TXT _mta-sts.example.com
dig +short TXT _smtp._tls.example.com
3. Use a third-party checker. MXToolbox's SuperTool has an MTA-STS Lookup and a TLS Reporting (TLSRPT) Lookup. These are neutral references, and we have no checker of our own.
Then wait for the first TLS-RPT reports from senders. They show whether anyone had trouble reaching you over TLS.
Do I need MTA-STS if I use a sending service?
No, not for the mail your app sends. MTA-STS protects mail that other servers send to your domain, so it matters if you receive email on that domain: company mailboxes, a reply-to address, or an inbound email setup. If your domain only sends, there is nothing for it to protect.
The other direction is a vendor question: when your service delivers outbound, its servers decide whether to honor the recipient's MTA-STS policy. We checked the nine services in our authentication table. None documents honoring recipients' MTA-STS policies (checked November 2026). Four document a related setting that makes you require TLS yourself:
| Service | Outbound TLS setting | Honors recipients' MTA-STS |
|---|---|---|
| SendGrid | Enforced TLS | Not documented |
| Amazon SES | TlsPolicy=REQUIRE per configuration set |
Not documented |
| Mailgun | Require TLS | Not documented |
| Postmark | Not documented | Not documented |
| Resend | Enforced TLS per domain | Not documented |
| Mailtrap | Not documented | Not documented |
| Brevo | Not documented | Not documented |
| Mailjet | Not documented | Not documented |
| MailerSend | Not documented | Not documented |
From each service's own docs and product pages, checked November 2026. "Not documented" means we didn't find it in the vendor's docs.
MTA-STS has no effect on your SPF, DKIM or DMARC results. Those are sender checks, covered in SPF, DKIM and DMARC explained, and the full list of standards is in what email authentication is.
MTA-STS: FAQ
What is MTA-STS?
MTA-STS (SMTP MTA Strict Transport Security) is a standard in which a domain publishes a policy, in a DNS record and an HTTPS file, asking other mail servers to deliver its incoming mail only over validated TLS (enforced in enforce mode). It blocks downgrade and interception attacks on mail sent to that domain. See what MTA-STS is.
What does MTA-STS stand for?
MTA-STS stands for SMTP MTA Strict Transport Security. MTA is mail transfer agent, the server software that moves email between servers. The standard is RFC 8461, a Proposed Standard from September 2018. Its companion, TLS-RPT, is RFC 8460.
Do I need MTA-STS?
Only if you receive mail on your domain, such as company mailboxes or an inbound address. MTA-STS protects mail sent to you, not the mail your app sends through a sending service. If your domain only sends, skip it. See whether you need it.
What is TLS-RPT?
TLS-RPT (SMTP TLS Reporting, RFC 8460) is a TXT record at _smtp._tls.<domain> that asks sending servers to report TLS failures when delivering to your domain. Reports are JSON files sent to the rua address in the record. Publish it before MTA-STS. See TLS-RPT.
Is MTA-STS the same as DANE?
No. Both make mail delivery to your domain resistant to downgrade attacks, but DANE uses TLSA records and requires DNSSEC, while MTA-STS uses an HTTPS policy file and certificate authorities. See MTA-STS vs DANE.
Are Gmail emails TLS encrypted?
Google's sender guidelines require senders to Gmail to use a TLS connection, and Gmail complies with enforced MTA-STS policies when it sends to other servers (checked November 2026).
What is the difference between SMTP and an MTA?
SMTP is the protocol that mail servers use to hand messages to each other. An MTA, or mail transfer agent, is the server software that speaks that protocol and moves the mail. MTA-STS is a policy that MTAs read before delivering. For basics, see what an email API is.
How long should I run MTA-STS in testing mode?
Until your TLS-RPT reports are clean, because no source we checked names a fixed period. Google's guidance is to read the daily reports in testing mode before switching to enforce, and it suggests a max_age of one to two weeks for testing (checked November 2026). See testing vs enforce.