Check out www.sendmail.org, it has some anti-spam stuff on it.
The following is what I use on 8.8.5:
LOCAL_CONFIG
F{SpamList} /etc/SpamList
F{LocalIP} /etc/LocalIP
LOCAL_RULESETS
Scheck_rcpt
# first: get client addr
R$+ $: $(dequote "" $&{client_addr} $) &| $1
R0 $| $* $@ ok no client addr: directly
invoked
R$={LocalIP}$* $@ ok from here
# not local, check rcpt
R$* $| $* $: $>3 $2
# remove local part, maybe repeatedly
R$*<@$=w.>$* $>3 $1 $3
# still something left?
R$*<@$+>$* $#error $@ 5.7.1 $: This machine does not
relay
Scheck_mail
# bounce junk mail
R<$={SpamList}> $#error $@ 5.7.1 $: This machine does not
accept junk mail
R$* $: $>3 $1
R$* < @ $={SpamList} . > $* $#error $@ 5.7.1 $: This machine does not
accept junk mail
in /etc have a file called SpamList with addresses of known spammers, in
LocalIP have addresses of foreign machines(networks) that you allow to use
you as a mail forwarder.
---------------------------------
Steve West-Fisher
steve@pelican.net
----------------------------------