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
This commit is contained in:
Jonathan M. Bresler 1998-05-17 23:05:16 +00:00
parent a15417e7cf
commit 333c76c66d
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=36137

View File

@ -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