Regular expressions can be used as match-type operators for many types of policy rule tests. For example, a regular expression can be used to test the contents of a message's "Envelope To" field. Certain policy rule actions also support the use of regular expressions. For example, the "Deliver immediately for" action supports the use of a regular expression as a match-type for exceptions.
if pmx_relay :re ".*\.com$" { keep; stop; }
In this example, the match-type :re is used to perform a regular expression comparison. If the sender's address ends in the string ".com", the message is delivered and the filter stops evaluating the message.
For information about using regular expressions with the policy script via the PureMessage Manager, see "Policy Rule Tests" and "Policy Rule Actions" in the Policy section of the PureMessage Administrator's Reference. If you are manually editing the policy script, see the pmx-policy manpage (the documentation for the command-line interface to the PureMessage policy engine). See the "Regular Expressions Primer" in the PureMessage Administrator's Reference for general information about regular expressions.