If you can consider replacing your MTA, qmail is designed to
solve this type of problem:
ftp://koobera.math.uic.edu/www/qmail.html
Procmail will still be a valuable tool at the user level.
On Nov 6, 12:10am, Robby Lee may have said:
Subject: [Q] Managing forwardees
Is there a better way to manage multiple mail forwarding as follows?
USERS="(A001|A002|A003)" #and so on
:0
* $^TO_$USERS
{
:0c
* ^TO_a001
! B1(_at_)domain(_dot_)com
#. and so on
:0
* ^TO_a003
! B3(_at_)domain(_dot_)com
}
My question is, I'm doing this manually (adding|changing|deleting)
but, is it possible to use some sort of file to manage this??
e.g. filename "list.txt" contains the following.
A001
B1(_at_)domain(_dot_)com
A002
B2(_at_)domain(_dot_)com
...etc.
Now the receipe.
LIST=`egrep '^[^@ ]+$' list.txt`
USERS=`echo $LIST | sed 's/ /|/g'`
:0
* $^TO_\/($USERS)
{ USER=$MATCH
FORWARDEE=`grep -A 1 -wi $USER list.txt | tail -1`
:0
! $FORWARDEE
}
# This doesn't allow for multiple receipients.
Any comments would be appreciated.
-- End of excerpt alledgedly from Robby Lee
-----
sbergeon, 713.917.0425 (SB2009)
To live alone one must be a beast or a god, says Aristotle. Leaving out
the third case: one must be both - a philosopher. - Nietzsche