divert(-1) # # Check Received field format # # никаких копирайтов! # dnl divert(0) dnl VERSIONID(`$Id: check-received.m4,v 8.12 2002/12/22 19:10:00 corvax Exp $') dnl divert(-1) dnl ifdef(`_RECEIVED_PARSED_',,`HACK(`precheck-received')') dnl divert(0) dnl dnl LOCAL_RULESETS dnl dnl SCheckReceived dnl R $- $+ ( $* [$*]) $* $: $>CheckReceivedPart <$2> <$1 $2 ( $3 [$4]) $5> R $- $+ by $* $: $>CheckReceivedPart <$2> <$1 $2 by $3> R $- $+ ( $* [$*]) $* $: $>CheckReceivedPart <$2> <$1 $2 ( $3 [$4]) $5> <+From> R $- $* ( $+ @ $+ [$*]) $* $: $>CheckReceivedPart <$4> <$1 $2 ( $3 @ $4 [$5]) $6> <+From> R $- $* ( $+ [$*]) $* $: $>CheckReceivedPart <$3> <$1 $2 ( $3 [$4]) $5> <+From> R $- $* ( $* [$+]) $* $: $>CheckReceivedPart <$4> <$1 $2 ( $3 [$4]) $5> <+From> ###################################################################### ### CheckReceivedPart -- check one part of Received header filed ### ### Parameters: ### <$1> -- key ### <$2> -- passthru (additional data passed unchanged through) ### <$3> -- mark (must be <(!|+) single-token>) ### ! does lookup only with tag ### + does lookup with and without tag ###################################################################### dnl SCheckReceivedPart dnl R <$+> <$+> <$+> $: $>LookUpDomain <$1> <$2> <$3> R <$*> $: @ $1 mark token as no match R <$={Accept}> <$*> $: @ $2 mark token as no match R $* $#error $@ 5.7.1 $: "554 Access denied" R $* $#discard $: discard R $* $#error $@ $1.$2.$3 $: $4 R $* $#error $: $1 R <$+> $* $#error $: $1 error from access db R @ $* $@ $1 remove mark