When I installed sendmail 8.12.8, I did the following (among other things)
added strings
FEATURE (`access_db')
dnl this sets DNS-based ACL
FEATURE (`relay_hosts_only')
dnl treating records in ACL as the names of hosts, not domains
to the file <sendmail_pkg>/cf/cf/sendmail.mc and built it
cd <sendmail_pkg>/cf/cf/sendmail.mc
./Build sendmail.cf
./Build submit.cf
After the binaries and *cf were installed, I created /etc/mail/access with records like
localhost RELAY
localhost.localdomain RELAY
# consult your /etc/hosts for exact FQDN of your localhost
127.0.0.1 RELAY
my_left_hand_side_neighbour.myoffice.my.net RELAY
my_right_hand_side_neighbour.myoffice.my.net RELAY
# any hosts not listed here are denyed by default
and compiled it with
cd /etc/mail
makemap hash access.db < access
Note, that this may be circumvented by dedicated software that can answer forged hostnames!!!
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.