procmail
[Top] [All Lists]

Re: [Q] mail to me AND the list to BOTH places..

1996-12-11 18:07:47
Peter Gjefle <pg(_at_)sn(_dot_)no> writes:
...
alan sent a mail to me with the procmail list in the cc: field. my
filter of course put the mail in the folder with the rest of the
procmail mails. 

 ??   how can i get my filter to understand that if it
 ??   finds me (my mail address) in the to: field, than
 ??   -also- put the mail in my mailbox so that i read
 ??   it "immediately"?

I have found that when sorting out mail from mailing lists into separate
folders/mailboxes/whatever, the *best* (opinion alert!) thing to 'sort'
on is the Return-Path: header.  Any mailing list set up this decade will
send out messages with an envelope sender of something like:

        procmail-request(_at_)Informatik(_dot_)RWTH-Aachen(_dot_)DE

Most (?) MTAs, and sendmail in particular, will put the envelope sender
in the Return-Path: header, where it can be matched on.

You received two copies of Alan's mail: one directly from him with a
Return-Path: of aks(_at_)anywhere(_dot_)engr(_dot_)sgi(_dot_)com (or something 
like that),
and one copy from the mailing list with a Return-Path: of <see above>.
If you sort on the Return-Path:, then the first of those copies will
end up in your normal mailbox, while the second will go into the folder
of procmail mail.  Your procmail mailbox will contain exactly those
messages which came to you because of your being on the mailing list.

For example, my .procmailrc contains, among other things, the following:

:0
*       ^Return-Path: +(firewalls-owner(_at_)GreatCircle(_dot_)COM|\
                        academic-firewalls-owner(_at_)net(_dot_)tamu(_dot_)edu)
Lists/Firewalls/.

:0
*       ^Return-Path: 
+(procmail|smartlist)-request(_at_)informatik(_dot_)rwth-aachen(_dot_)de
Lists/procmail/.

:0
*       ^Return-Path: +(owner-bugtraq@|\
                        <@VM.TEMPLE.EDU:owner-bugtraq(_at_)CRIMELAB(_dot_)COM>)
Lists/bugtraq/.

:0
*       ^Return-Path: 
+owner-ipng(_at_)sunroof[0-9]*(_dot_)Eng(_dot_)Sun(_dot_)COM
Lists/ipng/.


Get the idea?

Philip Guenther