Re: Serious problems with multiple connections working with the same mailbox
Andreas Aardal Hanssen <[email protected]> Fri, 23 Sep 2005 10:13:44 +0200 (CEST)
| Newsgroups | gmane.mail.imap.binc.devel |
|---|---|
| Message-ID | <[email protected]> |
On Fri, 23 Sep 2005, [ISO-8859-1] Jerry Lundstr=F6m wrote: >1: TAG NOOP >1: * 611 EXISTS >1: TAG OK NOOP completed >1: TAG FETCH 611 FLAGS >1: * 611 FETCH (FLAGS ()) >1: TAG OK FETCH completed >2: TAG FETCH 611 FLAGS >2: * 611 EXISTS >2: TAG OK FETCH completed This is perfectly normal behavior. The server for connection 2 does not know about message 611, so it returns no flags to the request (because 611 is outside the known message set). It does, however, report a new message arrival as part of the pending updates. Only after receiving the EXISTS response can the client make assumptions about the result of FETCH on that message. So the client on connection 2 is misbehaving, regardless of whether connection 1 is held by the same client. Each connection has a separate state in IMAP. The proper client behavior is to first issue the NOOP, then the FETCH. It cannot and must not assume that 611 exists on all connections just because connection 1 reported it. :-) This is also why EXPUNGE responses are not allowed as part of a pending update. If I have understood the problem correctly, the fix should be reverted and a bug report should be filed to the relevant client authors. :-) Andy -- Andreas Aardal Hanssen | http://www.andreas.hanssen.name/gpg Author of Binc IMAP | "It is better not to do something http://www.bincimap.org/ | than to do it poorly."