Re: [Exim] dbm updates

Páxina inicial
Borrar esta mensaxe
Responder a esta mensaxe
Autor: Philip Hazel
Data:  
Para: Phil Chambers
CC: exim-users
Asunto: Re: [Exim] dbm updates
On Fri, 15 Jun 2001, Phil Chambers wrote:

> I am concerned about the procedure for updating the dbm files used by exim when they
> are the .pag/.dir type. Using exim_dbmbuild the new files are built and then
> renamed. Since the renaming is not an atomic action there will be a period where the
> .dir file is new and the .pag file is old. As far as I can see exim does not take
> any steps to prevent this. Is this a correct interpretation?


Correct. I never got round to doing anything about this. As far as I
know, .dom/.pag DBM libraries are used only on SunOS4, Solaris, and
IRIX (but I may be wrong), and even then people often use others such as
DB or cdb.

> If so, I take it that
> I should I be stopping exim while I re-build the files to prevent the possiblity of
> a lookup failing when it should succeed? Taking exim down on the system which takes
> all our local PC-based user agent submissions will certainly not be popular!


Strictly, I suppose so. I do not know what the actual exposure is in
practice.

> Is there any chance of a lock being created around this activity so that exim can be
> kept running?


It's clearly possible - provided you use only exim_dbmbuild to make your
files, and provided the permissions are all correct. The lock would have
to be taken on a third file which was writeable by exim and by whatever
uid makes the files.

The question is: is it actually worth the effort? I don't know. What's
the view on the list? It's a small, but non-zero possibility, I suppose.
I think most sites with large alias files use cdb or at least some
variety of DB rather then the .dir/.pag libraries.

> I see that exim_dbmbuild makes no provision for restoring the old .dir file after it
> has been replaced if the rename of the .pag file files. It seems very very unlikely
> that this would happen but ...


That's a bit of paranoia that I should have included, yes. At the time,
exim_dbmbuild was a quick lash-up to get something working, and it never
got revisited. Noted.

-- 
Philip Hazel            University of Cambridge Computing Service,
ph10@???      Cambridge, England. Phone: +44 1223 334714.