Date: Mon, 8 Sep 1997 22:01:26 +0930 (CST) From: Stavros Patiniotis <stavros@esc.net.au> To: freebsd-questions@FreeBSD.ORG Subject: SPAM prevention Message-ID: <Pine.BSI.3.91.970908215333.18809A-200000@bang.esc.net.au>
index | next in thread | raw e-mail
[-- Attachment #1 --]
Howdy,
Since so many people asked me for the SPam prevention rulesets, I
will post them to the list, and hopefully they will be of much use to
freebsd-ers out there.
A couple of things:
1. Do this at your own risk
2. You need Sendmail 8.8.7 (see www.sendmail.org)
3. Backup sendmail.cf (cp /etc/sendmail/cf /etc/sendmail/cf.bak2)
(the 2 is included as you may already have a .bak file)
4. create /etc/LocalIP with all your address blocks in there ie
/etc/LocalIP
201.15.1
203.24.24.1
{Will allow any host 201.15.1.xxx to relay and also the specific host
203.24.24.1.}
5. create /etc/relayto allowing any remote host that uses you as a
relay.
6. append tosend to the endof sendmail.cf (cat tosend >> /etc/sendmail.cf)
7. restart sendmail (sendmail -bd -q30m)
8. Test it out
Hope this helps....
Regards,
Stavros Patiniotis
------------------------------------------------------------------------------
-System Administrator / Network Manager Escape.Net -
- 465b South Rd -
-email: stavros@esc.net.au Keswick SA 5035 -
-URL: http://www.esc.net.au Ph 82932526 Fax 82932949-
------------------------------------------------------------------------------
[-- Attachment #2 --]
##########END STANDARD CONF
#LOCAL CONF 1
Scheck_mail
# check for valid domain name (incompatible with DeliveryMode=defer)
R$* $: <?> $>3 $1 make domain canonical
R<?> $* < @ $+ . > $: <OK> tag resolved names
R<?> $* < @ $+ > $#error $: 451 Domain must resolve
#LOCAL_CONFIG 2
F{LocalIP} /etc/spam/LocalIP
F{RelayTo} /etc/spam/relayto
#LOCAL_RULESETS
Scheck_rcpt
# make sure you have TABs here, not BLANKs! sendmail will complain otherwise...
# 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
# alternatively (or even both):
# R$*<@$*$={RelayTo}.>$* $>3 $1 $4
# still something left?
R$*<@$+>$* $#error $@ 5.7.1 $: 571 we do not relay
help
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?Pine.BSI.3.91.970908215333.18809A-200000>
