Mailbox is always read-only in Mutt

4

1

I just installed Mutt and I'm currently unable to delete mail from my mailbox. Mutt will give a message saying it is unable to do this because the mailbox is ready-only. I can send and receive messages fine.

I searched for a solution and the advice is to set group id for the file mutt_dotlock. Following the instructions I ran the command:

ls -lF `which mutt` `which mutt_dotlock`

which gave the following result:

lrwxrwxrwx 1 root root    22 May  6 12:36 /usr/bin/mutt -> /etc/alternatives/mutt*
-rwxr-sr-x 1 root mail 10600 Aug 24  2012 /usr/bin/mutt_dotlock*

I then ran sudo chmod g+s /usr/bin/mutt_dotlock but the mailbox is still read-only. Permissions for mutt-dotlock are now:

-rwxrwsr-x 1 root mail 10600 Aug 24  2012 /usr/bin/mutt_dotlock

Next I checked the permissions on my mail file in /var/mail using ls -l /var/mail/steve:

-rw------- 1 steve vmail 10457 Aug 11 19:29 steve

So, following the advice on the web I ran chmod 700 on /var/mail/steve and the permissions are currently:

-rwx------ 1 steve   vmail 10457 Aug 11 19:29 steve

This still did not allow me to delete email in Mutt. Finally, someone suggested running chmod 2775 on /usr/bin/mutt_dotlock, which I did and the permissions are now:

-rwxrwsr-x 1 root mail 10600 Aug 24  2012 /usr/bin/mutt_dotlock

I still can't delete mail and I don't know where to go from here. The permissions all look OK. Is there a way to verify that the dot lock is being created in /var/mail? This is a basic mail gateway that I set up on a Debian server using Postfix with unix system accounts. No POP3 or imap and I'd rather not bother.

I'm not very familiar with Mutt but I would like to keep using it as a way to check my mail from the command line but eventually will need to delete messages. :) I know Mutt is still in use so if anyone has seen this before or can offer any advice I would really appreciate the help. Thanks.

Steve

Posted 2013-08-12T17:05:23.640

Reputation: 73

What does ls -ld /var/mail show? If the group on that directory matches the group on your mailbox the mutt_dotlock command will actually need to be changed to belong to the vmail group. – qqx – 2013-08-12T17:12:47.103

Good catch. ls -ld /var/mail is showing: drwxrwsr-x 2 vmail vmail 4096 Aug 11 19:29 /var/mail. I guess chown root:vmail /usr/bin/mutt_dotlock eh? – Steve – 2013-08-12T17:16:52.897

Yes, I believe that would fix it. – qqx – 2013-08-12T17:17:38.497

No, I thought it would as well but same problem. I also verified that I can delete mail using system mail command but not Mutt. – Steve – 2013-08-12T17:23:09.373

Answers

5

You need to make yourself belong to the vmail group.

The directory permission requires user running to be in that group in order to modify file in /var/mail directory. There should be no permission change required for any program

Try running (if in Unix/Linux)

usermod -a -G vmail your_user_name

user72518

Posted 2013-08-12T17:05:23.640

Reputation: 51

3If you're running on mac OSX (Darwin), the user group you need to add yourself to is mail ... there's no usermod in Darwin, but you can use dseditgroup to accomplish the same thing: dseditgroup -o edit -u [username] -p -a [username] -t user mail. The first username needs to be an admin. – TheMadDeveloper – 2016-09-03T04:38:35.993