Suped

MTA-STS

What MTA-STS is and how it prevents TLS downgrade attacks on email delivery.

MTA-STS (Mail Transfer Agent Strict Transport Security) tells sending mail servers that they must use TLS when delivering email to your domain. Without MTA-STS, a man-in-the-middle attacker could perform a downgrade attack - stripping TLS encryption and reading email in transit.

How it works

  1. A DNS TXT record at _mta-sts.yourdomain.com signals that MTA-STS is enabled.
  2. A policy file hosted at https://mta-sts.yourdomain.com/.well-known/mta-sts.txt specifies the policy details.
  3. Sending servers check the policy and enforce TLS accordingly.

Policy modes

ModeBehavior
noneNo enforcement. MTA-STS is effectively disabled.
testingFailures are reported but email is still delivered without TLS if needed.
enforceTLS failures cause delivery to be rejected. Only use after confirming TLS works.

Policy fields

The policy file contains the following fields:

version: STSv1
mode: enforce
mx: mail.yourdomain.com
max_age: 604800
FieldPurpose
versionMust be STSv1
modenone, testing, or enforce
mxWhich MX servers to enforce TLS for (can list multiple)
max_ageHow long receivers cache the policy, in seconds (e.g. 604800 = 7 days)

Hosting the policy file

The policy file must be served over HTTPS at a specific URL. Suped can host this for you automatically - see Hosted MTA-STS for setup instructions.