On Wed, 3 Aug 2005, Stephen Allen wrote:
I have lots of recipes similar to the ones below:
:0 c
* ^X-Original-To:.(fred|barney|wilma)@mydomain\.com
! me(_at_)anotherdomain(_dot_)com
:0 c
* ^X-Original-To:(_dot_)betty(_at_)mydomain\(_dot_)com
! you(_at_)yetanotherdomain(_dot_)com \
someoneelse(_at_)anywhere(_dot_)com
It would be easier if I could just dump the names in a file, and have the
file parsed for forwarding addresses. Eg:
fred(_at_)mydomain(_dot_)com me(_at_)anotherdomain(_dot_)com
betty(_at_)mydomain(_dot_)com you(_at_)yetanotherdomain(_dot_)com
someoneelse(_at_)anywhere(_dot_)com
The first column is the address here, the rest of the line is a list of
email addresses to forward to.
Put the list in file ("List.list" in my example):
:0
* ^X-Original-To:.\/(_dot_)+(_at_)mydomain\(_dot_)com
{
FRO=$MATCH
REP=`awk '$1=/'$FRO'/ {$1=""; print $0}' List.list`
}
:0 c
... Do what ever you want to with $FRO and $REP ...
But, remember that you are going to pay performance
when you IO to the file.
Bye,
Udi
Thanks,
Steve :)
____________________________________________________________
procmail mailing list Procmail homepage: http://www.procmail.org/
procmail(_at_)lists(_dot_)RWTH-Aachen(_dot_)DE
http://MailMan.RWTH-Aachen.DE/mailman/listinfo/procmail
+++++++++++++++++++++++++++++++++++++++++++
This Mail Was Scanned By Mail-seCure System
at the Tel-Aviv University CC.
---------------------------------------------------------------------------
Udi Mottelo - Unix System Administrator.
Faculty of Engineering - Tel-Aviv University
E-Mail: uuddii(_at_)eng(_dot_)tau(_dot_)ac(_dot_)il Phone: +972-3-6409446
---------------------------------------------------------------------------
____________________________________________________________
procmail mailing list Procmail homepage: http://www.procmail.org/
procmail(_at_)lists(_dot_)RWTH-Aachen(_dot_)DE
http://MailMan.RWTH-Aachen.DE/mailman/listinfo/procmail