Installing and Administering Internet Services
200 Chapter4
Installing and Administering sendmail
Configuring sendmail to Reject Unsolicited Mail
Below is a sample access database file, /etc/mail/access.
In the above Access Database file, all mail messages from the
cyberspammer.com domain are rejected and the error message "550 We
don’t accept mail from spammers" is displayed. All mail messages
from the okay.cyberspammer.com domain are accepted. Messages can be
relayed through 128.32. All mail messages from spammer@aol.com are
rejected. All mail messages from the 192.168.212 domain are discarded.
Creating the Database Map
After creating the text file, you must use makemap to create the
database map. Type the following command to make the database:
makemap hash /etc/mail/access < /etc/mail/access
The makemap utility takes /etc/mail/access file as input. It then stores
the results back into the /etc/mail/access.db file.
Relaying Capability
The gen_cf shell script distributed with Sendmail allows you to turn on
one or more of the relay anti-spamming features listed below. These
capabilities are described in this section.
Promiscuous Relay: Relaying from Any Host to Any Host
Promiscuous relay allows you to configure your site to allow mail
relaying from any one site to any other site. This feature is not enabled
by default.
You can enable promiscuous relay by selecting it as an option when
running the gen_cf script distributed with this release. By enabling this
option Sendmail does not check for relaying. Spammers may then relay
Table 4-5 Access Database Text File Example
cyberspammer.com 550 We don’t accept mail from spammers
okay.cyberspammer.com OK
128.32 RELAY
spammer@aol.com REJECT
192.168.212 DISCARD