12 November 2026 · DMARC Engine · 10 min read
- Start with testing mode
- Monitor aggregate reports
- Evaluate TLS setup
- Adjust policy mode gradually
Introduction to MTA-STS Policy Modes
When implementing MTA-STS, administrators must choose a policy mode that balances security and deliverability, a decision that affects how receiving mail servers handle incoming mail. A common pattern is to start with a testing mode, as seen in the following
_mta-sts.example.com. IN TXT "v=MTA-STS; m=testing"record, which allows senders to test their configuration without affecting mail delivery.
A hosted or managed setup may handle this differently, with some providers automatically configuring MTA-STS in testing mode by default.
Receivers typically cache MTA-STS policies, so changes to the policy mode may take some time to propagate.
The aggregate reports will show any issues with the current policy mode, helping administrators to identify potential problems before switching to a stricter mode.
_mta-sts.example.com. IN TXT "v=MTA-STS; m=strict"
Note: administrators should carefully evaluate the trade-offs of each policy mode before making a change, as this can impact mail delivery and security.
Understanding Strict Mode Trade-offs
A common pattern is for mail server administrators to initially configure MTA-STS in strict mode, as it offers the highest level of security, with the expectation that it will provide the best protection against man-in-the-middle attacks. However, this approach can have trade-offs, particularly in terms of mail deliverability. The aggregate reports will show that some legitimate emails may be blocked due to MTA-STS policy failures.
mts-sts.example.com. IN TXT "v=MTA-STS; id=2023022201"
In a hosted or managed setup, the provider may handle MTA-STS configuration, but it is still crucial to understand the implications of strict mode. For instance, if the mail server's TLS certificate is not properly configured or has expired, MTA-STS in strict mode will prevent emails from being delivered. Receivers typically enforce MTA-STS policies, so it is essential to ensure that the mail server is correctly set up before enabling strict mode.
example.com. IN MX 10 mail.example.com
mail.example.com. IN TLSA 0 0 1 d2a85f2860d218d8ceza8f142b7980092c536761eeae1da111f6c522b8b5242a
The key consideration when deciding whether to use strict mode is the trade-off between security and deliverability. While strict mode provides the highest level of protection, it may also lead to legitimate emails being blocked. A more cautious approach may be to start with testing mode and gradually move to enforce mode, as this allows for monitoring of MTA-STS policy failures without affecting mail deliverability.
Warning: enabling strict mode without proper testing and monitoring can result in significant mail delivery issues, so it is crucial to carefully evaluate the trade-offs before making a decision.
Testing Mode: A Cautionary Approach
Testing mode is a useful, though limited, way to introduce MTA-STS to mail servers, allowing senders to gauge the impact of the protocol without immediately enforcing it. A common pattern is to start with testing mode, as defined by the mx record, for example:
_mta-sts.example.com. IN TXT "v=MTA-STS;v=1;" then add a policy record, such as
mta-sts.example.com. IN TXT "v=MTA-STS;v=1; mode=testing; mx:mail.example.com; max_age=86400"This setup enables testing mode for the example.com domain. Receivers typically will not enforce the policy in testing mode, so mail delivery should not be affected.
A key trade-off in testing mode is the lack of actual security benefits, as receivers will not enforce the policy. However, testing mode does allow senders to monitor the effectiveness of their MTA-STS setup via the aggregate reports, which will show any potential issues with mail server configuration or certificate validation.
_smtp._tls.example.com. IN TXT "v=TLSRPT;v=1; rua=mailto:tls-rpt@example.com"
Warning: when using a hosted or managed email setup, ensure that the MTA-STS policy is correctly configured on the domain itself, rather than the hosting provider's hostname, to avoid any potential issues with mail delivery or security.
Enforce Mode: Balancing Security and Deliverability
Enforce mode is the most secure MTA-STS policy mode, as it requires mail servers to establish a TLS connection with the recipient's mail server, and enforces certificate validation. This mode provides the highest level of security, but it also introduces potential deliverability risks if not implemented carefully. A common pattern is for senders to start with a less restrictive mode, such as testing mode, and gradually move to enforce mode as they gain confidence in their TLS setup.
mts-sts.example.com. IN TXT "v=MTA-STS; version=1; mode=enforce; mx=mail.example.com; max_age=604800"The aggregate reports will show any failures to establish a secure connection or validate certificates, allowing senders to identify and fix issues before they impact deliverability. Receivers typically honour the MTA-STS policy, but may still accept mail from servers that do not support TLS, or where certificate validation fails, depending on their specific configuration and risk assessment. In a hosted or managed setup, the provider may handle MTA-STS policy configuration and monitoring, but it is still important for senders to understand the trade-offs and ensure their TLS setup is correct.
import dns.resolver
answers = dns.resolver.resolve('mts-sts.example.com', 'TXT')
for answer in answers:
print(answer.to_text())A key consideration when implementing enforce mode is the potential impact on mail delivery to receivers with outdated or misconfigured TLS setups. Senders should carefully evaluate their recipient base and consider the potential risks before enabling enforce mode. The MTA-STS protocol allows senders to specify a maximum age for the policy, which determines how often receivers should refresh their cached copy of the policy. A shorter maximum age can help ensure that changes to the policy are propagated quickly, but may also increase the load on the sender's DNS infrastructure.
mts-sts.example.com. IN TXT "v=MTA-STS; version=1; mode=enforce; mx=mail.example.com; max_age=86400"
Warning: senders should ensure that their mail servers are correctly configured to support TLS and have valid certificates, as enforce mode will cause mail delivery to fail if these requirements are not met. It is also important to monitor aggregate reports and adjust the MTA-STS policy as needed to ensure that mail delivery is not disrupted.
In general, receivers will honour the MTA-STS policy, but senders should be prepared to handle exceptions and adjust their policy accordingly. By carefully evaluating the trade-offs and implementing enforce mode correctly, senders can improve the security of their mail server and reduce the risk of tampering and eavesdropping.
Operational Guidance: Publishing MTA-STS Records
Publishing MTA-STS records requires careful consideration of the policy mode and its implications on mail server security and deliverability. A common pattern is for organisations to start with a testing policy, then transition to enforce mode once they are confident in their setup. The MTA-STS policy is defined in a TXT record, which is published on a subdomain of the organisation's domain, typically _mta-sts.
_mta-sts.example.com. IN TXT "v=MTA-STS; id=2023022201"This record specifies the MTA-STS version and a unique identifier for the policy. The policy itself is defined in a separate file, hosted on the same domain, which contains the policy mode and the list of allowed MX hosts. For example, a policy file for a domain using a hosted email service might contain the following:
GET /\.well-known/mta-sts.txt HTTP/1.1
HTTP/1.1 200 OK
Content-Type: text/plain
version: MTA-STS
mode: enforce
mx: mail.example.com
mx: backup-mail.example.comReceivers typically cache MTA-STS policies for a period of time, as specified in the policy file, to reduce the load on the hosting server. The aggregate reports will show any errors or warnings related to the MTA-STS policy, allowing organisations to identify and fix any issues before they impact deliverability.
_mta-sts.example.com. IN TXT "v=MTA-STS; id=2023022201; max_age=604800"A hosted or managed setup may handle the publication and management of MTA-STS records differently, so it is essential to check with the provider for specific guidance. Some providers may offer automated tools for generating and publishing MTA-STS records, while others may require manual configuration.
GET /\.well-known/mta-sts.txt HTTP/1.1
HTTP/1.1 200 OK
Content-Type: text/plain
version: MTA-STS
mode: testing
mx: mail.example.com
mx: backup-mail.example.comOrganisations should be cautious when transitioning from testing to enforce mode, as this can cause mail delivery issues if the policy is not correctly configured. It is recommended to monitor the aggregate reports and mail server logs closely during this transition period to identify and fix any issues promptly.
_mta-sts.example.com. IN TXT "v=MTA-STS; id=2023022201; max_age=604800; policy=enforce"Warning: Failing to correctly publish MTA-STS records or transitioning to enforce mode too quickly can result in mail delivery issues, so it is crucial to carefully plan and monitor the deployment of MTA-STS policies.
Monitoring and Troubleshooting MTA-STS
When implementing MTA-STS, it is crucial to monitor and troubleshoot any issues that may arise, as these can impact mail server security and deliverability. A common pattern is for receivers to check MTA-STS policies before attempting to deliver mail, so any errors in the policy or its publication can lead to delivery failures. The aggregate reports will show errors and warnings related to MTA-STS, such as certificate mismatches or policy validation failures, which can be used to identify and rectify issues.
_mta-sts.example.com. IN TXT "v=STSv1; id=1"
Receivers typically cache MTA-STS policies for a period of time, so changes to the policy may not be immediately visible. This caching behaviour can make troubleshooting more complex, as it may not be immediately clear whether changes have taken effect. In a hosted or managed setup, the provider may handle caching and policy updates, but it is still important to understand how these mechanisms work in order to effectively troubleshoot issues.
_mta-sts.example.com. IN TXT "v=STSv1; id=2; mx:mail.example.com"
To troubleshoot MTA-STS issues, it is helpful to use tools such as dig or online DNS record checkers to verify the publication of MTA-STS records. These tools can help identify errors in record formatting or publication, which can prevent receivers from successfully retrieving the MTA-STS policy. Also, mail server logs can provide valuable information about MTA-STS-related errors, such as certificate validation failures or policy mismatches.
> Tip: When troubleshooting MTA-STS issues, it is essential to verify that the MTA-STS records are published on the correct domain, as specified in the mail server's configuration, to ensure that receivers can successfully retrieve the policy.
Conclusion and Best Practices
When implementing MTA-STS, administrators must carefully consider the trade-offs between security and deliverability. A common pattern is to start with testing mode, as seen in the following record:
_mta-sts.example.com. IN TXT "v=MTA-STS; m=testing"This allows for the collection of aggregate reports without affecting mail delivery.
A list of best practices for MTA-STS policy modes includes:
- publish records on domains you control
- monitor aggregate reports for potential issues
- gradually transition from testing to enforce mode
_mta-sts.example.com. IN TXT "v=MTA-STS; m=enforce"Note: hosted email providers often handle MTA-STS configuration on behalf of their customers, so it is essential to consult their documentation before making any changes.