[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@do.main"
- LIST (\HasNoChildren) "/" "Shared/user@do.main/INBOX"
- LIST (\HasChildren) "/" "Public" . OK List completed.
. LIST "Shared/" *
- LIST (\Noselect \HasChildren) "/" "Shared/user@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 } ...
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
Am 16.12.2010 13:39, schrieb Charles Marcus:
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)...
You're right, I forgot at least to include the dovecot version ;-) Here is the full doveconf -n output:
# 2.0.8: /etc/dovecot/dovecot.conf # OS: Linux 2.6.35-23-virtual x86_64 Ubuntu 10.10 auth_mechanisms = plain login digest-md5 cram-md5 apop debug_log_path = /var/log/dovecot/debug.log disable_plaintext_auth = no info_log_path = /var/log/dovecot/info.log lmtp_save_to_detail_mailbox = yes log_path = /var/log/dovecot/error.log mail_location = maildir:~/Maildir mail_plugins = " quota acl listescape zlib lazy_expunge" namespace { hidden = yes list = no location = maildir:~/expunged prefix = .EXPUNGED/ separator = / type = private } namespace { list = children location = maildir:%%h/Maildir:INDEX=~/shared/%%u prefix = Shared/%%u/ separator = / subscriptions = no type = shared } namespace { list = no location = cydir:/var/spool/imap/public:INDEX=~/public prefix = Public/ separator = / subscriptions = no type = public } namespace { inbox = yes location = prefix = separator = / type = private } passdb { args = /etc/dovecot/dovecot-sql.conf.ext driver = sql } plugin { acl = vfile acl_shared_dict = file:/var/spool/imap/shared-mailboxes.dict lazy_expunge = .EXPUNGED/ quota = dict:Mailbox::file:%h/Maildir/dovecot-quota quota_rule = *:storage=1G quota_rule2 = Trash:storage=+50M sieve = ~/.dovecot.sieve sieve_dir = ~/sieve } protocols = imap pop3 sieve service auth { unix_listener auth-exim { user = Debian-exim } unix_listener auth-userdb { user = vmail } } service lmtp { inet_listener lmtp { port = 24 } } service managesieve-login { inet_listener sieve { port = 4190 } inet_listener sieve_deprecated { port = 2000 } } userdb { args = /etc/dovecot/dovecot-sql.conf.ext driver = sql } protocol lmtp { mail_plugins = " quota acl listescape zlib lazy_expunge sieve" } protocol lda { mail_plugins = " quota acl listescape zlib lazy_expunge sieve" } protocol imap { mail_plugins = " quota acl listescape zlib lazy_expunge imap_quota imap_acl imap_zlib" }
On Thu, 2010-12-16 at 09:26 -0500, Charles Marcus wrote:
On 2010-12-16 8:59 AM, Holger Mauermann wrote:
Here is the full doveconf -n output:
# 2.0.8: /etc/dovecot/dovecot.conf # OS: Linux 2.6.35-23-virtual x86_64 Ubuntu 10.10
Timo - am I crazy, or did this output used to include the filesystem too?
Only when mail_location path is absolute, otherwise Dovecot doesn't know what mount point to look at.
Timo Sirainen put forth on 12/16/2010 9:34 AM:
On Thu, 2010-12-16 at 09:26 -0500, Charles Marcus wrote:
On 2010-12-16 8:59 AM, Holger Mauermann wrote:
Here is the full doveconf -n output:
# 2.0.8: /etc/dovecot/dovecot.conf # OS: Linux 2.6.35-23-virtual x86_64 Ubuntu 10.10
Timo - am I crazy, or did this output used to include the filesystem too?
Only when mail_location path is absolute, otherwise Dovecot doesn't know what mount point to look at.
I had noticed that as well Charles. I previously had an empty mail_location value and I didn't see the filesystem reported in dovecot -n output. I just changed to specifying mail_location with
mail_location: mbox:/home/%u/mail:INBOX=/var/mail/%u
and I now see this:
# 1.2.15: /etc/dovecot/dovecot.conf # OS: Linux 2.6.34.1 i686 Debian 5.0.7 xfs
Note that /var/mail resides in the root filesystem on an EXT2 partition, and that /home is an XFS partition. So dovecot -n is only reporting the filesystem where mailboxes reside, not where the INBOX resides. Would it be preferable that it report both if they are on different mount points/filesystems?
-- Stan
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
Holger Mauermann wrote:
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?
Eh, hard to say.
From RFC 3501: ... A non-empty reference name argument is the name of a mailbox or a level of mailbox hierarchy, and indicates the context in which the mailbox name is interpreted.
But, later on it says: Note: The interpretation of the reference argument is implementation-defined. and: A client SHOULD NOT use such a reference argument except at the explicit request of the user.
So, email clients are supposed to do LIST "" "Shared/*" instead of LIST "Shared/" *
As far as I can tell, the first one does work on Dovecot. I can get the second form to work as long as it's an actual mailbox name. e.g., LIST Shared/someuser/ * works just fine as well -- at least with my set up.
So, short answer: yes and no. Dovecot could return all shared mailboxes, but it is not required to do so.
Am 17.12.2010 01:35, schrieb Willie Gillespie:
Eh, hard to say.
From RFC 3501: ... A non-empty reference name argument is the name of a mailbox or a level of mailbox hierarchy, and indicates the context in which the mailbox name is interpreted.
But, later on it says: Note: The interpretation of the reference argument is implementation-defined.
I really should read RFC 3501 completely. It's been many years since I tried to understand the now obsolete RFC 2060 ;-) I always thought that LIST "some/mail/box/" "*" LIST "" "some/mail/box/*" LIST "some/mail/" "box/*" are all equivalent.
and: A client SHOULD NOT use such a reference argument except at the explicit request of the user.
Hmmm, but this paragraph starts with:
If the reference argument is not a level of mailbox hierarchy (that is, it is a \NoInferiors name), and/or the reference argument does not end with the hierarchy delimiter, it is implementation-dependent how this is interpreted. ... A client SHOULD NOT use such a reference argument except at the explicit request of the user.
So Shared/ seems to be a valid reference argument that may be used by clients, because it is a level of mailbox hierarchy, it is not a \NoInferiors name and it ends with the hierarchy delimiter.
Anyway, it works now. Thunderbird always uses "" as reference argument to list the shared namespace. And for LIST "" "Shared/*" dovecot returns all sub mailboxes. However, I still don't know why TB first displayed only Shared/user@do.main without the shared mailboxes...
Holger
On Thu, 2010-12-16 at 01:38 +0100, Holger Mauermann wrote:
. LIST "" *
- LIST (\HasNoChildren) "/" "INBOX"
- LIST (\Noselect \HasChildren) "/" "Shared/user@do.main"
- LIST (\HasNoChildren) "/" "Shared/user@do.main/INBOX"
- LIST (\HasChildren) "/" "Public" . OK List completed.
. LIST "Shared/" *
- LIST (\Noselect \HasChildren) "/" "Shared/user@do.main" . OK List completed.
This is a bug since it doesn't show the Shared/user@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=~/public
You 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.
participants (5)
-
Charles Marcus
-
Holger Mauermann
-
Stan Hoeppner
-
Timo Sirainen
-
Willie Gillespie