[Dovecot] how to announce shared folders to clients using non-default mail prefix
We're using dovecot 2.1.3 and I've been doing some testing with 2.1.7. We have shared mail (maildir) folders working along with our default mbox mailboxes. Our problem is trying to get this to work in a reasonable fashion with our iPhone or iPad mail.app clients. It's well known that they don't honor the subscription list; they show all available mail folders and do not collapse trees of folders. I have 381 folders in directories under mail. Normal clients are fine, but this is unmanageable in IOS.
What we have been doing is changing the mail prefix for the iPhone to a subfolder, then using soft links to point to the most commonly used folders we use. This works, but when one changes the mail prefix, any shared folders are not presented. I'm suspicious that this is a design decision. If there is some way to make it work, I'd be very grateful.
Note the two 'sharedimap' folders listed in the first 'list'.
Note that if I change the prefix for that shared namespace to 'iphonemail/', it does present my shared folders as well as anything in a personal iphonemail directory. However, 'select' didn't work with the personal folders. My guess is it's mostly due to the difference in mail formats between the two (mbox & maildir). But, it does show that somewhere in the code it's checking the mail prefix against namespaces and not displaying shared folders in non-default prefixes. I wish this were a configurable option.
thank you
Tom Lieuallen Oregon State University
. list "" *
- LIST (\Noselect \HasChildren) "/" "foo1"
- LIST (\NoInferiors \UnMarked) "/" "foo1/folder1"
- LIST (\Noselect \HasChildren) "/" "iphonemail"
- LIST (\NoInferiors \Marked) "/" "iphonemail/foo1"
- LIST (\NoInferiors \UnMarked) "/" "Sent"
- LIST (\NoInferiors \UnMarked) "/" "Trash"
- LIST (\HasNoChildren) "/" "INBOX"
- LIST (\HasNoChildren) "/" "sharedimap/cesupport"
- LIST (\HasNoChildren) "/" "sharedimap/mimesupport" . OK List completed. . list "iphonemail/" *
- LIST (\NoInferiors \Marked) "/" "iphonemail/foo1" . OK List completed.
===============
# 2.1.7: /private/dovecot/etc/dovecot/dovecot.conf # OS: SunOS 5.10 sun4v auth_debug = yes auth_verbose = yes default_client_limit = 10245 default_process_limit = 5120 first_valid_uid = 100 mail_location = mbox:~/mail:INBOX=/var/mail/%u:INDEX=/a2/imap-index/%u mail_nfs_storage = yes mail_plugins = quota acl namespace { inbox = yes location = prefix = separator = / type = private } namespace { hidden = yes inbox = no list = children location = maildir:/a1/dove-shared:INDEX=/a2/imap-index/dove-shared/%u prefix = sharedimap/ separator = / type = shared } passdb { driver = pam } passdb { args = scheme=CRYPT username_format=%u /private/dovecot/etc/passwd driver = passwd-file } plugin { acl = vfile quota = fs:INBOX:mount=/a1 quota2 = fs:Home quota:mount=%h } protocols = imap lmtp service imap-login { inet_listener imaps { port = 993 ssl = yes } process_min_avail = 16 service_count = 1 } service imap { process_limit = 2048 } ssl_ca = </private/ssl/certs/SSL_CA_Bundle.pem ssl_cert = </private/ssl/certs/mail.crt ssl_key = </private/ssl/certs/mail.key userdb { driver = passwd } userdb { args = username_format=%u /private/dovecot/etc/passwd driver = passwd-file } protocol imap { mail_plugins = quota acl imap_quota imap_acl } protocol pop3 { pop3_uidl_format = %08Xv%08Xu }
On 8.6.2012, at 3.34, Tom Lieuallen wrote:
Note that if I change the prefix for that shared namespace to 'iphonemail/', it does present my shared folders as well as anything in a personal iphonemail directory. However, 'select' didn't work with the personal folders. My guess is it's mostly due to the difference in mail formats between the two (mbox & maildir).
You should be able to use prefix=iphonemail/shared/
On 6/11/12 5:21 AM, Timo Sirainen wrote:
On 8.6.2012, at 3.34, Tom Lieuallen wrote:
Note that if I change the prefix for that shared namespace to 'iphonemail/', it does present my shared folders as well as anything in a personal iphonemail directory. However, 'select' didn't work with the personal folders. My guess is it's mostly due to the difference in mail formats between the two (mbox& maildir).
You should be able to use prefix=iphonemail/shared/
Timo et all,
Unfortunately, that did not work.
l list "" *
- LIST (\Noselect \HasChildren) "/" "foo1"
- LIST (\NoInferiors \UnMarked) "/" "foo1/folder1"
- LIST (\Noselect \HasChildren) "/" "iphonemail"
- LIST (\NoInferiors \Marked) "/" "iphonemail/foo1"
- LIST (\NoInferiors \UnMarked) "/" "Sent"
- LIST (\NoInferiors \UnMarked) "/" "Trash"
- LIST (\HasNoChildren) "/" "INBOX"
- LIST (\HasNoChildren) "/" "sharedimap/cesupport"
- LIST (\HasNoChildren) "/" "sharedimap/mimesupport"
- LIST (\HasNoChildren) "/" "iphonemail/sharedimap/cesupport"
- LIST (\HasNoChildren) "/" "iphonemail/sharedimap/mimesupport" l OK List completed.
l list "iphonemail/" *
- LIST (\NoInferiors \Marked) "/" "iphonemail/foo1" l OK List completed.
So, the shared folders are listed twice when I do not include a prefix and neither are shown at all when I do include a prefix.
namespace { hidden = yes inbox = no list = children location = maildir:/a1/dove-shared:INDEX=/a2/imap-index/dove-shared/%u prefix = iphonemail/sharedimap/ separator = / type = shared }
I'm assuming I'm testing this correctly and in the best way. :-)
thank you
Tom Lieuallen
On Tue, 2012-06-12 at 11:16 -0700, Tom Lieuallen wrote:
namespace { hidden = yes inbox = no list = children location = maildir:/a1/dove-shared:INDEX=/a2/imap-index/dove-shared/%u prefix = iphonemail/sharedimap/ separator = / type = shared
type=public and same for the other shared namespace. The type=shared namespaces are for mailboxes shared between users.
On 6/13/12 6:38 AM, Timo Sirainen wrote:
On Tue, 2012-06-12 at 11:16 -0700, Tom Lieuallen wrote:
namespace { hidden = yes inbox = no list = children location = maildir:/a1/dove-shared:INDEX=/a2/imap-index/dove-shared/%u prefix = iphonemail/sharedimap/ separator = / type = shared
type=public and same for the other shared namespace. The type=shared namespaces are for mailboxes shared between users.
Unfortunately, it still isn't working.
namespace { inbox = yes location = prefix = separator = / type = private } namespace { hidden = yes inbox = no list = children location = maildir:/a1/dove-shared:INDEX=/a2/imap-index/dove-shared/%u prefix = sharedimap/ separator = / type = public } namespace { hidden = yes inbox = no list = children location = maildir:/a1/dove-shared:INDEX=/a2/imap-index/dove-shared/%u prefix = iphonemail/sharedimap/ separator = / type = public }
l list "" *
- LIST (\Noselect \HasChildren) "/" "foo1"
- LIST (\NoInferiors \UnMarked) "/" "foo1/folder1"
- LIST (\Noselect \HasChildren) "/" "iphonemail"
- LIST (\NoInferiors \Marked) "/" "iphonemail/foo1"
- LIST (\NoInferiors \UnMarked) "/" "Sent"
- LIST (\NoInferiors \UnMarked) "/" "Trash"
- LIST (\HasNoChildren) "/" "INBOX"
- LIST (\HasNoChildren) "/" "sharedimap/cesupport"
- LIST (\HasNoChildren) "/" "sharedimap/mimesupport"
- LIST (\HasNoChildren) "/" "iphonemail/sharedimap/cesupport"
- LIST (\HasNoChildren) "/" "iphonemail/sharedimap/mimesupport" l OK List completed.
l list "iphonemail/" *
- LIST (\NoInferiors \Marked) "/" "iphonemail/foo1" l OK List completed.
l list "sharedimap/" *
- LIST (\HasNoChildren) "/" "sharedimap/cesupport"
- LIST (\HasNoChildren) "/" "sharedimap/mimesupport" l OK List completed.
l list "iphonemail/sharedimap/" *
- LIST (\HasNoChildren) "/" "iphonemail/sharedimap/cesupport"
- LIST (\HasNoChildren) "/" "iphonemail/sharedimap/mimesupport" l OK List completed.
It seems to me like the logic for deciding which namespaces to follow is something like this:
If mail prefix = "", inspect and potentially use all namespaces
else look in default namespace for subdirectories matching prefix listed _AND_ look for namespaces that are exact matches for the prefix passed.
In that 'else' case, it does not appear to look for namespaces where the mail prefix is a subset.
thank you
Tom Lieuallen
On 13.6.2012, at 19.58, Tom Lieuallen wrote:
type=public and same for the other shared namespace. The type=shared namespaces are for mailboxes shared between users.
Unfortunately, it still isn't working. .. It seems to me like the logic for deciding which namespaces to follow is something like this:
If mail prefix = "", inspect and potentially use all namespaces
else look in default namespace for subdirectories matching prefix listed _AND_ look for namespaces that are exact matches for the prefix passed.
In that 'else' case, it does not appear to look for namespaces where the mail prefix is a subset.
No. I tried with your exact config, except changed namespace types to public, and it works fine in my tests.. You're trying with v2.1.7, right?
On 6/13/12 10:07 AM, Timo Sirainen wrote:
On 13.6.2012, at 19.58, Tom Lieuallen wrote:
type=public and same for the other shared namespace. The type=shared namespaces are for mailboxes shared between users.
Unfortunately, it still isn't working. .. It seems to me like the logic for deciding which namespaces to follow is something like this:
If mail prefix = "", inspect and potentially use all namespaces
else look in default namespace for subdirectories matching prefix listed _AND_ look for namespaces that are exact matches for the prefix passed.
In that 'else' case, it does not appear to look for namespaces where the mail prefix is a subset.
No. I tried with your exact config, except changed namespace types to public, and it works fine in my tests.. You're trying with v2.1.7, right?
Yes, 2.1.7 in solaris 10, compiled with gcc. I tried this on a linux box and got the same behavior. I tried compiling it with the Sun compilers; no change. I'm at a loss of what else to check or try.
thank you
Tom Lieuallen
participants (2)
-
Timo Sirainen
-
Tom Lieuallen