#644267 fails to access a read-only folder

Package:
mailutils-mh
Source:
mailutils
Description:
GNU mailutils-based MH utilities
Submitter:
Ivan Shmakov
Date:
2013-10-16 20:54:37 UTC
Severity:
normal
#644267#5
Date:
2011-10-04 15:19:59 UTC
From:
To:
	The mhn command fails to access a read-only folder, e. g.:

$ which mhn
/usr/bin/mailutils-mh
$ mhn +foo 12345
$ echo $?
0
$

	Running mhn under strace(1) reveals that it tries,
	unsuccessfully, to open(2) ~/Mail/foo/12345 with O_RDWR.
	Arguably, it should've used O_RDONLY instead.

	The scan command produces a list devoid of any information for
	this folder, except for the message numbers.

	Also, for no reason obvious to me, both commands try to access
	~/Mail/foo/10000 (which is the first message in the folder) just
	as well.

	The operation on read-only folders is a generic prerequisite of
	accessing shared mail folders (such as, e. g., mailing list or
	newsgroup archives.)