Re: [Exim] Exim4, improving error handling on SQL queries fo…

Etusivu
Poista viesti
Vastaa
Lähettäjä: David Woodhouse
Päiväys:  
Vastaanottaja: master
Kopio: exim-users
Aihe: Re: [Exim] Exim4, improving error handling on SQL queries for incoming
On Tue, 2004-01-27 at 20:04 +0000, stephen@??? wrote:
> The problem we have is that if mySQL is stopped for service and Exim is left
> running, incoming mail will NDR from Exim because the SQL SELECT fails.
>
> Is there a way to define this so the message will either queue or call a
> different incoming route logic when the SQL query fails?


Yes.

Since you didn't bother to include a copy of your configuration, or
explain precisely at what stage the incoming mail fails, I can only
assume that a single-word answer, rather than an actual example which
will help you fix your problem, is what you desire?

See the dns_virtual_* routers in my configuration at
http://www.infradead.org/~dwmw2/eximconf/master for what might possibly
be a useful example of how to deal with this kind of failure. Basically,
you want to make the offending router pass or defer rather than failing,
and if it passes, then have a fallback router which does the right
thing.

Deferring might be simpler, but depending on your use of recipient
verification in ACLs, may cause mail to be _temporarily_ rejected while
the SQL is down. Hence I don't do that -- I pass in the lookup router if
there's a problem, then defer only _delivery_ attempts while accepting
the same address on _verification_ attempts.

--
dwmw2