[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Strange IMAP "recent" update strangeness - bug or expected?



tl;dr: There is a development repository and branch that provides a fix for
this behavior, some explanations can be found here:

<http://article.gmane.org/gmane.mail.wanderlust.general.japanese/9045>

At Fri, 08 Jun 2012 16:04:25 -0600,
Ken Gunderson wrote:
> 
> Greetings List:
> 
> Wanderlust's handling of IMAP seems incongruent with expected
> behavior.  For example, if I "sync" %INBOX from within folder buffer
> _prior_ to having called up a summary buffer for that particular
> %INBOX, I will get correct reports for recent, unseen, and total
> message numbers.  Subsequently sending test message to that account
> from a different box and issuing another sync also updates counts
> correctly.
> 
> If, however, I have viewed a summary buffer for that %INBOX, then
> while unseen and total counts are updated, recent count is _not_
> updated.  Such might be expected if the summary buffer were still
> open, but even after it's been killed?  Moreover, Wanderlust continues
> to behave in this manner for seemingly any number of new incoming
> messages _unless_ I wait 30 mins for server side idle timeout.  

Open the summary SELECTs the mailbox and IIRC WL does not de-select
the mailbox when you quit summary view. Does the server disconnect
after 30mins?

> 
> I turned on elmo-imap4-debug and collected following as example:
> 
> [15:23:25] <- elmo-imap418 status INBOX (recent unseen messages uidnext)
> [15:23:25] -> * STATUS INBOX (MESSAGES 2380 RECENT 0 UIDNEXT 27521 UNSEEN 25)
> [15:23:25] -> elmo-imap418 OK Completed
> *elmo-imap418* OK arrived
> [15:23:25] => ((ok nil) (status ((unseen 25) (uidnext 27521) (recent 0) (messages 2380))))
> 
> Above is "base" reference.  Following after I sent some emails from
> another machine:
> 
> [15:24:16] <- elmo-imap419 status INBOX (recent unseen messages uidnext)
> 
> Above is sync" on INBOX folder
> 
> [15:24:16] -> * 2381 EXISTS
> [15:24:16] -> * 4 RECENT
> 
> Here we can see server responded that there were 4 "new" messages

WL does not care about untagged responses by default (violating
RFC3501, 7.3.; MUST be recorded by the client).

> 
> [15:24:16] -> * STATUS INBOX (MESSAGES 2381 RECENT 0 UIDNEXT 27522 UNSEEN 26)
> 
> Yet here status reports "0" recent messages

If the mailbox is still SELECTed then calling STATUS conflicts with
RFC3501, 6.3.10 (command SHOULD NOT be used on selected mailbox) and
using it to obtain information about new messages violates
6.3.10. (MUST NOT be used as a "check for new messages in the selected
mailbox").

From my interpretation of the IMAP specs the server response in this
case is undefined, thus the 0 RECENT but increased UNSEEN and MESSAGES
is totally normal.

The problem w/ STATUS on SELECTed mailbox is an outstanding bug:

,----[ BUGS ]
| * IMAP STATUS command MUST NOT be used as a "check for new messages in the
|   selected mailbox" operation (RFC3501)
`----

Best,
  -- David
-- 
OpenPGP... 0x99ADB83B5A4478E6
Jabber.... dmjena@jabber.org
Email..... dmaus@ictsoc.de

Attachment: pgpfjPOpMMzdQ.pgp
Description: OpenPGP Digital Signature