Just finished fixing a bug with our setup where the "archive" pseudo-user we setup wasn't listing the correct dirs in IMAP yet would show their other mailboxes, folders, etc. just fine via `doveadm mailbox list`. Turns out the issue was that the 'user' field is more important on dovecot 2.4's IMAP implementation than on 2.3, but in ways that the documentation didn't really suggest to me. In both cases it says that it overrides the user, but what that means is different.
On 2.3, it's mostly saying "act as if you are this user but with these other params we set in the user/passdb return" On 2.4.x, it is a straight up alias to another userdb/passdb return in IMAP's context, so any other params you override do not in fact get used. You can pretty quickly verify this with `doveadm user`/`doveadm auth lookup` calls; when your "override" user matches another user which has an entry reported back from your userdb/passdb, it just returns their data instead even if your auth source provided other data. What's odd to me is more that `doveadm mailbox list` worked "as expected" here, as everything else was consistent with 'user' being an aliasing trigger. I wound up fixing my bug by just no longer setting the 'user' variable for this archival psuedo-user, and instead relying on the (already set even on 2.3) uid/gid fields to make sure they didn't have permissions errors. Then things worked precisely how they did on 2.3. I only figured this out by accidentally making a new IMAP dir for the original user and then noticing that show up for the pseudo-user (I then scrutinized the userdb/passdb returns more carefully, then noticing the difference). Hopefully my tale helps others avoid the many hours of fruitless debugging I was doing before making that crucial mistake lol. Cheers, -- Thomas "Andy" Baugh | Software Development Engineer IV [email protected] www.webpros.com _______________________________________________ dovecot mailing list -- [email protected] To unsubscribe send an email to [email protected]
