After the asterisk, a normal regular expression is used as
the matching condition. Besides normal regular expressions, procmail defines seven special
conditions. Table 15.2 lists these special conditions.
TABLE 15.2 procmail Special Conditions
Condition Description
! Invert the condition.
$ Evaluate the condition according to shell substitution rules inside double quotes.
? Use the exit code of the specified program.
< Check if the total message length is less than the specified number of bytes (in
decimal).
> Check if the total message length is greater than the specified number of bytes
(in decimal).
variable ?? Match the remainder of the condition against the environment variable specified.
\ Quote any of the special characters to use as normal characters.
15
TABLE 15.1 Continued
Flag Description
The easiest way to learn how to write condition lines is to see a few examples. This condition
line checks if the message subject header field contains the word guitars:
* ^Subject:.*guitars
The condition uses the caret (^) regular expression character to match any message header
lines that start with the word ???Subject:???.
Pages:
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681