<smtp-user>set by the Hub
The line names the <source> block that will apply to this login. Named blocks are not matched by address — this directive is one of the only two references that bring them into play at all (the second is the source= parameter of smtp-listener).
The manual describes the result in one word: the named block’s settings override what the connection would have gotten by its address. A login without this line gets the reserved {auth} source, if it is declared.
What it is for: this way rights and identity are assigned to an account. One login gets the right to choose a stream and hand over mail, another only to hand over mail, a third its own message size limit. For a node used by several senders, there is no other way to separate their rights.
The practical conclusion is one: write out the whole set in the named block, not only the differences. And verify by behavior, not by reading the configuration.
In each such block the Hub writes out the full set — the submission service, relaying permission, the login requirement, stream selection, the selection list, suppression of local reports, header handling. Not out of caution: we did not see inheritance reach the authenticated connection.
The names are wrapped in curly braces — the format is shared with Protosender. The manual declares this name space reserved and names two of its own in it ({pickup} and {auth}); ours do not resemble them and work, but the space is still the vendor’s.
What to set. The value is a source block name; what you have to choose is the granularity:
| Value | When |
|---|---|
| a block of its own per login | the senders differ, and their rights must differ |
| one block for all | the senders have equal rights, and logins exist only for accounting |
| do not write it | the reserved {auth}, declared once per node, is suitable |
The first is the usual choice for a node used by several senders; the third is for a node where there is essentially one sender, with several logins for technical reasons.
# the login, its block and the full set of rights in it <smtp-user shop-example-com> password 8xK2-qRt7-vD1s-mZ4w source {shop-example-com-auth}</smtp-user> <source {shop-example-com-auth}> smtp-service yes always-allow-relaying yes require-auth true default-virtual-mta shop-example-com </source>
what people get wrong and how it ends3 mistakes▶
our experience
§ 3.3.8.6
§ 10.1.1
2 relations
grep -n '^<smtp-user\|^ *source ' /etc/pmta/virtualhost.txt
grep -n '^<source {' /etc/pmta/virtualhost.txt
3 articles
◇The source default is the bottom rung, tied to whoever connectsA source block matching the sender’s address can name a default stream; it applies when no choice was made higher up the ladder.◇How a message gets into the engineSix described submission methods: extended SMTP, four language bindings and a directory the node watches on disk.◇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.