Knowledge hub / Article

How to set up Inbound SMTP DANE, DNSSEC and MTA-STS for Microsoft 365

Step by step: enable Inbound SMTP DANE and DNSSEC in Exchange Online, then set up MTA-STS and TLS-RPT. With screenshots, PowerShell commands and DNS records.

28 April 2025 6 min read Brandaris Cybersecurity Updated 12 November 2026

In March 2022, Microsoft set up Outbound SMTP DANE with DNSSEC automatically. You didn’t have to do anything for that. For incoming mail, it took until 2024 before Microsoft made the same protection available, and you have to enable it yourself.

In this article you learn step by step how to set up Inbound SMTP DANE and DNSSEC in Exchange Online. Then you finish the job with MTA-STS and TLS-RPT, so that senders without DANE support also deliver to you encrypted, and you get reports when something goes wrong.

What do DANE, DNSSEC, MTA-STS and TLS-RPT do?

Technology What it does
DNSSEC Signs your DNS data, so nobody can forge it in transit.
SMTP DANE Records in DNS which certificate your mail server uses. Senders refuse a forged or unencrypted connection.
MTA-STS Does the same through a policy file on HTTPS, for senders that do not support DANE.
TLS-RPT Lets senders report failed encrypted deliveries to you daily.

All of it is free for Microsoft 365 users. You only need admin rights in Exchange Online and access to your DNS.

Part 1: Inbound SMTP DANE and DNSSEC

Step 1: Check that your domain is signed with DNSSEC

The Verisign DNSSEC Debugger with green ticks for a signed domain

Is your domain not signed? Enable DNSSEC at your registrar. If your registrar does not support it, it is wise to move your domain to a provider that does.

Step 2: Lower the TTL of your current MX record

The current MX record, pointing to mail.protection.outlook.com

  • Log in to your DNS provider.
  • Set the TTL (Time To Live) of your current MX record to 1 minute.
  • Make sure the priority of this record is 0 or 10.
  • Save the change.

Wait until the old TTL has fully expired before you continue. If it was 1 hour, wait an hour.

Step 3: Connect to Exchange Online PowerShell

Start PowerShell as administrator. If you do not have the Exchange Online module yet, install it first. Confirm with “Yes” when PowerShell asks whether it may install from the PSGallery.

Install-Module ExchangeOnlineManagement
Connect-ExchangeOnline

Step 4: Enable DNSSEC for your domain

Enable-DnssecForVerifiedDomain -DomainName "jouwdomein.nl"

The output shows a new value, the DnssecMxValue. You need it in the next step. It ends in mx.microsoft.

PowerShell shows the DnssecMxValue after Enable-DnssecForVerifiedDomain

Step 5: Add a new MX record

The new MX record with priority 20, pointing to mx.microsoft

Create a second MX record at your DNS provider:

Field Value
Name @
Value the DnssecMxValue from step 4
Priority 20
TTL 1 minute

Step 6: Test the new MX record

Microsoft’s Inbound SMTP Email Test: both the old and the new MX record pass

  • Go to Microsoft’s Inbound SMTP Email Test.
  • Enter an email address on your domain.
  • Check that the test passes for the new MX record.

Step 7: Delete the old MX record

Delete the MX record that points to mail.protection.outlook.com.

Step 8: Set the priority of the new MX record to 0

Change the priority of the new record from 20 to 0. You can now raise the TTL again too, for example to 1 hour.

Step 9: Check the DNSSEC validation

Microsoft’s DNSSEC validation, passed for the new MX record

Step 10: Enable Inbound SMTP DANE

Stay connected to Exchange Online and run:

Enable-SmtpDaneInbound -DomainName "jouwdomein.nl"

Then wait 15 to 30 minutes, so Microsoft’s TLSA records are known everywhere.

PowerShell after Enable-SmtpDaneInbound

Step 11: Check the DANE validation

Microsoft’s DANE validation, passed

Microsoft publishes several TLSA records for reliability. If at least one validates, your configuration is correct.

Part 2: MTA-STS and TLS-RPT

DANE only works with senders that support DNSSEC and DANE. Large providers such as Gmail also support MTA-STS. With both, you cover most senders.

Step 12: Publish the MTA-STS policy

Create a text file with this content:

version: STSv1
mode: testing
mx: *.mx.microsoft
mx: *.mail.protection.outlook.com
max_age: 604800
  • mode: testing means senders report errors but still deliver. Always start this way.
  • The two mx lines cover the new Microsoft mail servers from part 1 and the old ones. If only the new MX record is left, you can remove the second line later.
  • max_age is how long senders remember the policy, in seconds. 604800 is one week.

Put the file at exactly this address, with a valid HTTPS certificate:

https://mta-sts.jouwdomein.nl/.well-known/mta-sts.txt

The file must be served as plain text (text/plain). Any web host with HTTPS works. We use Cloudflare Pages: you add mta-sts.jouwdomein.nl as a custom domain there, and Cloudflare takes care of the certificate. Microsoft does not host the file for you.

Step 13: Add the DNS records

Name Type Value
_mta-sts TXT v=STSv1; id=20261112
_smtp._tls TXT v=TLSRPTv1; rua=mailto:tlsreports@jouwdomein.nl
  • The id is a version number of your own choosing. A date works well. Change it every time you change the policy file, otherwise senders will not notice the change.
  • In the _smtp._tls record, enter the address where the daily TLS reports should go. If you use a DMARC service, check whether it also processes TLS reports.

Step 14: Check, then switch the policy to enforce

  • Check that the policy file is reachable by opening the address from step 12 in your browser.
  • Leave the policy on testing for a few weeks and read the TLS reports.
  • If you see no errors, change mode: testing to mode: enforce, and increase the id in the _mta-sts record.

From then on, senders that support MTA-STS refuse to deliver unencrypted or to the wrong server.

Check your result on internet.nl

Run the email test at internet.nl/test-mail. With SPF, DKIM, DMARC, DNSSEC and DANE in order, everything you can configure yourself turns green.

Our test domain scored 100% with these steps in April 2025, and got a place in the internet.nl Hall of Fame.

Email test on internet.nl in April 2025: 100% for our test domain

One caveat: internet.nl also assesses the encryption of Microsoft’s own mail servers. In our test in November 2026, internet.nl rejected some cipher suites and SHA1 there, so the score stayed at 97%. As a Microsoft 365 customer, you have no control over that. internet.nl does not count MTA-STS and TLS-RPT in the score, but they do make your mail more secure.

Need help?

Would you rather not do this yourself, or do you want to know how your email domain is doing? The free domain check checks SPF, DKIM, DMARC and BIMI in one go. We are happy to help you set up DANE and MTA-STS.

Book an introductory call

Source for part 1: Ali Tajran’s guide, Inbound SMTP DANE and DNSSEC Exchange Online.

<frequently asked questions>

Questions about this topic

What is the difference between DANE and MTA-STS?

Both enforce encrypted delivery of email. DANE uses DNSSEC and TLSA records to confirm your mail server's certificate. MTA-STS uses a policy file on an HTTPS address. Not every sending mail server supports DANE, and not every one supports MTA-STS. With both, you cover most senders.

Do I need to do anything for Outbound DANE in Microsoft 365?

No. Microsoft enabled Outbound SMTP DANE with DNSSEC automatically in March 2022. Only Inbound DANE, for mail you receive, has to be enabled by you.

What do I need before I start?

A domain with DNSSEC at your registrar or DNS provider, admin rights in Exchange Online and access to your DNS records. For MTA-STS you also need a web address mta-sts.jouwdomein.nl with a valid certificate.

Will this get me 100% on internet.nl?

Everything you can configure yourself turns green. Our test domain scored 100% in April 2025. In our test in November 2026 the score stayed at 97%, because internet.nl rejects some cipher suites and SHA1 on Microsoft's mail servers. As a customer, you have no control over that.

What is TLS-RPT?

TLS-RPT is a DNS record that makes sending mail servers send you a daily report about failed encrypted deliveries. That shows you whether DANE and MTA-STS work properly, before you switch MTA-STS to enforce.

Do it yourself or together

Start with the free Cybercheck, or book an introductory call.

<newsletter>

Our newsletter

Cybersecurity is not just technology. It is people work. In our newsletter we share knowledge, stories and experiences that show how we help organisations move forward. The newsletter is in Dutch.