Re: [EXIM] Locking of the alias dbm files?

Top Page
Delete this message
Reply to this message
Author: Tom
Date:  
To: D.M.Chapman
CC: exim-users
Subject: Re: [EXIM] Locking of the alias dbm files?

On Mon, 10 Aug 1998, D.M.Chapman wrote:

> Hi,
>
> As a part of our move from PP we are upgrading all of our mail machines
> to run exim. Part of this move involves updating some locally written
> code that manages our users accounts. Sometimes (when a user moves to
> another machine or department etc) we need to automatically update the
> mail aliases which are currently held as a dbm database. It seems that
> exim performs no locking on this database - are we asking for odd errors
> if we edit the live alias dbm files (and similarly, we have a dbm file
> used in our rewritting rules as well).


Yes. Normally you make a new db file and rename it over top the old db
file. This is completely safe, and completely atomic.

> I am a little worried that exim could get confused if it happens to access
> the database after we have replaced the .dir file but not the corresponding
> .pag file. Are we worrying over nothing? Is there a way to perform some
> sort of file locking on these files that exim will obey? It seems to check
> its hints database for locks but nothing else...


Yes, a profound weakness in ndbm/dbm. db only uses one file, so
replacement is safe. I'd recommend that you use that.

> Oh, its exim 1.92 if that makes a difference.
>
>
> Thanks,
>
> Darren


Tom


--
*** Exim information can be found at http://www.exim.org/ ***