Bijayant Kumar


--- On Thu, 8/1/09, Chris Babcock <cbabc...@kolonelpanic.com> wrote:

> From: Chris Babcock <cbabc...@kolonelpanic.com>
> Subject: Re: Blocking Spam
> To: bijayan...@yahoo.com
> Cc: "postfix" <postfix-users@postfix.org>
> Date: Thursday, 8 January, 2009, 5:39 PM
> > > It's doing what you're asking...
> "REJECT"
> > > means bounce the message. You
> > > probably want to "DISCARD" it.
> > > 
> > DISCARD means nobody will receive the bounce message,
> right? If any
> > bodies mails is rejected from our server he/she will
> never know what
> > was the issue. 
> 
> Right, which is why you should be very careful about where
> you apply
> that rule. Specifically here you are making a policy to the
> effect of,
> "If mail claiming to to be from one of our users did,
> in fact, arrive
> from a foreign server then we do not want to send a bounce
> message."
> That is the rule you are asking how to enforce. Now that
> you know what
> it means you can make a decision about whether to do it.
> 
> > > There *MAY BE* legitimate reasons for for mail to
> come into
> > > your network
> > > from a server outsite the network addressed to
> one of your
> > > users and
> > > purporting to be from that user. For example,
> test messages
> > > from remote
> > > workers sending through their home ISP. Just so
> that you
> > > are aware of
> > > the other side of the issue.
> > > 
> > It means that we can not do any thing for that kind of
> mails at the
> > Postfix level. We have to receive those *SPAM* Mails
> in which from
> > and to address are same or spams coming from our one
> of the email
> > addresses to any users, right? If these types of mails
> can be
> > rejected by the Postfix then please let me know how or
> any pointer
> > any docs will be very useful to me.
> 
> http://www.postfix.org/access.5.html
> 
> The key is *where* you place the DISCARD action...
> 
> smtpd_recipient_restrictions =
>  permit_mynetworks,
>  reject_unauth_destination
>  YOUR CHECKS HERE
> 
> You've already permitted mail originating from your
> domain, so if you
> discard mail with addresses from your domain in your checks
> it only
> affects people claiming to be your users originating mail
> outside your
> network. That can include remote workers relaying through
> their home
> ISP's network.
> 
> If, however, you make a policy that your users are not to
> originate mail
> "from" their accounts outside of your network
> then you are not dropping
> any legitimate mail. The wisdom of the policy is outside
> the scope of
> the list, but there's no shortage of people who will
> either tell you
> "Don't do it," or "Fine, but you need to
> provide a way (auth) for users
> to follow the policy."
> 
> Chris Babcock

I have implemented this on my main server. I have included the check to reject 
the mails after reject_unauth_destination. Some relevant parts of  my postconf

smtpd_recipient_restrictions = 
permit_mynetworks
check_recipient_access pcre:/etc/postfix/ascii.pcre 
permit_sasl_authenticated
check_sender_access hash:/etc/postfix/check_backscatterer
reject_invalid_hostname        
reject_non_fqdn_sender  
reject_non_fqdn_recipient       
reject_unauth_destination       
**** check_sender_access hash:/etc/postfix/access_sender ****
>From access_sender hashfiles I have started the rejection. But I am facing one 
>problem also, my clients have the different webservers/database/test servers 
>etc also hosted on another places outside my network. They use to send 
>test/alert mails from there to their own domain. Those mails are also getting 
>rejected due to this rules. 
I want to ask one thing, can it be possible to block only those mails in which 
"From and To" address are same with help of regular expression support? It 
means that reject mails if From and To address are same otherwise accept.


      New Email addresses available on Yahoo!
Get the Email name you&#39;ve always wanted on the new @ymail and @rocketmail. 
Hurry before someone else does!
http://mail.promotions.yahoo.com/newdomains/aa/

Reply via email to