On Fri, 19 Jul 2002, Brad Forschinger wrote:
Thanks Udi; food for thought!
But what about getting the actual list name when there's a -owner or -admin
appended? That's why I resorted to using the Perl filter: I couldn't figure
out a way to use \/ and $MATCH to grab (list-name)-owner@(hostname.dom).
Here's how my mail directory is looking at the moment
~/Mail/2002-07% ls list-*
list-lists_rwth_aachen_de-procmail list-yahoogroups_com-deadstringsociety
list-netbsd_org-port_macppc list-yahoogroups_com-nexiimp3
list-securityfocus_com-bugtraq
you see what I mean?
I'm afraid yes... I did not found way to do it with no fork to
the shell (I do not like it). However, here is demorc version II.
LOGABSTRACT=all
SHELL=/bin/sh
VERBOSE=yes
DEFAULT=/dev/null
MAILING_LIST_NAME="Delivered-To: mailing list proci-owner-mmm(_at_)xxx"
#MAILING_LIST_NAME="Sender: owner-mmm(_at_)xxx"
#MAILING_LIST_NAME="Sender: mmm-admin(_at_)xxx"
#MAILING_LIST_NAME="Sender: mmm-owner(_at_)xxx"
:0
* 1^0 MAILING_LIST_NAME ?? ^Sender: \/.*-(owner|admin)@.*
* 1^0 MAILING_LIST_NAME ?? ^Sender: \/owner-[^(_at_)]*@.*
* 1^0 MAILING_LIST_NAME ?? ^Delivered-To: mailing list \/[^(_at_)]*@.*
{
m = `echo $MATCH | sed -e 's/-owner@/@/' -e 's/-admin@/@/' -e 's/owner-//'`
:0
* m ?? ()\/[^(_at_)]+
{
list_name=$MATCH
:0
/dev/null
}
:0 A
* m ?? ()(_dot_)*(_at_)\/.+
{
list_source=$MATCH
}
}
I just clean all possible -admin-owners- from the first MATCH.
Suppose that (echo + sed) < (perl program)
Bye,
Udi
_______________________________________________
procmail mailing list
procmail(_at_)lists(_dot_)RWTH-Aachen(_dot_)DE
http://MailMan.RWTH-Aachen.DE/mailman/listinfo/procmail