dovecot iterate_query for doveadm isn't working
short description
after a fresh ispconfig installation (git master) doveadm command isn't working:
# doveadm search -A mailbox Junk
Error: User listing returned failure
doveadm: Error: Failed to iterate through some users
correct behaviour
doveadm should be working ;)
environment
Server OS: debian Server OS version: stretch ISPConfig version: git master (3.1dev)
proposed fix
This is what is added in dovecot-sql.conf with the ispconfig installation:
iterate_query = SELECT email as user FROM mail_user WHERE `disable%Ls` = 'n' AND server_id = '1'
It seems that the %s (L is for lowercase) is unset when called by doveadm. So the query will fail as there's no 'disable' field in the table.
I think it has to be hardcoded as
iterate_query = SELECT email as user FROM mail_user WHERE `disabledoveadm` = 'n' AND server_id = '1'
log entries
Feb 15 09:45:15 test1 dovecot: auth-worker(4678): Warning: mysql: Query failed, retrying: Unknown column 'disable' in 'where clause'
Feb 15 09:45:15 test1 dovecot: auth-worker(4678): Error: sql: Iterate query failed: Unknown column 'disable' in 'where clause'