mail-client/mutt-1.5.20-r1 does not open /var/spool/mail/${LOGNAME} (mbox) in read/write mode. mail-client/mutt-1.5.19-r1 does. I have not tried in MMDF or Maildir yet. Reproducible: Sometimes Steps to Reproduce: 1. mutt 2. type 'd' (delete) Actual Results: mutt says, 'Mailbox is read-only.' Expected Results: mutt displays 'D' on the mail item. Without KDE-4.2.x, the above might not be happens. (not confirmed yet)
how is your /var/spool/mail/${LOGNAME} mounted?
$ fgrep ' /var ' /proc/mounts /dev/hdd1 /var reiserfs rw,noatime 0 0 $
If this happens, can you actually change the folder to read/write mode? The fs is not by chance read-only? You don't accidentially use Esc-c to open the mailbox?
Now, I am trying again with mutt-1.5.20-r1. > If this happens, can you actually change the folder to read/write mode? Yes, I can in ~/Mail. No, I cannot in /var/spool/mail. > The fs is not by chance read-only? Never. I can write to /var/spool/mail/MBOX with /usr/bin/vim and /usr/bin/touch it. $ ls -ld /var/spool/mail drwxrwxr-x 2 root mail 216 2009-07-23 22:51 /var/spool/mail $ ls -l /var/spool/mail/ons -rw------- 1 ons mail 2288073 2009-07-23 22:51 /var/spool/mail/ons $ touch /var/spool/mail/ons $ ls -l /var/spool/mail/ons -rw------- 1 ons mail 2288073 2009-07-23 23:40 /var/spool/mail/ons $ > You don't accidentially use Esc-c to open the mailbox? No. I don't. /var/spool/mail/${LOGNAME} is opened as R/O with typing 'c' and '/var/spool/mail/ons. With Esc-c, R/O also.
Now I try to make install vanilla mutt-1.5.19 into /usr/local/bin. -- $ which -a mutt /usr/local/bin/mutt /usr/bin/mutt $ /usr/local/bin/mutt -v Mutt 1.5.19 (2009-01-05) Copyright (C) 1996-2009 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.6.30-gentoo-r1 (x86_64) ncurses: ncurses 5.7.20081102 (compiled with 5.7) libidn: 1.15 (compiled with 1.15) hcache backend: GDBM version 1.8.3. 10/15/2002 (built Feb 2 2008 05:24:12) Compile options: -DOMAIN -DEBUG -HOMESPOOL +USE_SETGID +USE_DOTLOCK +DL_STANDALONE -USE_FCNTL +USE_FLOCK -USE_POP -USE_IMAP -USE_SMTP -USE_SSL_OPENSSL -USE_SSL_GNUTLS -USE_SASL -USE_GSS -HAVE_GETADDRINFO -HAVE_REGCOMP +USE_GNU_REGEX +HAVE_COLOR +HAVE_START_COLOR +HAVE_TYPEAHEAD +HAVE_BKGDSET +HAVE_CURS_SET +HAVE_META +HAVE_RESIZETERM +CRYPT_BACKEND_CLASSIC_PGP +CRYPT_BACKEND_CLASSIC_SMIME +CRYPT_BACKEND_GPGME -EXACT_ADDRESS -SUN_ATTACHMENT +ENABLE_NLS -LOCALES_HACK +HAVE_WC_FUNCS +HAVE_LANGINFO_CODESET +HAVE_LANGINFO_YESEXPR +HAVE_ICONV -ICONV_NONTRANS +HAVE_LIBIDN +HAVE_GETSID +USE_HCACHE ISPELL="/usr/bin/ispell" SENDMAIL="/usr/sbin/sendmail" MAILPATH="/var/spool/mail" PKGDATADIR="/usr/share/mutt" SYSCONFDIR="/etc" EXECSHELL="/bin/sh" -MIXMASTER To contact the developers, please mail to <mutt-dev@mutt.org>. To report a bug, please visit http://bugs.mutt.org/. $ /usr/bin/mutt -v Mutt 1.5.20 (2009-06-14) Copyright (C) 1996-2009 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.6.30-gentoo-r1 (x86_64) ncurses: ncurses 5.7.20081102 (compiled with 5.7) hcache backend: GDBM version 1.8.3. 10/15/2002 (built Feb 2 2008 05:24:12) Compile options: -DOMAIN -DEBUG -HOMESPOOL +USE_SETGID +USE_DOTLOCK +DL_STANDALONE -USE_FCNTL +USE_FLOCK -USE_POP +USE_IMAP -USE_SMTP +USE_SSL_OPENSSL -USE_SSL_GNUTLS +USE_SASL -USE_GSS +HAVE_GETADDRINFO -HAVE_REGCOMP +USE_GNU_REGEX +COMPRESSED +HAVE_COLOR +HAVE_START_COLOR +HAVE_TYPEAHEAD +HAVE_BKGDSET +HAVE_CURS_SET +HAVE_META +HAVE_RESIZETERM +CRYPT_BACKEND_CLASSIC_PGP -CRYPT_BACKEND_CLASSIC_SMIME -CRYPT_BACKEND_GPGME -EXACT_ADDRESS -SUN_ATTACHMENT +ENABLE_NLS -LOCALES_HACK +HAVE_WC_FUNCS +HAVE_LANGINFO_CODESET +HAVE_LANGINFO_YESEXPR +HAVE_ICONV -ICONV_NONTRANS -HAVE_LIBIDN +HAVE_GETSID +USE_HCACHE ISPELL="/usr/bin/ispell" SENDMAIL="/usr/sbin/sendmail" MAILPATH="/var/spool/mail" PKGDATADIR="/usr/share/mutt" SYSCONFDIR="/etc/mutt" EXECSHELL="/bin/sh" MIXMASTER="mixmaster" To contact the developers, please mail to <mutt-dev@mutt.org>. dgc.subjrx fg.smarttime vvv.initials vvv.quote patch-1.5.6.dw.mbox-hook.1 rr.compressed patch-1.5.4.lpr.collapse_flagged Lukas P. Ruf <lukas.ruf@lpr.ch> $ -- And then, I switched dotlock to /usr/local/bin. -- $ fgrep dotlock .muttrc set dotlock_program=/usr/local/bin/mutt_dotlock $ -- Now, /usr/bin/mutt (Gentoo mutt-1.5.20-r1) and /usr/local/bin/mutt (Vanilla mutt-1.5.19) works fine. The next, I did dotlock to the default (/usr/bin). -- $ fgrep dotlock .muttrc #set dotlock_program=/usr/local/bin/mutt_dotlock $ /usr/bin/mutt -D | fgrep dotlock dotlock_program="/usr/bin/mutt_dotlock" $ /usr/local/bin/mutt -D | fgrep dotlock dotlock_program="/usr/bin/mutt_dotlock" $ -- Now, both of the two opens /var/spool/mail/MBOX as R/O.
/usr/bin/mutt_dotlock (Gentoo mutt-1.5.20-r1) and /usr/local/bin/mutt_dotlock (Vanilla mutt-1.5.19) has diffrent permisson from each other. It may be the reason, may not? Makefile of mutt-1.5.20 says, mutt_dotlock must be chgrp-ed to mail and setgid-ed. -- $ ll /usr/bin/mutt_dotlock /usr/local/bin/mutt_dotlock -rwxr-s--x 1 root root 47472 2009-07-23 22:33 /usr/bin/mutt_dotlock -rwxr-sr-x 1 root mail 134274 2009-07-24 00:22 /usr/local/bin/mutt_dotlock $ fgrep -n -A2 -B1 chgrp mutt-1.5.19/Makefile 1066- if test -f $(DESTDIR)$(bindir)/mutt_dotlock && test xmail != x ; then \ 1067: chgrp mail $(DESTDIR)$(bindir)/mutt_dotlock && \ 1068- chmod 2755 $(DESTDIR)$(bindir)/mutt_dotlock || \ 1069- { echo "Can't fix mutt_dotlock's permissions!" >&2 ; exit 1 ; } \ $ fgrep -n -A2 -B1 chgrp mutt-1.5.20/Makefile 1192- if test -f $(DESTDIR)$(bindir)/mutt_dotlock && test xmail != x ; then \ 1193: chgrp mail $(DESTDIR)$(bindir)/mutt_dotlock && \ 1194- chmod 2755 $(DESTDIR)$(bindir)/mutt_dotlock || \ 1195- { echo "Can't fix mutt_dotlock's permissions!" >&2 ; exit 1 ; } \ $
reopening, seems we get close to the cause of this
the ebuild passes this onto configure: --enable-external-dotlock this seems to enable use of the mutt_dotlock program, otherwise it will compile in some dotlock support
ok, it just controls whether there should be a built-in dotlock, or a separate program, in both cases the same code. Could you check if your var/log/messages reports a setuid or something that fails?
what does ls -la /usr{,/local}/bin/mutt_dotlock show for permissions?
I think I found it. what's your UID (with what user are you emerging)?
> Could you check if your var/log/messages reports a setuid or something that fails? I don't found anything, as far as I know. > ls -la /usr{,/local}/bin/mutt_dotlock As above; $ ls -la /usr{,/local}/bin/mutt_dotlock -rwxr-s--x 1 root root 47472 2009-07-23 22:33 /usr/bin/mutt_dotlock -rwxr-sr-x 1 root mail 134274 2009-07-24 00:22 /usr/local/bin/mutt_dotlock > what's your UID (with what user are you emerging)? $ LANG=C id -u 501 $ I usually do emerge by root.
do you have userpriv in FEATURES?
Anyway, I found the configure script doing some checks for maildir and mbox. For the former it thinks no setuid is necessary, for the latter it is. Perhaps we should just fix it from the ebuild to be correct.
> do you have userpriv in FEATURES? Yes I do. # emerge --info | fgrep -i feature FEATURES="assume-digests ccache collision-protect cvs distlocks fixpackages multilib-strict parallel-fetch protect-owned sandbox sfperms sign splitdebug strict stricter unmerge-orphans userfetch userpriv usersandbox"
I tried to fix this in 1.5.20-r4, can you please give it a try?
Sure, where shall I get the ebuild (or patch)?
just emerge --sync
It works fine, thanks a lot!