summaryrefslogtreecommitdiffstats
path: root/etc/mail
diff options
context:
space:
mode:
authorjmb <jmb@FreeBSD.org>1998-05-17 23:05:16 +0000
committerjmb <jmb@FreeBSD.org>1998-05-17 23:05:16 +0000
commit0795c2718fe5bddffbddbc5450d8a1869eae3042 (patch)
treee204684ec2390d2ac4df7c3660b3bf5a6b9adc14 /etc/mail
parentcedbd2da429fc4e5807c932e2d15b37b8b9a1489 (diff)
downloadFreeBSD-src-0795c2718fe5bddffbddbc5450d8a1869eae3042.zip
FreeBSD-src-0795c2718fe5bddffbddbc5450d8a1869eae3042.tar.gz
replaced check_rcpt ruleset with one
recommended by Gary Palmer <gpalmer@freebsd.org> Obtained from: http://www.informatik.uni-kiel.de/%7Eca/email/check.html#check_rcpt
Diffstat (limited to 'etc/mail')
-rw-r--r--etc/mail/sendmail.cf.additions30
1 files changed, 19 insertions, 11 deletions
diff --git a/etc/mail/sendmail.cf.additions b/etc/mail/sendmail.cf.additions
index 0921b96..42305a8 100644
--- a/etc/mail/sendmail.cf.additions
+++ b/etc/mail/sendmail.cf.additions
@@ -100,15 +100,23 @@ R$+.REJECT $#error $@ 5.2.1 $: 550 $1
R<$*> $* $: $1
# mail must NOT be addressed "fakenames"--END
# mail must come from or go to this machine or machines we allow to relay--BEGIN
-# R$* $: $>Parse0 $>3 $1
-# R$+ < @ $* . > $* $: $1 < @ $2 >
-# R$+ < @ $=w> $@ OK
-# R$+ < @ $* $=R> $@ OK
-# R$* $: $(dequote "" $&{client_name} $)
-# R$=w $@ OK
-# R$* $=R $@ OK
-# R$@ $@ OK
-# R$* $#error $@ 5.7.1 $: "550 Relaying Denied"
+# from http://www.informatik.uni-kiel.de/%7Eca/email/check.html#check_rcpt
+R$+ $: $(dequote "" $&{client_addr} $) $| $1
+R0 $| $* $@ ok
+R$={LocalIP}$* $| $* $@ ok
+# not local, check rcpt
+R$* $| $* $: $>3 $2
+# remove local part, maybe repeatedly
+R$+ $:$>removelocal $1
+# still something left?
+R$*<@$+>$* $#error $@ 5.7.1 $: 550 we do not relay
+#
+Sremovelocal
+# remove RelayTo part (maybe repeatedly)
+# R$*<@$*$={RelayTo}.>$* $>3 $1 $4
+R$*<@$=w.>$* $: $>removelocal $>3 $1 $3
+R$*<@$*>$* $@ $1<@$2>$3
+# dequote local part
+R$- $: $>3 $(dequote $1 $)
+R$*<@$*>$* $: $>removelocal $1<@$2>$3
# mail must come from or go to this machine or machines we allow to relay--END
-R$* $@ OK
-
OpenPOWER on IntegriCloud