As we briefly covered in the previous chapter, Procmail has a number of useful 'pre-prepared' regular expressions or Macros that provide a range of matches that are commonly used in Procmail recipes.
^TO
was the original Procmail Macro for handling to addresses. This has been superseded by the newer ^TO_
macro that was introduced in Procmail Version 3.11pre4.
This catchall includes most headers that can include your address in them, such as To:
, Apparently-To:
, Cc:
, Resent-To:
, and so on.
In most cases you should use the ^TO_
option as it has much better coverage.
Here is the Regular Expression string from the Procmail source code:
"(^((Original-)?(Resent-)?(To|Cc|Bcc)|\ (X-Envelope|Apparently(-Resent)?)-To):(.*[^-a-zA-Z0-9_.])?)"