Subject: Re: Mail and locking
To: None <current-users@NetBSD.ORG>
From: Greg A. Woods <>
List: current-users
Date: 12/04/1996 20:03:05
[ On Wed, December 4, 1996 at 13:55:46 (-0800), Grey Wolf wrote: ]
> Subject: Re: Mail and locking
> So where, exactly, do you make the lock?

In the mailbox spool directory (/var/mail on *BSD).

> What do you do if you have a distributed mail scheme (i.e. everyone's
> mail goes to their workstation)?

Nothing.  Let each do it their own way.

> What do you do if you have a centralized mail scheme (i.e. everyone's
> mail goes to the mail server and they handle it that way)?

If users want to read on client machines then they use POP or IMAP.

> How do we handle locking?

With setgid mail-access programs (something very much like mail.local
for delivery, and something such as movemail for reading).

> How do we make the central system honor this locking?

By using a mailbox access protocol, such as IMAP or POP, and fixing the
daemons to "Do The Right Thing".

> The problems are that we live in an imperfect world in which chaos reigns
> most of the time, and we are never going to get all the programs which
> use locking to listen to all the other programs which use locking, unless
> you have a homogeneous environment.

Well, then you live with the risk of losing the odd bit of mail and
having to reboot to clear stuck mailboxes on occasion.

Before it more than doubled in size a very busy 1500 user system I
helped manage had no guaranteed interlock between mail delivery and mail
readers.  The only time we ever had problems were when the thing crashed
and left stale locks created by the reader program, but of course that
was easy to fix with an "rm /usr/mail/*.lock" during boot....

							Greg A. Woods

+1 416 443-1734			VE3TCP			robohack!woods
Planix, Inc. <>; Secrets Of The Weird <>