On Fri, 14 Sep 2001, Ollie Cook wrote:
> VISP_DOMAINS_WILD = *.visp1.com:*.visp2.com:...:*.vispN.com
> REWRITE_DOMAIN = primaryvisp.com
> REGEXP = (visp1.com|visp2.com|...|vispN.com)
>
> And then a hacked-up A0434 director:
>
> visp_wild:
> driver = smartuser
> domains = VISP_DOMAINS_WILD
> new_address = ${if match{$domain}{^(.+)\\.REGEXP}{$1@REWRITE_DOMAIN}fail}
>
> It's a perfectly workable solution as long as VISP_DOMAINS_WILD
> and REGEXP are kept in-sync, but if anyone can think of an easy
> way to only have to maintain one macro I'd love to hear it!
Why not make VISP_DOMAINS_WILD a regex? Possibly even the same regex?
Actually, you don't need the domains setting. If the expansion of
smart_user is forced to fail, the director just declines.
--
Philip Hazel University of Cambridge Computing Service,
ph10@??? Cambridge, England. Phone: +44 1223 334714.