procmail
[Top] [All Lists]

Mailing list filing regular expression help

2000-12-15 12:02:18

I am trying to auto file my mailing lists into their own folders.  I
started to use the following recipe (Thanks goes to Nancy McGough's page
at http://www.ii.com/internet/robots/procmail/qs/ for the recipe outline.)

This is running on a Solaris 2.6 box running procmail v3.10 1994/10/31 (we
are upgrading this to 3.15 in about two weeks.)

Here is the recipe:

################

:0:
* ^Delivered-to:.*\/(dev|doc|horde|imp|kronolith|turba)@lists\.horde\.org
* MATCH ?? ()\/[^(_at_)]+
$INBOXES/list-horde-$MATCH

################

Things seem to work, but my procmail regular expressions need some help.  :)
I want the final $MATCH to be just the list name or the part before the @,
but the final $MATCH seems to vary greatly.  Here are samples from my log
file.


procmail: Matched "imp(_at_)lists(_dot_)horde(_dot_)org"
procmail: Match on 
"^Delivered-to:.*\/(dev|doc|horde|imp|kronolith|turba)@lists\.horde\.org"
procmail: Matched "imp(_at_)lists(_dot_)horde"
procmail: Match on "()\/[^(_at_)]+"

procmail: Matched "horde(_at_)lists(_dot_)horde(_dot_)org"
procmail: Match on 
"^Delivered-to:.*\/(dev|doc|horde|imp|kronolith|turba)@lists\.horde\.org"
procmail: Matched "horde(_at_)lists(_dot_)hor"
procmail: Match on "()\/[^(_at_)]+"

procmail: Matched "dev(_at_)lists(_dot_)horde(_dot_)org"
procmail: Match on 
"^Delivered-to:.*\/(dev|doc|horde|imp|kronolith|turba)@lists\.horde\.org"
procmail: Matched "dev(_at_)lists(_dot_)horde"
procmail: Match on "()\/[^(_at_)]+"

procmail: Matched "kronolith(_at_)lists(_dot_)horde(_dot_)org"
procmail: Match on 
"^Delivered-to:.*\/(dev|doc|horde|imp|kronolith|turba)@lists\.horde\.org"
procmail: Matched "kronolith(_at_)lists"
procmail: Match on "()\/[^(_at_)]+"

procmail: Matched "turba(_at_)lists(_dot_)horde(_dot_)org"
procmail: Match on 
"^Delivered-to:.*\/(dev|doc|horde|imp|kronolith|turba)@lists\.horde\.org"
procmail: Matched "turba(_at_)lists(_dot_)hor"
procmail: Match on "()\/[^(_at_)]+"


As you can see, the third line from each log file cut is not doing what I
want and that is I was to file it based on the list name.  i.e. imp,
horde, dev, kronolith, or turba, etc.  Not some variant of the list
address.

Can anyone help me on what I need to change my second condition to.

Thanks.

Derek.

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