Re: [Exim] Rewriting

Kezdőlap
Üzenet törlése
Válasz az üzenetre
Szerző: Philip Hazel
Dátum:  
Címzett: Ollie Cook
CC: exim-users
Tárgy: Re: [Exim] Rewriting
On Fri, 14 Sep 2001, Ollie Cook wrote:

> What I would prefer to do is to use rewriting so that:
>
>    userN@???        remains    userN@???
>     name@???    -->         userN@???

>
> Then I could have one director, which could just use usernames.cdb
> to check local_parts, and have 'domains = VISPS' where VISPS is a
> macro.
>
> However - I can't find a way to retain the 'name' part of
> the original address, which the customers would require for
> filtering their mail, by using any of the rewriting flags.


Rewriting is not the way to do this. At least, not using global
rewriting rules.

You are trying to solve a routing problem using rewriting. What you need
is a director along these lines:

xxxx:
driver = smartuser
domains = *.vispN.com
new_address = a suitable rewriting expansion
headers_add = X-local-part-was: a suitable expansion

I *think* this will work, because headers_add is expanded at directing
time. But I haven't tested it.


-- 
Philip Hazel            University of Cambridge Computing Service,
ph10@???      Cambridge, England. Phone: +44 1223 334714.