OT: Reject non local users with sendmail, help

Jim Holland mailscanner at mango.zw
Fri Oct 20 13:55:04 IST 2006


On Fri, 20 Oct 2006, Derek Catanzaro wrote:

> Correct, sendmail will not relay for a domain that you do not allow and
> this is working for me.  The subject line of this message is incorrect,
> it should have read "RELAY" not reject.  My MailScanner/sendmail servers
> relay to an internal Lotus Domino server.  I have compiled a list of
> addresses that I want sendmail to relay to and if the adddress is not
> listed I do not want sendmail to accept it.  Right now it accepts any
> address that is sent to mydomain.com, hence the extra load.  
> MailScanner is having to process a bunch of messages that are going to
> non existent users in mydomain.com.
> 
> I have the list of receipients that I need to relay for I just need to
> know how to tell sendmail to only relay to these users and drop the
> rest.

In the access file:

To:user1 at example.com    RELAY
To:user2 at example.com    RELAY
To:user3 at example.com    RELAY
To:example.com          ERROR:5.1.1:550 No such user

Keep your base access file in a separate location, and then generate the
above entries with a script, combine it with your base access file and
then run "make".

Regards

Jim Holland
System Administrator
MANGO - Zimbabwe's non-profit e-mail service



More information about the MailScanner mailing list