Re: [exim] Trim down pgsql callouts

Páxina inicial
Borrar esta mensaxe
Responder a esta mensaxe
Autor: Graeme Fowler
Data:  
Para: exim-users
Asunto: Re: [exim] Trim down pgsql callouts
Hi

On Wed, 2008-07-09 at 17:10 +0100, Sam Smith wrote:
> Any help with this please?


You'll need to use "exim -d" and a set of appropriate options to see
what's going on here. Probably the easiest way to do this would to be to
stop Exim then run "exim -bd -d" and then send a message to the machine
which would cause the router in question to be triggered.

If you want to capture the debug, do it like this:

exim -bd -d 2>&1 | tee /path/to/file-you-want-to-save-as

(And yes, there are many other ways to do this!)

Once you've done it, look through the debug output to see if you can
fathom what's going on - it should show the DB lookups something like
this:

1834 type=mysql key="SELECT home FROM maildata WHERE
name='graeme@???' limit 1"
1834 database lookup required for SELECT home FROM maildata WHERE
name='graeme@???' limit 1
1834 MySQL query: SELECT home FROM maildata WHERE
name='graeme@???' limit 1
1834 MYSQL new connection: [connection data removed]
1834 lookup yielded: /var/spool/path/to/graeme

[other things happen]

1834 cached data used for lookup of SELECT home FROM passwd WHERE
name='graeme@???' limit 1

In this case as the message traverses other routers a total of three
identical lookups are done, two of which are pulled from the cache.
(Other lookups also happen, which makes me realise I could optimise this
a little by using the "extract" operator).

Make sure you also understand what happens with redirect routers - if
the message is processed by a redirect router, it starts the chain again
and may then cause non-cached lookups. I'd have to re-read the caching
code to see if the cached entry would be invalidated under those
conditions.

So: use "-d" and see what you get. If you don't understand, post the
output (but be careful not to post your database username/password).

Graeme