[Exim] new_address / old_address

Página Inicial
Delete this message
Reply to this message
Autor: Jan Johansson
Data:  
Para: exim-users
Assunto: [Exim] new_address / old_address
Ponder the following

/etc/exim/routing/routes has in it:
workingtest@???:test@???:smtp.mupp.net
failingtest@???:test2@???:smtp.mupp.net


Director:

virtuals:
        condition =
${extract{1}{:}{${lookup{$local_part@$domain}lsearch{/etc/exim/routing/routes}{true}fail}}}
        driver = smartuser
        new_address =
${extract{1}{:}{${lookup{$local_part@$domain}lsearch{/etc/exim/routing/routes}{$value}fail}}}
        transport = virtual_smtp




Transports:

virtual_smtp:
        driver = smtp
        hosts =
${extract{2}{:}{${lookup{$local_part@$domain}lsearch{/etc/exim/routing/routes}{$value}fail}}}


The first case works as expexted. The second doesnt, because when it gets
to the transports section, a new lookup is performed, and the "new
address" doesnt match anything in the database. Now, i have bypassed this
by adding "test2@???:test2@???:smtp.mupp.net"
to my "routes" file. But that seems a bit awkward. Can i solve this
somehow so that the "original" $localpart@$domain is available when the
message hits the transport? Or is this a "exim4" case? Or should i just
have stayed with having a transport defined for each destination host, and
just looking up the name of the transport in the "routes" file?