procmail
[Top] [All Lists]

Re: Filter emails coming not from my own domain

2006-08-22 04:19:36

On Tue, 22 Aug 2006, M. Imran wrote:

Date: Tue, 22 Aug 2006 13:29:19 +0500

Dear All,

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.


        The most simple or innocent recipe is:

FRM=`formail -r -x"To: "`
:0
* ! FRM ?? @my.own.main\>
! private(_at_)address

        I think it's ok for start.  If your private is gmail you
        already have SPAM filter.


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

        If you don't wnat to read extra info in the mans, read the man for
        procmailex (examples) you will see what /dev/null means.  If you
        want to learn procmail I suggest you to start from
        http://www.ii.com/internet/robots/procmail/qs/#steps  (Nancy
        McGough's Step by Step)

Bye,
  Udi

____________________________________________________________
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