The mechanism rests on named source blocks. An ordinary <source> block is selected by the submitter’s address; a named one is not selected by itself, but is attached to a listener with the smtp-listener directive, and from then on applies to everyone who connected to the given address and port. default-virtual-mta sits inside such a block.
There can be any number of listeners — on different addresses and ports, each with its own named source and, hence, its own default stream. The sender only has to choose where to connect.
The vendor accompanies this with a warning, and it is important. A named source applies to everyone who can reach the address and port — so permissions must not be granted there: neither relaying nor merge access. Permissions are granted by authentication or by sender address. On a listener only one thing is appropriate — stream selection.
The method stays in reserve for the case “a platform needs its own entry point”: give it a separate address and port, and it gets its own stream without changing anything on its side.
The mechanism has no values of its own: it is assembled from two directives — smtp-listener with a source= reference and default-virtual-mta inside the named block. What may and may not be written in such a block:
| Line | Allowed | Why |
|---|---|---|
| default-virtual-mta | yes, this is the whole point | stream selection, not a permission |
| always-allow-relaying | no | applies to everyone who reached the address |
| allow-mailmerge | no | the same, plus the top step of selection |
| limits and timeouts | yes | these are receiving properties, not permissions |
# each address has its own entry point and its own default stream <virtual-mta vmta1> smtp-source-host 203.0.113.10 vmta1.example.com </virtual-mta> <source vmta1> default-virtual-mta vmta1</source> smtp-listener 203.0.113.10:25 source=vmta1 smtp-listener 0.0.0.0:25
what people get wrong and how it ends2 mistakes▶
§ 9.4.3
§ 9.4.3
2 relations
grep -rn '^ *smtp-listener' /etc/pmta/
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.◇Headers the sender uses to control deliverySix control headers let the submitting side choose a stream, tag a message with a job, set signing options and the key, the envelope identifier and the schedule; each is allowed separately and per source.◇The load balancer header at the entranceThe node reads the PROXY header at the start of an incoming connection and treats the address from it as the source; this works for both kinds of entry point.