wwgrol(_at_)sparc01(_dot_)fw(_dot_)hac(_dot_)com (W. Wesley Groleau x4923)
writes:
This recipe:
:0:
* ^TOprocmail(_at_)Informatik(_dot_)RWTH-Aachen(_dot_)DE
| formail -A"X-List: procmail" >> procmail
Failed today for the first time. Log says:
procmail: No match on "(^((Original-)?(Resent-)?(To|Cc|Bcc)|(X-Envelope|Appare
ntly(-Resent)?)-To):(.*[^a-zA-Z])?)procmail(_at_)Informatik(_dot_)RWTH-Aachen(_dot_)DE"
Problem: messages sent to the list don't always have the listaddress in
the destination (To: or Cc:) headers.
Solution: either don't use ^TO to determine whether the message came
from the list, or in addition use a check on something like Return-Path:
or Resent-From: which the list adds. The latter will catch any message
sent to you via the list itself, guaranteed. Whether or not to include
the ^TO (or ^TO_) check depends on whether you want the second copy of
a message sent to both you and the list to marked as from the list. If
yes, include the ^TO bit, otherwise don't:
# Copies sent directly to you aren't refiled
:0
* ^Resent-From: *procmail(_at_)Informatik(_dot_)RWTH-Aachen(_dot_)DE
| formail -A"X-List: procmail" >> procmail
or:
# Copies sent directly to you and the list are both refiled
:0
* (^Resent-From:
*|^TO)procmail(_at_)Informatik(_dot_)RWTH-Aachen(_dot_)DE
| formail -A"X-List: procmail" >> procmail
Got it?
Philip Guenther