Detecting and verifying MTA-STS policy changes and locations primarily involves a two-phase process: first, querying the DNS for a specific TXT record, and then retrieving a policy file via HTTPS from a well-known URL. Receiving Mail Transfer Agents (MTAs) initiating this process first check for a _mta-sts.<domain> DNS TXT record. This record contains a policy ID and points to the location where the actual policy is hosted. Subsequently, the MTA fetches the mta-sts.txt policy file from a standardized HTTPS URL, typically https://mta-sts.<domain>/.well-known/mta-sts.txt. Verification is critical, requiring validation of the HTTPS server's certificate chain against trusted roots and ensuring the hostname matches. Policy changes are reflected and detected based on the 'max_age' directive within the policy file, which specifies how long the policy can be cached before a new check is required. Both manual command-line checks using tools like 'dig' and 'curl', and automated online validation tools, simplify this complex verification process, helping administrators confirm proper implementation and quickly identify any misconfigurations or unauthorized alterations.
12 marketer opinions
The detection and verification of MTA-STS policy changes build upon the foundational two-phase lookup by focusing on the active methodologies. This involves a systematic approach to confirm the integrity of both the DNS TXT record and the HTTPS-hosted policy file. Practical verification methods range from manual command-line execution, using tools like 'dig' to inspect the '_mta-sts' DNS TXT record for the policy ID and 'curl' to retrieve the 'mta-sts.txt' policy file, to leveraging specialized online validation tools. These automated tools streamline the process by performing comprehensive checks, including DNS lookups, secure retrieval of the policy file via HTTPS, validation of the TLS certificate, and parsing of the policy content to ensure correct formatting, matching IDs, and proper 'max_age' and 'mode' settings. Continuous monitoring services are also crucial, providing alerts for discrepancies or unauthorized alterations, which is vital given real-world scenarios such as Yahoo's observed transition between enforcement and testing modes.
Marketer view
Email marketer from Email Geeks explains how he detected Yahoo's move to an enforce MTA-STS policy by observing logs and an increase in messages logged with an enforce policy. He also clarifies that the MTA-STS policy is stored in a fixed location, providing the example of https://mta-sts.yahoo.com/.well-known/mta-sts.txt, and later notes that Yahoo reverted to testing mode, suggesting they encountered issues.
6 Feb 2025 - Email Geeks
Marketer view
Email marketer from Email Geeks shares that Yahoo publishes its MTA-STS TXT record, indicating how to verify it using a DNS lookup tool.
29 Jan 2023 - Email Geeks
2 expert opinions
Receiving mail servers initiate MTA-STS policy detection through a two-step process, first querying a DNS TXT record in the `_mta-sts` subdomain, then fetching the detailed policy from a specific HTTPS URL. Policy updates are managed by the `max_age` value, which dictates how long a policy is cached before a new retrieval is prompted. Verification critically relies on the secure HTTPS connection used for policy retrieval, ensuring the authenticity of the policy data. It is important to note that the policy may be hosted on the domain associated with the MX record, ensuring proper alignment for email reception.
Expert view
Expert from Spam Resource explains that MTA-STS policy detection by receiving servers involves two steps: first, a DNS TXT record query in the _mta-sts subdomain (e.g., _mta-sts.example.com) is performed. This TXT record points to a well-known URL (e.g., https://mta-sts.example.com/.well-known/mta-sts.txt) where the actual policy data is fetched via HTTPS. Verification relies on the secure HTTPS connection and the max_age field in the policy, which dictates how long the policy is cached before a new check is required.
28 Sep 2022 - Spam Resource
Expert view
Expert from Word To The Wise explains that detecting MTA-STS policies involves a two-part lookup: a DNS TXT record lookup for _mta-sts.example.com and then fetching the policy file from a well-known HTTPS URL (e.g., https://mail.example.com/.well-known/mta-sts.txt), where mail.example.com is the domain's MX record. Policy changes are detected by observing the max_age field within the policy, which specifies the caching duration, prompting re-fetching of the policy once expired to ensure the latest version is used.
16 Dec 2021 - Word To The Wise
5 technical articles
Sending Mail Transfer Agents (MTAs) play a crucial role in detecting and verifying MTA-STS policies. This process begins with the sending MTA querying the DNS for a specific TXT record, typically `_mta-sts.<domain>`, which indicates the policy's existence and location. Following this initial DNS lookup, the MTA proceeds to fetch the actual policy file over a secure HTTPS connection from a standardized, well-known URL path, commonly `https://mta-sts.<domain>/.well-known/mta-sts.txt`. A critical step in this retrieval is the validation of the HTTPS server's TLS certificate chain against trusted root Certificate Authorities, ensuring both the authenticity of the policy source and that the hostname matches. Policy changes are primarily detected and applied based on the `max_age` directive specified within the policy file, which dictates how long sending MTAs should cache the policy before re-fetching it to check for updates. Administrators can verify their implementation using tools like Google Admin Toolbox Dig or by checking server configurations, ensuring the policy is correctly hosted and accessible.
Technical article
Documentation from RFC Editor explains that MTA-STS policies are retrieved via HTTPS from a well-known URL path (/.well-known/mta-sts.txt) on the destination domain. The policy file's integrity is validated by checking the certificate chain of the HTTPS server against trusted root CAs and ensuring the hostname matches. Changes are detected by fetching the policy at intervals specified by the max_age directive, with caching mechanisms in place.
15 Nov 2021 - RFC Editor
Technical article
Documentation from Google Workspace Admin Help shares that administrators can verify their MTA-STS policy implementation by using tools like the Google Admin Toolbox Dig tool to check the DNS TXT record for '_mta-sts' and then ensuring the policy file is correctly hosted at the specified URL (https://mta-sts.yourdomain.com/.well-known/mta-sts.txt) and accessible via HTTPS with a valid certificate. Policy changes are reflected based on the 'max_age' value in the policy.
28 Apr 2025 - Google Workspace Admin Help
How can I test inbound starttls with a given external IP address?
How to debug DMARC authentication failure and alignment issues?
How to verify DMARC, DKIM, and SPF setup?
What are the best methods for identifying email sending vendors for DMARC enforcement?
What are the steps to troubleshoot DMARC reject policy causing low email delivery rates after implementation?
What email deliverability services monitor DNS record changes and report back?