Autor: Ralf G. R. Bergs Datum: To: Kjetil Torgrim Homme CC: Exim users list Betreff: Re: [Exim] How to conditionally rewrite envelope addresses?
Kjetil Torgrim Homme wrote: > On Wed, 2004-08-04 at 14:41 +0200, Ralf G. R. Bergs wrote:
>
>>I'm running Exim 4.30 on the systems in question and have to implement
>>the following:
>>
>>I need to conditionally rewrite envelope sender domains, i.e.
>>
>> if recipient_domain == A then sender_domain = X
>> if recipient_domain == B then sender_domain = Y
>>
>>Is there a more elegant, simpler way than running additional Exim
>>instances (that I pass messages to by means of routers that evaluate the
>>conditions in question) and that have (unconditional) "rewrite" sections
>>performing the above changes?
>
>
> you can check whatever you like in the string expansion, I don't see the
> problem? e.g., we do first one LDAP lookup to see if the domain is
> actually a local hostname, then we do a lookup to find the official
> address of the user.
I simply overlooked the fact that I can use conditional string
expansions. In the meantime I had found the solution in Phil's book for
the old Exim3 release. :-)