RE: [exim] Exim 3.36, mySQL and route_list

Kezdőlap
Üzenet törlése
Válasz az üzenetre
Szerző: Rob Stead
Dátum:  
Címzett: exim-users
Tárgy: RE: [exim] Exim 3.36, mySQL and route_list

Thank you for your suggestions Adrian,

I should have said in my email I'm trying to setup a router and 'query =
select route from ...' only appears to work in the director section. My
lack of knowledge sadly doesn't allow me (yet) to understand the
relationship between these two.

Using my SQL Query or MYSQL_SMARTHOST in the route_list gives me the
following error:

    smarthost_tg router: failed to expand "${lookup": missing lookup type


I thought it would be simply a case of replacing a file lookup with a mySQL
lookup but I'm obviously missing something.

Here is the original file lookup:

route_list = "* ${extract{smart_host}{${lookup{$domain}lsearch \
      {/etc/exim/smtp_users}{$value}fail}}} bydns_a"


And this is what I have for mySQL:

smarthost_tg:
condition = ${lookup mysql{MYSQL_RELAY_DOMAINS}{$value}fail}
driver = domainlist
transport = remote_smtp
route_list = "* ${lookup mysql {MYSQL_SMARTHOST}{$value}fail} bydns_a"

Further thoughts would be appreciated.

Rob

---------------------------------------------------------------
Rob Stead


-----Original Message-----
From: exim-users-bounces@??? [mailto:exim-users-bounces@exim.org] On
Behalf Of Adrian Zaugg
Sent: 05 February 2005 21:39
To: exim-users@???
Subject: Re: [exim] Exim 3.36, mySQL and route_list

Hi Rob

Rob Stead wrote:

>    route_list = * ${lookup mysql {MYSQL_SMARTHOST}{$value}fail} 
> bydns_a

>
> MYSQL_SMARTHOST represents a SQL statement that returns the smarthost
> for the domain in question.

Does it work, when you do not use MYSQL_SMARTHOST and fill in your actual
SQL Query code?

...or you can try a structure like:

sql_routes:
driver = domainlist
transport = remote_smtp
search_type = mysql
query = select route from ...

The query should return a host list and routing options like the arguments
of route_list are. For details, please see the exim-doc:
http://ente.limmat.ch/doc/exim/manual.html/spec_28.html#IDX1591
...I personally do not use sql with exim and thus do not know how to do it
exactly.

Regards, Adrian.

--
## List details at http://www.exim.org/mailman/listinfo/exim-users Exim
details at http://www.exim.org/ ##