divert(-1) # # Check the pair of addresses (sender and recipient) # # модифицировано для использования REJECT и принудительного выполнения check_compat из Local_check_rcpt # dnl divert(0) VERSIONID(`$Id: compat_check.m4,v 8.11-0.02 2003/05/11 16:55:04 corvax Exp $')dnl divert(-1) dnl ifdef(`_CHECK_ENVELOPE_INIT_',,`HACK(`precheck-envelope')') dnl ifdef(`_ACCESS_TABLE_', `', ` errprint(HACK(`check_compat') requires FEATURE(`access_db') ')') dnl dnl LOCAL_RULESETS dnl dnl Scheck_compat dnl SLocal_check_compat dnl R < $* > $| $+ $: $1 $| $2 R $* $| < $+ > $: $1 $| $2 dnl R $* $| $+ $: $1 $| $2 dnl R $*.${KAV} $| $+ $: $1 $| $2 dnl R $* $| $+ $: <$(access Compat:$1<@>$2 $: ? $)> $1 $| $2 R $+@$+ $| $+ $: <$(access Compat:@$2<@>$3 $: ? $)> $1@$2 $| $3 #R $+@$+ $| $+ $: <$(access Compat:$2<@>$3 $: ? $)> $1@$2 $| $3 R $+@$+ $| $+ $: $>LookUpDomainCompat < $2<@>$3 > < ? > < $1@$2 $| $3 > R < $+ $| $+ > $: $1 $| $2 R $+@$+ $| $+ $: <$(access Compat:$1@<@>$3 $: ? $)> $1@$2 $| $3 R $+ $| $+ $: $1 $| $2 dnl R < REJECT:$* > $* $| $* $#error $: $1 R < REJECT > $* $| $* $#error $: " rejected by Local_check_compat" R < REJECT $* > $* $| $* $#error $: $1 R < DISCARD:$* > $* $| $* $#discard $: $1 R < DISCARD > $* $| $* $#discard $: " discarded by Local_check_compat" R < DISCARD $* > $* $| $* $#discard $: $1 R < TEMP:$* > $* $| $* $#error $@ TEMPFAIL $: $1 " error from Local_check_compat. Try again later" R < ERROR:$* > $* $| $* $#error $@ UNAVAILABLE $: $1 " error from Local_check_compat" dnl SLocal_check_rcpt dnl R $* < @ $+ . > $* $: $1 < @ $2 > $3 dnl R $* < @ $+ > $* $: $1 < @ $2 > $3 $| $>Local_check_compat $&{mail_addr} $| $1@$2 R $* $| $#$* $#$2 dnl R $* $| $* $: $1 $| $>Local_check_compat $&{mail_addr} $| $&{rcpt_addr} R $* $| $#$* $#$2 dnl R $* < @ $+ > $* $| $* $: $1 < @ $2 > $3 $| $>check_compat $&{mail_addr} $| $1@$2 R $* $| $#$* $#$2 dnl R $* $| $* $: $1 dnl ###################################################################### ### LookUpDomainCompat: search for domain in access database ### ### Parameters: ### <$1> -- key (domain name) ### <$2> -- default (what to return if not found in db) ### <$3> -- mark (must be <(!|+) single-token>) ### ! does lookup only with tag ### + does lookup with and without tag ### <$4> -- passthru (additional data passed unchanged through) ###################################################################### SLookUpDomainCompat R<$*<@>$*> <$+> <$- $-> <$*> $: < $(access $5:$1<@>$2 $: ? $) > <$1<@>$2> <$3> <$4 $5> <$6> R <$+<@>$*> <$+> <+ $-> <$*> $: < $(access $1<@>$2 $: ? $) > <$1<@>$2> <$3> <+ $4> <$5> R <$+.$+<@>$*> <$+> <$- $-> <$*> $@ $>LookUpDomainCompat <$2<@>$3> <$4> <$5 $6> <$7> R <$+<@>$*> <$+> <$- $-> <$*> $@ <$3> <$6> R<$* > <$+<@>$*> <$+> <$- $-> <$*> $@ <> <$7> R<$*> <$+<@>$*> <$+> <$- $-> <$*> $@ <$1> <$7>