Re: [exim] lookup pgsql

Top Page
Delete this message
Reply to this message
Author: W B Hacker
Date:  
To: exim users
Subject: Re: [exim] lookup pgsql
Rainer Sigl wrote:
> Hi all,
> how does exim respond to a pgsql query if the database is not reachable
> due to network problem etc. occasionally?
> Keeps the Query hanging, waiting?
> Are there possible parameters to affect this behavior?
>
> Many thanks
> Rainer Sigl


Immediate response is given to either an SQL error or DB unreachable, and is a
temporary rejection, and so logged:

Ex - DB not running at all:

2007-02-08 16:52:38 H=(none) [190.48.22.46]:2129 I=[203.194.153.87]:25
F=<kjhaskjdsa@???> temporarily rejected RCPT
<kjhjkhdkjasda@???>: PGSQL connection failed: could not connect to
server: No such file or directory

Similar behavior if/as/when number of available connections (to the DB) is
exceeded. Too rare for me to have examples, though I have seen it in tests when
'delay =' was set to hours, not minutes, for zombots too stupid to quit of their
own volition.


Ex - SQL call 'sin tax' error:

2007-02-09 00:03:46 H=conducive.org (conducive.net) [203.194.153.81]:49611
I=[203.194.153.83]:25 F=<askbill@???> temporarily rejected RCPT
<fudge@???>: PGSQL: query failed: ERROR: syntax error at or near
"'default'" at character 25


One could probably craft the calling acl's to do a 'permanent reject' instead of
temporary, but not sure if that is any improvement.

Use of a 'warn', OTOH, for SQL INSERTS, can more easily be structured to allow
Exim to automagically press on regardless. Not suited if/as/when the DB is
essential, as in use for UID:PWD for AUTH, but might be OK for greylisting
inserts (only), if you would rather chance a bit of spam than lose decent
traffic (recommended).

HTH,

Bill