Knowledge base

<pattern-list>

Named selection rules
A layer between what a message looks like and where it will go out from

The block gathers rules for choosing a sending address by message content. The mechanism is analyzed separately (pattern-list); this is about the block itself.

It lives at the top level but acts by reference. A list does nothing by itself: it is attached with a line in a submission block. A list without a reference is a dead setting.

There can be several lists, and different submitting systems can use different ones.

Do not confuse it with the receiver reaction block — that one is named almost the same (<smtp-pattern-list>), but lives on the other side of the node.

Example configuration
# the list and the reference to it — they do not work apart
<pattern-list pmta-pattern>
    mail-from /@example\.com$/ virtual-mta=mta-news-1
</pattern-list>
<source {pmta-auth}>
    pattern-list pmta-pattern</source>
The highlighted line is the one without which the list does not act on a single message. The block by itself only describes the rules.
yellow — — directive names, blue — blocks. They are highlighted the same way in the text of the card.