Skip to main content
MediumEmailOWASP A02:2021CWE-319

How to fix: MTA-STS Mode Not Enforcing

The MTA-STS policy is set to mode: none or mode: testing. These modes do not enforce TLS for inbound SMTP connections, so STARTTLS downgrade attacks remain possible.

Why it matters

Attackers can downgrade inbound SMTP sessions from STARTTLS to plaintext, exposing email content and relay credentials. The MTA-STS declaration provides false assurance without enforcement.

MTA-STS mode: none and mode: testing tell sending servers to check the policy but not enforce it. Only mode: enforce causes sending servers to abort delivery if TLS cannot be established.

How to fix it

  1. 1Change mode: testing or mode: none to mode: enforce.
  2. 2Before switching to enforce, verify TLS is consistently working by reviewing TLS-RPT aggregate reports.
  3. 3Update the id= value in the _mta-sts DNS record to force cache invalidation.

Code examples

mta-sts.txt

text
version: STSv1
mode: enforce
mx: mail.example.com
max_age: 604800

References

Detected automatically by VulnRadar. The check id is email-mta-sts-mode-none, stable across every scan so you can filter or diff on it.

See every email check

Questions

How severe is MTA-STS Mode Not Enforcing?
VulnRadar rates this medium severity in the email category. The severity is fixed per check, not scored per site, so the same finding is the same severity on every scan.
Does VulnRadar check for this automatically?
Yes. It runs as part of every scan under the check id email-mta-sts-mode-none, which stays the same between runs so you can filter, diff, or gate CI on it.
Which standards does MTA-STS Mode Not Enforcing map to?
It maps to CWE-319. In the OWASP Top 10 it falls under A02:2021.

Missing a check?

The detection set is open. If you know a misconfiguration this does not catch, propose it: the issue template asks for the threat model, how to detect it, the false-positive risk, and a test fixture, which is the same thing a maintainer would have to work out anyway.

Propose a checkHow a check is built

Scan your own site for mta-sts mode not enforcing

VulnRadar runs this check and hundreds more against a URL in seconds. No agent to install, just paste a URL.

Or scan this site as a demoRead the docs

How to fix: MTA-STS Mode Not Enforcing | VulnRadar