@Kostya:
I discovered some interesting fact that might be helpful to you.
I have a Thunderbird (running on a Win10 desktop) configured with the option: "Allow immediate server notifications when new messages arrive". I assume that's their option for enabling IDLE/Push notifications.
The IMAP server is dovecot v. 2.2.27.
There is some strangeness in the way notifications come under Win10, but I can conclusively report the following:
When I have several new messages, and read one of them in a different e-mail client (in my case it is either alpine or Aquamail, both connected to the IMAP server), I am getting a notification for the rest of the new and still unread messages.
A note of caution here: What is strange is that [at least in some cases] I am not always getting (within some reasonable time) a notification in Aquamail about these messages before I opened one of the new messages in alpine or Aquamail. My suspicion is that there might be some interference with Win10 posting notifications.
This, obviously, has nothing to do with Aquamail.
The reason I wrote it here, is that a few weeks ago there was a thread, where a part of the problem reported was sound notifications on Aquamail from the server when a message is read on a desktop client and Push and sound notifications were enabled in Aquamail. I suggested it was likely a bug in Aquamail.
While the situation I described here is not exactly the same, and there are other factors (such as Win10 that can mess up many things) involved, it shows that [at least] some IMAP servers trigger a notification when IDLE is enabled and one of the recent new messages changes status to read (from a different e-mail client). This doesn't happen when IDLE is disabled in the client (Thunderbird).
So, very likely I was wrong about assuming it was a bug in Aquamail. My apology.