NCSA Home
Contact Us | Intranet | Search

Using Rulesets to Bounce Unsolicited Electronic Mail


Summary

This document contains the necessary information to use Sendmail Rulesets to bounce unsolicited electronic mail. You must use the Sendmail 8.8.5 binary described here .

/afs/ncsa/src/sendmail/sendmail-8.8.5/nospam/spam.cf.add contains the two sections of your sendmail.cf that you will need to alter.

The first defines the file that will contain your list of addresses that you want to bounce. This line should be added before the Options section.

 FR/etc/mail/junkmail.addresses
The second section is the ruleset that actually checks the addresses in your list to the senders address. This should be added after Ruleset 98 and before the MAILER DEFINITIONS.
Scheck_mail
R<$=R>                  $#error $@ 5.7.1 $: "571 unsolicited email is refused"
R$=R                    $#error $@ 5.7.1 $: "571 unsolicited email is refused"
R$*                     $: $>3 $1
R$* < @ $* $=R . > $*   $#error $@ 5.7.1 $: "571 unsolicited email is refused"
R$* < @ $* $=R > $*     $#error $@ 5.7.1 $: "571 unsolicited email is refused"
Populate the /etc/mail/junkmail.addresses file with addresses or domains. Restart sendmail.