[milters] Archive

Lists Index Date Thread Search

Article: 518
From: Joe Matuscak
Date: 2005-04-27 08:38:26 -0400
Subject: Re: Sendmail , Exchange, milter-sender, how can i accept

Removal...........: milters-request@milter.info?subject=remove
More information..: http://www.milter.info/#Support

On Wed, 27 Apr 2005, Andrew Lyon wrote:

> Is there any way in sendmail I can setup a full list of valid recipients for
> each of our domains? Sendmail doesn't seem to check access.db if the
> recipient is at a domain specified in mailertable.

How about:

---------- Forwarded message ----------
Date: Tue, 18 May 2004 21:24:29 -0400 (EDT)
From: Todd Vierling <tv@duh.org>
To: nanog@merit.edu
Subject: Secondary MX user list filter for Sendmail

A colleague asked me offlist about how to make a Sendmail secondary MX 
properly return 550 for invalid recipient addresses.  For smaller sites -- 
or even larger sites if the list is autogenerated and the access_db uses 
"btree" storage (it's rather fast) -- the below solution will do just 


In your secondary MX's sendmail.mc, add the following FEATUREs if you 
don't already have them.


Rebuild your sendmail.cf from this, and then put entries like the 
following in your /etc/mail/access file (assuming "foo.com" is your 
domain).  I'm also assuming that "foo.com" is already in 
/etc/mail/relay-domains (or /etc/mail/sendmail.cR depending on your 
sendmail install), so that relayed mail can get through.

userone@foo.com                    RELAY
usertwo@foo.com                    RELAY
To:foo.com                         "550 User unknown"

The RELAY lines designate explicitly allowed recipient addresses for
relaying to the primary MX.  The To:...550 line, which requires the
"blacklist_recipients" feature, is a fallback rule that matches after the
email addresses and returns the expected "User unknown" error.

Now rebuild your access.db file, restart sendmail, and voila, you have a
secondary MX explicit user list.

Joe Matuscak
Rohrer Corporation
717 Seville Road
Wadsworth, Ohio 44281

Lists Index Date Thread Search