<domain>
It works for a file queue (type). It sets a directory — if file-format creates a file per message — or a file name, if messages are appended to a shared one.
The path does not have to be constant. The same substitutions are expanded in it as in the handler program’s command line: $isodate — a date like 2026-08-28, $domain — the recipient domain, $user — the recipient name before the at sign (and if it contains +, the part to the left of it), $from and $to — the envelope addresses, $envid, $timet, $ctime, $rfctime, $bodytype.
The case of the expansion differs. $user and $domain are always lowercased — so as not to produce two directories for the same name in different cases. $from and $to depend on macro-variables-preserve-case.
A date in the path is the minimum. $isodate splits the archive by day and makes it suitable for deletion by age.
$domain is more useful than $to. A directory name from the recipient domain is readable and does not produce a directory per address.
The directory must exist in advance. Substitutions expand into the path, but the node does not create directories for you — unlike the bundled newfile program, which can.
# the archive is split by day and by domain <domain archive.example.com> type file file-format newfile-pickup file-destination /var/spool/archive/$isodate/$domain/</domain>
what people get wrong and how it ends2 mistakes▶
our experience
§ 3.3.10.110.2
1 relation
pmta show settings archive.example.com/vmta1 | grep -i file-destination find /var/spool/archive/ -name '*.msg' -newermt '-1 hour' | head
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.