Looked at the hg commits since 2.1.1, but didn't see anything that was
exactly on-point to this...
UNSEEN counts seem to be broken when done in a LIST-STATUS call. I
see this, for example:
Timestamp: Thu, 01 Mar 2012 10:55:47 -0700 [...] C: 3 LIST "" (INBOX IN.dovecot) RETURN (STATUS (UNSEEN)) S: * LIST () "." "IN.dovecot" S: * STATUS "IN.dovecot" (UNSEEN 0) S: * LIST () "." "INBOX" S: * STATUS "INBOX" (UNSEEN 3) S: 3 OK List completed.
3 seconds later...
Timestamp: Thu, 01 Mar 2012 10:55:50 -0700 S: * OK [CAPABILITY IMAP4rev1 LITERAL+ LOGIN-REFERRALS ID ENABLE
AUTH=LOGIN XIMAPPROXY] Dovecot ready. C: [LOGIN Command - username: slusarz] S: * OK [XPROXYREUSE] IMAP connection reused by squirrelmail-imap_proxy S: 1 OK User logged in C: 2 EXAMINE IN.dovecot (QRESYNC (1254166849 25800
18484,20260,20393,20705,20860:20868)) S: * FLAGS (\Answered \Flagged \Deleted \Seen \Draft impflag1 impflag2
impflag0 Junk seen NonJunk) S: * OK [PERMANENTFLAGS ()] Read-only mailbox. S: * 13 EXISTS S: * 0 RECENT S: * OK [UNSEEN 5] First unseen. S: * OK [UIDVALIDITY 1254166849] UIDs valid S: * OK [UIDNEXT 20869] Predicted next UID S: * OK [HIGHESTMODSEQ 25800] Highest S: 2 OK [READ-ONLY] Select completed. [...] C: 7 SEARCH RETURN (COUNT) UNSEEN S: * ESEARCH (TAG "7") COUNT 8 S: 7 OK Search completed (0.000 secs).
I can confirm that I did not receive 8 dovecot list messages in 3 seconds. :)
Once the mailbox is accessed, I am seeing correct counts in
LIST-STATUS return again:
Timestamp: Thu, 01 Mar 2012 10:57:28 -0700 [...] C: 3 LIST "" (INBOX IN.dovecot) RETURN (STATUS (UNSEEN)) S: * LIST () "." "IN.dovecot" S: * STATUS "IN.dovecot" (UNSEEN 8) S: * LIST () "." "INBOX" S: * STATUS "INBOX" (UNSEEN 3) S: 3 OK List completed.
I am using imapproxy for these connections, so all access are
happening in the same Dovecot access.
michael