On 2015-08-26 17:07 -0700, Ian Zimmerman wrote:

> On 2015-08-27 01:00 +0200, Joe wrote:
> 
> > mtime (Aug 26 17:16) > atime (Aug 26 23:48)
> > 
> > As explained by "Ian Zimmerman" and by man pages of mbox(5):
> > ---
> > If the modification-time (usually determined via stat(2)) of a nonempty mbox
> > file is greater than the access-time the file has new mail.
> > ---
> > 
> > This should mean our "mail.test" mailbox contains new messages and I would
> > expect Mutt shows "N" flag when I'm in "browser menu".
> 
> No, it is the opposite (as I had written correctly but you
> misinterpreted).
> 
> When new mail is delivered, _both_ mtime and atime should under normal
> circumstances get bumped, so they're the same; this is the "new" state.
> When something reads the file (be it a MUA or something else by
> accident, for example if you manually view the mailbox with a pager),
> the atime is bumped but the mtime is not.  This is the "old" state.

I was wrong, but you aren't exactly right, either :-P

Check the code, in buffy.c, buffy_mbox_hasnew().  It's a good deal more
complicated, and there are quite a few more ways it could be messed up.
Including, but maybe not limited to, the config options check_mbox_size
and mail_check_recent.

-- 
Please *no* private copies of mailing list or newsgroup messages.
Rule 420: All persons more than eight miles high to leave the court.

Reply via email to