You will need Dovecot 2.2 (Debian 8 is at 2.2.13, Ubuntu 14.04 LTS is at 2.2.9, both are fine).
To check that it's working:
Send yourself a test message, refresh "whole account" in AquaMail.
When that's done, do it again, you'll see that the app detects very quickly that there are no changes on the server, in any of the folders -- without checking each folder one by one.