SQL hostlist against a different server

View: New views
2 Messages — Rating Filter:   Alert me  

SQL hostlist against a different server

by Ian P. Christian :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hi all,

I've noticed since 4.68 , I can use different SQL servers for
read/write, or define different servers on a per-query basis, as
coveredin the manual in 9.21/9.22 [1]

However.. I can't see how I'd query a certain server for a hostlist.
For example, how would the below be modified?

hostlist blacklist_hosts     = mysql;Q_BLACKLIST_HOSTS


Thanks!

[1]  http://www.exim.org/exim-html-current/doc/html/spec_html/ch09.html#SECTsql
--
Blog: http://pookey.co.uk/blog
Follow me on twitter: http://twitter.com/ipchristian

--
## List details at http://lists.exim.org/mailman/listinfo/exim-users 
## Exim details at http://www.exim.org/
## Please use the Wiki with this list - http://wiki.exim.org/

Re: SQL hostlist against a different server

by wagonza :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

2009/7/16 Ian P. Christian <pookey@...>

> Hi all,
>
> I've noticed since 4.68 , I can use different SQL servers for
> read/write, or define different servers on a per-query basis, as
> coveredin the manual in 9.21/9.22 [1]
>
> However.. I can't see how I'd query a certain server for a hostlist.
> For example, how would the below be modified?
>
> hostlist blacklist_hosts     = mysql;Q_BLACKLIST_HOSTS
>


Like so:

hostlist blacklist_hosts = ${lookup
mysql{servers=OTHER_MYSQL_SERVER/db/username/password;Q_BLACKLIST_HOSTS}}

OTHER_MYSQL_SERVER can be defined previously for example:

OTHER_MYSQL_SERVER = 10.0.0.10/database/username/password

so you can simply use:

hostlist blacklist_hosts = ${lookup
mysql{servers=OTHER_MYSQL_SERVER;Q_BLACKLIST_HOSTS}}

hope that answers your question.

.warren
--
## List details at http://lists.exim.org/mailman/listinfo/exim-users 
## Exim details at http://www.exim.org/
## Please use the Wiki with this list - http://wiki.exim.org/