The mechanism has two steps: the node asks DNS for the policy ID, then fetches the policy itself over HTTPS from mta-sts.<domain>/.well-known/mta-sts.txt.
If the policy is in enforce mode, the message goes out only if three conditions are met at once: the receiver’s address matched at least one MX pattern from the policy; the connection is encrypted; the node verified both the certificate chain and the server name in it.
testing mode forbids nothing — the node will deliver the message even if the MX does not match. This matters during an investigation: the policy exists, but the behavior is ordinary because the receiver has not turned on enforcement yet.
Certificates are verified against the list shipped with the distribution — Mozilla CA — and it can be replaced with your own via smtp-tls-ca-file. The node does not check certificate revocation, and it does not support TLS reports (RFC 8460) at all.
The policy is cached for the period stated in it and refreshed once a day. That is, changes at the receiver do not reach us instantly.
And a separate rule about queue rollup: if the receiver enforces MTA-STS, queues are rolled up only when all the MX being rolled up are allowed by its policy. Otherwise there will be no rollup.
The mechanism has no values of its own: it is enabled by use-mta-sts. What is worth knowing about the behavior:
| Receiver’s policy mode | What the node does |
|---|---|
| enforce | delivers only when the MX matches, the connection is encrypted and the certificate is verified |
| testing | delivers in any case — the policy requires nothing |
| no policy | delivers as usual |
What the mechanism does not do: it does not check certificate revocation and does not send TLS reports. These cannot be relied on.
# a large receiver gets mandatory encryption and policy verification <domain hotmail.com> use-starttls yes require-starttls yes use-mta-sts yes</domain>
what people get wrong and how it ends3 mistakes▶
§ 10.6
§ 10.6
§ 10.6
3 relations
curl -s https://mta-sts.gmail.com/.well-known/mta-sts.txt
3 articles
◇Four value types the whole config is written inBoolean, domain pattern, regular expression and time interval — defined once in § 3.2 and then used by all directives.◇How the policy for a receiver is assembledSettings are assembled from the most general pattern to the most precise; the order of blocks in the file means nothing.◇Backoff mode — the queue's second personalityA queue that a receiver has started refusing switches to a parallel set of limits, retries and routes — ten directives that act only in this mode.