Subject: Re: Mail and locking
To: None <current-users@NetBSD.ORG>
From: Greg A. Woods <>
List: current-users
Date: 12/04/1996 00:51:52
[ On Tue, December 3, 1996 at 13:50:10 (-0800), Curt Sampson wrote: ]
> Subject: Re: Mail and locking
> Flocking is a lot easier to use in the long run. It's easier to program,
> doesn't require write access to the mail spool, and is compatabile with
> non-mail applications, such as vi.

Please folks, K.I.S.S.!!!

It has already been pointed out that dot-locking is the one true
universal mail spool file locking protocol which *works*.

The only known disadvantage of dot-locking (other than the fact that it
requires a setuid or setgid process with write access to the spool
directory) is that there really needs to be a cleanup of stale locks run
at boot time while still in single-user -- something very few systems
supply by default, BTW.

Anyone crazy enough to run 'vi' on a live spool file deserves to lose
all their mail (though a note to this effect may be worthwile in the
mail.local manual page).

On the other hand, wouldn't it be better to replace
/usr/src/libexec/mail.local with /usr/src/usr.sbin/sendmail/mail.local?
If not, then I'd strongly suggest adding '-l' to the mail.local
invocation in the standard sendmail configuration for NetBSD....

							Greg A. Woods

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