The manual defines a regular expression in the configuration as a Perl-compatible expression (PCRE) and names the PCRE library in its acknowledgments. Such expressions are accepted by <pattern-list>, <smtp-pattern-list>, bounce category patterns, address lists, dkim-headers and other places.
Two quirks are fixed in the manual. In <pattern-list> all expressions are case-insensitive by default — case sensitivity is turned on with the inline (?-i) modifier. Headers are compared whole, with spaces and line breaks, so an expression with ^ or $ must account for that.
Where expressions work:
| Where | What is compared |
|---|---|
| <pattern-list> | sender, recipient, headers — case-insensitive |
| <smtp-pattern-list> | receiver replies |
| bounce-category-patterns | bounce texts for accounting categories |
| <address-list> | addresses |
| dkim-headers | header names for signing |
<pattern-list pmta-pattern> mail-from /@example\.com$/ virtual-mta=vmta1</pattern-list>
5 relations
header<pattern-list>The directive that enables this mechanism. § 3.3.14mail-from<pattern-list>The directive that enables this mechanism. § 3.3.14rcpt-to<pattern-list>The directive that enables this mechanism. § 3.3.14address<address-list>The directive that enables this mechanism. § 3.2The stream is chosen by matching the envelope or a headerA related mechanism: they work together. § 9.4.2
echo 'User@EXAMPLE.com' | grep -Pi '@example\.com$'
3 articles
◇Accept, route, deliverA message’s path inside the node: accept, decide where, deliver — and all the settings live between these three steps.◇Four value types the whole config is written inBoolean, domain pattern, regular expression and time interval — defined once in § 3.2 and then used by all directives.◇Reloading settings versus restarting the serviceThe configuration is read at startup, and after that edits are picked up by the reload command — except for the directives the manual marks as requiring a restart.