MTA-STS setup: DNS, HTTPS policy and safe rollout

MTA-STS lets a receiving domain publish a policy for SMTP transport security. It is separate from outgoing SPF, DKIM and DMARC, and it does not guarantee inbox placement. A TXT record is only the discovery step.

1. Check all four components

Confirm the receiving domain's current MX records, the servers that accept its mail and their TLS readiness. MTA-STS enforcement can prevent supporting senders from delivering if the policy does not match the real mail infrastructure.

ComponentWhat to verifyWhat a failure means
TXT discovery_mta-sts.example.com publishes v=STSv1; id=policy1Supporting senders cannot discover an updated policy. Check authoritative DNS and record naming.
HTTPS policyhttps://mta-sts.example.com/.well-known/mta-sts.txt returns the policy as textA TXT record can exist while the policy returns 404 or invalid content.
Policy-host certificateValid public HTTPS certificate for mta-sts.example.com, with a trusted chainA CNAME alone does not establish HTTPS readiness. Finish validation and certificate provisioning.
MX / SMTP TLSActual MX names match policy patterns; mail servers offer suitable TLS and valid certificatesThe web policy host can be healthy while mail delivery fails the enforcement policy.

The public DNS check only checks TXT discovery. It does not fetch the policy, validate certificates or test SMTP TLS. Verify these independently with your mail and hosting providers.

2. Prepare a testing policy

The following is an illustrative policy for a reserved example domain, not a safe copy-and-paste configuration for your mail. Replace the MX names with your actual receiving hosts. Choose a cache lifetime that fits your rollout and recovery needs.

version: STSv1
mode: testing
mx: mail.example.com
max_age: 86400

Publish a discovery TXT record at _mta-sts.example.com, for example v=STSv1; id=policy1. Use 1–32 ASCII letters or digits for the identifier. Change it when changing the policy so supporting senders can discover an update. The identifier is not a certificate or a readiness signal.

testing lets supporting senders evaluate the policy without requiring delivery failure solely for a policy mismatch. TLS reporting is a separate configuration; publishing MTA-STS does not automatically give you reports. Arrange observations with the mail operator before switching to enforcement.

3. Complete hosting and validation

  1. Serve the policy at the exact HTTPS hostname and path. Check the response body as well as its status.
  2. Complete domain validation and wait for the policy-host certificate to become ready. Do not treat a provisioning response as success.
  3. Publish discovery in the authoritative DNS zone, not merely at the registrar where the domain was purchased.
  4. Confirm every legitimate MX name is covered and the SMTP TLS configuration works.
  5. Observe testing results, resolve mismatches, and agree enforcement with the domain owner.

Authwright's setup_mta_sts_hosting provides managed HTTPS policy hosting through Azure Front Door on Pro and above. Its result can include CNAME, domain-validation and provisioning state. Complete those steps before relying on the policy. This is not a promise of immediate certificate issuance or automated TLS reporting.

For DNS specifics, review Cloudflare DNS-only mail hosts, Namecheap full-record-set preservation and Route 53 service boundaries. An HTTP proxy certificate or Cloudflare Origin CA certificate is not a substitute for the mail servers' SMTP TLS certificates.

4. Enforce deliberately and plan cache-aware recovery

Move to mode: enforce only after the policy matches the receiving infrastructure and the owner accepts the effects. Supporting senders may refuse delivery when MX or TLS checks fail. Other senders may not implement MTA-STS, so enforcement is not universal transport protection.

Senders cache policies for up to max_age. Deleting the TXT record or restoring an old file does not instantly clear those caches. Keep prior policy versions and a named recovery owner. For planned removal, RFC 8461 describes serving a mode: none policy and retaining it long enough for previously cached policies to expire; do not simply tear down the HTTPS host.

When moving mail providers, include both the policy and cached-policy lifetime in the migration plan. Test new receiving hosts before removing old ones. Coordinate the timeline with the mail operator rather than relying on a generic waiting period.

Troubleshooting by symptom

For outgoing message authentication, use the separate SPF, DKIM and DMARC rollout checklist. Review Authwright tool and plan requirements before applying changes, or create a workspace to begin with supported diagnosis.

Primary reference

RFC 8461: SMTP MTA Strict Transport Security defines discovery, policy syntax, validation, caching and policy removal. Follow your receiving mail provider's current TLS instructions as well.