procmail
[Top] [All Lists]

Re: filtering to my inbox *and* each mailing list's file

2003-01-06 19:13:00
At 15:36 2003-01-06 -0800, Zack Brown wrote:

-------------------------------------------------
MAILDIR=/home/zbrown/mail

# Allows for easier portability
MAILDIR=$HOME/mail

# mailing list recipe (there are lots of these here)
:0
* ^TOprocmail(_at_)Lists(_dot_)RWTH-Aachen(_dot_)DE
Procmail/Procmail.$MONTHFOLDER

Filtering on ^TO isn't the best way to filter them - better to filter on list-inserted headers. View all the headers from this message, and you'll see several which positively identify it as a list message, even if the message is *BCC'D* to the list, in which case ^TO won't work...

# everything else goes in my INBOX
:0
INBOX

You really aught to specify a LOCKING flag on that.

The above file makes sure that mail to mailing lists is *not* checked

[known] mailing lists...

for spam, while all mail coming directly to me, is checked. the problem
is, if mail is sent to the procmail list, and Cced to me as well, I
never see it in my INBOX. The very first recipe snags it and puts it in
the procmail mailbox.

.. assuming that it is addressed To:/Cc: the procmail list.

I use list-specific headers to snag the messages actually relayed by the list, then cc'd messages don't get matched - OTOH, on those lists where there are idi^H^H^Husers who insist on cc'ing people when they reply ON LIST, I have filters that match based on ^TO, and discard the messages anyway.

What I'd like is a way to have the mail go into the procmail mailbox,
but if it's Cced to me, it should *also* drop through and be handled by
bogofilter, and then dumped in my INBOX (or the spam box, as the case
may be).

Well, if it's cc'd, you will have receieved two copies - one through the list, and one directly. Use:

# Procmail discussion list
:0:
* ^Sender: procmail-admin(_at_)lists\(_dot_)rwth-aachen\(_dot_)de
Procmail/Procmail.$MONTHFOLDER

# Then ditch carbons and the like.
# (in your case, don't even do this, and the cc'd messages will just pass
# along)
:0:$TEMP/cc_list$LOCKEXT
* 
^TO(procmail(_at_)lists\(_dot_)rwth-aachen\(_dot_)de|procmail-users(_at_)procmail\(_dot_)org)
|gzip -9fc >> cc_list.gz

---
 Sean B. Straw / Professional Software Engineering

 Procmail disclaimer: <http://www.professional.org/procmail/disclaimer.html>
 Please DO NOT carbon me on list replies.  I'll get my copy from the list.


_______________________________________________
procmail mailing list
procmail(_at_)lists(_dot_)RWTH-Aachen(_dot_)DE
http://MailMan.RWTH-Aachen.DE/mailman/listinfo/procmail