Globalset by the Hub
The line names the certificate the node presents when a client starts encryption on an inbound connection. Everything discussed so far on the TLS pages was about the outbound side; here the node acts as the server.
Two storage locations. A PEM file is the usual case; the other is a secrets store, referenced with a {vault}:path/key entry. The private key password is optional and is given as the second word — also either as a string or as a reference to the store.
Four combinations, and the manual gives three of them as examples: a file plus a plain password, the store plus a plain password, the store for both.
Without this line encryption on receiving does not work at all — there is nothing to present. Allowing a client to start encryption is a separate line, allow-starttls in the source.
The notation and what is stored where:
| Certificate | Password | When |
|---|---|---|
| file | not set | the key is not encrypted — the simplest case |
| file | as a string | the password ends up in the configuration in plain text |
| file | {vault}:path/key | the password is in the store, only a reference is in the configuration |
| {vault}:path/key | {vault}:path/key | neither the certificate nor the password is in the node’s files |
What to watch is the expiration date. An expired certificate means submission stops being encrypted, and with strict platform settings the platform stops connecting altogether.
# this is how the Hub writes the base configuration — self-signed, no password smtp-server-tls-certificate /etc/pmta/mtahub-smtp.pem # both values from the secrets store — the manual's example smtp-server-tls-certificate {vault}:/v1/kv/data/tlsCerts:smtp-cert {vault}:/v1/kv/data/tlsCerts:smtp-password
what people get wrong and how it ends2 mistakes▶
§ 3.3.1.10
our experience
3 relations
smtp-server-tls-ca-fileGlobalThat certificate the node presents itself; this list is for verifying certificates presented to it. § 3.3.1.11allow-starttls<source>Permission to start encryption is pointless without a certificate: there will be nothing to present. § 3.3.1.10tls-certificate<smtp-listener>The same setting at the node level: if not set on the listener, it is inherited from there. § 3.3.17.4
openssl s_client -starttls smtp -connect localhost:25 -showcerts 2>/dev/null | openssl x509 -noout -subject -enddate
3 articles
◇Who is allowed to submit mail and for whom to accept itOut of the box, the node accepts submission only from the machine itself; two different questions — “who can send through us” and “for whose addresses we accept mail” — are answered by different directives.◇The group that grants management rightsMembership in the pmta group gives an unprivileged user the right to call the node’s commands and use submission.◇How the node selects a source and combines its settingsA connection falls under all source blocks whose addresses cover it, and they act merged — the narrow one overrides the wide one; named blocks are attached only by direct reference.