<domain>set by the Hub
The line enables working with the MTA-STS policy for this receiver. The node finds it through DNS and fetches it over HTTPS, then acts according to its mode.
In enforce mode there are three conditions, and all are required: the receiver’s address matched an MX pattern from the policy; the connection is encrypted; the node verified the certificate chain and the server name in it. If any one is not met, the message will not go out.
In testing mode nothing is forbidden. The node will deliver the message even if the MX does not match — that is by design, and during an investigation it is the first thing worth checking.
The default is false.
There is a consequence for queue rollup. With an enforcing policy, queues are rolled up only if all the MX being rolled up are allowed. A single mismatch — and there will be no rollup.
The value is boolean, and it is worth enabling together with its neighbor:
| What is set | What you get |
|---|---|
| only require-starttls | encryption is guaranteed, the receiver is not verified |
| only this line | verification exists, but only at receivers with an enforce policy |
| both (our choice) | encryption always, plus verification where the receiver requires it |
It can be set broadly. Unlike use-dane, this line requires nothing and simply does not trigger at receivers without a policy.
# this is exactly how it is in the Hub's policy template — three lines <domain $mailru> use-starttls yes require-starttls yes use-mta-sts yes</domain>
what people get wrong and how it ends2 mistakes▶
§ 10.6
§ 10.6
2 relations
curl -s https://mta-sts.gmail.com/.well-known/mta-sts.txt
3 articles
◇Submission over HTTPS on its own listener, modeled on SparkPostA separate entry point: its own listener with a certificate, its own keys and a reserved source name through which the usual submission settings apply to such mail.◇The receiver declares an encryption requirement on its websiteThe node fetches the recipient domain’s policy over HTTPS and, if it is in enforce mode, delivers only when the MX matches, the connection is encrypted and the certificate is verified.◇The receiver declares an encryption requirement in its DNS zoneThe node looks at the recipient domain’s DANE records and, if STARTTLS is required, sends only over an encrypted channel with a certificate verified by fingerprint.