From owner-freebsd-current Wed Oct 30 23:15:53 1996 Return-Path: owner-current Received: (from root@localhost) by freefall.freebsd.org (8.7.5/8.7.3) id XAA05275 for current-outgoing; Wed, 30 Oct 1996 23:15:53 -0800 (PST) Received: from Tomobiki-Cho.CAC.Washington.EDU (bruce@tomobiki-cho.cac.washington.edu [128.95.135.58]) by freefall.freebsd.org (8.7.5/8.7.3) with ESMTP id XAA05267; Wed, 30 Oct 1996 23:15:49 -0800 (PST) Received: from localhost by Tomobiki-Cho.CAC.Washington.EDU (8.7.5/UW-NDC Revision: 2.28 ) id XAA18061; Wed, 30 Oct 1996 23:15:47 -0800 (PST) Date: Wed, 30 Oct 1996 22:59:22 -0800 (PST) From: Mark Crispin Subject: Re: /var/mail (was: re: Help, permission problems...) To: Gary Palmer cc: Joe Greco , terry@lambert.org, j@uriah.heep.sax.de, roberto@keltia.freenix.fr, current@FreeBSD.org, scrappy@ki.net In-Reply-To: <2495.846744826@orion.webspan.net> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; CHARSET=US-ASCII Sender: owner-current@FreeBSD.org X-Loop: FreeBSD.org Precedence: bulk On Thu, 31 Oct 1996 01:53:46 -0500, Gary Palmer wrote: > No, probably because without NFS locking, it will have a tendancy to > destroy mail. Ergo, it isn't done :-) It works to lock with .lock files over NFS. You have to do nasty stuff to get it right, since O_CREAT is not implemented atomically over NFS: 1) create a file with a gensymmed unique name 2) hard link the gensymmed to the lock file name. Ignore errors from the hard link (not atomic, that's why) 3) stat the gensymmed name 4) unlink the gensymmed name. 5) if the link count from the stat is not 2, the lock failed. > NFS for e-mail is evil and people who do it should be shot. You will have no dispute from me there. I've been saying this for at least 11 years. That is why I invented IMAP. > Some people who have > a mad love for /usr/bin/mail want /var/mail NFS mounted from the mail > box to the shell box. I tell them to use fetchmail. Problem solved. I do not have the option of doing this. Suppose The Very Big Corporation of America offered you a megabuck or two for FreeBSD development -- but only if you made NFS-mounted mail worked, because TVBCA insists upon it. How hard will you stick to your principles? > To be perfectly honest, I don't see the problem here ... make the > locking method an option, just like elm does. No more problem. What about my users who thank me for *NOT* doing this, because they find Elm's options too confusing? Sorry, but I support the plug-n-play crowd, and I have to make compromises to support them. It doesn't matter what hackers think about the compromises. Real hackers are quite capable of working around them.