HP-UX Mailing Services Administrator's Guide
Configuring and Administering Sendmail
Configuring Sendmail to Reject Unsolicited Mail
Chapter 284
Table 2-4 contains a sample access database file, /etc/mail/access.
In the example Access Database text 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 Finer Spam Control Using Tags
You can also tag entries in the access map based on their type. The
following tags are available:
• Connect: connection information (${client_addr},
${client_name})
• From: sender
• To: recipient
When the required item is looked up in a map, it is tried with the
corresponding tag in front, then without any tag (as fallback to enable
backward compatibility). For example:
From:spammer@some.dom REJECT
To:friend.domain RELAY
Connect:friend.domain OK
Connect.from.domain RELAY
From:good@another.dom OK
From:another.dom REJECT
Table 2-4 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