MTA-STS and TLS-RPT explained

Written by Micronet AS · Updated

Short answer

What are MTA-STS and TLS-RPT?

MTA-STS lets a domain require that email to it is delivered over an encrypted connection (TLS) with a valid certificate. It is set up with a TXT record at _mta-sts and a policy file at https://mta-sts.company.com/.well-known/mta-sts.txt. TLS-RPT is a TXT record at _smtp._tls that asks senders to report when encrypted delivery fails.

DMARC protects the email you send. MTA-STS protects the email you receive. Ordinary encryption between mail servers (STARTTLS) is opportunistic, and an attacker on the network can make the servers send in plain text. MTA-STS closes that gap.

The three parts of MTA-STS

TXT record at _mta-sts.company.comv=STSv1; id=20261114120000

id is a version marker. Every time the policy file changes, id must change, or senders will not fetch the new file.

version: STSv1
mode: testing
mx: company-com.mail.protection.outlook.com
max_age: 604800

The file is at https://mta-sts.company.com/.well-known/mta-sts.txt, and the host must have a valid certificate. mx lists the mail servers that are allowed to receive email for the domain. max_age is how many seconds the sender remembers the policy, at most 31,557,600, which is one year.

Three modes

ModeWhat the sender does
testingDelivers as usual, but reports failures through TLS-RPT.
enforceDoes not deliver the email if encryption or the certificate fails, or if the server is not listed in mx.
noneThe policy is withdrawn.

TLS-RPT

TXT record at _smtp._tls.company.comv=TLSRPTv1; rua=mailto:tls@company.com

Senders that support it send a daily JSON report on how many deliveries were encrypted, and why the others failed. You read the reports with the TLS-RPT report reader.

A safe order

  1. Publish TLS-RPT first, so you get reports.
  2. Publish MTA-STS with mode: testing. Create the record and the file with the MTA-STS generator.
  3. Read the reports for a few weeks. Fix certificates and MX names that fail.
  4. Switch to mode: enforce, and remember to change id in the TXT record.
  5. Check with the MTA-STS checker.

If you change email provider while the policy is at enforce, mx in the policy file must be updated first. Otherwise senders refuse to deliver to the new servers until they have fetched the new file.

MTA-STS or DANE?

DANE solves the same problem with TLSA records in DNS and requires DNSSEC. MTA-STS does not require DNSSEC, but a web address with https. They can be used together. You check DANE with the DANE checker.

Sources

Questions and answers

Can MTA-STS stop email to us?

Yes, in the enforce mode. Senders that follow MTA-STS then do not deliver if the encryption or the certificate fails. That is why you start with testing and read the reports first.

Do I need a web server of my own for the policy file?

The file must be on https under mta-sts in front of your domain. Many use a service that hosts the file. With hosted MTA-STS in Micronet DMARC you point the mta-sts name to us, and the mode is changed in the portal.

Do I need MTA-STS when I have DMARC?

They solve different problems. DMARC stops others from sending email in your name. MTA-STS stops email to you from being intercepted or redirected on the way. NSM (the Norwegian National Security Authority) recommends STARTTLS for all email between organisations, and MTA-STS makes the encryption a requirement.