Re: [Exim] Rewriting

Páxina inicial
Borrar esta mensaxe
Responder a esta mensaxe
Autor: Ollie Cook
Data:  
Para: ph10
CC: exim-users
Asunto: Re: [Exim] Rewriting
On Fri, Sep 14, 2001 at 05:00:25PM +0100, Ollie Cook wrote:
> Thank you Philip. I've just realised I asked an FAQ (Q0434: How can I arrange
> that mail addressed to anything@??? gets delivered to
> something@????) :/


Having said that, I think it's non-trivial to apply A0434 to multiple
domains. (I'm willing to be proven wrong though!)

At the moment I've come up with:

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}


(headers_add doesn't seem to be necessary if envelope_to_add is set
on the transport that eventually delivers to message)

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!

Cheers,

Ollie

-- 
Oliver Cook    Systems Administrator, ClaraNET
ollie@???               020 7903 3065