Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

how to prevent mail from abc.com?

Status
Not open for further replies.

yiutin03

MIS
May 15, 2003
76
HK
how to configure the sendmal so that mail from abc.com is blocked?
 
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!!!
 

All you need to do is to add the line

abc.com reject

to the access file and recompile the access db file (makemap hash /etc/mail/access.db < access)

Stop and restart sendmail and this should prevent mail from abc.com entering your system.

~ Remember - Nothing is Fool Proof to a Talented Fool ~
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top