Re: [exim] MySQL failover option?

Top Pagina
Delete this message
Reply to this message
Auteur: Peter Bowyer
Datum:  
Aan: Exim Users Mailing List
Onderwerp: Re: [exim] MySQL failover option?
On 17/05/05, Mike Grice <mgrice@???> wrote:
> Hi there,
>
> I'm not sure if what I want to do is already available, so this may be a
> query or a feature request, depending on the outcome! :)
>
> We are currently using a MySQL database for delivery instructions. The
> problem we have here is that if the MySQL database fails for any reason,
> a mail server will then lose delivery instructions (and start to bounce
> mail). I am aware the 'mysql_servers = ' option is a list, but from
> what I can see in the .spec, these are tried in order until a query
> succeeds.
>
> The way I interpret this is:
>
> Mail comes in, query is done on server1.
> Server1 says "nothing found"
> Query retries on server2.


For the correct definition of 'nothing found', yes. The first server
will be used provided that Exim can connect successfully and the query
doesn't return an error (like - database doesn't exist, table doesn't
exist, and so on).

>
> This isn't what I want because the data may not be in server1 on purpose
> (e.g., a customer doesn't have that mailbox name), so the way it works
> above would suggest that a backup server gets hammered when data isn't
> in the first database (e.g., a spammer just sent a mail to
> 234832assad47028@???). What would be ideal for me is
> where if the connection itself fails to the database, to try the second
> machine.


You're OK - provided the query succeeds on server1, the fact that it
returns no data is a matter for the router which called the query to
deal with. Server2 won't be tried.

Peter

--
Peter Bowyer
Email: peter@???
Tel: +44 1296 768003
VoIP: sip:peter@???