diff -urN sendmail-8.9.3/cf/feature/domainmap.m4 sendmail-8.9.3-domainmap/cf/feature/domainmap.m4 --- sendmail-8.9.3/cf/feature/domainmap.m4 Wed Dec 31 18:00:00 1969 +++ sendmail-8.9.3-domainmap/cf/feature/domainmap.m4 Tue Sep 14 10:45:08 1999 @@ -0,0 +1,34 @@ +ifdef(`_DOMAIN_MAP_',`',`dnl +LOCAL_RULE_0 +# do mapping for domains where applicable +R$* $=O $* <@ $=D .> $@ $>97 $1 $2 $3 Strip extraneous routing +R$+ <@ $=D .> $>DomainMapLookup $1 <@ $2 .> domain mapping + +LOCAL_RULESETS +########################################################################### +### Ruleset DomainMapLookup -- special rewriting for mapped domains ### +########################################################################### + +SDomainMapLookup +R $=L <@ $=w .> $@ $1 <@ $2 .> weed out local users, in case +# Cw contains a mapped domain +R $+ <@ $+ .> $1 <@ $2 > strip trailing dot +R $+ <@ $+ . $+ > $1 <@ $(dequote $2 "_" $3 $) > +# change "." to "_" +R $+ <@ $+ > $: $1 <@ $(dequote "domain_" $2 $) > +# prepend "domain_" +R $+ + $+ <@ $*> $1 <@ $3 > <+> $2 handle user+list syntax +R $+ <@ $* > $* $( $2 $1 $: $) $3 +# do actual domain map lookup +R $* $#error $@ 5.1.1 $: "550 email address lookup in domain map failed" +R $* $* $#error $@ 4.3.0 $: "450 domain map temporarily unavailable" +R $+ @ $+ <+> $+ $1 + $3 @ $2 reset original user+list +R $+ <+> $* $1 paranoid check - remove <+> +R $+ @ $+ . $1 @ $2 strip trailing dot +R $+ @ $+ $@ $>97 $1 @ $2 recanonify +define(`_DOMAIN_MAP_',`1')') + +LOCAL_CONFIG +CD _ARG_ +K `domain_'translit(_ARG_, `.', `_') _ARG2_ -T + diff -urN sendmail-8.9.3/cf/m4/cfhead.m4 sendmail-8.9.3-domainmap/cf/m4/cfhead.m4 --- sendmail-8.9.3/cf/m4/cfhead.m4 Tue Dec 29 11:42:08 1998 +++ sendmail-8.9.3-domainmap/cf/m4/cfhead.m4 Tue Sep 14 10:36:43 1999 @@ -44,7 +44,7 @@ `ifdef(`_MAILER_$1_', `dnl`'', `define(`_MAILER_$1_', `')PUSHDIVERT(7)include(_CF_DIR_`'mailer/$1.m4)POPDIVERT`'')') define(`DOMAIN', `PUSHDIVERT(-1)define(`_ARG_', $2)include(_CF_DIR_`'domain/$1.m4)POPDIVERT`'') -define(`FEATURE', `PUSHDIVERT(-1)define(`_ARG_', $2)include(_CF_DIR_`'feature/$1.m4)POPDIVERT`'') +define(`FEATURE', `PUSHDIVERT(-1)define(`_ARG_', $2)define(`_ARG2_', $3)include(_CF_DIR_`'feature/$1.m4)POPDIVERT`'') define(`HACK', `PUSHDIVERT(-1)define(`_ARG_', $2)include(_CF_DIR_`'hack/$1.m4)POPDIVERT`'') define(`VERSIONID', ``##### $1 #####'') define(`LOCAL_RULE_0', `divert(3)')