divert(-1) # # Copyright (c) 2003, 2004 Victor Ustugov # This hack is under BSD License # Redistributions of source code must retain the above copyright notice # # hacks disscussion's maillist - http://www.mta.org.ua/mailman/listinfo/sendmail-conf # # # Precheck envelope fields # # предшествует первой проверке адресов конверта (MAIL FROM, RCPT TO) # divert(0) ifdef(`_CHECK_ENVELOPE_INIT_', `dnl', `dnl VERSIONID(`$Id: precheck_envelope.m4,v 8.12-0.08 2004/11/03 20:31:25 corvax Exp $')dnl divert(-1) dnl dnl LOCAL_CONFIG dnl dnl define(`_CHECK_ENVELOPE_INIT_')dnl dnl HACK(`is_outgoing')dnl dnl dnl LOCAL_RULESETS dnl dnl SLocal_check_mail dnl # parse MAIL FROM address dnl R $* $: $(macro {mail_from} $@ $1 $) $1 R $* $: $>Parse0 $>3 $1 dnl ifdef(`_DELAY_CHECKS_',` R $* $: $1 $| [ $&{client_addr} ] R $* $| [$-.$-.$-.$-] $: $1 $| $(dns_ptr $5.$4.$3.$2.IN-ADDR.ARPA. $: FAIL $) R $* $| $+ $: $1 $| [ $&{client_addr} ] R $* $| FAIL $: $1 $| [ $&{client_addr} ] R $* $| $* . $: $1 $| $2 R $* $| $* $: $1 $(macro {client_ptr} $@ $2 $) ') dnl R $* $: $1 $| $&{IsOutgoing} R $* $| $: $1 $| $>SetIsOutgoing R $* $| $* $: $1 dnl SLocal_check_rcpt dnl # parse RCPT TO address dnl R $* $: $1 $(macro {rcpt_to} $@ $1 $) R $* $: $1 $| $&{recipients} R $* $| $: $1 $(macro {recipients} $@ $1 $) R $* $| $* $: $1 $(macro {recipients} $@ $2, $1 $) R $* $: $>Parse0 $>3 $1 dnl ifdef(`_DELAY_CHECKS_',` R $* $: $1 $| [ $&{client_addr} ] R $* $| [$-.$-.$-.$-] $: $1 $| $(dns_ptr $5.$4.$3.$2.IN-ADDR.ARPA. $: FAIL $) R $* $| $+ $: $1 $| [ $&{client_addr} ] R $* $| FAIL $: $1 $| [ $&{client_addr} ] R $* $| $* . $: $1 $| $2 R $* $| $* $: $1 $(macro {client_ptr} $@ $2 $) dnl R $* $: $1 $| $>SetIsOutgoing R $* $| $* $: $1 ') dnl SLocal_check_relay dnl ifdef(`_DELAY_CHECKS_', `', ` R $* $| $* $: $1 $| $2 $| [ $1 ] R $* $| $* $| [$-.$-.$-.$-] $: $1 $| $2 $| $(dns_ptr $6.$5.$4.$3.IN-ADDR.ARPA. $: FAIL $) R $* $| $* $| $+ $: $1 $| $2 $| [ $1 ] R $* $| $* $| FAIL $: $1 $| $2 $| [ $1 ] R $* $| $* $| $* . $: $1 $| $2 $| $3 R $* $| $* $| $* $: $1 $| $2 $(macro {client_ptr} $@ $3 $) dnl R $* $: $1 $>SetIsOutgoing R $* $* $: $1 ') ')