Andrew P. Lentvorski, Jr. wrote: > > On Mar 2, 2005, at 11:35 PM, John H. Robinson, IV wrote: > > >Why? 1) The *only* NFS safe mailbox, PERIOD. > ... > > 5) No locking, no corruption. > > I believe that these two are both *false*.
You have two systems, system A and system B. system A exports the mailspool, and system B mounts it. System A uses flock, and system b uses fcntl. Both want to update the mailspool at the same time. System A gets the flock, and system B gets the fcntl. BAM! Corrupted mailspool. Oops. Ah well, there is always backups. > I have managed Solaris systems accessing Solaris NFS and Netapp servers > in which NFS handles mbox *just fine*. No corruption, no problems, no > nothing. Yep, me too. > Oh, you meant on the broken implementation of NFS on Linux? Sorry, you > are out of luck. Actually, that may be an unfair accusation, I haven't > looked an NFS on Linux in about 2 years. Nope. Nothing to do with Linux. > Second, I believe that maildir actually uses its own file locking > scheme in order to make sure that everything works as expected. False. There is no locking, period. No delivery agent will ever try to write to the same file at the same time. This is why you don't need locks. Please see http://cr.yp.to/proto/maildir.html for a complete description. > Third, both mbox and maildir corrupt files in *exactly the same way* > when memory or a disk partition fills *even if NFS is not involved*. if that is the case, then your MUA, MDA MTA failed. Read how maildirs work. They are not allowed to report successful delivery until certain conditions are met. http://www.qmail.org/qmail-manual-html/man5/maildir.html There are six steps in a Maildir delivery: 1) chdir; 2) stat; 3) (if 2 failed) sleep, then go back to 2; 4) make file in tmp/ with unique name; 5) write the file; 6) links it to new/ Only on that sixth step is the message considered delivered. > There are reasons to like maildir. There are reasons to like mbox. I > can't think of one *technical* difference that matters anymore with > modern disks and technologies. I can think of one: NFS safe. Only one of the many mailbox formats has it. I think Cyrus uses something very similar to Maildir+an index. I know, I know, your experience tells you otherwise. Yes, I agree: mbox is relatively safe over NFS. For years I have used mbox over NFS. Never had a problem. This does not mean I never will. > Both formats need to die and should be replaced by something better. Such as? What features would it have? What would it not have? Ideas! -john -- [email protected] http://www.kernel-panic.org/cgi-bin/mailman/listinfo/kplug-list
