<domain>
Ordinary STARTTLS does not verify authenticity — the receiver can present any certificate, even a self-signed one. Verification is enabled by this line: it names the file with root certificates against which the presented chain is checked.
What happens when verification fails depends on the neighbor. With opportunistic encryption the node falls back to plain text; with require-starttls enabled it returns a temporary 4xx refusal, and the message stays in the queue.
By default the list from the distribution is used — the Mozilla CA set. This line replaces it rather than extending it.
The MTA-STS and DANE mechanisms verify the certificate themselves, but differently: MTA-STS by the chain and the name, that is, with the same list; DANE by the fingerprint from DNS, and it does not need the list at all.
The value is a path to a file. Only one thing is decided here: whose list to use:
| What | When |
|---|---|
| do not set (default) | always: the Mozilla list from the distribution covers public authorities |
| your own file | the receiver presents a certificate from an internal authority |
And always next to it — require-starttls. Without it a failed verification silently turns into unencrypted delivery.
# certificate verification makes sense only together with mandatory encryption <domain internal.example.com> use-starttls yes require-starttls yes smtp-tls-ca-file /etc/pmta/certchain.pem</domain>
what people get wrong and how it ends2 mistakes▶
§ 3.3.10.108.14
our experience
2 relations
openssl s_client -starttls smtp -connect mx.example.com:25 -CAfile /etc/pmta/certchain.pem
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.