Re: [Exim] routing certain users to another smtp-relay

Top Page
Delete this message
Reply to this message
Author: Andreas Metzler
Date:  
To: exim-users@exim.org
Subject: Re: [Exim] routing certain users to another smtp-relay
On Wed, Oct 22, 2003 at 07:33:49PM +0200, Thomas Baumann wrote:
> how can I route from a lsearch to different relays ?
>
> special_router:
>   driver = manualroute
>   domains = mydom.com
>   transport = remote_smtp
>   route_list = * "${if or {\
>                           {eq {$local_part@$domain}{user1@???}}\
>                           {eq {$local_part@$domain}{user2@???}}\
>                           }\
>                           {relay1.mydom.com}{other.mydom.com}}"

>
> I know with this all mail to user1@??? or user2@???
> gets routed through relay1.mydom.com and any other match gets
> routed through other.mydom.com.
>
> But I'd like a lsearch-file better in the form
> user1@???:        relay1.mydom.com

[...]

route_list = * "${lookup{$local_part@$domain}lsearch*{/some/file}}"
or
route_data = ${lookup{$local_part@$domain}lsearch*{/some/file}}

The latter is copied almost verbatim from spec.txt

*:  other.mydom.com
sets the default-entry.
                 cu andreas