Setting up MTA-STS: enforced encryption for incoming email
MTA-STS forces sending servers to deliver your email encrypted only, and only to your real mail servers. Setup with policy file, DNS record and TLS-RPT.
Between mail servers, encryption is normally only offered, not required — an attacker on the network path can negotiate it away and read along, or redirect emails to a wrong server. MTA-STS (Mail Transfer Agent Strict Transport Security) closes exactly this gap: your domain publishes a binding statement, "deliver to me only over TLS and only to these mail servers". Google, Microsoft and the other big players honour it.
The three building blocks
MTA-STS consists of a policy file at a fixed address, a DNS record that points to it, and — sensibly — TLS-RPT for reports. The policy file ALWAYS lives at the same address: https://mta-sts.your-domain.at/.well-known/mta-sts.txt — which requires a small website on the subdomain mta-sts with a valid certificate.
_mta-sts.beispiel.atv=STSv1; id=2026090201The policy file itself is plain text and states the mode, the permitted mail servers and the caching period:
https://mta-sts.beispiel.at/.well-known/mta-sts.txtversion: STSv1
mode: testing
mx: *.protection.outlook.com
max_age: 86400First testing, then enforce
In testing mode nothing is rejected yet — senders only report problems (via TLS-RPT). Only enforce makes the rule binding. The safe route: start with testing and a small max_age (e.g. one day), watch the reports for a few weeks, then switch the file to enforce, raise max_age to one week (604800) — and bump the id in the TXT record in the same step.
TLS-RPT: the reports to go with it
_smtp._tls.beispiel.atv=TLSRPTv1; rua=mailto:dmarc@beispiel.atFrequently asked questions
Do I need MTA-STS if I use Microsoft 365 or Google?
Your mailbox provider supplies the server side (TLS, valid certificates) — but the statement that your domain may only be delivered to over encrypted connections is published by the domain owner. Without your record, delivery to you remains open to a downgrade.
What is the difference to DANE?
DANE achieves the same goal via DNSSEC-secured TLSA records and is cryptographically stricter — but many large senders do not evaluate it, and it requires DNSSEC. MTA-STS works without DNSSEC and is actively used by Google and Microsoft; both can coexist.
Does MTA-STS count towards the deliverability of my OUTGOING email?
Only indirectly. MTA-STS protects delivery TO you. For outgoing mail, SPF, DKIM and DMARC are what count — MTA-STS is still part of the clean domain hygiene that distinguishes reputable senders.