Cluster 10 · RFC 8461 · Microsoft 365 · Exchange Online

MTA-STS Setup Guide for Microsoft 365 & Exchange Online (*.mail.protection.outlook.com)

Configure RFC 8461 MTA-STS and RFC 8460 TLS-RPT for Microsoft 365 Exchange Online tenants using *.mail.protection.outlook.com, custom *.mx.microsoft endpoints, and safe testing-to-enforce rollout.

Zero Telemetry · Strict CSP (connect-src 'none')

Domain Trust & Email-TLS Configuration

RFC 8461 · 8460 · 8659 · 9116
Domain Trust Readiness Score
100 / 100 (A)
HARDENED — TRUST & TLS READY
MTA-STS & TLS-RPT 30/30
BIMI & DMARC Gate 25/25
DNS CAA (RFC 8659) 20/20
RFC 9116 security.txt 25/25

MTA-STS & TLS-RPT Artifacts

RFC 8461 + 8460
https://mta-sts.example.com/.well-known/mta-sts.txt
version: STSv1
mode: enforce
mx: *.mail.protection.outlook.com
max_age: 604800
TXT @ _mta-sts.example.com
v=STSv1; id=20261127000000Z
TXT @ _smtp._tls.example.com
v=TLSRPTv1; rua=mailto:[email protected]
STS-MX-OK: 1 valid MX pattern(s) encoded PASS
Policy binds TLS validation to *.mail.protection.outlook.com.
STS-ID-OK: Valid _mta-sts policy id=20261127000000Z PASS
Update id= whenever you edit /.well-known/mta-sts.txt so senders re-fetch the policy.
STS-MODE-OK: mode: enforce active (downgrade protection enabled) PASS
Sending MTAs will refuse plaintext fallback or mismatched MX certificates.
STS-AGE-OK: max_age: 604800s (7 days) PASS
Within RFC 8461 bounds (<= 31557600 seconds).
TLSRPT-OK: Valid _smtp._tls TLS-RPT record (RFC 8460) PASS
Daily JSON TLS reports route to mailto:[email protected].

Complete 4-in-1 Domain Trust Bundle

Markdown / TXT
domain-trust-bundle.md
# Domain Trust Sidecar & Email-TLS Bundle — example.com

- **Domain Trust Readiness Score:** 100 / 100 (Grade A — HARDENED — TRUST & TLS READY)
- **MTA-STS & TLS-RPT:** 30/30 · **BIMI:** 25/25 · **DNS CAA:** 20/20 · **security.txt:** 25/25

## 1. MTA-STS Policy File (`https://mta-sts.example.com/.well-known/mta-sts.txt`)
Serve over HTTPS (`200 OK`, `Content-Type: text/plain; charset=utf-8`, no redirects):
```text
version: STSv1
mode: enforce
mx: *.mail.protection.outlook.com
max_age: 604800
```

### MTA-STS & TLS-RPT DNS TXT Records
- `_mta-sts.example.com` TXT: `v=STSv1; id=20261127000000Z`
- `_smtp._tls.example.com` TXT: `v=TLSRPTv1; rua=mailto:[email protected]`

## 2. BIMI DNS TXT Record
- `default._bimi.example.com` TXT: `v=BIMI1; l=https://example.com/.well-known/bimi-logo.svg; a=https://example.com/.well-known/bimi-vmc.pem`
- DMARC Prerequisite: `p=reject; pct=100` (READY)

## 3. DNS CAA Records (RFC 8659 BIND Zone)
```bind
example.com. 3600 IN CAA 0 issue "letsencrypt.org"
example.com. 3600 IN CAA 0 issue "pki.goog"
example.com. 3600 IN CAA 0 issuewild "letsencrypt.org"
example.com. 3600 IN CAA 0 issuewild "pki.goog"
example.com. 3600 IN CAA 0 iodef "mailto:[email protected]"
```

## 4. RFC 9116 `https://example.com/.well-known/security.txt`
```text
Contact: mailto:[email protected]
Expires: 2027-11-26T00:00:00.000Z
Canonical: https://example.com/.well-known/security.txt
Policy: https://example.com/security-policy
Preferred-Languages: en
```

## Live Verification & Automated Remediation
- Live DoH + Security Scan: https://audit.runglab.dev/?domain=example.com
- Tailored 9-File ReadyCheck Fix Pack ($49): https://www.creem.io/product/prod_6rX3ZZhMCJ5MGugvk75Ogo
- Remote MCP Server (dev.runglab/devtools): https://mcp-server.runglab.dev/
Live DoH + TLS Verification $49 9-File Fix Pack

Verify Live DNS Records or Deploy All 9 ReadyCheck Fixes Together

In our N=140 B2B SaaS Readiness Benchmark, 95.2% (60/63) missed _mta-sts and 79.4% lacked valid RFC 9116 security.txt. Scan your live domain on ReadyCheck (https://audit.runglab.dev), order the tailored $49 9-File Domain Fix Pack, or automate via remote MCP Server dev.runglab/devtools.

RFC Specifications & Provider Requirements

Field / Record Compliant Value Engineering & Rollout Rationale
Standard Exchange Online MX mx: *.mail.protection.outlook.com Single leftmost wildcard matches <tenant-key>.mail.protection.outlook.com
New EOP MX Namespace (2025+) mx: *.mx.microsoft (if enabled) Check dig MX <domain>; newer Microsoft 365 tenants using mx.microsoft need this line too
Outbound vs Inbound Enforcement Exchange Admin Center + MTA-STS Microsoft 365 honors MTA-STS for outbound mail and validates inbound via published mta-sts.<domain>
Policy Mode Transition testing (86400) -> enforce (604800) Verify zero certificate mismatches in TLS-RPT JSON before switching to enforce

Microsoft 365 Exchange Online mta-sts.txt Policy

mta-sts-m365.txt
version: STSv1
mode: enforce
mx: *.mail.protection.outlook.com
max_age: 604800

Hybrid / EOP Check & Microsoft 365 DNS Validation

verify-m365-mtasts.sh
# Inspect your actual Exchange Online MX target first:
dig +short MX example.com
# Standard: 0 example-com.mail.protection.outlook.com.
# If your tenant uses newer *.mx.microsoft or a third-party gateway (Proofpoint/Mimecast),
# add that exact MX pattern on a new "mx:" line in mta-sts.txt!

# Verify _mta-sts and _smtp._tls DNS records:
dig +short TXT _mta-sts.example.com
dig +short TXT _smtp._tls.example.com

Step-by-Step Deployment & Key Insights

  1. Run dig +short MX <domain> to verify whether Exchange Online routes via <tenant>.mail.protection.outlook.com, *.mx.microsoft, or a security gateway (Mimecast/Proofpoint).
  2. Create /.well-known/mta-sts.txt with mode: testing, max_age: 86400, and matching mx: patterns.
  3. Deploy the policy on https://mta-sts.<domain>/.well-known/mta-sts.txt and publish _mta-sts and _smtp._tls TXT records.
  4. Audit TLS-RPT reports for 7 days, then change mode to enforce, set max_age: 604800, and increment _mta-sts id=.
  • Organizations that route Microsoft 365 inbound mail through Mimecast, Proofpoint, or Cloudflare Area 1 MUST list the gateway's MX hostnames in mta-sts.txt instead of *.mail.protection.outlook.com.
  • Microsoft 365 supports both enforcing MTA-STS when sending outbound mail to external partners and receiving MTA-STS-protected mail when you publish mta-sts.<domain>.
  • If your tenant uses Exchange Online's newer *.mx.microsoft MX records, add mx: *.mx.microsoft to avoid inbound delivery rejections under enforce mode.

Common Configuration Pitfalls to Avoid

  • Copy-pasting *.mail.protection.outlook.com when an external spam filter sits in front of Microsoft 365 — sending MTAs will reject delivery when enforce is active.
  • Deploying mode: enforce with max_age: 31536000 before testing with TLS-RPT.
  • Using underscores or dashes in _mta-sts TXT id= (RFC 8461 permits only ASCII letters and digits).

More Domain Trust & Email-TLS Guides

RFC 8461 · Cloudflare Workers + Pages

MTA-STS Setup on Cloudflare: Workers, Pages & DNS TXT Guide

Deploy RFC 8461 MTA-STS on Cloudflare in under 5 minutes without a separate origin server: host https://mta-sts.<domain>/.well-known/mta-sts.txt via Cloudflare Pages or a 12-line Worker plus _mta-sts TXT.

← Back to Domain Trust Sidecar Hub · Cluster 1A: SPF & DMARC Builder → · Cluster 4: Security Headers & CSP → · 2026 N=140 B2B Benchmark → · ReadyCheck Live Audit → · $49 9-File Fix Pack →

Frequently Asked Questions

Does Microsoft 365 host mta-sts.<domain> for me automatically?

No. You must host https://mta-sts.<domain>/.well-known/mta-sts.txt on your own web edge (such as Cloudflare Pages/Workers, Azure Static Web Apps, or Nginx) and publish the DNS TXT records.

What if we use Proofpoint or Mimecast in front of Exchange Online?

Your public DNS MX points to the secure email gateway, so your mta-sts.txt must list the gateway's exact MX hostnames (e.g., *.pphosted.com or *.mimecast.com) rather than Microsoft's MX.

Does Exchange Online check SPF lookups strictly alongside MTA-STS?

Yes — Microsoft 365 consumes 2 SPF lookups via include:spf.protection.outlook.com. Check your total SPF budget in Cluster 1A (/spf-dmarc/).