Re: NFS in 2.1.130??

Jon Peatfield (
02 Dec 1998 03:23:46 +0000 (Alan Cox) writes:
> procmail style dot locking works over NFS. NFS has an atomic rename,
> even though they screwed everything else up in NFSv2. Rename is the only
> real NFS safe operation to use.

I think you may be wrong -- link is atomic, it either works or
doesn't. The classic NFS Kludge is to make a hitching post, then link
the lock and check that the lock is the file you made as the post.
See the code in Pine (wow they got something right!), and then on into
many other mailers.

IMHO the locking done on mail spool files should be configurable by
the admin. Only the admin know can what other machines they have to
interact with (in the NFS or similar case). Failing that .lock files
are usually safe to use (in addition to any other mechanism).

I started thinking (a long time ago) about a library for MUAs which
does all the common things that MUAs want to do (read varius formats
of spool files, extract lists of headters, delete or re-file messages
etc). If one had a powerful enough set of functions an MUA would just
be the user-interface code and then all MUAs would interact through
the same library and locking problems etc could be much simpler.
However, I can't really see how to define an interface powerful enough
for all MUAs. Any suggestions? Should MTAs also interact with
mailboxes through the same set of interfaces?

Jon Peatfield,  DAMTP,  Computer Officer,   University of Cambridge
Telephone: +44 1223  3 37852    Mail:

- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to Please read the FAQ at