On Tue, Apr 03, 2001 at 09:36:12AM +0000, Matt Dunford wrote:
> * Joshua Haberman <[EMAIL PROTECTED]> [010403 09:24]:
> > try:
> >
> > :0:
> > * ^TOvim@vim\.org
> > vim
> >
> > or (untested, just came across it in the manpage):
> >
> > :0:
> > * ^TO_vim@vim\.org
> > vim
> >
> > $ man procmailrc
> >
> > The only problem I have with the above rule is that if someone mails the
> > list and cc's you, both mails end up in the list's folder. If anyone
> > knows of a good, simple way to prevent this, please let me know.
>
> Maybe something like this.
>
> :0:
> * ^TO_joshua@haberman\.com
> $DEFAULT
>
> :0:
> * ^TO_vim@vim\.org
> vim
>
Here is how I deal with mailing lists in my .procmailrc:
# define all my possible addresses
ALTERNATES=(mito|ldm)@(aparima|apartia)\.(com|fr|org|net|ch)|(mito|ldm)@(lncsa\.com|premier\.fr)
# all mailing lists I read
LISTS = "(\
mason-devel|\
mason|\
pamldap|\
nssldap|\
abook-devel|\
isdn4linux|\
apartia-auction|\
postfix-users|\
pgsql-general|\
pgsql-hackers|\
pgsql-sql|\
openldap-general|\
openldap-software|\
quikwrite-talk|\
info-cvs|\
ldap-nis|\
vlan|\
pptp-server|\
dbi-users|\
debian-devel|\
debian-firewall|\
debian-consultants|\
debian-french|\
quotegrabber|\
zsh-users|\
membres|\
linux-raid|\
acting-pro|\
linux-laptop|\
linux-ipsec|\
gtkmm|\
linux-on-portege|\
yaoifrance|\
java-linux|\
lftp|\
mutt-users|\
modperl)"
# mailing lists recipe: test to|cc AND return-path in case the message
# is a bcc
:0
*$! ^TO_\/$LISTS()@
*$! ^Return-Path: [^@]*\<\/$LISTS\>
{ }
:0E
*$ MATCH ?? ()\/[-a-z0-9]+[a-z0-9]
*$ LISTS ?? ()\/$\MATCH
{
FOLDER=$MATCH
# if to|cc me OR from me OR contains references to a previous mail of
# mine OR body contains my name then drop directly mail spool
:0
*$! ^TO_$ALTERNATES
*$! ^From:.*$ALTERNATES
* ! ^References:.*(ldm|cunctator|mito|vindex)@styx\>
* ! HB ?? (Louis-David|Mitterrand)
{ }
:0E:
$DEFAULT
# Correct wrong sig-dashes: add a space for lines with only "--" in them
:0 fBw
* ^--$
| sed -e 's/^--$/-- /'
# eliminate duplicate messages
:0Wh: msgid.lock
| formail -D 16384 archive/msgid.cache
# match the characters left of a '-' in list name, preparing for its
# possible elimination on the subject line
:0
*$ FOLDER ?? [^-]+-\/[^-]+
{
FOLDER_PART=$MATCH
}
# eliminate [list] name in subject, often added by clueless mailing list
# admins
:0
*$! ^Subject: *($REPLY: *|)\[$FOLDER\]\/.*
*$! ^Subject: *($REPLY: *|)\[$FOLDER_PART\]\/.*
*$! ^Subject: *($REPLY: *|)$FOLDER:\/.*
*$! ^Subject: *($REPLY: *|)\[ACT-PRO\]\/.*
{ }
:0E
{
:0f
*$ ^Subject: *$REPLY:
| formail -i "Subject: Re:$MATCH"
:0Ef
| formail -i "Subject:$MATCH"
}
# eliminate stupid "tip" footer on pgsql-* mailing lists
:0 bf
* ^TO_pgsql-
| sed -n -e '/^---------------------------(end of
broadcast)---------------------------$/q' -e p
# kill ugly three-line warning at beginning of message in dbi-users
# :0 fbwi
# * ^TO_dbi-users@
# * B ?? ^^ *\*\*\* From dbi-users
# * 1^1 B ?? ^.*$
# * -11^0
# | sed -e 1,3d -e "$="q
# finally, store in folder named after list
:0:
$FOLDER
}
--
"When I give food to the poor I am called a saint, when I ask why
they go hungry I am called a communist"
--Bishop Helder Camara