procmail
[Top] [All Lists]

Re: generic matching for mailing lists...

2003-01-12 11:56:06
On Sun, Jan 12, 2003 at 06:59:24PM +0100, poff(_at_)sixbit(_dot_)org wrote:
On Sun, 12 Jan 2003, Zack Brown enslaved 16 hundred monkeys to type:

MONTHFOLDER=`date +%Y-%m`
:0:
* ^(Sender:[  ]*owner-|X-BeenThere:[  ]*|Delivered-To:[       ]*mailing
list |X-Loop:[
]*)\/[-A-Za-z0-9_+]+
$MATCH/$MATCH.$MONTHFOLDER

This is nice! I just have:

:0H:
* ? egrep -i "Listar|majordomo|List-Id:|Precedence: list"
lists

Which is more basic, but works for all the lists I'm on. The majordomo bit
is crude :) At least I don't get any filtered mail which shouldn't be
there!

I'm curious (Still learning) - do you get mail like:
poff.sixbit.org/poff.sixbit.org.2002-12

Or is the "from" the mailing list in all cases, so you'd get:

procmail(_at_)Lists(_dot_)RWTH-Aachen(_dot_)DE/procmail(_at_)Lists(_dot_)RWTH-Aachen(_dot_)DE(_dot_)2002-12

The actual match varies depending on how clueful the list admin is. Most
often, the file is named after what comes before the @ in the email
address. But not always.


Or does it stop at the @ (what is the _+ for in your regexp? is that sort
ofa wildcard thing?)

The _+ is within square brackets, so it just means that the _ and + are
legal characters to match in that regex. The final + that's outside of
the regex means that 1 or more of that character set will be matched.


Well anyway, hope my basic version helped! Doesn't seem to for your
headers, you could also do a case=by=case one isntead (sender: lists.*)

I do use case-by-case recipes now, so I'm not actually losing anything.
It would just be cool to have a single recipe for all mailing lists.


Poff

poff(_at_)sixbit(_dot_)org
SDF Public Access UNIX System - http://sdf.lonestar.org


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


-- 
Zack Brown

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