MailScanner & CentOS5/Sendmail

Bernard Lheureux bernard.lheureux at
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/ file for a description
# of the format of this file. (search for access_db in that file)
# The /usr/share/doc/sendmail/ is part of the sendmail-doc
# package.
# by default we allow relaying from localhost...
localhost.localdomain		RELAY
localhost			RELAY			RELAY			RELAY  #your SMTP server IP
To:postmaster at    OK     #relay OK to this address
To:root at		OK     #relay OK to this address
To:you at		OK     #relay OK to this address		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 :

(°-   Bernard Lheureux Gestionnaire des MailingLists ML, TechML, LinuxML
//\ ** MailTo:root at
v_/_ <<<<<< () >>>>>>

More information about the MailScanner mailing list