Re: [exim] Equivalent to transport_maps from Postfix in Exim

Góra strony
Delete this message
Reply to this message
Autor: John Burnham
Data:  
Dla: exim-users@exim.org
Temat: Re: [exim] Equivalent to transport_maps from Postfix in Exim
>
> I've been using Postfix for many years and I've recently migrated some of
> my servers to Exim.
> In Postfix I've been using transport_maps to specify where a specific
> domain or email-address should go.
>
> In some cases I have a couple of users that are not on the same server as
> the rest of the domain. So I've done something like this:
>
> domain.com                 smtp:[mail.domain.com]
> user1@???      smtp:[other.server.domain.com]

>
>
> How would I achieve this in Exim?
> I haven't done any actual configuration on this Exim-server myself so I
> don't really know where to look.
>
>


You mean you want to pass the mail on to another SMTP server ? In that case, what you're probably looking for is the manualroute router. It is documented at

http://www.exim.org/exim-html-current/doc/html/spec_html/ch-the_manualroute_router.html

which has some reasonable examples.

For your above example you could have something like:

test_route:
driver = manualroute
domains = domain.com
local_parts = !user1
transport = remote_smtp
route_list = domain.com mail.domain.com

test_route2:
driver = manualroute
domains = domain.com
local_parts = user1
transport = remote_smtp
route_list = domain.com other.server.domain.com

in your routers. Remember that routers are traversed in the order they're encountered in your config file.

You can, of course, use lookups or files to make it more general. (local_parts = dbm; /etc/exim/$domain/list.of.local.parts). Some of this is clarified in

http://www.exim.org/exim-html-current/doc/html/spec_html/ch-generic_options_for_routers.html

Have a look at the docs and if you want any clarification, please ask.

John