procmail
[Top] [All Lists]

Re: whitelist

2002-05-15 20:54:24
On Wed, May 15, 2002 at 07:41:24PM -0700, Chuck Charlton wrote:
I have a .procmailrc that works.  I would like to add a
"whitelist" of From: addresses that I want to receive without
further processing.  I am envisioning a unix text file that
contains the addresses, and a recipe that checks that file for
acceptability, and then releases the mail to $DEFAULT .

How would I implement this?

:0
* ? formail -rtz -x"To:" | egrep -iqsx -f $HOME/.procmail/from-whitelist
$DEFAULT

... works for me. "from-whitelist" is a plain text file with one email
address per line (with no leading or trailing whitespace).  If you do not
want to use regular expressions in your from-whitelist file, (such as
(_dot_)*(_at_)foo(_dot_)com) then you can use 'fgrep' instead of the 'egrep' 
above. 

--
paul at paulrodger dot com      http://paulrodger.com/pgpkey.html 
1024D/F0C363EF BC57 D4A4 AAB4 625F 61E8  D933 8F3D 04C5 F0C3 63EF
_______________________________________________
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>