Loading Smiley Hoster
Skip to content

Deploy MTA-STS, TLS-RPT and DANE for server-to-server email

Smiley Hoster Team · · 2 min read
Two mail servers joined by a TLS channel with MTA-STS and DANE checks.

More automated senders in 2026 make transport checks increasingly useful, but domain authentication and transport encryption solve different problems. Opportunistic STARTTLS can be downgraded; introduce an enforceable policy only after testing every receiving server.

1. Match the mechanism to your infrastructure

MTA-STS uses DNS discovery and an HTTPS policy to identify permitted MX hosts and require TLS from supporting senders in enforce mode. TLS-RPT reports transport failures; it does not enforce encryption itself.

DANE binds an SMTP service to certificate or public-key material using TLSA records secured by validated DNSSEC. Publishing receiving-side records does not automatically enable policy enforcement in your outbound MTA. Check its implementation separately.

These mechanisms protect server-to-server transport, not end-to-end message secrecy. On shared hosting, establish who controls MX records, certificates and DNSSEC before attempting a deployment.

2. Pilot MTA-STS with reporting

For example.com, serve this policy over valid public HTTPS at mta-sts.example.com/.well-known/mta-sts.txt:

Example
version: STSv1mode: testingmx: mx.example.commax_age: 86400

The proposed 86400-second cache is a pilot choice, not a required value. Add discovery and reporting records, replacing the example domain and provisioning the reporting mailbox:

Example
_mta-sts IN TXT "v=STSv1; id=20261010a;"_smtp._tls IN TXT ( "v=TLSRPTv1; rua=mailto:tls@example.com")

Include backup MX hosts in the policy. Test every endpoint from outside the network:

Example
openssl s_client -starttls smtp -connect mx.example.com:25 -servername mx.example.com -verify_hostname mx.example.com -verify_return_error

Check certificate trust, hostname, expiry and STARTTLS negotiation. Group incoming TLS-RPT JSON failures by destination MX and error type. Move to enforce only after resolving anomalies; change the DNS id when updating the policy.

3. Add DANE with a rotation plan

With validated DNSSEC in place, publish TLSA at _25._tcp.mx.example.com. The 3 1 1 parameters select the end-entity certificate's SPKI public key and SHA-256 digest. Generate that digest from the certificate actually deployed:

Example
openssl x509 -in mx.pem -pubkey -noout | openssl pkey -pubin -outform DER | openssl dgst -sha256dig +dnssec TLSA _25._tcp.mx.example.com

Enter 3 1 1 followed by the digest as the TLSA value. Asking dig for DNSSEC data does not independently validate it; use a validating resolver and a separate DANE acceptance test.

Before changing keys, publish both old and new associations, allow caches to expire, then deploy. For MTA-STS rollback, publish mode none with a new id while keeping HTTPS available. Previously cached enforce policies may still apply. For DANE failures, restore a key matching valid TLSA data and repair DNSSEC; deleting records is not an immediate rollback.

Common mistakes

Leaving a backup MX out, hashing the wrong certificate and removing HTTPS during rollback can interrupt delivery.

FAQ

Must you deploy all three? Choose according to actual platform support and operational ownership.

Does testing mode block failures? It provides an observation stage before enforcement.

Final check

Every MX passes, reports arrive, renewals are monitored and rollback instructions account for cached policy and DNS data.

Sources: RFC 8461, RFC 8460, RFC 7672.

Did this article answer your question?
Your feedback shapes what we write next.

Your site online today

Free migration* · 30-day refund

Get started* A site under 30 GB, cPanel, WordPress and VPS plans.