MailScanner & CentOS5/Sendmail

Bernard Lheureux bernard.lheureux at bbsoft4.org
Fri May 16 09:34:58 IST 2008


On Fri, 2008-05-16 at 08:41 +0100, Julian Field wrote:

> > After sending a few test emails, I noticed that MailScanner/sendmail doesn't
> > reject unknown users at the SMTP stage but rather it accepts the email for
> > delivery and then a DSN is generated afterwards.
> >
> > How do you get sendmail to reject at the SMTP stage like postfix does with
> > "relay_recipients.db"?
> >   
> You need FEATURE(blacklist_recipients) I think. It is certainly *very* 
> possible and quite simple to do in sendmail. I always thought it did it 
> by default :-)
You can do it from /etc/mail/access

by setting it to:

# Check the /usr/share/doc/sendmail/README.cf file for a description
# of the format of this file. (search for access_db in that file)
# The /usr/share/doc/sendmail/README.cf is part of the sendmail-doc
# package.
#
# by default we allow relaying from localhost...
localhost.localdomain		RELAY
localhost			RELAY
127.0.0.1			RELAY
195.238.2.29			RELAY  #your SMTP server IP
To:postmaster at yourdomain.com    OK     #relay OK to this address
To:root at yourdomain.com		OK     #relay OK to this address
To:you at yourdomain.com		OK     #relay OK to this address
To:yourdomain.com		REJECT #then rejects any other address

When the file is correctly filled for EACH E-Mail Addres, Alias and
Domain make a:
makemap hash /etc/mail/access < /etc/mail/access
And that's it...


 M$-Internet Exploder est le cancer de l'Internet, voyez pourquoi ici :
 http://www.aful.org/ressources/documentations/msie-problemes-securite/

--
(°-   Bernard Lheureux Gestionnaire des MailingLists ML, TechML, LinuxML
//\   http://www.bbsoft4.org/Mailinglists.htm ** MailTo:root at bbsoft4.org
v_/_  http://www.bbsoft4.org/ <<<<<< () >>>>>> http://www.portalinux.org



More information about the MailScanner mailing list