Caine the wanderer <ctflist(_at_)jane(_dot_)penn(_dot_)com> writes:
Currently wrote recipes to move incoming mail to groups based on their To:
entry. Is there a way to do this using the CC: entry as well. I would
like the final recipe to work something like this:
look at the header. if the To: line or the CC: line have the list name in
it, drop it to that folder.
For most mailing lists, a more accurate way to determine whether it came
from the list is to examine the Return-Path:, "From ", or Resent-From:
header. This catch messages from the list, regardless of whether they
were To: the list, Cc: the list, or even Bcc: the list, something which
doesn't show in the message at all.
For instance, I refile message from the procmail mailing list using the
following recipe:
:0
* ^Return-Path: +<procmail-request(_at_)informatik
Lists/procmail/.
There's one tricky thing to note: if someone sends a message to both me
and the list (say, he or she is responding to a message I sent to the list),
then the copy that got to me through the list will end up in my procmail
folder, while the copy that went directly won't. I like this behavior,
but some people, possibly yourself, may prefer it if both messages end
up refiled. If so, your best bet is to combine the above with matching
against the To: and Cc: headers via the ^TO_ token:
:0
* ^Return-Path:
+<procmail-request(_at_)informatik|^TO_procmail(_at_)informatik
Lists/procmail/.
(If you have a version of procmail before 3.11pre4, then you'll need to
use "^TOprocmail" instead of "^TO_procmail".)
Philip Guenther