Date: Sun, 4 May 1997 23:13:20 +0800 (WST) From: Adrian Chadd <adrian@obiwan.psinet.net.au> To: freebsd-hackers@freebsd.org Subject: Sendmail.cf patch #2.. Message-ID: <Pine.BSF.3.95q.970504231019.819A-100000@obiwan.psinet.net.au>
next in thread | raw e-mail | index | archive | help
Heres the updated patch of mine that does exactly what the first one did,
but this one rejects mail if the MAIL FROM: doesn't resolve.
(Read the patch for more details)
Again, this isn't my work - this is stuff off the net thats avaliable with
a little searching.. however in light of the recent spam thread I thought
it would be nice to include these modifications in somehow.
Anyone want to review this stuff at all?
--- sendmail.cf Sun May 4 11:03:06 1997
+++ /etc/sendmail.cf.back Sat May 3 18:55:44 1997
@@ -85,21 +85,6 @@
# ... define this only if sendmail cannot automatically determine your domain
#Dj$w.Foo.COM
-# Both these files are basic text files, one host or user@host per line
-# a list of known spammers, user@host form one per line
-F{Spammer}/etc/sendmail/spammers
-
-# A list of domains to completely block, one per line
-F{SpamDomains}/etc/sendmail/spamdomains
-
-Kdequote dequote
-# Localdomains is a plaintext list of domains we accept mail for, including
-# virtual domains
-F{LocalDomains}/etc/sendmail/virtdomains
-# Contains a plaintext list of IPs we will relay mail for, can be X.Y.Z to
-# cover a whole class C..
-F{LocalNetworks}/etc/sendmail/localnetworks
-
CP.
@@ -929,59 +914,3 @@
R$+ $: $>61 $1
R$+ $: $>93 $1
-
-
-
-# blocking of spammers at MAIL From: and forcing DNS resolve
-# (note - this is incompatible with the DeliveryMode=defer option, since
-# it requires that a DNS lookup be done immediately upon mail receipt.
-
-Scheck_mail
-# Check for valid domain name
-R$* $: <?> $>3 $1
-R<?> $* < @ $+ . > $: <OK>
-R<?> $* < @ $+ > $#error $: 451 Domain must resolve
-
-
-# Check against spammer list
-R<$={Spammer}> $#error $@ 5.7.1 $: "571 We don't accept junk mail"
-R$* $: $>3 $1
-R$*<@$={SpamDomains}.>$* $#error $@ 5.7.1 $: "571 We don't accept junk mail from your domain"
-R$*<@*$={SpamDomains}>$* $#error $@ 5.7.1 $: "571 We don't accept junk mail from your domain"
-R$={Spammer} $#error $@ 5.7.1 $: "571 We don't accept junk mail from your domain"
-
-
-
-#
-# check_rcpt
-#
-Scheck_rcpt
-
-# mail terminating locally is ok
-R$*$={LocalDomains}$* $@ OK
-
-# adding the client's domain name...
-R$* $: $(dequote "" $&{client_name} $) $| $1
-
-# directly invoked (no client name) is ok
-R $| $* $@ OK
-
-# we will relay mail from clients in our own domain
-R$*$={LocalDomains}$* $| $* $@ OK
-
-# adding the client's ip number...
-R$* $: $(dequote "" $&{client_addr} $) $| $1
-
-# directly invoked (no ip address) is ok
-R0 $| $* $| $* $@ OK
-
-# we will relay all mail from clients on our own networks
-R$*$={LocalNetworks}$* $| $* $| $* $@ OK
-
-# or from localhost
-R$*127.0.0.1$* $| $* $| $* $@
-
-# anything else is bogus
-R$* $#error $: "550 Relay Denied"
-
-
** End patch
--
Adrian Chadd | UNIX, MS-DOS and Windows ...
<adrian@psinet.net.au> | (also known as the Good, the bad and the
| ugly..)
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?Pine.BSF.3.95q.970504231019.819A-100000>
