I have taken a look at virtual folders and have it working. The couple of the folders I have set up are All Mail and Flagged by creating the respective dovecot-virtual file.
The dovecot-virtual files seems to be needed in each users mailbox.
How can I auto create the required dovecot-virtual files for every mailbox?