Hi Michael,
Michael wrote:
doveadm expunge -A mailbox Junk savedbefore 28d doveadm(root): Error: User listing returned failure
The mail log file says: dovecot: auth-worker(18549): Error: sql: Iterate query failed: Table 'system.users' doesn't exist (using built-in default iterate_query: SELECT username, domain FROM users)
dovecot-sql.conf: iterate_query = SELECT username AS user FROM accounts
Some examples in the wiki refer to "username", you could try this:
iterate_query = SELECT username FROM accounts
though I have had to comment the following from dovecot.conf: #iteratedb { # args = /usr/local/etc/dovecot/dovecot-sql.conf # driver = sql #} because it errors on dovecot start up.
Your primary userdb refers to dovecot-sql.lda.conf, not dovecot-sql.conf. What does /usr/local/etc/dovecot/dovecot-sql.lda.conf look like and is there an iterate_query inside this file?