<domain>
It works for a pipe queue (type) and is mandatory for it. It sets the command line the node uses to run the handler program; the message is fed to its standard input. The program is run for each new recipient.
Substitutions with message properties are expanded in the line: $envid — the envelope identifier, $user — the recipient name before the at sign (and if it contains +, the part to the left of it), $domain — its domain, $from and $to — the envelope addresses, $isodate, $ctime, $rfctime, $timet — the time in four forms, $bodytype — the message body type.
The backslash is doubled. It also serves to escape spaces, quotes and the dollar sign, so a Windows-style path is written with double backslashes — or with ordinary forward slashes, which the engine also accepts.
Put every substitution in double quotes. It is the only protection against a space in an address.
The program must start quickly. It is run for every recipient; half a second of startup at a thousand messages a minute is already load on the node, not on the mail.
Write the path as absolute. The node runs the program outside your environment, and a relative path does not work the way it does in the shell.
# a bounce handler: the envelope identifier and the recipient name <domain bounces.example.com> type pipe command "/opt/bounce/parse --envid \"$envid\" \"$user\""</domain>
what people get wrong and how it ends3 mistakes▶
§ 3.3.10.111.1
our experience
§ 11.21
1 relation
pmta show settings bounces.example.com/vmta1 | grep -E '^type|^command' pmta show queues | grep -i bounces.example.com
3 articles
◇How a message gets into the engineSix described submission methods: extended SMTP, four language bindings and a directory the node watches on disk.◇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.