Re: [exim] Different MySQL connections for different jobs

Αρχική Σελίδα
Delete this message
Reply to this message
Συντάκτης: Philip Hazel
Ημερομηνία:  
Προς: Mike Cardwell
Υ/ο: exim-users
Αντικείμενο: Re: [exim] Different MySQL connections for different jobs
On Tue, 5 Sep 2006, Mike Cardwell wrote:

> I nice solution would be for you to be able to do:
>
> hide mysql_servers = named_database1=localhost/dbname1/dbuser1/dbpass1: \
>                      named_database2=otherhost/dbname2/dbuser2/dbpass2

>
> And then name your database in the lookup:
>
> ${lookup mysql{named_database1}{THE QUERY}{$value}}


In MySQL, you can name the database in the query, but you can't name the
server. Doing something like what you have suggested is actually quite
complicated because it would impinge on the query caching. More and more
I feel that the best solution for Exim is to have some kind of SQL proxy
daemon that takes the complexity out of Exim itself.



-- 
Philip Hazel            University of Cambridge Computing Service
Get the Exim 4 book:    http://www.uit.co.uk/exim-book