mailing list procmail rules (Re: Apparently irrational behaviour in sort
From:
Bob Proulx
Subject:
mailing list procmail rules (Re: Apparently irrational behaviour in sort)
Date:
Wed, 7 Dec 2005 09:59:49 -0700
User-agent:
Mutt/1.5.9i
Brian Dessent wrote:
> The Wanderer wrote:
> > Instead, I'll just ask how
> > exactly I'm supposed to make sure that one and *only* one copy of any
> > messages I receive from the list gets sorted into the folder in which I
> > keep list messages... while simultaneously making sure that any messages
> > which happen to have been replies to list messages but which are not
> > sent through the list do *not* wind up in that folder?
>
> Filter on the List-Id: header present in every list message. Regardless
> of reply-to issues I find this to be much more reliable than trying to
> match addresses in all the various To/CC/BCC/whatever fields.
For mailman lists I tend to use X-BeenThere instead. It is a more
useful format. Even though the presence of List-Id is standard the
format is less so.
Here is the procmail rule that I use for the GNU lists.
# gnu.org lists
:0
* ^X-BeenThere: address@hidden
* ^X-BeenThere: \/[-a-zA-Z0-9]+
$MAILDIR/Lists/gnu/$MATCH/
# nongnu.org lists
:0
* ^X-BeenThere: address@hidden
* ^X-BeenThere: \/[-a-zA-Z0-9]+
$MAILDIR/Lists/nongnu/$MATCH/
This automatically creates new mailing list folders as I subscribe to
them. This means that I do not need to do any other special
configuration when I subscribe or unsubscribe from a mailing list.
Bob