What port does MTA-STS typically use for policy fetching?
Michael Ko
Co-founder & CEO, Suped
Published 25 Dec 2024
Updated 22 Sep 2025
7 min read
When we talk about MTA-STS (Mail Transfer Agent Strict Transport Security), the port it uses for policy fetching is a foundational aspect of its security. MTA-STS is designed to ensure that email communication between mail servers is always encrypted using Transport Layer Security (TLS), preventing downgrade attacks and passive eavesdropping. To achieve this, it relies on a policy file that receiving mail servers publish and sending mail servers retrieve. The core of this retrieval process centers around a specific, secure port.
The answer is straightforward: MTA-STS exclusively uses port 443. This is the standard port for HTTPS (Hypertext Transfer Protocol Secure) traffic, which is crucial for the secure retrieval of the MTA-STS policy file. This design choice underscores the protocol's commitment to verifiable security, leveraging the same robust encryption mechanisms that secure web browsing.
The policy itself is hosted on a web server accessible via HTTPS. This means that a sending mail server, after discovering a domain's MTA-STS policy via DNS TXT records, will attempt to download the policy file from a specific URL over port 443. This mechanism ensures that the policy itself is not tampered with during transmission, maintaining the integrity of the email security enforcement.
HTTPS and the policy fetching mechanism
HTTPS and the policy fetching mechanism
The selection of HTTPS and port 443 for fetching MTA-STS policies is not arbitrary. It's a deliberate design to guarantee the authenticity and integrity of the policy information. Without the encryption and certificate validation provided by HTTPS, a malicious actor could potentially intercept or alter the MTA-STS policy, leading to downgrade attacks or email interception. For instance, an attacker could change a policy to 'enforce' mode to 'testing' mode, weakening security.
When a mail server wants to send an email to a domain that has MTA-STS enabled, it first performs a DNS lookup to find the _mta-sts TXT record. This record contains a version identifier and indicates that an MTA-STS policy exists. It also directs the sending server to a specific subdomain, mta-sts.yourdomain.com, where the policy file is hosted. The file is always expected to be found at a specific directory path.
The actual policy file name is fixed: mta-sts.txt. So, the full URL from which the policy is fetched would look something like https://mta-sts.yourdomain.com/.well-known/mta-sts.txt. The inclusion of .well-known in the path is a standard convention for server-based metadata, making it easy for clients to discover policies.
Using port 443, the default for HTTPS, provides several layers of security that are essential for MTA-STS. Firstly, it ensures that the connection between the sending mail server (client) and the hosting web server is encrypted. This prevents anyone from reading the policy data as it travels across the network. Secondly, HTTPS involves certificate validation. The client verifies the web server's SSL certificate to ensure it is communicating with the legitimate domain. This protects against DNS spoofing attacks, where an attacker might try to redirect the client to a fake policy server.
If MTA-STS policies were fetched over an unencrypted port, such as port 80 (HTTP), the entire system would be vulnerable. An attacker could easily perform a man-in-the-middle attack to modify the policy or prevent its delivery, undermining the security guarantees of MTA-STS. This is why the protocol explicitly mandates HTTPS, as highlighted by RFC 8461, which defines MTA-STS.
HTTPS (Port 443) for MTA-STS
Encrypted Connection: All data exchanged is encrypted, safeguarding policy integrity.
Certificate Validation: Client verifies the server's identity using SSL certificates.
Protects Against Attacks: Mitigates man-in-the-middle and DNS spoofing threats effectively.
Mandatory Requirement: Essential for MTA-STS to function securely and as intended.
HTTP (Port 80) – Not for MTA-STS
Unencrypted Traffic: Data is sent in plain text, making it vulnerable to interception.
No Identity Verification: No SSL certificates, increasing risk of impersonation.
High Vulnerability: Susceptible to policy tampering and redirection attacks.
Incompatible: MTA-STS protocol specifically disallows policy fetching over HTTP.
Deployment considerations for port 443
Deployment considerations for port 443
For domains implementing MTA-STS, ensuring that the policy is correctly hosted and accessible over port 443 is paramount. This typically involves configuring a web server (like Apache or Nginx) to serve the mta-sts.txt file at the designated URL. The web server must have a valid, publicly trusted SSL certificate installed for the mta-sts.yourdomain.com subdomain.
Proper MTA-STS policy changes and locations verification is crucial. Without a correctly configured SSL certificate, sending mail servers will fail to validate the authenticity of the policy host, treating it as an insecure connection. This often leads to MTA-STS policy failures, where the policy cannot be fetched or trusted, effectively disabling the security benefits. Therefore, ongoing monitoring of certificate validity and accessibility is vital.
Important for MTA-STS implementation
When setting up MTA-STS, remember that the mta-sts.txt file must be served with a Content-Type header of text/plain. Additionally, a successful policy retrieval should result in an HTTP 200 OK status code. Any deviation can cause sending MTAs to ignore the policy, compromising your email security.
Furthermore, ensuring your DNS records are correctly configured, including the _mta-sts TXT record and the A/AAAA records for the mta-sts subdomain, is a critical step. These DNS entries guide sending servers to the correct location for policy retrieval, reinforcing the secure channel established over port 443.
Integrated security with DMARC and TLS reporting
Integrated security with DMARC and TLS reporting
MTA-STS isn't a standalone solution but works best as part of a comprehensive email authentication strategy, alongside protocols like SPF and DKIM, enforced by DMARC. DMARC allows domain owners to instruct receiving mail servers on how to handle emails that fail authentication checks, and it provides reporting on these failures. The combination of MTA-STS, SPF, DKIM, and DMARC creates a robust defense against email spoofing, phishing, and the various blocklist (or blacklist) threats that plague email deliverability. Microsoft also details how MTA-STS enhances mail flow.
For effective monitoring, you need visibility into how your MTA-STS policies are being applied and whether they are being fetched successfully. This is where DMARC monitoring tools become invaluable. While MTA-STS ensures secure transport, DMARC allows you to see the overall health of your email authentication, including any issues related to MTA-STS policy retrieval. With a unified platform approach, you can gain actionable insights to troubleshoot and optimize your email security.
We understand the complexities of email security. That's why Suped offers an advanced DMARC monitoring and reporting solution with a generous free plan. Our platform provides AI-powered recommendations to simplify complex issues, real-time alerts, and a unified dashboard for DMARC, SPF, and DKIM, alongside blocklist and deliverability insights. This comprehensive view helps ensure your MTA-STS policies are working as intended, and your emails reach the inbox securely.
Key takeaways on MTA-STS policy fetching
Key takeaways on MTA-STS policy fetching
In summary, the functionality of MTA-STS hinges on the secure retrieval of its policy file, which is consistently achieved over port 443, utilizing the HTTPS protocol. This choice provides the necessary encryption and authentication to protect against malicious interference, ensuring that the rules governing TLS enforcement for email are trustworthy.
For anyone managing email infrastructure, understanding this fundamental aspect of MTA-STS is vital. It emphasizes the need for correctly configured web servers, valid SSL certificates, and accurate DNS records. Only then can organizations fully leverage MTA-STS to prevent email deliverability issues and safeguard their email communications.