There is a bug in /etc/dovecot/dovecot-mysql.conf that prevents doveadm to iterate through all users (with option -A eg. doveadm expunge -A mailbox Trash savedbefore 90d)
To fix this problem it is necessary to add this line: iterate_query = SELECT username as user FROM mailbox