Sendmail – control who can send relay

Sendmail use “access” database to control who can use this email server to send email out.

It’s easy, just edit this file

/etc/mail/access

 

, but access is a database file, after you edit it you need to recreate database map

makemap hash /etc/mail/access < /etc/mail/access

 

Put your control list in the at the end of the file:

[email protected] REJECT
cyberspammer.com REJECT
TLD REJECT
192.168.0 RELAY
192.168.1 OK

 

REJECT: reject all email from that source
RELAY: allow that IP range to use our server as a relay.
OK: allow to send any email even though it’s blocked in some other rules.

Leave a Reply

Your email address will not be published. Required fields are marked *