schedule 17-min read

What Is MTA-STS and Do You Need It?

DMARC AI editorial team · Last updated

What is MTA-STS? It makes senders use valid TLS for mail to your domain, stopping STARTTLS downgrades. Who needs it, effort and MSP decisions.

01

What is MTA-STS?

MTA-STS (Mail Transfer Agent Strict Transport Security) is a standard that lets a domain tell sending mail servers: "only deliver to my MX hosts over TLS with a valid certificate." It closes the gap where encryption between mail servers silently falls back to plain text or is redirected to a fake server. It is defined in RFC 8461.

Most businesses that receive confidential email should publish it, and for UK central government it is mandatory. This page answers the decision questions: what MTA-STS protects against, who needs it, what it costs in effort, how it relates to TLS-RPT, DANE and DMARC, and how an MSP (managed service provider) should decide per client. The mechanics and setup are in how MTA-STS works and how to set it up. For the wider picture, start at the email protection pillar.

02

Key takeaways

  • MTA-STS protects inbound mail to your domain in transit. It stops STARTTLS stripping and MX spoofing for senders that support it, such as Exchange Online and Gmail.
  • It is not encryption of the message itself and not sender authentication. DMARC, SPF and DKIM solve a different problem.
  • The effort is small but ongoing: two DNS TXT records, a policy file on an HTTPS host, valid MX certificates, and someone watching TLS-RPT reports.
  • Roll out in testing mode with TLS-RPT first. The NCSC advises monitoring for at least a month before enforce.
  • UK government organisations must publish MTA-STS and TLS-RPT for every domain that receives email, according to GOV.UK guidance.
03

What problem does MTA-STS solve?

MTA-STS fixes the weakness of opportunistic TLS between mail servers. SMTP (Simple Mail Transfer Protocol) uses STARTTLS to upgrade a connection to encryption, but only if both sides agree, and nothing tells the sender to insist. An attacker in the path can remove the offer or redirect the connection, and mail goes out readable.

RFC 8461 describes the two attacks directly. Its introduction says STARTTLS alone does not stop "any attacker who can delete parts of the SMTP session (such as the "250 STARTTLS" response)" or "who can redirect the entire SMTP session (perhaps by overwriting the resolved MX record of the delivery domain)."

The NCSC (National Cyber Security Centre) makes the same point in its MTA-STS guidance: although email between servers is protected by TLS, "there remain vulnerabilities in this method of protecting the confidentiality of emails." It describes a person-in-the-middle who "can trick incoming connections to send to another server and/or send information in the clear."

What attacks does MTA-STS stop?

MTA-STS defeats three things for senders that have fetched and cached your policy: STARTTLS stripping (a forced downgrade to plain text), MX spoofing (a forged DNS answer pointing at the attacker's server) and certificate impersonation (a self-signed or mismatched certificate on that server).

Attack What happens without MTA-STS What an MTA-STS sender does in enforce mode
STARTTLS stripping The 250 STARTTLS line is removed, and the sender delivers in plain text Refuses to deliver without TLS
MX spoofing A forged MX record sends mail to the attacker's host Rejects any MX host not listed in the policy's mx: lines
Certificate impersonation Most senders accept any certificate, or none Requires a valid, unexpired certificate that matches the MX hostname and chains to a trusted CA

What does MTA-STS not protect?

It protects only mail coming to the domain that publishes it, only in transit, and only from senders that support it. The NCSC is explicit: "when your organisation sets up MTA-STS, you are securing inbound connections only." It does not encrypt stored mail, stop spoofed mail from your domain, or protect mail your users send.

There is also a first-contact limit. RFC 8461 Section 10 says MTA-STS can thwart attacks "only if the sender is able to previously obtain and cache a policy for the recipient domain." A sender that has never seen your policy, and whose discovery is blocked, falls back to normal opportunistic TLS. The max_age cache is what makes the protection stick between visits.

For how this sits next to message encryption, see does DKIM encrypt email?.

04

What does an MTA-STS policy look like?

An MTA-STS deployment is two published items: a DNS TXT record at _mta-sts.<domain> that announces a policy exists, and a plain-text policy file served over HTTPS at https://mta-sts.<domain>/.well-known/mta-sts.txt. The policy lists the allowed MX hosts, the mode and how long senders may cache it.

_mta-sts.example.co.uk.  IN  TXT  "v=STSv1; id=20261119T090000;"


version: STSv1
mode: testing
mx: mx1.example.co.uk
mx: mx2.example.co.uk
max_age: 86400

The id value tells senders whether their cached copy is current; RFC 8461 says it "MUST uniquely identify a given instance of a policy," so it changes whenever the policy file changes. max_age is in seconds, with a maximum of 31557600 (about one year). The full field reference, hosting options and rollout steps are in the MTA-STS setup guide.

To check whether a client domain already has MTA-STS and TLS-RPT:

dig +short TXT _mta-sts.example.co.uk
dig +short TXT _smtp._tls.example.co.uk
curl -s https://mta-sts.example.co.uk/.well-known/mta-sts.txt

05

What do the MTA-STS modes mean?

RFC 8461 Section 5 defines three modes. In enforce, a sender must not deliver to an MX host that fails MX matching or certificate validation. In testing, the sender delivers as if nothing failed and reports the failure through TLS-RPT. In none, the domain has no active policy.

Mode RFC 8461 behaviour When to use it
enforce Senders "MUST NOT deliver the message to hosts that fail MX matching or certificate validation" After clean TLS-RPT data over your monitoring window
testing Messages "may be delivered as though there were no MTA-STS validation failure"; senders that implement TLS-RPT report the failure Every new deployment, and after major mail changes
none Senders "should treat the Policy Domain as though it does not have any active policy" Withdrawing a policy cleanly, for example before a migration

Two details matter for business risk. In enforce, a sender that finds one bad MX tries the next one in the list, and RFC 8461 Section 5.1 says delivery "MUST NOT be permanently failed until the sender has first checked for the presence of a new policy." A misconfiguration usually shows up as delayed mail before it shows up as bounces. Removing the DNS record alone does not withdraw a policy that senders have cached, which is why none exists.

06

Do you need MTA-STS?

You need MTA-STS if your domain receives email that would cause harm if read or redirected in transit: contracts, invoices and bank details, health or legal data, credentials, payroll. That covers most businesses. You can skip it for domains that receive no mail, and you should delay it where MX certificates are not yet valid.

A practical test for any domain:

  1. Does it receive mail? No MX, or a parked domain: MTA-STS adds nothing. Focus on SPF -all, DMARC p=reject and a null MX instead.
  2. Is the content sensitive or regulated? Yes: MTA-STS is worth publishing.
  3. Are all MX hosts on TLS 1.2 or higher with valid, publicly trusted certificates? No: fix that first, or enforce will block mail. The NCSC says: "You must ensure that you have TLS 1.2 in place, and that your certificates are valid."
  4. Is someone going to read TLS-RPT reports? No: you are deploying blind. Arrange that before moving past testing.
  5. Is there a public-sector or contractual requirement? UK government bodies must publish it (see below).

Is MTA-STS worth it for small businesses?

Usually yes, for any small business on Microsoft 365 or Google Workspace that handles client money or personal data. The protocol has no licence fee, and the main work is a one-off setup plus a hosted policy file. The real cost is ongoing ownership: someone must update the policy when MX hosts change and act on failure reports.

If nobody will own it, testing mode with TLS-RPT is still useful: it gives visibility at zero delivery risk. Just do not leave it there forever and call it protection.

07

What does MTA-STS cost in time and money?

There is no licence cost; MTA-STS is an open IETF standard. The costs are the effort of setting up two DNS records and an HTTPS host with a certificate, plus ongoing work: renewing that certificate, keeping the mx: lines in step with real MX records, and reviewing TLS-RPT reports. Most of the risk sits in that ongoing part.

Item One-off or ongoing Notes
_mta-sts TXT record One-off, plus an id change on every policy edit Standard DNS change
Policy host mta-sts.<domain> Ongoing Needs HTTPS with a certificate valid for that hostname. RFC 8461 says only HTTP 200 responses count and redirects must not be followed
MX certificates Ongoing Must be unexpired, match the MX name and chain to a trusted CA
_smtp._tls TLS-RPT record One-off Points reports to a mailbox or reporting service
Report review Ongoing Daily JSON reports from supporting senders
Change control Ongoing Any MX, gateway or provider change must update the policy first

Exchange Online cannot host the policy for you. Microsoft's MTA-STS page says customers host the policy file themselves. RFC 8461 Section 8.2 also allows delegation to a provider via CNAME, provided the endpoint still presents a certificate valid for your policy host.

08

Do Microsoft 365 and Gmail support MTA-STS?

Yes, in both directions. Exchange Online validates MTA-STS on outbound mail to domains that publish a policy, and domains whose MX points to Exchange Online can publish their own policy. Gmail also honours enforced policies on outbound mail and Google Workspace admins can publish MTA-STS and TLS reporting for their domains.

What does Exchange Online do?

According to Microsoft's enhancing mail flow with MTA-STS documentation, "All messages sent outbound from Exchange Online to MTA-STS-protected recipients are validated with the TLS enforcement and certificate-validity checks defined by the MTA-STS standard. There's nothing administrators need to do to apply it." For outbound connectors that use a smart host, Microsoft validates against the smart host domain, not the final recipient domain.

For inbound, Microsoft says domain owners can protect mail to their domains with MTA-STS "if their MX record points to Exchange Online." Its example policy uses a wildcard MX line:

version: STSv1
mode: testing
mx: *.mail.protection.outlook.com
max_age: 604800

Microsoft stresses that this wildcard is specific to Exchange Online and "must NOT be used as general guidance for configuring MTA-STS." If the MX points at a third-party gateway, Microsoft says to check with that provider instead. That is the common MSP trap: the gateway, not Microsoft 365, is what senders see.

What does Gmail do?

Google's About MTA-STS and TLS reporting help page says turning on MTA-STS asks external servers to deliver to your domain only over connections authenticated with a valid public certificate and encrypted with TLS 1.2 or higher. It also states that "Gmail messages from your domain comply with MTA-STS when sent to external servers" that have an enforced policy. Google recommends starting in testing mode, reviewing reports, then moving to enforce.

09

How does MTA-STS relate to TLS-RPT, DANE and DMARC?

They are four separate controls. MTA-STS enforces TLS for inbound mail using HTTPS and CA certificates. TLS-RPT reports TLS failures so you can see what MTA-STS would block. DANE enforces TLS using DNSSEC instead. DMARC authenticates the sender's domain and has nothing to do with encryption.

Standard Question it answers Protects Depends on
MTA-STS (RFC 8461) Must senders use valid TLS to reach my MX? Inbound mail in transit HTTPS host, CA certificates
TLS-RPT (RFC 8460) Did senders manage to connect securely? Nothing directly; gives visibility A reporting address
DANE for SMTP (RFC 7672) Which certificate key must my MX present? Inbound mail in transit DNSSEC-signed zone, TLSA records
DMARC (RFC 9989) Is this message really from the domain in the From header? Your domain's identity at receivers SPF, DKIM, alignment

Do you need TLS-RPT with MTA-STS?

In practice, yes. TLS-RPT is technically optional, but without it you cannot see which senders fail to connect, so moving to enforce is a guess. The NCSC recommends always using testing mode first and setting up TLS-RPT, describing it as "a mechanism for getting feedback before you progress."

The record is one TXT entry:

_smtp._tls.example.co.uk.  IN  TXT  "v=TLSRPTv1; rua=mailto:tlsrpt@example.co.uk"

The differences are covered in MTA-STS vs TLS-RPT, and how to read the reports in TLS-RPT explained. Note that the NCSC's own page says "Mail Check no longer processes TLS reporting", so UK organisations that pointed rua= at Mail Check need a new destination.

Should you choose MTA-STS or DANE?

Choose by your DNS, not by preference. DANE is stronger against downgrades because it does not rely on a first fetch, but it needs DNSSEC on the zone and support from your mail platform. MTA-STS works on any domain with an HTTPS host. Many domains publish MTA-STS; DNSSEC-signed domains can add DANE too.

RFC 8461 Section 2 notes that MTA-STS "does not require DNSSEC, at a cost of risking malicious downgrades," and that when both exist, senders "MUST NOT allow MTA-STS Policy validation to override a failing DANE validation." Running both is supported. See DANE for SMTP for when DANE is worth it.

Does DMARC make MTA-STS unnecessary?

No. DMARC stops other people sending mail that claims to be from your domain. MTA-STS stops mail sent to you from being read or redirected on the way. A domain at p=reject can still receive invoices over a stripped, plain-text connection. You need both, and they are owned by different settings.

DMARCbis (RFC 9989) updated DMARC itself but did not touch transport security. The identity side is covered in the DMARC pillar guide. The four standards together are described in the modern email security stack.

10

What does UK guidance say about MTA-STS and TLS-RPT?

UK guidance treats MTA-STS and TLS-RPT as standard practice. The NCSC recommends testing mode with TLS-RPT, monitoring for at least a month, then enforce. GOV.UK goes further for government: organisations must publish an MTA-STS policy for every domain that receives email and must set up and review TLS-RPT data.

The specifics, from each source:

  • NCSC (MTA-STS guidance): monitor "for the period of at least a month" before enforce. It recommends max_age of 24 hours in testing and "at least 2 weeks" in enforce. TLS 1.2 and valid certificates are a must.
  • GOV.UK (Securing government email, updated 4 March 2024): government organisations must "publish a Mail Transfer Agent Strict Transport Security (MTA-STS) policy for all of your domains that receive email" and must set up DMARC and TLS-RPT reporting and review the data regularly. The update history records MTA-STS and TLS-RPT being "Moved from 'recommended' to 'must do'."
  • GOV.UK also recommends "using a provider that enforces MTA-STS policies when sending outbound email", a box Exchange Online and Gmail tick.
  • security.gov.uk (MTA-STS and TLS-RPT standards): always start in testing, monitor TLS-RPT "for at least 2 weeks", and remember that subdomains do not inherit the parent's policy.

The windows differ (a month from the NCSC, two weeks from security.gov.uk); using the longer one is the safe default. None of this makes MTA-STS a legal requirement for private companies, but UK clients that supply the public sector, or that are asked "do you follow NCSC email guidance?", should have it. The NCSC's DMARC advice is in what does the NCSC recommend for DMARC.

11

How should an MSP decide per client?

Decide by mail platform, MX path and data sensitivity. Microsoft 365 and Google Workspace clients with direct MX are the easy wins. Clients behind a gateway or on self-hosted mail need certificate and MX checks first. Domains that send but never receive need DMARC, not MTA-STS.

Client type Recommendation Main risk to check Target mode
Microsoft 365, MX direct to Exchange Online Deploy Policy host and certificate renewal enforce after monitoring
Google Workspace, MX direct to Google Deploy MX lines matching Google's published hosts enforce after monitoring
Microsoft 365 or Workspace behind a third-party gateway Deploy after checking the gateway's TLS and certificates mx: must list the gateway hosts, not Microsoft or Google enforce once the gateway is confirmed
Self-hosted or on-premises MX Assess first Self-signed or expired certificates, TLS below 1.2 testing until fixed
Regulated (legal, finance, healthcare, payroll) Prioritise Same as above, plus documented evidence for audits enforce
UK public sector or suppliers to it Required for government bodies Every receiving domain and subdomain covered enforce
Mid-migration between providers Hold at testing, or set none before cutover Cached policies listing old MX hosts Back to enforce after cutover
Parked or send-only domains (no MX) Not needed Spoofing, handled by DMARC p=reject and SPF -all n/a

Operationally, treat MTA-STS like a certificate: inventory it, monitor it, and put it in change control. Add "update the MTA-STS policy and id" to every MX or gateway change runbook, because an enforce policy pointing at old MX hosts delays mail from the largest senders first. Keep a per-client record of mode, max_age, policy host and certificate expiry.

The authentication side of the same estate is where a DMARC platform helps. DMARC AI processes DMARC aggregate (RUA) reports across all client domains and uses AI to classify sending sources, so each client can move through p=none, p=quarantine and p=reject alongside the transport work. See DMARC for MSPs for the service side.

12

FAQ

Is MTA-STS the same as encryption?

No. MTA-STS does not encrypt anything itself. It makes TLS, which encrypts the connection between mail servers, mandatory and authenticated for mail to your domain. Messages are still readable on each server and in mailboxes. For content-level protection you need message encryption such as S/MIME or your provider's encryption features.

Will MTA-STS block mail from senders that do not support it?

No. Senders that do not implement MTA-STS never fetch your policy and keep delivering as before, using opportunistic TLS where available. Microsoft's documentation notes that mail is only refused when both sides use MTA-STS and validation fails. The policy changes behaviour only for supporting senders, such as Exchange Online and Gmail.

What happens if my MTA-STS policy is wrong in enforce mode?

Supporting senders will not deliver to MX hosts that fail matching or certificate checks. They try other listed MX hosts and re-check for a new policy before giving up, so the first symptom is usually delayed mail from large providers. Fix the MX or certificate, publish a corrected policy and change the id value.

Does MTA-STS protect the email my users send?

No. Your MTA-STS policy protects mail coming in to your domain. Mail your users send is protected only if the recipient domain publishes MTA-STS or DANE and your provider validates it. Exchange Online and Gmail both validate recipients' MTA-STS policies on outbound mail automatically.

Not as a named requirement for private companies. GOV.UK makes MTA-STS and TLS-RPT mandatory for government organisations' receiving domains, and the NCSC recommends both as good practice. For everyone else it is a recommended control that supports data-protection and contractual security obligations, not a named requirement.

13

Final thoughts

MTA-STS answers one narrow question well: will mail sent to this domain arrive encrypted, at the real server? For most businesses that receive anything sensitive, the answer should be yes, and the cost is mostly ownership rather than money.

Start every domain in testing with TLS-RPT, fix certificates and MX lists, and move to enforce after a month of clean data. Then read how MTA-STS works and how to set it up for the build, and keep DMARC moving in parallel, because identity and transport are two different halves of the same job.

Related articles

Related tools

Ready to Implement?

Get authenticated mail moving in minutes: start free, book a guided demo, or talk to the team about your stack.