On 20/07/2026 11:38, MK via dovecot wrote:
Hi!
I have a problem with Dovecot on Debian 13:
Dovecot 2.4.1, Debian Trixie
> doveadm mailbox path -A INBOX >/dev/null
doveadm(email@domain): Error: auth-master: userdb list: User listing
returned failure
doveadm: Error: cmd mailbox path: Failed to iterate through some users
userdb sql {
iterate_query = SELECT `email` AS `user` FROM `users`
}
In syslog file:
dovecot: auth: Error: auth-worker: Aborted LIST request for *: Shutting down
I have over 30k users in sql DB, doveadm with -A option is dying few
second after start with this error, printing about 10% of users.
I need much more time (FE command "doveadm expunge -A mailbox Spam
savedbefore 3w" could run over 30 minutes).
What I'm doing wrong?
I had the same problem with `doveadm -A` commands after upgrading from Debian
12 to Debian 13 including dovecot upgrade from 2.3.19 to 2.4.1.
My current theory is that changes in how SQL is integrated in 2.4 are causing the
iterate query session to time out during something you do > with doveadm and -A
option and a larger amout of users.
I wrote about this last week, you can find it under the title "doveadm backup /
purge problems since migration from 2.3 to 2.4".
My current workarround is a script that generates a user list via doveadm user '*'
, cached this and then execute the doveadm command you need > for each user in
this list. Works for me with arround 4k user.
Since this is the second time I heard of that is here anyone else who had the
same problem?
I thought it might be a problem on my end, but it seems to be an issue with
Dovecot 2.4 since I'm clearly not the only one who is affected.
Maybe someone from the dovecot Team has heared about it? Would be nice if this
can be fixed and I can use -A option since before.
Oliver
Hi
it appears to be a bug in dovecot 2.4.x when iterating thousands of users.
See
https://dovecot.org/mailman3/archives/list/[email protected]/message/P5QBZAYXNAMNYHYA3BRLN4J3GUKX26WP/
The fix I posted there did bypass the issue during a test I did. I am
not sure it could be treated as a definitive fix. Another workaround is
to iterate outside dovecot.
John
Hi,
did you get a feedback from someone of the dovecot developer? Since your
request is 4 month ago.
So this sounds like my used workarround seem to be the best we can do at the
moment, as Philip did the same.
Do you have experiences if this works with about 40k users or more too?
(doveadm user '*', cache this and then execute doveadm -u for each user)
Oliver
__________
Hi Oliver
so far I haven't seen any follow up from the development team.
In my experience doveadm user '*' also runs into the same trouble for
large numbers of users. I got issues with even 20K users on 2.4.x.
Where the users are in a mysql database, you could query the db directly
to get the usernames and then execute doveadm -u for each user.
John
_______________________________________________
dovecot mailing list -- [email protected]
To unsubscribe send an email to [email protected]