<pattern-list>
Matches the recipient address from the SMTP RCPT TO command. The form is the same as for the list’s other rules: a pattern in slashes and a result — virtual-mta=name, recipient-priority=N or call-to:.
The main peculiarity is stated by the manual directly. If a message has several recipients and several of them match rules, the stream of the first match applies to the whole message — including the recipients that did not match that rule. The vendor adds that this behavior may change in the future and advises using the rule only for messages with a single recipient.
Where it fits. Recipient priority is the most honest case: recipient-priority=90 on password recovery messages lifts them above the mailing, and the question of stream selection does not come up.
When a recipient rule really fits:
| Case | Suitable | Why |
|---|---|---|
| priority of transactional messages | yes | the priority is set for the recipient, not the message |
| messages with a single recipient | yes | the caveat does not apply |
| a mailing to many addresses | no | the stream of the first match will apply to everyone |
| splitting by mailbox provider | no, use <domain> | recipient rules are a property of the queue |
Patterns are written by the same rules as the others: dots are escaped, and the end of the domain is anchored.
# a safe use: priority, not stream selection <pattern-list mta-hub-senders> mail-from /@shop\.example\.com$/ virtual-mta=shop-example-com rcpt-to /^password-reset@/ recipient-priority=90</pattern-list>
what people get wrong and how it ends2 mistakes▶
§ 3.3.14.3
§ 3.3.14
2 relations
pmtaacctfind --output csv[rcpt,vmta,jobId] /var/log/pmta/acct-*.csv | head -30
3 articles
◇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.◇Selecting a sending address by message contentRegular expressions are matched against a header, the return address or the recipient and select a sending address or assign a priority; lists can call each other.◇How a message gets into the engineSix described submission methods: extended SMTP, four language bindings and a directory the node watches on disk.