Re: [Imap-protocol] Selected mailbox deleted by another client

Bron Gondwana <[email protected]> Tue, 26 Jan 2016 10:41:35 +1100
Newsgroups gmane.mail.imap.general
Message-ID <[email protected]>
On Tue, Jan 26, 2016, at 10:15, Omar Sandoval wrote:
> I haven't actually tried it, but Dovecot apparently disconnects the
> client [2].
> 
> So, what's the correct behavior here? I'm a fan of the behavior I quoted
> above, and the Dovecot behavior also seems sane. Gmail's behavior seems
> utterly incorrect, however. NOOP is definitely not supposed to change
> the connection state, so this appears to be a bug. Any thoughts?

Cyrus has a switch called 'disconnect_on_vanished_mailbox' which gives
the same behaviour as Dovecot.  It defaults to off, but my testing just now
showed an immediate disconnect without even running the NOOP when I
ran the command, so I'll be investigating that (and adding a test case to
our testing framework)

Thanks for bringing this up :)

What Cyrus is supposed to do is to issue an EXPUNGE for every existing
message (or a VANISHED if QRESYNC is turned on) and then a NO in
response to the command.  You would remain "selected" though.

I guess you could return:

<tag> NO [CLOSED] Mailbox no longer exists

If QRESYNC is enabled...

https://tools.ietf.org/html/rfc5162#section-3.7

Another possible thing (and what Cyrus IMAP used to do for a little while
in the 2.4 series when I added long-lived index locks) is to say
"NO Mailbox is locked" to the session which tries to delete an open
mailbox.  This was bad because the situation actually occurs quite often
in practice that someone's phone or desktop is sitting there with a mailbox
open for hours or days just NOOPing away.

Bron.

-- 
  Bron Gondwana
  [email protected]
_______________________________________________
Imap-protocol mailing list
[email protected]
http://mailman13.u.washington.edu/mailman/listinfo/imap-protocol