Re: [exim] Does exim_tidydb need to be run in cron?

Kezdőlap
Üzenet törlése
Válasz az üzenetre
Szerző: Philip Hazel
Dátum:  
Címzett: Dean Brooks
CC: exim-users
Tárgy: Re: [exim] Does exim_tidydb need to be run in cron?
On Wed, 1 Dec 2004, Dean Brooks wrote:

> My question is whether or not exim_tidydb really needs to be run on
> a regular basis in cron, especially in a high volume environment.
>
> My understanding is that "retry_data_expire" automatically expires
> retry data older than 7 days anyway, and old record slots simply
> get reused.


That is not exactly true. Exim itself never sweeps the hints for dead
data - that's what tidydb is for. If a host is down, a retry record is
created for it. Next time a message is routed to that host, the retry
record is examined. If the data is over 7 days (or whatever is
configured), it is ignored, the host is tried, and if it is no longer
down, the retry record is deleted. The retry record is also deleted if
the host is tried because its retry time has passed and it is found to
be up. But if nothing is ever routed to that host again, the retry
record will just sit there.

> Plus, entries in the wait database and the retry database that are
> tied to message id are presumably supposed to be purged by Exim when
> the messages are delivered.


That is not true. When Exim delivers a message, it does not search the
hints databases for any references. Suppose a message is routed to hosts
A and B, both of which are down. Exim will create two records, one for
each host, remembering that that message is waiting. Any further
messages for the same hosts will be added to the records. Later, suppose
host A comes back up and a message is delivered to it. Exim reads the
record for host A, finds the messages that are waiting, and delivers
them (hopefully over the same SMTP connection). It should then remove
the record for host A. However, it does nothing about the record for
host B. If host A is never down again, and nothing is sent to host B,
its record will sit there for ever, unless tidydb is run.

> The manual is very vague about the _real_ need to run tidydb.


I will try to add some words. I suspect that in practice, if you never
run tidydb, the hints files will grow to a certain size and then
probably stay there, simply because there is some finite set of hosts to
which your users send email. However, somebody needs to do the
experiment to verify this...

-- 
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