#990828 mutt can not delete mails due to access rights

Package:
mutt
Source:
mutt
Description:
text-based mailreader supporting MIME, GPG, PGP and threading
Submitter:
"Hans-J. Ullrich"
Date:
2026-06-24 02:43:02 UTC
Severity:
important
#990828#5
Date:
2021-07-08 17:26:06 UTC
From:
To:
Dear Maintainer,

it looks like, that mutt is not able to delete mails due to access rights.
I checked the settings of the files and directories, but these seem to be ok for me.
This is the output:

ls -la / | grep var
drwxr-xr-x  14 root root    4096 18. Mai 11:33 var

ls -la /var | grep mail
drwxrwsr-x   2 root mail   4096  8. Jul 16:02 mail

ls -la /var/mail/myusername
-rw-rw---- 1 myusername mail 55330396  8. Jul 16:02 /var/mail/myusername 

(The term "myusername" is an alias for my real username)

When I remember correctly, this bug appeared in the past from time to time and was fixed. Now it appears again.

It would be nice, if you could take a look at it.

Thank you and best regards

Hans

#990828#10
Date:
2021-12-14 22:08:20 UTC
From:
To:
Sorry I also can't duplicate this problem.  This ticket, in addition to
#969279 seem to hint something is very odd about your system or your
configuration.

Perhaps more details would help illuminate the problem.  Can you
duplicate it with a minimal muttrc file?  Does it happen just with your
spoolfile, or with other mbox files in your home directory?  Is there a
problem with the mutt_dotlock program installation?  What error messages
are you getting?

#990828#15
Date:
2022-11-20 12:50:41 UTC
From:
To:
Hi.

"mutt_dotlock" is the one to blame:

	# ls -l /usr/bin/mutt_dotlock
	-rwxr-sr-x 1 root root 13804 Nov 13 18:01 /usr/bin/mutt_dotlock

This works for me:

	# chown root:mail /usr/bin/mutt_dotlock
	# chmod 2755 /usr/bin/mutt_dotlock

Now:

	# ls -l /usr/bin/mutt_dotlock
	-rwxr-sr-x 1 root mail 13804 Nov 13 18:01 /usr/bin/mutt_dotlock

Bye.

#990828#20
Date:
2022-11-20 17:45:21 UTC
From:
To:
Thanks for the information.  What architecture are you running on?  The
amd64 package installs properly with sgid mail.

However, I did check the various packages for 2.2.9, and it looks like
the i386 package does not.  Are you running i386 architecture, or did
you install the i386 package on an amd64 architecture?

I don't know if this is a bug in the i386 packaging environment, or if
the mail directories on i386 are different.  I'm Cc'ing Antonio to see
if he has any input.

#990828#25
Date:
2022-11-21 13:53:14 UTC
From:
To:
Yes, you were right.

Architecture: i386 (i686)

#990828#30
Date:
2022-11-21 17:32:09 UTC
From:
To:
architecture.  I believe this means something is wrong the package
building environment.

I've just looked again at the Mutt configure/makefile related to
mutt_dotlock, and it turns out Mutt always installs as group 'mail' when
setting sgid:

configure.ac:
=============
if test x$mutt_cv_setgid = xyes; then
         DOTLOCK_GROUP='mail'
         DOTLOCK_PERMISSION=2755
else
         DOTLOCK_GROUP=''
         DOTLOCK_PERMISSION=755
fi
AC_SUBST(DOTLOCK_GROUP)
AC_SUBST(DOTLOCK_PERMISSION)

Makefile.am:
============
	if test -f $(DESTDIR)$(bindir)/mutt_dotlock && test x$(DOTLOCK_GROUP) != x ; then \
		chgrp $(DOTLOCK_GROUP) $(DESTDIR)$(bindir)/mutt_dotlock && \
		chmod $(DOTLOCK_PERMISSION) $(DESTDIR)$(bindir)/mutt_dotlock || \
		{ echo "Can't fix mutt_dotlock's permissions!  This is required to lock mailboxes in the mail spool directory." >&2 ; exit 1 ; } \
	fi


The content of the various mutt deb files:
==========================================
% for deb in *; do echo $deb; dpkg -c $deb | grep bin/mutt_dotlock; echo; done
mutt_2.2.9-1_amd64.deb
-rwxr-sr-x root/mail     14584 2022-11-13 09:01 ./usr/bin/mutt_dotlock

mutt_2.2.9-1_arm64.deb
-rwxr-sr-x root/mail     67680 2022-11-13 09:01 ./usr/bin/mutt_dotlock

mutt_2.2.9-1_armel.deb
-rwxr-sr-x root/root     67108 2022-11-13 09:01 ./usr/bin/mutt_dotlock

mutt_2.2.9-1_armhf.deb
-rwxr-sr-x root/root     67120 2022-11-13 09:01 ./usr/bin/mutt_dotlock

mutt_2.2.9-1_i386.deb
-rwxr-sr-x root/root     13804 2022-11-13 09:01 ./usr/bin/mutt_dotlock

mutt_2.2.9-1_mips64el.deb
-rwxr-sr-x root/mail     68648 2022-11-13 09:01 ./usr/bin/mutt_dotlock

mutt_2.2.9-1_mipsel.deb
-rwxr-sr-x root/root     67732 2022-11-13 09:01 ./usr/bin/mutt_dotlock

mutt_2.2.9-1_ppc64el.deb
-rwxr-sr-x root/mail     67760 2022-11-13 09:01 ./usr/bin/mutt_dotlock

mutt_2.2.9-1_s390x.deb
-rwxr-sr-x root/mail     14432 2022-11-13 09:01 ./usr/bin/mutt_dotlock


I'm not sure what is going wrong, but armel, armhf, i386, and mipsel are
failing to chgrp to mail during the package building.

Antonio I'll need your help to figure out what is going on in this case.
Since this renders the program unusable for working with spoolfile mail,
I think this ought to be bumped to 'serious'.

#990828#35
Date:
2026-06-24 02:32:53 UTC
From:
To:
This seems to be resolved now:

$ dpkg -c mutt_2.4.0-1_i386.deb  |grep mutt_dotlock
-rwxr-sr-x root/mail     13804 2026-06-21 09:07 ./usr/bin/mutt_dotlock
-rw-r--r-- root/root      1780 2026-06-21 09:07 ./usr/share/man/man1/mutt_dotlock.1.gz

$ dpkg -c mutt_2.4.0-1_armhf.deb |grep mutt_dotlock
-rwxr-sr-x root/mail     67120 2026-06-21 09:07 ./usr/bin/mutt_dotlock
-rw-r--r-- root/root      1780 2026-06-21 09:07 ./usr/share/man/man1/mutt_dotlock.1.gz