[{"data":1,"prerenderedAt":291},["ShallowReactive",2],{"tool-mta-sts-check":3},{"id":4,"title":5,"body":6,"description":268,"extension":269,"faq":270,"h1":283,"intro":284,"meta":285,"navigation":286,"path":287,"seo":288,"stem":289,"__hash__":290},"tools\u002Ftools\u002Fmta-sts-check.md","MTA-STS Checker and TLS-RPT Validator",{"type":7,"value":8,"toc":263},"minimark",[9,14,26,43,50,84,93,102,106,182,186,200,210,225,240,251,259],[10,11,13],"h2",{"id":12},"what-mta-sts-and-tls-rpt-are","What MTA-STS and TLS-RPT are",[15,16,17,18,25],"p",{},"MTA-STS (",[19,20,24],"a",{"href":21,"rel":22},"https:\u002F\u002Fwww.rfc-editor.org\u002Frfc\u002Frfc8461",[23],"nofollow","RFC 8461",") has two parts. A TXT record says a policy exists and gives it a version id:",[27,28,33],"pre",{"className":29,"code":30,"language":31,"meta":32,"style":32},"language-txt shiki shiki-themes material-theme-lighter material-theme material-theme-palenight","_mta-sts.example.com.  TXT  \"v=STSv1; id=20261118T1200\"\n","txt","",[34,35,36],"code",{"__ignoreMap":32},[37,38,41],"span",{"class":39,"line":40},"line",1,[37,42,30],{},[15,44,45,46,49],{},"The policy itself is a text file served over HTTPS from a fixed URL, ",[34,47,48],{},"https:\u002F\u002Fmta-sts.example.com\u002F.well-known\u002Fmta-sts.txt",":",[27,51,53],{"className":29,"code":52,"language":31,"meta":32,"style":32},"version: STSv1\nmode: enforce\nmx: mx1.example.net\nmx: *.mail.example.net\nmax_age: 604800\n",[34,54,55,60,66,72,78],{"__ignoreMap":32},[37,56,57],{"class":39,"line":40},[37,58,59],{},"version: STSv1\n",[37,61,63],{"class":39,"line":62},2,[37,64,65],{},"mode: enforce\n",[37,67,69],{"class":39,"line":68},3,[37,70,71],{},"mx: mx1.example.net\n",[37,73,75],{"class":39,"line":74},4,[37,76,77],{},"mx: *.mail.example.net\n",[37,79,81],{"class":39,"line":80},5,[37,82,83],{},"max_age: 604800\n",[15,85,86,87,92],{},"TLS-RPT (",[19,88,91],{"href":89,"rel":90},"https:\u002F\u002Fwww.rfc-editor.org\u002Frfc\u002Frfc8460",[23],"RFC 8460",") is a separate TXT record that asks senders to send daily reports of TLS problems:",[27,94,96],{"className":29,"code":95,"language":31,"meta":32,"style":32},"_smtp._tls.example.com.  TXT  \"v=TLSRPTv1; rua=mailto:tls-reports@example.com\"\n",[34,97,98],{"__ignoreMap":32},[37,99,100],{"class":39,"line":40},[37,101,95],{},[10,103,105],{"id":104},"how-to-read-the-result","How to read the result",[107,108,109,121,147,168],"ul",{},[110,111,112,116,117,120],"li",{},[113,114,115],"strong",{},"TXT record",": present, one record only, ",[34,118,119],{},"id="," of 1 to 32 letters and digits.",[110,122,123,126,127,130,131,134,135,138,139,142,143,146],{},[113,124,125],{},"Policy file",": fetched without following redirects, ",[34,128,129],{},"text\u002Fplain",", with ",[34,132,133],{},"version",", ",[34,136,137],{},"mode",", at least one ",[34,140,141],{},"mx"," and a ",[34,144,145],{},"max_age",".",[110,148,149,152,153,156,157,160,161,164,165,146],{},[113,150,151],{},"MX coverage",": each real MX host must match an ",[34,154,155],{},"mx:"," line. ",[34,158,159],{},"*.mail.example.net"," matches ",[34,162,163],{},"a.mail.example.net"," but not ",[34,166,167],{},"a.b.mail.example.net",[110,169,170,173,174,177,178,181],{},[113,171,172],{},"TLS-RPT",": present and pointing at a ",[34,175,176],{},"mailto:"," or ",[34,179,180],{},"https:"," address.",[10,183,185],{"id":184},"common-failures-and-how-to-fix-them","Common failures and how to fix them",[15,187,188,191,192,195,196,199],{},[113,189,190],{},"Policy URL unreachable."," No ",[34,193,194],{},"mta-sts"," host, a certificate that does not cover ",[34,197,198],{},"mta-sts.example.com",", or a 404. Any of these means senders treat the domain as having no policy. A static host or a small worker works fine for serving one text file.",[15,201,202,205,206,209],{},[113,203,204],{},"Redirects."," Hosting platforms often redirect to add a trailing slash or ",[34,207,208],{},"www",". Serve the file with a direct 200.",[15,211,212,215,216,219,220,222,223,146],{},[113,213,214],{},"MX not in the policy."," After a mail provider migration the policy still lists the old MX names. In ",[34,217,218],{},"enforce"," mode, senders refuse to deliver to unlisted hosts, so mail queues and eventually bounces. Update the ",[34,221,155],{}," lines first, then change the ",[34,224,119],{},[15,226,227,232,233,236,237,146],{},[113,228,229,231],{},[34,230,119],{}," with punctuation."," ",[34,234,235],{},"id=2026-11-18"," is invalid; use ",[34,238,239],{},"id=20261118",[15,241,242,247,248,250],{},[113,243,244,245,146],{},"Very short ",[34,246,145],{}," Senders cache the policy for ",[34,249,145],{}," seconds. A few minutes offers little protection against an attacker who blocks the first fetch. One to several weeks is common in enforce mode, and the limit is one year (31557600).",[15,252,253,256,257,146],{},[113,254,255],{},"No TLS-RPT."," Without reports you will not know when a sender cannot establish TLS to your MX, which is exactly what you need to see before moving to ",[34,258,218],{},[260,261,262],"style",{},"html .light .shiki span {color: var(--shiki-light);background: var(--shiki-light-bg);font-style: var(--shiki-light-font-style);font-weight: var(--shiki-light-font-weight);text-decoration: var(--shiki-light-text-decoration);}html.light .shiki span {color: var(--shiki-light);background: var(--shiki-light-bg);font-style: var(--shiki-light-font-style);font-weight: var(--shiki-light-font-weight);text-decoration: var(--shiki-light-text-decoration);}html .default .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html.dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}",{"title":32,"searchDepth":62,"depth":62,"links":264},[265,266,267],{"id":12,"depth":62,"text":13},{"id":104,"depth":62,"text":105},{"id":184,"depth":62,"text":185},"Check MTA-STS and TLS-RPT for any domain. Reads both TXT records, fetches the policy file over HTTPS and checks that it covers every MX host.","md",[271,274,277,280],{"question":272,"answer":273},"What does MTA-STS protect against?","SMTP between servers uses opportunistic TLS, so an attacker on the network path can strip STARTTLS and read or change mail in transit. MTA-STS tells senders that your MX hosts always support valid TLS, so they refuse to fall back to plain text.",{"question":275,"answer":276},"Should I start with testing or enforce?","Start with mode testing and a TLS-RPT address. Senders still deliver but report TLS failures. Switch to enforce once a week or two of reports are clean.",{"question":278,"answer":279},"Why must the policy not redirect?","RFC 8461 forbids senders from following redirects when fetching the policy, so a redirect counts as no policy. Serve the file directly from mta-sts.\u003Cdomain> with a valid certificate for that name.",{"question":281,"answer":282},"How do I update the policy?","Edit the policy file, then change the id= value in the _mta-sts TXT record. Senders only refetch the policy when the id changes or their cached copy expires after max_age.","MTA-STS and TLS-RPT checker","Enter a domain to check its MTA-STS setup. The checker reads the _mta-sts TXT record, fetches the policy from https:\u002F\u002Fmta-sts.\u003Cdomain>\u002F.well-known\u002Fmta-sts.txt, checks that every MX host is covered, and validates the TLS-RPT record.",{},true,"\u002Ftools\u002Fmta-sts-check",{"title":5,"description":268},"tools\u002Fmta-sts-check","1i084LQpAx0viRD0rC1PuiEUcnZbI0mS84J72Z3-HZk",1795555753433]