divert(-1) # # Precheck envelope fields # # предшествует первой проверке адресов конверта (MAIL FROM, RCPT TO) # # никаких копирайтов! # dnl divert(0) dnl VERSIONID(`$Id: precheck-envelope.m4,v 8.12 2002/12/23 11:27:48 corvax Exp $') dnl divert(-1) define(`_CHECK_ENVELOPE_INIT_')dnl divert(0) dnl dnl LOCAL_CONFIG dnl dnl Kstorage_relay macro dnl dnl LOCAL_RULESETS dnl dnl SLocal_check_mail dnl R $* $: $>Parse0 $>3 $1 dnl dnl SLocal_check_rcpt dnl R $* $: $>Parse0 $>3 $1 dnl # # use Translate rule for checking relays and check_compat: # Translate,checkrelay zuka.ru.ru $| 1.2.3.4 # Translate,check_compat sender-address $| recipient-address # STranslate R $* $$| $* $: $1 $| $2 SIsOutgoing R $-.$-.$-.$- $: $1.$2.$3.$4 R $=R $* $@ $1 R $-.$-.$-.$- $: [ $1.$2.$3.$4 ] R $=w $: $1 R <$+> [ $+ ] $: <$1> $2 R $+ $@ $1 ifdef(`confDONT_CHECK_OUTGOING_IN_ACCESS_DB',,` R $-.$-.$-.$- $: < $(access Connect:$1.$2.$3.$4 $: ? $) > $1.$2.$3.$4 R $-.$-.$-.$- $: < $(access $1.$2.$3.$4 $: ? $) > $1.$2.$3.$4 R $-.$-.$-.$- $: < $(access Connect:$1.$2.$3. $: ? $) > $1.$2.$3.$4 R $-.$-.$-.$- $: < $(access $1.$2.$3. $: ? $) > $1.$2.$3.$4 R $-.$-.$-.$- $: < $(access Connect:$1.$2.$3.0/24 $: ? $) > $1.$2.$3.$4 R $-.$-.$-.$- $: < $(access $1.$2.$3.0/24 $: ? $) > $1.$2.$3.$4 R $* $@ $1 R <$*> $* $@ $2 ') SLocal_check_relay R $* $: $1 $>SetIsOutgoing R $* $* $: $1 SSetIsOutgoing R $* $: $(storage_relay {IsOutgoing} $@ NO $) $1 R $* $: $1 $>IsOutgoing $&{client_addr} R $* $* $: $(storage_relay {IsOutgoing} $@ YES $) $1 R $* $* $: $1