Knowledge base

<smtp-user>

An account for submitting mail
The right to hand in mail, tied to a name rather than an address

The block describes one user who is allowed to relay mail through the node — regardless of the address they submit from. The block name is the login.

Inside there are two parts that are mandatory in meaning: what confirms the login and what rights the logged-in user gets.

The login is confirmed with the authentication-method directive — by password (the default), by certificate, by a system login on Linux or via LDAP. Password authentication needs password, certificate authentication needs tls-certificate and, if the chain is verified, tls-ca-file with tls-certificate-san-or-cn.

Rights are given with a source reference to a named source block: its settings apply after login. A login without such a reference gets the reserved {auth} source, if it is declared.

Passwords sit here in plain text — the engine requires it, otherwise it could not support all SASL mechanisms. So the configuration file must be protected like a key file.

Example configuration
# password login and its own set of rights via a named source
<smtp-user shop-example-com>
    password 8xK2-qRt7-vD1s-mZ4w
    source {shop-example-com-auth}
</smtp-user>

# certificate login — no password needed at all
<smtp-user partner>
    authentication-method certificate
    tls-certificate /etc/pmta/partner.pem
    source {partner-auth}
</smtp-user>
yellow — — directive names, blue — blocks. They are highlighted the same way in the text of the card.