Re: [Exim] Reducing mysql load

Kezdőlap
Üzenet törlése
Válasz az üzenetre
Szerző: Philip Hazel
Dátum:  
Címzett: David Leggett
CC: exim-users
Tárgy: Re: [Exim] Reducing mysql load
On Wed, 29 Oct 2003, David Leggett wrote:

> I have my MTA (exim 4.24) set up here at home to take all its data from a
> mysql database. After looking at my mysql log I realised that exim was doing
> about 6-10 queries per incoming email.


Exim was not designed with this kind of use in mind. Indeed, my original
conception used only lsearch, dbm, and NIS to hold data.

> Most of those queries seem to me to be work that isnt needed.
> They are lookups to satisfy local_parts= and domains= for my routers, having 3
> different routers with exactly the same set of domains/local parts


Exim caches the last lookup, but if you have two alternating lookups,
you lose this. You may do better if you use named local part/domain
lists, because there is some caching involved there too. (I'm cautious
here, because I know the caching can only happen if Exim is sure the
domain list won't be different in different cases, and I can't remember
exactly what the rules are.)

> I am wondering if there is any way to reduce the load that this is putting on
> mysql, although I guess its not vital as I have very few users (and I dont
> ever anticipate having many).


In the first router that does the checks, you could set address_data to
something (using the address_data generic option), and just test that in
the subsequent routers.

--
Philip Hazel            University of Cambridge Computing Service,
ph10@???      Cambridge, England. Phone: +44 1223 334714.
Get the Exim 4 book:    http://www.uit.co.uk/exim-book