procmail
[Top] [All Lists]

filter mail using .aliases file

2004-04-20 17:10:36
(I have also posted this at comp.mail.misc)

At present I have the following filter rule to sort mail from people I
*always* want to receive email from into a 'white' mailbox :

:0:
* ? formail -x "From:" -x "From" -x "Sender:" \
 | egrep -i -is -f $PROCMAILDIR/whitelist
white

Obviously 'whitelist' is a file that is just a list of email addresses
only, and at the moment I manually build the file as I add contacts to
my addressbook - /home/troy/.aliases in mutt format :

alias nickname First Last <email address>
alias troy Troy Piggins <troy(_at_)piggo(_dot_)com>

What I would like to do is change my filter to just search my .aliases
file to save me the trouble of having to remember to add new contacts to
whitelist.  I am not very good at using sed, grep or regex in general,
but I am sure there is some simple change to the 'egrep' line above that
would do the job.  I don't really want to use any external programs, or
perl scripts etc.  I am sure it can be done within the recipe by someone
who knows more about regex than me :-)

Any help appreciated.

--
T R O Y  P I G G I N S
e : troy(_at_)piggo(_dot_)com

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