Skip to content

MTA-STS Setup Guide: Enforce TLS for Inbound Email

MTA-STS tells other mail servers to use TLS when they send to you. Here is how to set it up and move to enforce mode.

Abedrahim B Nov 14, 2026 5 min read 1,159 words
MTA-STS Setup Guide: Enforce TLS for Inbound Email

Email was built without encryption. Many servers now use TLS, but by default a sending server will fall back to plain text if TLS fails. MTA-STS closes that gap. It lets a domain say, "Only deliver mail to me over a verified TLS connection."

This guide explains what MTA-STS is, why it matters and how to set it up in four steps. It is written for sales and marketing teams who own a sending domain and need a clear checklist to hand to IT.

MTA-STS setup guide for TLS on inbound email
MTA-STS setup guide for TLS on inbound email

What is MTA-STS?#

MTA-STS stands for Mail Transfer Agent Strict Transport Security. It is defined in RFC 8461. It protects mail sent to your domain.

Without it, an attacker on the network can strip the TLS offer from a connection. The sending server then delivers the message in plain text. With MTA-STS, the sender finds your policy, learns that TLS is required and refuses to deliver if the connection cannot be secured.

Two points to remember:

  • MTA-STS protects inbound mail only. It does not sign or authenticate your outbound mail. For that you need SPF, DKIM and DMARC.
  • It only works when the sending server supports it. Large mailbox providers do. Small ones may not.

Why MTA-STS matters for senders#

If you run cold email or any outbound program, replies come back to your domain. Those replies can carry deal details, names and contract terms. Encrypting them in transit is basic hygiene.

There is a second benefit. Setting up MTA-STS and its reporting forces you to check your mail servers' certificates. Expired or mismatched certificates are a common source of silent delivery problems.

MTA-STS is not a deliverability factor on its own, and you should not expect it to move inbox placement. Treat it as security that supports a healthy sending domain.

What you need before you start#

  • Control of your domain's DNS.
  • A web server or static host that can serve HTTPS on a subdomain.
  • A valid TLS certificate on every MX host. It must match the host name and chain to a public authority.
  • A list of your MX host names.

MTA-STS setup in 4 steps#

Step 1: Publish the DNS TXT record#

Create a TXT record at _mta-sts.yourdomain.com:

_mta-sts.example.com.  IN  TXT  "v=STSv1; id=20261114T000000"

The id is any string. Change it every time you update the policy so senders know to fetch the new one. A date stamp works well.

Step 2: Host the policy file#

Create a host named mta-sts.yourdomain.com that serves HTTPS with a valid certificate. At this exact path, publish a plain text file:

https://mta-sts.example.com/.well-known/mta-sts.txt

version: STSv1
mode: testing
mx: mail1.example.com
mx: mail2.example.com
max_age: 86400

Each field means:

  • version: always STSv1.
  • mode: none, testing or enforce.
  • mx: one line per allowed MX host. Wildcards such as *.example.com are allowed.
  • max_age: how long senders cache the policy, in seconds.

The file must be served with a 200 response and the content type text/plain.

Step 3: Add TLS reporting (TLS-RPT)#

TLS-RPT tells you when senders fail to connect securely. It is defined in RFC 8460. Add a TXT record at _smtp._tls.yourdomain.com:

_smtp._tls.example.com.  IN  TXT  "v=TLSRPTv1; rua=mailto:tls-reports@example.com"

Reports arrive as daily JSON files. Read them during the testing period to find problems before you enforce.

Step 4: Start in testing mode, then enforce#

Leave mode: testing for at least two to four weeks. In this mode, senders deliver mail even if TLS fails but still send you reports. Review the reports for:

  • Certificate errors on any MX host.
  • MX names that are not in your policy.
  • Senders that repeatedly fail to negotiate TLS.

When the reports are clean, change mode to enforce, raise max_age (for example, to 604800 for one week, then longer) and update the id in the DNS record.

Common MTA-STS problems#

Problem Likely cause Fix
Policy not found Wrong path or the host has no valid certificate Check the URL in a browser; it must load over HTTPS without warnings
Mail rejected after enforce An MX host is missing from the policy Add every MX host to the file
Old policy still used The id was not changed Update the TXT id after each change
Certificate errors in reports Expired or mismatched certificate on an MX Renew the certificate or fix the host name
Backup MX fails TLS A secondary server without a valid certificate Secure it or remove it from DNS

How to test your MTA-STS setup#

  1. Open the policy URL in a browser and confirm it loads without a warning.
  2. Query the DNS record with dig TXT _mta-sts.example.com.
  3. Use an online MTA-STS checker to validate the record and the file together.
  4. Send a test email from a large provider and watch for a TLS-RPT report the next day.

Check your related records at the same time. The SPF checker confirms your SPF record, and our guide to checking DMARC records covers the next layer. If you are still building the foundation, read how to set up SPF, DKIM and DMARC first.

MTA-STS and the rest of your email security#

MTA-STS is one layer. A complete setup looks like this:

  • SPF, DKIM and DMARC authenticate who sends as your domain.
  • MTA-STS and TLS-RPT secure the connection to your servers.
  • List hygiene keeps bounces low so your reputation stays strong.

Authentication and transport security do nothing for an outreach list full of dead mailboxes. Verify contacts before you send with the Tomba Email Verifier, and check that your sending IP is clean with the blacklist checker.

FAQ#

What is MTA-STS in simple terms?#

It is a policy that tells other mail servers to deliver to your domain only over a verified TLS connection. If they cannot, they hold or refuse the message instead of sending it in plain text.

Is MTA-STS the same as DMARC?#

No. DMARC authenticates mail sent from your domain. MTA-STS secures the delivery of mail sent to your domain.

Do I need MTA-STS if I use Google Workspace or Microsoft 365?#

The provider's servers support TLS, but the policy for your domain is still yours to publish. Check your provider's documentation for the correct MX host names to list.

What is the difference between MTA-STS and DANE?#

Both secure SMTP connections. DANE needs DNSSEC. MTA-STS needs only HTTPS and DNS, so it is easier to deploy for most teams.

Can MTA-STS cause me to lose email?#

If you enforce a policy that lists the wrong MX hosts, or a certificate expires, supporting senders may refuse to deliver. That is why a long testing period and TLS reports matter.

Next steps#

Publish the DNS record and a policy file in testing mode this week. Read the TLS reports for a month, then switch to enforce. In the meantime, clean your outreach list with the Tomba Email Verifier.

// start free

See who Tomba finds at any company

Type a company's domain to see its people, their roles and verified work emails, each with the pages it was found on. Free account, no card.

Free plan · No credit card required · GDPR & CCPA

Share
0 clapsEnjoyed it? Give a clap.
Abedrahim B

// about the author

Abedrahim B

CEO

Was this helpful?