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:
- Create virtual "All" mailbox in Gmail-like style:
$ cat All/dovecot-virtual * -Drafts -Spam -Trash ALL
Ensure that (real non-virtual) mailbox "Test" does not exist.
Create sieve rule which deliver some email to "Test" mailbox.
require [ "fileinto", "mailbox" ]; ... fileinto :create "Test";
Open dovecot imap connection, select virtual "All" mailbox and then enter IDLE command.
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@gmail.com