procmail
[Top] [All Lists]

Re: Filter emails coming not from my own domain

2006-08-22 02:54:36
M. Imran schreef:

I want to filter all emails coming not from my own domain to our
private email address say  privateaddress(_at_)mydomain(_dot_)com . I am 
working
around following  recipie but it is not working, kindly tell me how to
write it.

  :0
  * !^From:outsidefrom-mydomain(_at_)mydomain(_dot_)com
  * ^TO_privateaddress(_at_)mydomain(_dot_)com
  /dev/null

   :0
   * ! ^From:(_dot_)*(_at_)mydomain\(_dot_)com
   *   ^TO_privateaddress(_at_)mydomain\(_dot_)com
   /dev/null

But since headers are easily faked, you might want to do some more
checks, like on the number and contents of the Received header fields,
and maybe on the contents of the postmark line (that contains the
envelope-from).

Further you might want to deliver not to /dev/null but rather to a
special mailbox, to be able to check that once in a while for false
positives.

-- 
Groet, Ruud


____________________________________________________________
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