Subject: Re: email SPAM
To: Peter Seebach <seebs@solon.com>
From: Andrew Brown <codewarrior@daemon.org>
List: current-users
Date: 06/04/1997 14:12:37
sorry to revive a somewhat dead thread, but i've been getting too much
lately...
>There are several good rulesets on the sendmail.org web pages. Basically,
>here's what you want to do:
i've had enough, so i decided to do something.
>1. You can have a check_mail rule which refuses mail from invalid
>domains, and also refuses mail from any number of domains you distrust.
the check_mail rule there (http://www.sendmail.org/antispam.html) is
not quite what i was looking for, and neither was the one in the
batbook on page 508 (but this was a lot closer, even though i thought
it was somewhat broken), so i wrote my own.
F{spam}/etc/sendmail.cx
Scheck_mail
R$* $: $>3 $1
R$* < @ $+ . > $* $1 < @ $2 > $3
R$* < @ $+ > $* $: $>spam_host $1 < @ $2 > $2
R$* < @ $+ > $+ $: $>spam_addr $1 @ $3
Sspam_host
R $* < @ $={spam} > $+ $#error $@ 5.7.1 $: "Permanent failure, delivery not authorized, messages refused."
R $* < @ $* . $+ . $+ > $+ $: $>spam_host $1 < @ $3 . $4 > $5
Sspam_addr
R$={spam} $#error $@ 5.7.1 $: "Permanent failure, delivery not authorized, message refused."
R $+ @ $* . $+ . $+ $: $>spam_addr $1 @ $3 . $4
this allows me to have domains, subdomains or hosts, and email
addresses in the sendmail.cx file (random name that sort of follows
from .cf, .cw, .cT, etc.) ala
savetrees.com
ix.netcom.com
nobody@uu.net
but still allow things like
anyone@netcom.com
anyone@uu.net
comments? questions?
ps - please keep in mind that i've only been writing sendmail rules
for about two days now. :)
--
|-----< "CODE WARRIOR" >-----|
andrew@echonyc.com (TheMan) * "ah! i see you have the internet
codewarrior@daemon.org that goes *ping*!"
warfare@graffiti.com * "information is power -- share the wealth."