Re: Locking mboxes
On Mon, Dec 03, 2001 at 07:45:45PM -0500, David T-G wrote: % I would not design a production quality mail setup that relied on it % if that is what you are asking. Well, that's one way to answer it :-) I don't know enough to know whether there are right and wrong ways to implement NFS so that locking works or if it's just plain always bad. The main trouble with NFS is that it's stateless, and locking is statefull. So you have two opposed systems trying to work with each other. Steve -- NetTek Ltd tel +44-(0)20 7483 1169 fax +44-(0)20 7483 2455 Flat 2,43 Howitt Road, Belsize Park,London NW3 4LU mobile 07775 755503 Epage [EMAIL PROTECTED] [body only]
Re: Locking mboxes
Steve, et al -- ...and then Steve Kennedy said... % On Mon, Dec 03, 2001 at 07:45:45PM -0500, David T-G wrote: % % % I would not design a production quality mail setup that relied on it % % if that is what you are asking. % Well, that's one way to answer it :-) I don't know enough to know % whether there are right and wrong ways to implement NFS so that % locking works or if it's just plain always bad. % % The main trouble with NFS is that it's stateless, and locking is % statefull. So you have two opposed systems trying to work with % each other. *click* Oh, now I get it. The light goes on. Of course; that makes sense. % % Steve Thanks a bunch! % % -- % NetTek Ltd tel +44-(0)20 7483 1169 fax +44-(0)20 7483 2455 % Flat 2,43 Howitt Road, Belsize Park,London NW3 4LU % mobile 07775 755503 Epage [EMAIL PROTECTED] [body only] :-D -- David T-G * It's easier to fight for one's principles (play) [EMAIL PROTECTED] * than to live up to them. -- fortune cookie (work) [EMAIL PROTECTED] http://www.justpickone.org/davidtg/Shpx gur Pbzzhavpngvbaf Qrprapl Npg! msg21017/pgp0.pgp Description: PGP signature
Re: Locking mboxes
So I recompiled: ./configure --with-flock --enable-nfs-fix Don't use flock for locking mail folders accessed via NFS. Fcntl was the right thing to do. I'd guess that some part of your NFS locking is screwed up. For the benefit of the archives, I resolved the issue by disabling both flock and fcntl, and sticking with dotlock. ag
Re: Locking mboxes
Aaron -- ...and then Aaron Goldblatt said... % I'm having an oddball problem with locking. Mutt 1.3.24i on RedHat 7.2 % Linux 2.4.16. The mailboxes in question are mbox format on an NFS % server running Slackware 8.0 Linux 2.4.16. ... % There are no obvious conflicts in /var/lock/. Manually operating on the % file in question (rm, mv, cp) produces no errors. IIRC, there are three types of locking: dotlock, flock, and fnctl. You know about dotlocking from your trip through the manual, but IIRC that's not recommended for NFS. You should run mutt -v and look at how your mutt is compiled to lock and ensure that that's supported on your system. You might find that there are NFS permission issues where, say, mutt_dotlock (which should be SGID mail) can't write to your home dir or some such. % ... % Thank you. HTH HAND % % ag :-D -- David T-G * It's easier to fight for one's principles (play) [EMAIL PROTECTED] * than to live up to them. -- fortune cookie (work) [EMAIL PROTECTED] http://www.justpickone.org/davidtg/Shpx gur Pbzzhavpngvbaf Qrprapl Npg! msg20962/pgp0.pgp Description: PGP signature
Re: Locking mboxes
mutt -v Okay. bash-2.05$ mutt -v Mutt 1.3.24i (2001-11-29) Copyright (C) 1996-2001 Michael R. Elkins and others. Mutt comes with ABSOLUTELY NO WARRANTY; for details type `mutt -vv'. Mutt is free software, and you are welcome to redistribute it under certain conditions; type `mutt -vv' for details. System: Linux 2.4.16 (i686) [using ncurses 5.2] Compile options: -DOMAIN +DEBUG -HOMESPOOL +USE_SETGID +USE_DOTLOCK +DL_STANDALONE +USE_FCNTL -USE_FLOCK -USE_POP -USE_IMAP -USE_GSS -USE_SSL -USE_SASL +HAVE_REGCOMP -USE_GNU_REGEX +HAVE_COLOR +HAVE_START_COLOR +HAVE_TYPEAHEAD +HAVE_BKGDSET +HAVE_CURS_SET +HAVE_META +HAVE_RESIZETERM +HAVE_PGP -BUFFY_SIZE -EXACT_ADDRESS -SUN_ATTACHMENT +ENABLE_NLS -LOCALES_HACK +HAVE_WC_FUNCS +HAVE_LANGINFO_CODESET +HAVE_LANGIN FO_YESEXPR +HAVE_ICONV -ICONV_NONTRANS +HAVE_GETSID -HAVE_GETADDRINFO ISPELL=/usr/bin/ispell SENDMAIL=/usr/sbin/sendmail MAILPATH=/var/mail PKGDATADIR=/usr/local/share/mutt SYSCONFDIR=/usr/local/etc EXECSHELL=/bin/sh -MIXMASTER To contact the developers, please mail to [EMAIL PROTECTED]. To report a bug, please use the flea(1) utility. So I recompiled: ./configure --with-flock --enable-nfs-fix Now it looks like this: -DOMAIN +DEBUG -HOMESPOOL +USE_SETGID +USE_DOTLOCK +DL_STANDALONE +USE_FCNTL +USE_FLOCK -USE_POP -USE_IMAP -USE_GSS -USE_SSL -USE_SASL +HAVE_REGCOMP -USE_GNU_REGEX +HAVE_COLOR +HAVE_START_COLOR +HAVE_TYPEAHEAD +HAVE_BKGDSET +HAVE_CURS_SET +HAVE_META +HAVE_RESIZETERM +HAVE_PGP -BUFFY_SIZE -EXACT_ADDRESS -SUN_ATTACHMENT +ENABLE_NLS -LOCALES_HACK +HAVE_WC_FUNCS +HAVE_LANGINFO_CODESET +HAVE_LANGINFO_YESEXPR +HAVE_ICONV -ICONV_NONTRANS +HAVE_GETSID -HAVE_GETADDRINFO issues where, say, mutt_dotlock (which should be SGID mail) can't write to your home dir or some such. Strikes me as odd, but I'll look: bash-2.05$ ls -la /usr/local/bin/mutt_dotlock -rwxr-sr-x1 root mail43680 Dec 3 13:23 \ /usr/local/bin/mutt_dotlock I don't have trouble with the Maildir mailboxes, but razor (http://razor.sourceforge.net/) doesn't work with Maildir. Note that writing a message to /tmp (a non-NFS filesystem) is successful, so I guess the problem IS NFS, but beyond what I've done I don't know what to do about it. Recompiling as above did not resolve the issue. ag
Re: Locking mboxes
Aaron -- ...and then Aaron Goldblatt said... %mutt -v % % Okay. % % bash-2.05$ mutt -v % Mutt 1.3.24i (2001-11-29) ... % -HOMESPOOL +USE_SETGID +USE_DOTLOCK +DL_STANDALONE % +USE_FCNTL -USE_FLOCK ... So that tells us how you can lock. Good. % % % So I recompiled: ./configure --with-flock --enable-nfs-fix % % Now it looks like this: % ... % -HOMESPOOL +USE_SETGID +USE_DOTLOCK +DL_STANDALONE % +USE_FCNTL +USE_FLOCK ... That looks better; I don't know if your system will support flocking, but now your mutt does. ... % issues where, say, mutt_dotlock (which should be SGID mail) can't write % to your home dir or some such. % % Strikes me as odd, but I'll look: % % bash-2.05$ ls -la /usr/local/bin/mutt_dotlock % -rwxr-sr-x1 root mail43680 Dec 3 13:23 \ %/usr/local/bin/mutt_dotlock % % I don't have trouble with the Maildir mailboxes, but razor % (http://razor.sourceforge.net/) doesn't work with Maildir. Well, Maildir boxes don't require locking, so your success is expected :-) % % Note that writing a message to /tmp (a non-NFS filesystem) is % successful, so I guess the problem IS NFS, but beyond what I've done I % don't know what to do about it. Recompiling as above did not resolve % the issue. No, that won't do it. You can test your permissions by trying to manually dotlock something like cd $HOME touch testfile mutt_dotlock testfile to see what you get. You might play with the -t and -f parameters to see what you get. At this point, you should check with your sysadmin to look at how you might have your home dir exported to allow your box to run a program with SGID perms set. Alternatively, you might pull the mail in as usual but then save it to a Maildir after razor has finished with the box. Ugly, but a workaround :-) % % ag HTH HAND :-D -- David T-G * It's easier to fight for one's principles (play) [EMAIL PROTECTED] * than to live up to them. -- fortune cookie (work) [EMAIL PROTECTED] http://www.justpickone.org/davidtg/Shpx gur Pbzzhavpngvbaf Qrprapl Npg! msg20983/pgp0.pgp Description: PGP signature
Re: Locking mboxes
File Locking + NFS = very bad news It is inherently unreliable. -- Regards Cliff
Re: Locking mboxes
Cliff -- ...and then Cliff Sarginson said... % File Locking + NFS = very bad news Agreed. If he has to use an mbox, though, he may not have many choices (my drop-in-mbox+run-razor+move-to-maildir kludge being one of them). % % It is inherently unreliable. Always? % % -- % Regards % Cliff % :-D -- David T-G * It's easier to fight for one's principles (play) [EMAIL PROTECTED] * than to live up to them. -- fortune cookie (work) [EMAIL PROTECTED] http://www.justpickone.org/davidtg/Shpx gur Pbzzhavpngvbaf Qrprapl Npg! msg20995/pgp0.pgp Description: PGP signature
Re: Locking mboxes
On Mon, Dec 03, 2001 at 07:17:14PM -0500, David T-G wrote: Cliff -- ...and then Cliff Sarginson said... % File Locking + NFS = very bad news Agreed. If he has to use an mbox, though, he may not have many choices (my drop-in-mbox+run-razor+move-to-maildir kludge being one of them). % % It is inherently unreliable. Always? I would not design a production quality mail setup that relied on it if that is what you are asking. But NFS is way past it's sell by date in my view. Some technologies get stretched beyond their design limitations. Time synchronisation (or lack thereof) is also a royal pain in the butt with any application relying on very accurate time keeping. There are alternatives. But that is OT, and not very helpful for this problem :( -- Regards Cliff
Re: Locking mboxes
Cliff -- ...and then Cliff Sarginson said... % On Mon, Dec 03, 2001 at 07:17:14PM -0500, David T-G wrote: % % ...and then Cliff Sarginson said... % % File Locking + NFS = very bad news ... % % It is inherently unreliable. % % Always? % % I would not design a production quality mail setup that relied on it % if that is what you are asking. Well, that's one way to answer it :-) I don't know enough to know whether there are right and wrong ways to implement NFS so that locking works or if it's just plain always bad. % But NFS is way past it's sell by date in my view. *grin* % Some technologies get stretched beyond their design limitations. Admitted. I haven't seen anything else targed at *NIX, though; am I just blind^Wsheltered or has the industry taken the it ain't broke enough to fix stance? % % Time synchronisation (or lack thereof) is also a royal pain in the % butt with any application relying on very accurate time keeping. Oh, yeah. Miserable, I know. % % There are alternatives. That's what I was wondering... % % But that is OT, and not very helpful for this problem :( But interesting, though :-) And perhaps he could take the entire thread, once it fills out nicely with all sorts of other input, ideas, and experiential data, and hand it to the sysadmin and initiate a site-wide transformation -- all because he uses The Mailer That Knows Better ;-) % % -- % Regards % Cliff % :-D -- David T-G * It's easier to fight for one's principles (play) [EMAIL PROTECTED] * than to live up to them. -- fortune cookie (work) [EMAIL PROTECTED] http://www.justpickone.org/davidtg/Shpx gur Pbzzhavpngvbaf Qrprapl Npg! msg21002/pgp0.pgp Description: PGP signature