I noticed something interesting, disturbing while testing
some changes in procmail recipes ( cat message | procmail ).
I noticed that these tests would misdirect the mail, not
because the changes were bad, but because, apparently,
the "^TO" rules were being interpreted differently. Why?
Here's an easy example of the difference.
Given this rule:
:0
* ^TO_admin-pgp-public-keys
/dev/null
This is how it's interpreted on inbound mail:
procmail: No match on "(^((Original-)?(Resent-)?(To|Cc|Bcc)|(X-Envelope|Apparent
ly(-Resent)?)-To):(.*[^-a-zA-Z0-9_.])?)admin-pgp-public-keys"
This is how it's interpreted on "cat message | procmail"
procmail: No match on "(^((Original-)?(Resent-)?(To|Cc|Bcc)|(X-Envelope|Apparent
ly(-Resent)?)-To):(.*[^a-zA-Z])?)_admin-pgp-public-keys"
[in other words, as "^TO" + "_", not "^TO_"]
Why the difference?