[Exim] 3.x -> 4.x conversion problem.

Page principale
Supprimer ce message
Répondre à ce message
Auteur: Jan Johansson
Date:  
À: exim-users
Sujet: [Exim] 3.x -> 4.x conversion problem.
...well i THOUGHT all was running along nicely, but one rewrite rule illudes me.

Old version:

in /etc/exim/routing/routes i have (among others)

j2@???:j2@???:animal_mupp_net
dans@???:dans@???:lists_mupp_net
dans-admin@???:dans-admin@???:lists_mupp.net
dans-request@???:dans-request@???:lists_mupp_net
dans-owner@???:dans-owner@???:lists_mupp_net
owner-dans@???:dans-admin@???:lists_mupp_net


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 = ${extract{2}{:}{${lookup{$local_part@$domain}lsearch{/etc/exim/routing/routes}{$value}fail}}}
#       transport = virtual_smtp



lists_mupp_net:
        driver = smtp
        hosts = lists.mupp.net


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


And all of the above works. (but a bit messy, agreed)


New version has become.

virtuals:
driver = redirect
condition = ${extract{1}{:}{${lookup{$local_part@$domain}lsearch{/etc/exim/routing/routes}{true}fail}}}
data = ${extract{1}{:}{${lookup{$local_part@$domain}lsearch{/etc/exim/routing/routes}{$value}fail}}}
redirect_router = virtuals_part2
retry_use_local_part

#!!# This router is invented to go with the previous one because
#!!# in Exim 4 you can't have a change of address and a transport
#!!# setting in the same router as you could in Exim 3.

virtuals_part2:
  driver = accept
  condition = ${if eq{$local_part@$domain}{${extract{1}{:}{${lookup{$local_part@$domain}lsearch{/etc/exim/routing/routes}
{$value}fail}}}}{yes}{no}}
  transport = ${extract{2}{:}{${lookup{$local_part@$domain}lsearch{/etc/exim/routing/routes}{$value}fail}}}
#       transport = virtual_smtp



and that gives (when running, -bt)

> j2

j2@???
    <-- j2@???
  router = virtuals_part2, transport = animal_mupp_net

> dans@???

dans@??? is undeliverable:
Unrouteable address
> dans

dans@??? is undeliverable:
Unrouteable address

Regards /Med vänlig hälsning
Jan Johansson