Re: [exim] rewrite condition

Etusivu
Poista viesti
Vastaa
Lähettäjä: typus vulgaris
Päiväys:  
Vastaanottaja: exim-users
Aihe: Re: [exim] rewrite condition
Thanks Philip!

This is temporary rewrite for test purposes only. I've solved this
problem by changing rewrite condition:

*@first.dom      "${if match {$header_To:}{@second.dom} \
                          {$local_part@???}fail}" Ff


I have found answer at
http://www.exim.org/eximwiki/FAQ/Rewriting_addresses/Q0807?highlight=%28rewrite%29

WBR,
typus vulgaris

On 9/5/05, Philip Hazel <ph10@???> wrote:
> On Mon, 5 Sep 2005, typus vulgaris wrote:
>
> > Hi All.
> >
> > I have task with address rewriting.
> >
> > I have to rewrite address *@first.dom to address *@second.dom but only
> > in case if the message sent to third.dom.
> >
> > I suppose that it has to de rule like this:
> >
> > *@first.dom      "${if eq {$domain}{third.dom} \
> >                           {$local_part@???}fail}" Ff

> >
> > But it doesn't work :-(
> >
> > Where is my mistake?
>
> 1. In a rewrite rule, $domain will have the value "first.dom", the
>    domain that is being rewritten.

>
> 2. A message may have more than one recipient. What do you want to do in
>    that case? If you want to rewrite on the copy that goes to third.com,
>    you will have to put the rewriting on the transport, not as a general
>    rewrite.

>
>
>
> --
> Philip Hazel            University of Cambridge Computing Service,
> ph10@???      Cambridge, England. Phone: +44 1223 334714.
> Get the Exim 4 book:    http://www.uit.co.uk/exim-book

>