<smtp-user>
The line chooses how the node verifies the submitter. The default is password, that is, the password from the neighboring line.
Five values, and three of them require an encrypted connection:
password — a password. system — Linux only: the password is checked against the system’s accounts. certificate — the client presents exactly the certificate file named in tls-certificate. ca-file — the client presents any certificate that chains up to tls-ca-file; optionally with a name check as well (tls-certificate-san-or-cn). {vault}:ldap — the password is checked in LDAP through the secrets vault, and then no password is written in the configuration at all.
The two certificate methods require a TLS connection — the manual says so directly. The submitting program must support either STARTTLS or SMTPS.
LDAP has a mechanism restriction: CRAM-MD5 does not work with it, only LOGIN and PLAIN. That is, submission through some PowerMTA APIs is impossible with this method.
Five values and what each requires:
| Value | What is needed alongside | Requires TLS |
|---|---|---|
| password (default) | password | no, but it is worth requiring |
| system | an account in Linux | no, but it is worth requiring |
| certificate | tls-certificate with a file | yes |
| ca-file | tls-ca-file, optionally a name | yes |
| {vault}:ldap | a <vault> block; no password is written | yes, and only LOGIN or PLAIN |
For all five it is sensible to require encryption before authentication — require-starttls-before-auth.
# two logins, two different verification methods <smtp-user foo> password barbaz </smtp-user> <smtp-user bar> authentication-method {vault}:ldap</smtp-user>
what people get wrong and how it ends2 mistakes▶
§ 3.3.8.2
§ 3.3.8.2
4 relations
password<smtp-user>The default method: the password set by this line next to it. § 3.3.8.1tls-certificate<smtp-user>The “certificate” method: the login is confirmed by a specific certificate file. § 3.3.8.3tls-ca-file<smtp-user>The “trusted authority” method: any certificate that chains up to the specified chain will do. § 3.3.8.4
printf 'EHLO test\r\nAUTH LOGIN\r\n' | openssl s_client -starttls smtp -connect localhost:25 -quiet 2>/dev/null | head -5
3 articles
◇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.◇Submission logins, plain-text passwords and per-user settingsA sender logs in with one of three methods; each login is a configuration block with a plain-text password, and that login’s named source overrides what its address would have given.◇A license for a fleet, not for a serverThe license is not bound to a server: it is installed on as many machines as the instance limit allows, and the nodes send volume statistics to the vendor every hour.