Re: [exim] manualroute sql route_list

Top Page
Delete this message
Reply to this message
Author: Magnus Holmgren
Date:  
To: exim-users
Subject: Re: [exim] manualroute sql route_list
On Wednesday 02 May 2007 15:11, Customer Support wrote:
> smart_route:
> driver = manualroute
> domains = !+local_domains
> transport = remote_smtp
> route_list = * "${lookup mysql{SELECT target FROM exim_smarthost
> WHERE (domain='$domain')}}"
>
> According to the documentation the destination of a route list can
> include a server and port.
> I've tried setting target to
> domain.com:2525
> and bearind in mind exim uses : to split host names, I've tried
> domain.com::2525 as described in another document.
>
> Anyone got any ideas as to how I can specify a target host and port
> for the forwarding?


First off, you should use route_data instead of route_list. Doubling the colon
should work (what happens?), but to avoid it you can set the list separator
to a character that never appears in a smarthost specification:

   route_data = </${lookup mysql{SELECT target FROM exim_smarthost \
                                WHERE (domain='$domain')}}


If the SELECT can return multiple records you have to transform the result
using the sg expansion item.

-- 
Magnus Holmgren        holmgren@???
                       (No Cc of list mail needed, thanks)


"Exim is better at being younger, whereas sendmail is better for
Scrabble (50 point bonus for clearing your rack)" -- Dave Evans