procmail
[Top] [All Lists]

Check whitelist file and if not there add to whitelist

2005-08-20 09:12:33
Hello everyone,

I cant figure out why this isn't working. I want to check the existing
whitelist and if the address is already there, add a X-Puremail Tag to the
mail.

Then check to see if it's To: our web forms, not From: us and not already
in the whistlist using the X-Puremail tag.

What is happening is ALL mail is getting the X-puremail tag and added to
the whitelist regardless of the To, From, or X-puremail tag checks.

The problem seems to be in the top recipe but I cant figure out why. Any
help would be appreciated.

:0 
* ?formail -x"From:" -x"Sender:" \ 
  -x"Reply-To:" -x"Return-Path:" \ 
| fgrep -is -f $HOME/whitelist 
{  
         
        :0 hif 
        | formail -A"X-Puremail: Global Whitelist" 
} 
 
:0
*
^To:.*(feedback|malaysia|maldives|myanmar|phuket|samui|seychelles|singapore|sri-lanka)
* ! ^X-Puremail: Global Whitelist
* ! ^From:.*(seal|phuket|siam)
{          

        :0 hicw:
        | (formail -r -z -iFrom: \
          -xFrom: >> $HOME/whitelist)
}

-- 
Best Regards,

Tim Rice
---------------
Phuket Thailand




____________________________________________________________
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