The /etc/mail/access file has two columns. The first lists IP addresses and domains from which the mail is coming or going. The second lists the type of action to be taken when mail from these sources or destinations is received. Keywords include RELAY, REJECT, OK (not ACCEPT), and DISCARD
spammer@aol.com REJECT# You can also use the access database to block sender addresses based on
cyberspammer.com REJECT
192.168.212 REJECT
spammer@aol.com REJECT
cyberspammer2.com 550 We don't accept mail from spammers
okay.cyberspammer.com OK
sendmail.org OK
128.32 RELAY
# the user name portion of the address. For example:
FREE.STEALTH.MAILER@ 550 Spam not accepted# by default we allow relaying from localhost
localhost.localdomain RELAYYou'll then have to convert this text file into a sendmail readable database file named /etc/mail/access.db. Here are the commands you need:
localhost RELAY
127.0.0.1 RELAY
192.168.1 RELAY
makemap hash /etc/mail/access.db < /etc/mail/access
source:http://linuxpoison.blogspot.com/2010/04/135781677510056.html