summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJonathan M. Bresler <jmb@FreeBSD.org>1998-05-17 23:05:16 +0000
committerJonathan M. Bresler <jmb@FreeBSD.org>1998-05-17 23:05:16 +0000
commit333c76c66d939d6cb48a7289ba3f89145a83c841 (patch)
tree441dd241eb40da170d6c3ae1705c0d6fa518c106
parenta15417e7cf1b2fc04442255bb0aa25587a398d19 (diff)
Notes
-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 0921b96cc21b..42305a8656b4 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
-