Installing and Administering Internet Services

Chapter 4 195
Installing and Administering sendmail
Configuring sendmail to Reject Unsolicited Mail
/etc/Mail/Spammer and /etc/Mail/SpamDomains files.
Rejecting Mail from Specific Users
Enter the user’s complete mail address into the /etc/Mail/Spammer file.
sally@cup.hp.com
john@rose.hp.com
All messages from Sally and John will be rejected.
Rejecting Mail from All Users in a Specific Domain
Enter the domain address into the /etc/Mail/SpamDomain file.
pests.com
rose.hp.com
Mail messages received from all users in the pests domain and all users
in the rose.hp.com domain, not just John, will be rejected.
Rejecting Messages from a Specific Host
Enter the name of the host from which you do not want to receive
messages into the /etc/Mail/SpamDomain file.
bobcat.rose.hp.com
cheetah.india.hp.com
Mail from any user on the host bobcat in the rose.hp.com domain and
from the host cheetah in the india.hp.com domain will be rejected. You
will not receive messages from this host.
Preventing Unauthorized Mail Relay Usage
You can allow your machine to be used as a relay agent to other
machines. By specifying who you wish to be a relay for, you eliminate the
indiscriminate use of your machine as a relay for spammers, who may
pass unsolicited mail from and to other networks through your machine.
You can use the ruleset check_rcpt to validate the sender-envelope
address given to the SMTP RCPT command (the address in the “To” field
of the SMTP RCPT command)
Because this ruleset is employed, when a message is sent, it checks that
either the connecting SMTP client is “local” or the recipient is a host for
which the mailhost acts as a relay or both. Local refers to any domain
listed in /etc/mail/LocalIP or /etc/Mail/LocalNames.