Holger Mauermann
2010-Dec-16 00:38 UTC
[Dovecot] namespace and list=children inconsistencies
Hi, after setting up a new Dovecot server with shared and public namespaces, both with hidden=no and list=children, I see some inconsistency in the folder listing. . NAMESPACE * NAMESPACE (("" "/")) (("Shared/" "/")) (("Public/" "/")) . OK Namespace completed. . LIST "" * * LIST (\HasNoChildren) "/" "INBOX" * LIST (\Noselect \HasChildren) "/" "Shared/user at do.main" * LIST (\HasNoChildren) "/" "Shared/user at do.main/INBOX" * LIST (\HasChildren) "/" "Public" . OK List completed. . LIST "Shared/" * * LIST (\Noselect \HasChildren) "/" "Shared/user at do.main" . OK List completed. . LIST "Public/" * . OK List completed. With LIST "Shared/" the other users INBOX is missing, so with namespace capable clients like Thunderbird it is impossible to see or subscribe this folder. The "Public/" namespace has some subfolders, but only for other acl_groups and I don't have rights to access any of them. So the LIST "Public/" looks good. However, with LIST "" * it is shown without the trailing slash and with \HasChildren where it should be hidden. Here is the relevant doveconf -n output: ... namespace { list = children location = maildir:%%h/Maildir:INDEX=~/shared/%%u prefix = Shared/%%u/ separator = / subscriptions = no type = shared } namespace { list = children location = cydir:/var/spool/imap/public:INDEX=~/public prefix = Public/ separator = / subscriptions = no type = public } ...
Charles Marcus
2010-Dec-16 12:39 UTC
[Dovecot] namespace and list=children inconsistencies
On 2010-12-15 7:38 PM, Holger Mauermann wrote:> Here is the relevant doveconf -n output: > ...Please always include *full* doveconf -n output, not just what you *think* is relevant... its not that much more, and includes extra info that people sometimes forget - like dovecot version (and filesystem, etc)... -- Best regards, Charles
Holger Mauermann
2010-Dec-16 23:30 UTC
[Dovecot] namespace and list=children inconsistencies
Am 16.12.2010 01:38, schrieb Holger Mauermann:> With LIST "Shared/" the other users INBOX is missing, so with namespace > capable clients like Thunderbird it is impossible to see or subscribe > this folder.After restarting Thunderbird now I can see and subscribe the other users INBOX. However, I still think that a "LIST Shared/ *" should include *all* sub mailboxes. Or am I wrong?> The "Public/" namespace has some subfolders, but only for other > acl_groups and I don't have rights to access any of them. So the LIST > "Public/" looks good. However, with LIST "" * it is shown without the > trailing slash and with \HasChildren where it should be hidden.I found a solution for this annoying "Public/" namespace vs. nonexistent "Public" mailbox behavior: I'm trying to setup per-domain public folders. First I used location=cydir:/path/%d/public:..., but Dovecot doesn't expand the %d variable inside type=public namespaces. Next I used location=cydir:/path/public:... and created /path/public/do.main and a dovecot-acl file inside with content "group=do.main lrswi". This works fine for users with the acl_groups=do.main extra field, they see their Public/ namespace. But users without a group or users in a group for that no public folder exists are wondering why they see a "Public" mailbox, which gives an error on select or subscribe... Now I return CONCAT('cydir:/path/', `domain`, '/public:INDEX=~/public') AS `namespace/pub/location` in the user_query, which works fine for all users in all domains :-) as long as there is either no subfolder or a subfolder/dovecot-acl with "anyone lrs" in /path/do.main/public. Holger
On Thu, 2010-12-16 at 01:38 +0100, Holger Mauermann wrote:> . LIST "" * > * LIST (\HasNoChildren) "/" "INBOX" > * LIST (\Noselect \HasChildren) "/" "Shared/user at do.main" > * LIST (\HasNoChildren) "/" "Shared/user at do.main/INBOX" > * LIST (\HasChildren) "/" "Public" > . OK List completed. > > . LIST "Shared/" * > * LIST (\Noselect \HasChildren) "/" "Shared/user at do.main" > . OK List completed.This is a bug since it doesn't show the Shared/user at do.main/INBOX. I'll look into it.> . LIST "Public/" * > . OK List completed.This is expected.> namespace { > list = children > location = cydir:/var/spool/imap/public:INDEX=~/publicYou really shouldn't be using cydir. It's mainly intended for testing and for learning how to implement a Dovecot storage backend. You should use sdbox instead.