ReplyDak

MTA-STS setup: the TXT record, the policy file and a Google Workspace example

Updated 10 November 2026 · 5 min read

Short answer

MTA-STS (RFC 8461) tells other mail servers that mail to your domain must be delivered over TLS with a valid certificate to the MX hosts you list. You publish a TXT record at _mta-sts.yourdomain and a policy file at https://mta-sts.yourdomain/.well-known/mta-sts.txt. Start in mode: testing with TLS-RPT reports on, then switch to enforce. It protects mail coming to you (including replies to cold email); it doesn't change whether your outgoing mail lands in the inbox.

The two pieces

_mta-sts.acme.com.  TXT  "v=STSv1; id=20261110T000000"

Served at https://mta-sts.acme.com/.well-known/mta-sts.txt (valid HTTPS certificate for mta-sts.acme.com):

version: STSv1
mode: testing
mx: smtp.google.com
mx: aspmx.l.google.com
mx: *.aspmx.l.google.com
max_age: 604800
FieldMeaningNote
idPolicy versionChange it every time you edit the policy file, or senders keep the cached one
modetesting, enforce or nonetesting reports failures without blocking
mxAllowed MX host patternsMust cover every MX record; wildcard only as the left-most label
max_ageSeconds senders cache the policyStart at 1 day–1 week; the RFC allows up to about a year

Rollout

  1. 1

    Turn on TLS-RPT first

    Publish _smtp._tls with a rua address so you see failures.

  2. 2

    Host the policy file

    Any static host works if it serves mta-sts.yourdomain over HTTPS with a valid certificate.

  3. 3

    Publish the TXT record in testing mode

    Watch TLS reports for a week or two.

  4. 4

    Enforce

    Change mode: enforce, bump the id, and raise max_age gradually.

Does a cold email domain need it?

Not for deliverability: Gmail and Yahoo don't require MTA-STS from senders. It's worth it on domains that receive important mail. For lookalike sending domains, replies are the only inbound mail, so it's optional; skip it if it would add a web host you don't otherwise need.

Check the result

Check the MX line first: the policy must list every MX host the domain publishes. Run the domain through the free ReplyDak deliverability check: it reads MX, SPF, DKIM and DMARC live from public DNS, counts SPF lookups and checks the main blocklists, with no sign-up. If your DKIM selector is not a common one, type it into the optional selector box.

More on limits, bounces, blocklists and sender rules: cold email deliverability, one question at a time.

FAQ

What happens if my policy file is unreachable in enforce mode?

Senders that cached the policy keep using it until max_age expires; new senders without a cached policy deliver normally. Keep the file reliably hosted.

Which MX names does Google Workspace use?

Newer setups use smtp.google.com; older ones use aspmx.l.google.com and alt1–alt4.aspmx.l.google.com. List whatever your MX records actually contain.

Is MTA-STS the same as DANE?

No. Both protect TLS for inbound mail, but DANE uses DNSSEC-signed TLSA records while MTA-STS uses an HTTPS-hosted policy.

Sources

Related

Microsoft 365 mailboxes are coming soon. Until then, new orders use Google Workspace mailboxes.