On 24Dec2012 17:37, Chris Green <[email protected]> wrote: | I have the following settings in my muttrc file:- [...] | set mbox_type=mbox [...] | .... but the next-unread-mailbox command is *not* taking me to mailboxes | with unread mail. If I navigate manually to these mailboxes there are | messages flagged with N. So what's wrong? Why isn't next-unread-mailbox | finding the new mail? | | These are mailboxes listed in the 'mailboxes' command in my muttrc. | | It's as if next-unread-mailbox is first doing the same sort of check | that 'c' does and *then* looking for N messages. In my case 'c' won't | find new mail because access times have been changed by overnight | backups etc., next-unread-mailbox did seem to work yesterday (before the | backups ran).
To detect new mail in a "mbox" format file (a single file with lots of messages inside) efficiently, _without_ having ever examined the file before, the usual check is mtime > atime i.e. that a message has been appended to the file since the file was last read (implicitly by a mail reader). Backups routinely update the atime, because they read the file. So now atime > mtime. If new mail arrived in a particular mbox since the backup, it should work for that mbox. (Can you test that?) There's doco on this here: http://www.mutt.org/doc/devel/manual.html#new-mail Note particularly the $check_mbox_size mode, which lets mutt notice file size changes that happen while mutt is active. Cheers, -- Cameron Simpson <[email protected]> Think positively, act positively, and never leave fingerprints. - Robert Sneddon
