procmail
[Top] [All Lists]

Re: procmail with option ?

2002-01-23 22:38:39
Alex said,
   I want to accept mails from one of senders that I have in a local
   file (address_book).
     0:
     * ? aux=`formail -X "From:" | cut -d" " -f2` &&  grep $aux
address_book
     mybox

Are there other way to do the same more easy?

Yep.  Try:

:0
* ^From:\/.+
* ? echo "$MATCH" | fgrep -i -f $addressbook
mybox

where $addressbook points to the path where you have a listing (1 per line)
of emails you want to accept mail from.

If you want to bypass the grep and pick only one sender, this will work:
:0
* ^From(_dot_)*the(_at_)email(_dot_)address(_dot_)com
mybox


Sorry about my bad english

Realmente, su inglés es muy bueno.

- Jeff

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