Installing and Administering Internet Services
Chapter 4 203
Installing and Administering sendmail
Configuring sendmail to Reject Unsolicited Mail
Example 2
spammer@aol.com REJECT
cyberspammer.com REJECT
Mail can’t be sent to spammer@aol.com or anyone at cyberspammer.com.
Real-time Blackhole List
This feature will reject hosts listed in the Real-time Blackhole List,
which is found in the Real-time Blackhole List server. The server is
rbl.maps.vix.com.
To use this feature, you must add the following to the DNS database:
1.5.5.192.rbl.maps.vix.com. IN A 127.0.0.2
You can specify the Real-time Blackhole List servers in the sendmail.cf
file.
Header Checking
With header checking, mail messages can be rejected based on the
contents of their mail headers. Sendmail provides the syntax for limited
header syntax checking. A config line of the form: HHeader: $>Ruleset
causes the specified ruleset to be invoked on the Header when read.
Below is an example of header checking:
Validity of a Message-ID: header
#LOCAL_RULESETS
HMessage-Id: $>CheckMessageId
SCheckMessageId
R< $+ @ $+ > $@ OK
R$* $#error $: 553 Header Error
If the above lines are included in the sendmail.cf file then, all header
messages of the form "Message-Id:" will call the ruleset
SCheckMessageID, which checks the validity of the Message-Id header.
Discard Mailer
Sendmail has defined a special internal delivery agent called discard.
This agent can be used with the header checking ruleset and “check”
rulesets: check_mail, check_rcpt, check_relay, or check_compat.