Blazalek.com

MTA-STS rollout: from testing to enforce, and a way back

Deploying MTA-STS safely means starting in testing mode, validating every MX host and HTTPS endpoint, and only then enabling enforce. If something breaks, rolling back means waiting out every cached policy, not removing DNS records.

By

On this page

To move MTA-STS from testing to enforce, start in testing, verify every path that receives your mail, and only then enable enforce, with a recovery plan that fits inside the lifetime of the policies senders have already cached. In testing, an MTA-STS validation failure does not by itself prevent delivery; in enforce, a compliant sender cannot deliver to an MX that fails validation. Ordinary delivery failures can still happen under either mode (RFC 8461 section 5).

MTA-STS protects the SMTP transport connection to your receiving infrastructure. It doesn’t authenticate who wrote the message, and it doesn’t encrypt content end to end, limits that RFC 3207 spells out for STARTTLS itself. The protection also depends on outbound sender adoption. For example, Microsoft documents outbound validation in Exchange Online, but senders that don’t support MTA-STS don’t run these checks at all. That is a scoped implementation statement, not evidence of universal adoption. For full background on how the standard works, check the guide chapter on MTA-STS (RFC 8461).

What must each MX pass before you publish a policy?

Start with an inventory of your production MX hostnames, including backups and inbound security gateways, because your policy must declare each of them. For each host, verify that STARTTLS responds properly, as RFC 8461 section 4 requires. Check that the TLS certificate has not expired, chains to a trusted root, and lists a matching entry in its Subject Alternative Name, following the SMTP certificate requirements in section 4.2. Every MX in your DNS must match an mx line in the policy. Wildcards cover only a single leftmost label: *.example.net matches relay.example.net but not east.relay.example.net (MX matching, section 4.1).

The HTTPS policy service is a separate surface with its own certificate. That web certificate must authenticate mta-sts.example.net, even if a provider hosts the file for you; a valid SMTP certificate on your MX proves nothing about the web endpoint. When senders fetch your policy, the endpoint must return HTTP 200 without redirects, as required by RFC 8461 section 3.3.

Before publishing your policy, set up a monitored TLS-RPT destination. Add a DNS TXT record at _smtp._tls.example.net containing v=TLSRPTv1 and a rua address such as mailto:tls-reports@example.net (reporting setup, RFC 8460 section 3). Because reports should cover a UTC day and may arrive hours later, treat them as daily diagnostic summaries rather than real-time alerts (report timing, RFC 8460 section 4.1).

Publishing a testing policy you can watch

The policy file lives at https://mta-sts.example.net/.well-known/mta-sts.txt, using the exact host and path required by RFC 8461 section 3.2. Test the public response from outside your network before announcing it in DNS. The DNS TXT record at _mta-sts.example.net reads v=STSv1; id=20260915A;. The id identifies a policy revision and carries no numerical ordering (discovery record, section 3.1).

The example that follows is synthetic; no live test is claimed. Suppose example.net operates with primary mail server relay.example.net and backup host reserve.example.net. You begin by publishing this initial policy:

version: STSv1
mode: testing
mx: relay.example.net
mx: reserve.example.net
max_age: 604800

The 604800 parameter sets seven days of cache lifetime. It isn’t an automated countdown that turns on enforcement when the week ends (policy format, section 3.2). Google’s guidance (as of 15 September 2026) recommends one to two weeks in testing and specifies a max_age between 86400 and 31557600 seconds. Follow the current guidance for your deployment; it does not set every sender’s acceptance rules (Google policy guidance).

Before switching to enforcement, use clear decision gates:

What checks revealDecisionNext step
Primary passes; backup certificate expiredStay in testingRenew the backup certificate and rerun its TLS check
Both MX paths pass; policy retrieval failsStay in testingFix the HTTPS policy server and confirm policy retrieval
Both paths and retrieval pass; the relevant reports agreeConsider enforcementDocument the active policy, rollback contact, and cache duration

These gates are operational recommendations, not RFC requirements. Because ordinary successful traffic may never touch the backup MX, clean TLS-RPT reports alone do not prove your backup server works; test it directly (backup MX blind spot, RFC 8461 section 8.4). In addition, TLS-RPT success counts confirm handshakes only for providers that send reports, not every sender delivering to your domain (success-count scope, RFC 8460 section 4.2.1).

How to promote to enforce without stranding cached senders

To promote, update the policy file to mode: enforce, check from outside your network that the live URL returns the new text, and only then update the DNS TXT id, for example to 20260915B. Follow this exact order for every future change. While the DNS change propagates, keep your mail servers compatible with the previous policy, because senders will still act on their cached instructions (update sequence, RFC 8461 section 8.1).

Updating the TXT ID doesn’t clear remote caches. Whenever DNS discovery or HTTPS retrieval fails, a sender can keep using a cached policy that has not expired (cached-policy fallback, RFC 8461 section 3.3). Under enforcement, a compliant sender must check for an updated policy before bouncing mail permanently, and it should treat failures as transient and retry. Recovery is therefore not a promise of immediate delivery (failure handling, section 5).

A withdrawal that keeps the recovery channel open

If enforcement starts dropping inbound mail, your first move is repairing the failing mail server so it satisfies the cached policy. If you must withdraw the policy entirely, publish mode: none with a short max_age, such as 86400, and then update the TXT ID. Keep both DNS records and the HTTPS policy endpoint live until every previously served policy has expired; removing DNS discovery early doesn’t revoke enforcement in anyone’s cache (withdrawal procedure, RFC 8461 section 8.3).

A second synthetic calculation shows why. An older 14-day policy last served on 1 October at 12:00 UTC remains valid until 15 October at 12:00. A seven-day revision last served on 3 October at 12:00 expires on 10 October. If those are the only outstanding revisions, schedule endpoint teardown no earlier than 15 October at 12:00. Serving a one-day none policy on 3 October does nothing to truncate that older 14-day cache. This applies the withdrawal rule above; it is not an observed sender schedule.

Frequently asked questions

Does a validation failure in testing mode block delivery?

No. In testing mode, an MTA-STS validation failure does not by itself prevent senders from delivering mail. In enforce mode, a compliant sender cannot deliver to an MX that fails validation, though ordinary delivery issues can still occur in either mode.

Is max_age 604800 a seven-day countdown to enforcement?

No. The value 604800 specifies seven days of cache lifetime. It does not trigger an automatic transition to enforcement when the timer runs out.

Does a valid MX certificate also cover the policy host?

No. The HTTPS policy service requires its own certificate covering mta-sts.example.net, even when an external vendor hosts the file for you. Having a valid SMTP certificate on your MX host proves nothing about the web endpoint.

What changes first when you promote to enforce?

Update the policy file on your HTTPS host to mode: enforce first. Check from outside your network that the live URL serves the new text, and only then update the id tag in your DNS TXT record to a new value such as 20260915B.

Does changing the TXT id clear senders’ caches?

No. Updating the ID does not clear previously cached policies on remote sending systems. When discovery or HTTPS retrieval fails, a sender can keep using a cached policy that has not expired.

Email deliverability consultant

Get a second opinion on your email setup

Tell me what your customers are seeing or what you’re planning to change. In 30 minutes, we’ll work out what your team can check first and whether a deliverability audit would help.

I led deliverability at GetResponse, designed a dedicated newsletter system for Easy.Tools and helped Youmoney migrate its automated emails in stages. Read the case studies

Book free call

Email deliverability audit

See what I check and read a sample report with recommendations for your team.