procmail
[Top] [All Lists]

Re: general mail list rules?

2003-10-01 16:37:15
At 14:52 2003-10-01 -0700, multimedia-fan(_at_)myrealbox(_dot_)com wrote:
[snip]
Precedence: list
X-BeenThere

But that is not always a great idea, since other mail can easily have
such headers.

No, I clearly read it that they didn't want to have to write a bunch of individual list filters if they could avoid it. I posted the original recipe of the following (itself based on ideas discussed on this list) back in January, and made a minour modification to it a few months ago:


# Generic Listname identification
# 20030517/1134 SBS     Updated to handle quoted Sender text

:0
* 9876543210^0 ^(Sender:[       ]*owner-|X-BeenThere:[  ]*|Delivered-To:\
        [       ]*mailing list )\/[-A-Za-z0-9_+]+
* 9876543210^0 ^(List-Post:[    ]*(<mailto:)?|List-Owner:\
        [       ]*(<mailto:)?owner-)\/[-A-Z0-9_+]+
* 9876543210^0 ^Sender:.* List"? <(mailto:)?\/[-A-Z0-9_+]+
{
        LISTNAME=$MATCH
}

:0E
* ^Sender:[     ]*\/[-A-Z0-9_+]+-owner
{
        LISTNAME=`echo $MATCH | sed -e s/-owner//i`
}

# If the listname isn't blank, emit it to the logfile.
# (at this stage, you could just as easily dump the message to a
# $LISTNAME-ed file
:0
* ! LISTNAME ?? ^^^^
{
        LOG="List: $LISTNAME$NL"
}


This generally catches all the regular type of lists, running "real" list management software. Invariably, there are crappy lists operated as a bcc: list by someone, and those aren't recognized as lists, since, well, they are not lists.

---
 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

<Prev in Thread] Current Thread [Next in Thread>