Bookmarks

MTA-STS — MTA Strict Transport Security

SMTP MTA Strict Transport Security

A mechanism by which a domain publishes a requirement that mail must be sent to it only over TLS with a verified certificate.

Also: MTA-STS policy, MTA STS

checked 9 Nov

All terms

Encryption between mail servers is usually opportunistic: if TLS fails, the message goes out in the clear, and an attacker can deliberately break the negotiation. MTA-STS gives the recipient a way to declare that its servers always support TLS, so a sending server must not accept anything less.

What it consists of

  • A _mta-sts TXT record in DNS with a version and a policy ID; the ID changes whenever the policy changes.
  • A policy file served over HTTPS from the mta-sts subdomain at the path /.well-known/mta-sts.txt.
text
_mta-sts.example.com. IN TXT "v=STSv1; id=20261107T120000Z" # https://mta-sts.example.com/.well-known/mta-sts.txtversion: STSv1mode: enforcemx: mail.example.commax_age: 604800

When a sender sees the _mta-sts record, it downloads the policy over HTTPS (so authenticity is verified with an ordinary web certificate) and caches it for max_age. On later deliveries it checks the server name from the MX record against the mx list and verifies the server’s certificate.

Modes

ModeWhat the sender does when validation fails
enforcedoes not deliver the message to that server and retries later
testingdelivers the message but reports the failure through TLS-RPT reports
nonethe policy is treated as absent; this mode exists so that a policy can be withdrawn

The maximum value of max_age is 31,557,600 seconds (about a year). Unlike DANE, MTA-STS does not require DNSSEC: trust is built on certificates, but the policy could be spoofed on first download, which is why it is cached for a long time. The standard is RFC 8461 (September 2018, with authors from Google, Comcast, Microsoft and Oath).

Sources

the term is written from these pages

Verified 9 Nov

Not to be confused with

what it is mixed up with and how it differs

  • STARTTLS command

    STARTTLS merely offers to enable TLS, while MTA-STS obliges the sender not to deliver mail without verified TLS.

  • TLS-RPTSMTP TLS Reporting

    MTA-STS sets the requirement, while TLS-RPT delivers reports on how senders are meeting it.

In depth in the references

where the topic is covered in detail