On Tuesday, 31 October 2006 at 10:35, Bob Bell wrote: > On Sun, Oct 29, 2006 at 11:01:35PM -0800, Brendan Cully wrote: > >mutt's supposed to cache the STATUS response for any mailbox it polls > >for new mail. If UIDVALIDITY matches and UNSEEN is no greater than the > >cached value, mutt concludes there is no new mail. To keep annoying > >you about new mail until you open the mailbox, mutt doesn't cache the > >UNSEEN value until you select the mailbox. > > > >My guess is either UIDVALIDITY isn't stable or mutt's failing to > >look up the cached STATUS entry properly. Either should be fairly > >obvious from mutt -d2 or -d3 output. > > Actually, the code that I see in command.c appears to be comparing > UIDNEXT, not UNSEEN. From my reading of the code, if UIDVALIDITY > matches and UIDNEXT is no greater that the cache value, mutt concludes > that there is no new mail. Otherwise, UNSEEN will be to indicate the > number of new mail messages. > > Looking at my .muttdebug# files, UIDVALIDITY is in fact stable. > However, mutt doesn't appear to be properly caching the value of > UIDNEXT. For example, look at the following selected line from my > .muttdebug0 file: > > < * STATUS "INBOX.Bob.MyPrivateFolder" (UIDNEXT 2187 UIDVALIDITY 1030314270 > UNSEEN 25) > INBOX.Bob.MyPrivateFolder (UIDVALIDITY: 1030314270, UIDNEXT: 2187) 0 > messages, 0 recent, 25 unseen > Found INBOX.Bob.MyPrivateFolder in buffy list (OV: 1030314270 ON: 0 U: 25) > < ... some lines snipped ... > > < * STATUS "INBOX.Bob.MyPrivateFolder" (UIDNEXT 2187 UIDVALIDITY 1030314270 > UNSEEN 25) > INBOX.Bob.MyPrivateFolder (UIDVALIDITY: 1030314270, UIDNEXT: 2187) 0 > messages, 0 recent, 25 unseen > Found INBOX.Bob.MyPrivateFolder in buffy list (OV: 1030314270 ON: 0 U: 25) > > It's my understand that "ON" should be reflecting the cache UIDNEXT > value. That is, it should be 2187, but it is never set. Therefore, > mutt always thinks the folder has new mail. > > I can continue to look for the root problem when/if I get a chance, but > I thought that perhaps this information had a chance of triggering an > "ah, I know what must be wrong" thought... Actually ON isn't cached until the mailbox is open. Otherwise when you started mutt, it would tell you there was new mail in mailbox FOO, then forget about it the next time it polled. ON should reflect the value of UIDNEXT from the last time you opened the mailbox.
Attachment:
pgpdnBnO5USsy.pgp
Description: PGP signature