Foxcolab

Glossary

MTA-STS

Definition

MTA-STS: SMTP MTA Strict Transport Security (RFC 8461): a policy a domain publishes over HTTPS and announces in DNS, telling sending mail servers to deliver only over TLS to listed hosts with valid certificates, and to refuse delivery otherwise.

Also known asSMTP MTA Strict Transport SecurityMTA Strict Transport SecurityMTA-STS policy

In short

MTA-STS (SMTP MTA Strict Transport Security, RFC 8461) lets a domain declare that its mail servers support TLS and that senders should refuse to deliver when they can't get an encrypted connection to a listed host with a valid certificate. The policy is a text file served over HTTPS and announced by a DNS TXT record. It protects mail coming in to your domain.

Key takeaways

  • MTA-STS needs a TXT record at _mta-sts.<domain> and a policy file at https://mta-sts.<domain>/.well-known/mta-sts.txt.
  • Start in testing mode with a TLS reporting record, read the reports, then switch to enforce.
  • In enforce mode, senders that support MTA-STS won't deliver to a host that isn't listed, lacks STARTTLS or has an invalid certificate.
  • It protects incoming mail only, and only from senders that check MTA-STS.
  • DANE solves the same problem with DNSSEC and resists a first-contact attack that MTA-STS can't.

Last reviewed 30 November 2026

MTA-STS, short for SMTP MTA Strict Transport Security, is a standard (RFC 8461) that lets a domain tell sending mail servers two things: its mail servers accept TLS, and a sender should refuse to deliver when it can't get an encrypted connection to a listed host with a valid certificate. It exists because encryption between SMTP servers is optional by default, and an attacker in the network path can quietly switch it off.

The two parts#

A DNS TXT record announces that a policy exists and which version is current:

TXT record·Text
_mta-sts.example.com.  IN  TXT  "v=STSv1; id=2026112901"

The policy is a text file served over HTTPS at a fixed address:

https://mta-sts.example.com/.well-known/mta-sts.txt·Text
version: STSv1
mode: testing
mx: mail.example.com
max_age: 604800

The mx lines must cover every host in your MX records. max_age is how long senders cache the policy, in seconds: 604800 is a week, and the maximum is about a year. Senders spot a change by comparing the id, so update the file first and the id second.

Testing mode, then enforce#

ModeWhat a supporting sender does when validation fails
testingDelivers anyway and reports the failure, if you publish a TLS reporting record
enforceSkips that host, tries the next MX and retries later
noneTreats the domain as having no policy, which withdraws MTA-STS cleanly

Start in testing and add a TLS reporting record (RFC 8460) so senders mail you their results:

TLS reporting record·Text
_smtp._tls.example.com.  IN  TXT  "v=TLSRPTv1; rua=mailto:tls-reports@example.com"

Switch to enforce once the reports are clean. Two mistakes then stop your own mail: an MX host missing from the policy after a provider change, and a certificate that expires or doesn't match the host name.

MTA-STS vs DANE#

MTA-STSDANE (RFC 7672)
Trust comes fromCertificate authorities, over HTTPSTLSA records signed with DNSSEC
Needs DNSSECNoYes
First contactAn attacker who blocks the first policy lookup can still force a downgradeResists downgrade
Testing modeYesNo

A domain can publish both. RFC 8461 says a passing MTA-STS check must not override a failing DANE check.

What it doesn't cover#

MTA-STS protects mail on its way in to your domain, and only from senders that check it. Gmail and Exchange Online do. Other senders deliver as before. It also secures one hop at a time, so the servers on the route still read the message. Keeping content from them takes end-to-end encryption.

Keep exploring

All terms

Foxcolab

Private work tools, without the ads.

Mail, files, documents, spreadsheets and meetings in one account. Files, documents and spreadsheets are end-to-end encrypted.

Jump to