Mail Transfer Agent Strict Transport Security (MTA-STS)

Mail Transfer Agent Strict Transport Security (MTA-STS)

Hi All,

What is MTA-STS

Mail Transfer Agent Strict Transport Security (MTA-STS) makes sure that Emails are Transfered over a secured TLS Connection but has lower requirements than DNS based Authentification of Named Entities (DANE).

“Mail Transfer Agent Strict Transport Security (MTA-STS)” has been defined in 2018 in the following RFC

MTA-STS benefits:

  • Emails are transfered over a secure TLS connection
  • Must use TLS-Version 1.2 or higher
  • For the TLS Certificates they need to:
    • Certificate Subject needs to match the MX-Entry
    • They need to be signed and issued by a public trusthworthy CA
    • They need to be valid (valid from / valid until)

MTA-STS protects against:

  • Downgrade-Attacks to lower TLS Versions
  • Man-In-The-Middle (MITM) Attacks
  • Solves multiple SMTP-Security Issues, including expired TLS certificates and lack of support for secure protocols.

MTA-STS consists of:

Like DANE the Sender must support MTA-STS and query the MTA-STS TXT Record as well as get the MTA-STS Policy. If the Sender does not support MTA-STS it is still allowed to send Mails without TLS1.2 - as long as the Receiving Mailserver supports that.


The MTA-STS DNS TXT Record basically tells a Sending Server that this Domain does support MTA-STS

The DNS Query is for a TXT Record in “_mta-sts.domain.tld”

_mta-sts.domain.tld IN TXT “v=STSv1; id=20231019145600Z;”

Example Record

v=STSv1; id=20231019145600Z;

$DNSQuery = ""
Resolve-DnsName -Name $DNSQuery -Type TXT | where {$_.Strings -match "v=STSv1"}

MTA-STS Policy

The MTA-STS Policy is a simple Text File that contains a Version, Mode, the MX Certificate Subjects and max Age for caching.



  • “enforce”: In this mode, Sending MTAs MUST NOT deliver the message to hosts that fail MX matching or certificate validation or that do not support STARTTLS.

  • “testing”: In this mode, Sending MTAs that also implement the TLSRPT (TLS Reporting) specification [RFC8460] send a report indicating policy application failures (as long as TLSRPT is also implemented by the recipient domain); in any case, messages may be delivered as though there were no MTA-STS validation failure.

  • “none”: In this mode, Sending MTAs should treat the Policy Domain as though it does not have any active policy

The MTA-STS Policy for Exchange Online has been provided here

version: STSv1
mode: enforce
mx: *
max_age: 604800

To query the MTA-STS Policy you can use this PowerShell Code

$Result = Invoke-WebRequest -Uri ""

As you can see the Policy can contain mutliple MX Records

version: STSv1
mode: enforce
mx: *
max_age: 604800

SMTP TLS Reporting

TLS Reporting provides a way to report if the TLS connection could not be established.

The Reprorting can be eighter a Mailbox or a HTTP POST to an URL.

Example for RUA to Mailbox IN TXT “v=TLSRPTv1; rua=mailto:mailbox@domain.tld”

Examle for RUA to HTTP POST IN TXT “v=TLSRPTv1; rua=https://reporting.domain.tld/v1/tlsrpt”

Example Record

v=TLSRPTv1; rua=mailto:mailbox@domain.tld

$DNSQuery= ""
Resolve-DnsName -Name $DNSQuery -Type TXT | where {$_.Strings -match "v=TLSRPTv1"}

A TLSRPT Email looks quite similar to DMARC Reports. I has an *.gz Attachment that contains a JSON File

Here are two Examples of such JSON Files



Exchange Online Report

In Exchange Online Admin Center there is a Outbound Message in Transit Security report

As you can see MTA-STS

Andres Bohren

Exchange Logo