Skip to content

Home Topics Email Authentication MTA-STS and TLS-RPT

Email Authentication · MTA-STS and TLS-RPT

How to set up MTA-STS: step-by-step guide (2026)

Short answer

To set up MTA-STS: Publish a _mta-sts TXT record with an id value you will change on each policy update; Host a policy file at https://mta-sts.yourdomain.com/.well-known/mta-sts.txt listing your MX hosts; Start in mode: testing, then move to mode: enforce after reviewing TLS-RPT reports. Then publish _smtp._tls TXT with rua=mailto: to receive TLS-RPT reports.

Opportunistic TLS can be downgraded by an attacker in the network path. MTA-STS closes that hole and is increasingly a checkbox in security questionnaires.

How to implement MTA-STS#

  1. Publish a _mta-sts TXT record with an id value you will change on each policy update.
  2. Host a policy file at https://mta-sts.yourdomain.com/.well-known/mta-sts.txt listing your MX hosts.
  3. Start in mode: testing, then move to mode: enforce after reviewing TLS-RPT reports.
  4. Publish _smtp._tls TXT with rua=mailto: to receive TLS-RPT reports.
Example MTA-STS policy
version: STSv1
mode: enforce
mx: aspmx.l.google.com
mx: *.googlemail.com
max_age: 604800

How to verify it worked#

Send a test message to seed mailboxes at Gmail, Outlook, and Yahoo, then inspect the Authentication-Results and delivery headers. Repeat after any DNS or sending-platform change.

Common mistakes#

  • Listing MX hostnames that do not exactly match certificate names.
  • Forgetting to bump the id when the policy file changes, so caches never refresh.

Frequently asked questions#

Does MTA-STS affect outbound mail?

Only when the recipient domain publishes a policy. Your own policy protects mail coming to you.

Is DANE better than MTA-STS?

DANE requires DNSSEC and is stronger, but MTA-STS is easier to adopt. Microsoft and Google both support MTA-STS.

Analyse your own setup

All analysers
Technical analysis

SPF record analyser

Parse an SPF record, count its DNS lookups, and find what will break it.

Runs in your browser
Technical analysis

DMARC record analyser

Grade a DMARC record on enforcement, not just syntax.

Runs in your browser
Technical analysis

DKIM key analyser

Check a DKIM public key's strength, revocation state, and tags.

Runs in your browser

Keep reading on MTA-STS and TLS-RPT