summaryrefslogtreecommitdiffstats
path: root/etc/mail/sendmail.cf.additions
diff options
context:
space:
mode:
authorjmb <jmb@FreeBSD.org>1997-10-19 16:40:10 +0000
committerjmb <jmb@FreeBSD.org>1997-10-19 16:40:10 +0000
commit76e2a878114e7b6390c0effc00d8798995e477d5 (patch)
tree5a528c5df244863252a1ca728d5ae085f6338c12 /etc/mail/sendmail.cf.additions
parent3f21e439b0000c3c0982adfa0b180455db95d8cf (diff)
downloadFreeBSD-src-76e2a878114e7b6390c0effc00d8798995e477d5.zip
FreeBSD-src-76e2a878114e7b6390c0effc00d8798995e477d5.tar.gz
anti-spam filter used by the FreeBSD mailing lists.
Diffstat (limited to 'etc/mail/sendmail.cf.additions')
-rw-r--r--etc/mail/sendmail.cf.additions40
1 files changed, 40 insertions, 0 deletions
diff --git a/etc/mail/sendmail.cf.additions b/etc/mail/sendmail.cf.additions
new file mode 100644
index 0000000..f7a95ea
--- /dev/null
+++ b/etc/mail/sendmail.cf.additions
@@ -0,0 +1,40 @@
+# database declarations
+Kdenyip hash -o -a.REJECT /etc/mail/denyip.db
+Kspamsites hash -o -a.REJECT /etc/mail/spamsites.db
+
+# called with host.tld and IP address of connecting host.
+# ip address must NOT be in the "denyip" database
+Scheck_relay
+R$* $| [$+ $1 $| $2 should not be needed
+R$* $| $+] $1 $| $2 same (bat 2nd ed p510)
+R$* $| $* $: $1 $| $(denyip $2 $)
+R$* $| $*.REJECT $#error $: 521 blocked. contact postmaster@FreeBSD.ORG ($2)
+# host must *not* be in the "spamsites" database
+R$+.$+.$+ $| $* $2.$3 $| $4
+R$+.$+ $| $* $: $(spamsites $1.$2 $) $| $3
+R$*.REJECT $| $* $#error $: 521 blocked. contact postmaster@FreeBSD.ORG ($1)
+# Host must be resolvable, currently not used at hub.freebsd.org
+#R$* $| $* $: <?> <$1 $| $2> $>3 foo@$1
+#R<?> <$*> $*<@$*.> $: $1
+#R<?> <$*> $*<@$*> $#error $: 451 Domain does not resolve ($1)
+
+# called with envelope sender, "Mail From: xxx", of SMTP conversation
+#
+Scheck_mail
+R$* $: <?> $>3 $1
+R<?> $* < @ $+ . > $: $2
+# R<?> $* < @ $+ > $#error $: "451 Domain does not resolve"
+R<?> $* < @ $+ > $: $2
+R$+.$+.$+ $2.$3
+R$* $: $(spamsites $1 $: OK $)
+ROK $@ OK
+R$+.REJECT $#error $: 521 $1
+
+# for testing check_relay and check_mail
+# if we type "$|", sendmail will split this into two tokens "$" and "|"
+# this rule glues prevent sendmail from splitting "$|"
+# to use: /usr/sbin/sendmail -bt
+# host.domain.tld $| 111.222.333.444
+Sxlat
+R$* $$| $* $: $1 $| $2
+R$* $| $* $@ $>check_relay $1 $| $2
OpenPOWER on IntegriCloud