Author sdaoden
Recipients r.david.murray, sdaoden
Date 2011-05-05.10:54:11
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <20110505105402.GA79405@sherwood.local>
In-reply-to <>
On Thu,  5 May 2011 03:52:29 +0200, R. David Murray wrote:
> [..] the shell [..] I believe it just looks at the mtime/atime.

/* check_mail () is useful for more than just checking mail.  Since it has
   the paranoids dream ability of telling you when someone has read your
   mail, it can just as easily be used to tell you when someones .profile
   file has been read, thus letting one know when someone else has logged
   in.  Pretty good, huh? */

          /* If the user has just run a program which manipulates the
             mail file, then don't bother explaining that the mail
             file has been manipulated.  Since some systems don't change
             the access time to be equal to the modification time when
             the mail in the file is manipulated, check the size also.  If
             the file has not grown, continue. */

         /* If the mod time is later than the access time and the file
             has grown, note the fact that this is *new* mail. */

> Not all system mail spools are mode 1777.  Mutt needs to be
> setgid mail on systems that aren't, if I understand correctly.
> Making a python program setgid mail is a bit more of security
> issue than making a well-tested C program setgid, since it is
> easier to break out of the box in a python program.

Ok, maybe set-group-ID on /var/mail isn't even necessary;
    0 drwxrwxx-x    3 root      mail       102  5 May 11:30 mail
is enough as long as
    $ groups $USER
states you are member of group mail.  On my system
doesn't have any problems with modifying the mail directory.
If this is not true on your box go and stress your admin, he's not
worth his money - is he?
I.e., whereas it is possible to rewrite to handle issue
#7359 i would not do so because it is unnecessary on correctly
setup boxes.  Maybe has used so much copy-and-paste
from mutt(1)'s mbox.c because that code works well for many years.
And Jason seems to work as root all of the time.

> mailbox is an mbox manipulation program, not a mail delivery
> agent.  If you are using it to write a mail delivery agent,
> I think perhaps the mtime setting code belongs in your
> application, not the mailbox module.

I really don't understand your point now.
Of course the standart is soft like butter in that it seems to
assume that the spool mailbox is then locally processed and
truncated to zero length, so that "mailbox has grown==new mail
arrived", whereas it is also possible to use that spool file as
a real local mailbox, including resorting, partial deletion etc..

This issue is about fixing to adhere MMDF and MBOX
standarts, which is what the patch implements.
This patch works for me locally in that mutt(1) will mention that
new mail has arrived in the boxes.

The patch uses a safe approach by dating back the access time
instead of pointing modification time into the future, which
however will make the patch fail on Pear OS X if the mailbox is on
HFS, case sensitive, because that is buggy and *always* updates
atime; maybe this is because Apple only provides a shallow wrapper
around UFS to integrate that in the Microkernel/IOKit structure,
just in case HFS, case sensitive is really UFS, but i'm guessing
in all directions here.  I would not adjust the patch to fix this,
but the problem exists and it has been noted in this issue.

Date User Action Args
2011-05-05 10:54:13sdaodensetrecipients: + sdaoden, r.david.murray
2011-05-05 10:54:12sdaodenlinkissue11935 messages
2011-05-05 10:54:11sdaodencreate