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>
On 16 Dec 2018, at 21.26, Pali Roh?r <pali.rohar at gmail.com> wrote:> > 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.It actually has nothing to do with IDLE specifically. It's just that the virtual storage code doesn't try to look for new folders after the virtual mailbox is opened.> To get notifications, it is needed to re-open that "All" mailbox again.Right. I don't think this is going to be fixed anytime soon. Quite a lot of effort and it can be worked around.
On Sunday 16 December 2018 21:55:23 Timo Sirainen wrote:> On 16 Dec 2018, at 21.26, Pali Roh?r <pali.rohar at gmail.com> wrote: > > > > 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. > > It actually has nothing to do with IDLE specifically. It's just that the virtual storage code doesn't try to look for new folders after the virtual mailbox is opened. > > > To get notifications, it is needed to re-open that "All" mailbox again. > > Right. I don't think this is going to be fixed anytime soon. Quite a lot of effort and it can be worked around.How to workaround it? Imap clients uses either IDLE or STATUS or LIST (with STATUS) commands for checking if there is a new messages. But none of these commands reports existence of new message until that virtual folder is re-opened. -- Pali Roh?r pali.rohar at gmail.com