On Tue, Dec 25, 2012 at 02:08:44PM +1100, Cameron Simpson wrote:
> 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).
> 
Yes, I *know* this.


> Backups routinely update the atime, because they read the file.
> So now atime > mtime.
> 
Exactly!


> 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.
> 
I want to *avoid* all this complexity, I simply want a command which
will scan through all my incoming mail mailboxes and take me to the ones
which have messages marked N in them.  OK, it'll be a bit slower than
the (default) way that 'c' works but it will not be dependent on
operating system quirks which may or may not change the access times in
unwanted ways.

Surely this isn't too much to want?

I thought it was what next-unread-mailbox does but it would appear not.

-- 
Chris Green

Reply via email to