Bug in IDLE implementation for virtual mailbox

Pali Rohár pali.rohar at gmail.com
Sun Dec 16 21:26:02 EET 2018


Hello!

I found bug in Dovecot's IDLE implementation when virtual mailbox is in
use. IDLE does not notify about new emails when email appears in newly
created mailbox and IDLE was issued in virtual folder which matches "*"
wildcard and that mailbox was created after opening virtual mailbox.

This problem is present in version 2.2.34 which is available in Debian
Stretch system with backports.

Reproducer:

1. Create virtual "All" mailbox in Gmail-like style:

$ cat All/dovecot-virtual
*
-Drafts
-Spam
-Trash
  ALL

2. Ensure that (real non-virtual) mailbox "Test" does not exist.

3. Create sieve rule which deliver some email to "Test" mailbox.

  require [ "fileinto", "mailbox" ];
  ...
  fileinto :create "Test";

4. Open dovecot imap connection, select virtual "All" mailbox and then
   enter IDLE command.

4. Send email which matches that sieve filter.

Email will be processed by dovecot sieve. As "Test" mailbox does not
exist, dovecot sieve would first create it and then deliver email into
it.

Now dovecot imap should notify IDLE client that new message into virtual
"All" mailbox was delivered (as it collects emails from all - * -
mailboxes).

But dovecot for some unknown reason does not notify via IDLE that there
is a new email.

To get notifications, it is needed to re-open that "All" mailbox again.

-- 
Pali Rohár
pali.rohar at gmail.com
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 195 bytes
Desc: not available
URL: <https://dovecot.org/pipermail/dovecot/attachments/20181216/6a21fe97/attachment-0001.sig>


More information about the dovecot mailing list