Bijayant Kumar
--- On Tue, 6/1/09, DJ Lucas <d...@lucasit.com> wrote: > From: DJ Lucas <d...@lucasit.com> > Subject: Re: Blocking Spam > To: "postfix" <postfix-users@postfix.org> > Date: Tuesday, 6 January, 2009, 6:34 AM > bijayant kumar wrote: > > Hello list, > > > > Now a days we are getting lots of spam emails from our > own email-ids. I want to block this. I have tried to block > senders domains which are local and not doing smtp-auth. > While implementing I come across a new problem like, when I > rejected a spam coming from my own email-id from another > spam server, I got Bounce-Notification message also. As the > account(my email id) is local, it entitled to get the Bounce > Notification. How to overcome this issue? Any suggestion or > reading. > > > > > <SNIP> > > I am trying to reject the mails which is coming from > a...@abc.com without smtp-authentication. It is being > rejected but the bounce message is getting delivered to > a...@abc.com as this domain and email is local. This is the > problem. > > Bijayant Kumar > > > What is the source of the NDR (show headers if it is not > you) and > why/how was the original message rejected (logs)? > I think I was not clear on my question. As we all know spammers uses the from address as our own email address and spamming like anything, right. In those emails from address and To address both are same. So, I tried to block those spams which are local and not doing smtp-authentication. I have tried to simulate the scenario on my local testing environments. I have created a test domain kavach.com and a user bijay...@kavach.com. I have telneted on one another postfix installation and tried to send emails from bijay...@kavach.com to bijay...@kavach.com. What I observed the email is rejected as desired because it has sent without the smtp-authentication. But bijay...@kavach.com also received the bounce-notification message i.e undelivered mail returned to sender. Postconf -n on test machine mynetworks = 127.0.0.0/8 mynetworks_style = subnet myorigin = $mydomain newaliases_path = /usr/bin/newaliases queue_directory = /var/spool/postfix readme_directory = /usr/share/doc/postfix-2.5.5/readme sample_directory = /etc/postfix sendmail_path = /usr/sbin/sendmail setgid_group = postdrop smtpd_recipient_restrictions = permit_mynetworks permit_sasl_authenticated reject_unauth_destination check_sender_access hash:/etc/postfix/access_sender smtpd_sasl_auth_enable = yes smtpd_sasl_security_options = noanonymous unknown_local_recipient_reject_code = 550 cat /etc/postfix/access_sender kavach.com REJECT .kavach.com REJECT Mail-Log I sent a mail from another postfix installation postfix/smtpd[14415]: connect from unknown[192.168.99.22] postfix/smtpd[14415]: NOQUEUE: reject: RCPT from unknown[192.168.99.22]: 554 5.7.1 <bijay...@kavach.com>: Sender address rejected: Access denied; from=<bijay...@kavach.com> to=<bijay...@kavach.com> proto=ESMTP helo=<test1.localdomain> postfix/smtpd[14415]: disconnect from unknown[192.168.99.22] postfix/smtpd[14415]: connect from unknown[192.168.99.22] postfix/smtpd[14415]: 4C8ED7F68D: client=unknown[192.168.99.22] postfix/cleanup[14421]: 4C8ED7F68D: message-id=<20090106054312.37623df...@test1.localdomain> postfix/qmgr[14308]: 4C8ED7F68D: from=<>, size=2520, nrcpt=1 (queue active) postfix/smtpd[14415]: disconnect from unknown[192.168.99.22] postfix/virtual[14422]: 4C8ED7F68D: to=<bijay...@kavach.com>, relay=virtual, delay=0.05, delays=0.03/0.01/0/0.01, dsn=2.0.0, status=sent (delivered to maildir) Hope I am clear this time. > -- DJ Lucas > > > -- > This message has been scanned for viruses and > dangerous content, and is believed to be clean. Get your preferred Email name! Now you can @ymail.com and @rocketmail.com. http://mail.promotions.yahoo.com/newdomains/aa/