Hi,
I've been researching this for a while now, and can't find a definitive answer.
I have a virtual setup, with globally static UID, GID and mail locations set. The documentation is clear that this lets me use a static userdb instead of SQL. But then, doveadm mailbox list -A requires that a valid iterate_query is set, and that requires an SQL userdb. So, which is it? If querying does not work with a static userdb, that seems like a significant caveat.
I'm also curious how this works with prefetch. I understand I can make the passdb query return static values, but I figure since I already have those configured, I shouldn't need to do that. How can I determine whether prefetching is working as intended?
Thank you.
On 13/05/2026 19:13 EEST social+17dw1scw--- via dovecot <dovecot@dovecot.org> wrote:
Hi,
I've been researching this for a while now, and can't find a definitive answer.
I have a virtual setup, with globally static UID, GID and mail locations set. The documentation is clear that this lets me use a static userdb instead of SQL. But then, doveadm mailbox list -A requires that a valid iterate_query is set, and that requires an SQL userdb. So, which is it? If querying does not work with a static userdb, that seems like a significant caveat.
I'm also curious how this works with prefetch. I understand I can make the passdb query return static values, but I figure since I already have those configured, I shouldn't need to do that. How can I determine whether prefetching is working as intended?
Thank you.
Hi!
If you are using static userdb or globally configured mail_uid,gid,etc. you cannot list users.
Where would the user list come from, Dovecot cannot invent users.
Aki
Hi,
Yes, that makes sense, of course. I guess I'm confused as to how all the different queries are used.
So, iterate_query is required which, as far as I understand, in turn uses userdb query in order to look up UID, GID and mail location, but I defined those globally, so can I not skip the userdb query and have iterate_query just fall back to the global values somehow? Listing commands fail if I don't define a userdb query, so to make it work I use a query that returns some irrelevant field, and the commands indicate the global values, as expected.
If yes, do I still need the userdb query for LMTP, while using prefetch? The page on prefetch says that "a valid userdb" is still required when using LDA or LMTP. A static userdb should still be a valid one, I reckon. Also, the static userdb section mentions that LDA "of course doesn't work with static userdb because there is no list of users", but that "normally static userdb handles this by doing a passdb lookup instead". I don't know whether this would be something that would apply to LMTP, as well, nor what "normally" means, exactly. I also have not been able to find any information regarding what data LMTP needs the userdb query to return.
participants (3)
-
Aki Tuomi
-
Lombra
-
social+17dw1scw@lombra.net