Dear all, Lately I am working on PHP mail account management application. It has, among others, Unread messages count column. To get the number of unread messages, I execute "doveadm search" command for each database row. The search time for single account is about 0.03 seconds. Our system has around 750 accounts, so the total loading time is currently around 20 seconds. When setting up Dovecot, I made the user_query, which is also used to store the message quota, and total number of messages stored in particular mailbox. Is there a keyword that can be included in the user_query, or some other way to maintain the unread messages count in the database? Maybe there is a way to execute a script every time a message is received, or becomes read, or unread. Kind regards,JC