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 # # divert(0) VERSIONID(`$Id: cfhead.m4,v 8.13-0.01 2004/08/03 09:35:30 corvax Exp $')dnl divert(-1) dnl dnl LOCAL_CONFIG dnl dnl define(`_FEEDBACK_MSG_', `ifelse(len(X`'_ARG_),`1',`" - If you have any questions please email postmaster@$j"', " - "`'_ARG_)')dnl dnl D{Feedback_Msg}`'_FEEDBACK_MSG_ dnl define(`ifelse_strstr',`define(`_STR_INDEX_',`index(`$1',`$2')')`'define(`_IS_SET_',`eval(_STR_INDEX_ >= 0)')`'ifelse(_IS_SET_,`1',`$3',`$4')') define(`repeat_str',`ifelse($3,`1',$1$2,`repeat_str($1$2,$2,eval($3-1))')') Klog syslog Kmacro macro Karith arith # map for DNS based lookups Kdns_a dns -R A -a. -T -r`'ifdef(`EDNSBL_TO',`EDNSBL_TO',`5') Kdns_ptr dns -R PTR -a. -T -r`'ifdef(`EDNSBL_TO',`EDNSBL_TO',`5') Kdns_txt dns -R TXT -a. -T -r`'ifdef(`EDNSBL_TO',`EDNSBL_TO',`5') Kmxserved_best bestmx -T Kmxserved bestmx -z: -T # Kdulpat01 regex -a@MATCH ^(.+\.)*(.*dsl|dial-*(up|in)|ppp|ts|[dhc])-*[0-9A-Fa-f-]+[.-] # Kdulpat01 regex -a@MATCH ^(.*cable|host|ip|dyn-*ip|cpe|modem|pool|cable|dhcp|.*dsl|dial-*(up|in)|ppp|pppoe|d|user)-*[0-9A-Fa-f-]+[\.-] Kdulpat01 regex -a@MATCH ^(.+\.)*(.*dsl|pool-|dial-*(up|in)|ppp)-*[0-9A-Fa-f-]+[.-] Kdulpat02 regex -a@MATCH ^(.+\.)*(dsl|dhcp|cable|dslam|user|client|pool|subnet|network)(\.|-|[0-9]|_) #Kdulpat02 regex -a@MATCH (dial|dialup|dsl|dhcp|dyn|ip|ipt|ppp|cable|dslam|user|client|pool|subnet|network)(\.|-|[0-9]|_) Kdulpat sequence dulpat01 dulpat02 LOCAL_RULESETS ###################################################################### ### ### use Translate rule for checking relays and check_compat: ### Translate,checkrelay zuka.ru.ru $| 1.2.3.4 ### Translate,check_compat sender@address.tld $| recipient@address.tld ### ###################################################################### STranslate R $* $$| $* $: $1 $| $2 dnl ###################################################################### ### AdvD: AdvLookUpDomain -- 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) ### <$5> -- found key (domain name) ###################################################################### SAdvD R<$*> <$+> <$- $-> <$*> $: < $(access $4:$1 $: ? $) > <$1> <$2> <$3 $4> <$5> R <$+> <$+> <+ $-> <$*> $: < $(access $1 $: ? $) > <$1> <$2> <+ $3> <$4> R <[$+.$-]> <$+> <$- $-> <$*> $@ $>AdvD <[$1]> <$3> <$4 $5> <$6> R <[$+::$-]> <$+> <$- $-> <$*> $: $>AdvD <[$1]> <$3> <$4 $5> <$6> R <[$+:$-]> <$+> <$- $-> <$*> $: $>AdvD <[$1]> <$3> <$4 $5> <$6> R <$+.$+> <$+> <$- $-> <$*> $@ $>AdvD <$2> <$3> <$4 $5> <$6> R <$+> <$+> <$- $-> <$*> $@ <$2> <$5> <$1> R<$* > <$+> <$+> <$- $-> <$*> $@ <> <$6> <$2> R<$*> <$+> <$+> <$- $-> <$*> $@ <$1> <$6> <$2>