summaryrefslogtreecommitdiff
path: root/usr.sbin/sendmail
diff options
context:
space:
mode:
authorThorsten Lockert <tholo@cvs.openbsd.org>1998-10-17 06:00:06 +0000
committerThorsten Lockert <tholo@cvs.openbsd.org>1998-10-17 06:00:06 +0000
commitb5ee48c12c4fcf03759b56078117505b3d14e4bf (patch)
tree75f9bedb9dedab538a83c7ece8844aecc4db8fab /usr.sbin/sendmail
parentca8f791d2508b1663727a6c63aaed37eb4008e3a (diff)
Stricter anti-spam measures; mostly from Eric's knecht.mc
Diffstat (limited to 'usr.sbin/sendmail')
-rw-r--r--usr.sbin/sendmail/cf/cf/gandalf.mc38
1 files changed, 37 insertions, 1 deletions
diff --git a/usr.sbin/sendmail/cf/cf/gandalf.mc b/usr.sbin/sendmail/cf/cf/gandalf.mc
index ae6a06fe656..5eae553a690 100644
--- a/usr.sbin/sendmail/cf/cf/gandalf.mc
+++ b/usr.sbin/sendmail/cf/cf/gandalf.mc
@@ -30,7 +30,7 @@ divert(-1)
#
include(`../m4/cf.m4')dnl
-VERSIONID(`$OpenBSD: gandalf.mc,v 1.4 1998/08/15 18:17:14 millert Exp $')dnl
+VERSIONID(`$OpenBSD: gandalf.mc,v 1.5 1998/10/17 06:00:05 tholo Exp $')dnl
OSTYPE(openbsd)dnl
DOMAIN(sigmasoft)dnl
MASQUERADE_AS(SigmaSoft.COM)dnl
@@ -43,3 +43,39 @@ MAILER(procmail)dnl
MAILER(smtp)dnl
Cw SigmaSoft.COM
+
+LOCAL_CONFIG
+#
+# Regular expression to reject:
+# * numeric-only localparts from aol.com and msn.com
+# * localparts starting with a digit from juno.com
+# * localparts longer than 10 characters from aol.com
+#
+Kcheckaddress regex -a@MATCH
+ ^([0-9]+<@(aol|msn)\.com|[0-9][^<]*<@juno\.com|.{10}[^<]+<@aol\.com)\.?>
+
+#
+# Names that won't be allowed in a To: line (local-part and domains)
+#
+C{RejectToLocalparts} friend you
+C{RejectToDomains} public.com
+
+LOCAL_RULESETS
+HTo: $>CheckTo
+
+SCheckTo
+R$={RejectToLocalparts}@$* $#error $: "553 Header error"
+R$*@$={RejectToDomains} $#error $: "553 Header error"
+
+HMessage-Id: $>CheckMessageId
+
+SCheckMessageId
+R< $+ @ $+ > $@ OK
+R$* $#error $: "553 Header error"
+
+LOCAL_RULESETS
+SLocal_check_mail
+# check address against various regex checks
+R$* $: $>Parse0 $>3 $1
+R$+ $: $(checkaddress $1 $)
+R@MATCH $#error $: "553 Header error"