[Dovecot] getting Apple Mail and dovecot/IMAP to co-operate
Hi. I've been fighting a losing battle to get Apple Mail and dovecot
to play nice. When dovecot is told to use mbox-style mailboxes, it's
not possible to create child mailboxes. Apple Mail whines "The IMAP
command “CREATE” failed with server error: Mailbox doesn't allow
inferior mailboxes.". I've looked through the documentation, the wiki
and searched the mail archives without finding a solution. Can anyone
help?
I've tried (and failed) to get a hybrid maildir/mbox setup to work
like that shown on http://wiki.dovecot.org/Namespaces. When that gets
plugged into dovecot.conf, Apple Mail blocks, with the Activity window
saying "waiting for login" or something like that, even though a valid
imaps connection and login has been established.
There's nothing getting logged by dovecote for both of these problems,
even when syslog is turned all the way to debug priority.
Here's the current configuration info:
shaun# dovecot -n # 1.1.16: /usr/local/etc/dovecot.conf # OS: FreeBSD 7.2-RELEASE amd64 ufs base_dir: /var/run/dovecot/ syslog_facility: local4 protocols: imaps listen: *, [::] ssl_cert_file: /usr/local/etc/ssl/certs/dovecot.pem ssl_key_file: /usr/local/etc/ssl/private/dovecot.pem ssl_cipher_list: ALL:!LOW:!SSLv2 login_dir: /var/run/dovecot/login login_executable: /usr/local/libexec/dovecot/imap-login login_max_processes_count: 8 login_max_connections: 32 max_mail_processes: 32 mail_privileged_group: mail mail_location: mbox:/mail/imap/%u:INBOX=/var/mail/%u mail_debug: yes mbox_write_locks: fcntl auth default: mechanisms: cram-md5 verbose: yes debug: yes passdb: driver: pam passdb: driver: passwd-file args: /usr/local/etc/dovecot-md5 userdb: driver: passwd shaun# dovecot --version 1.1.16
On Wed, 2009-07-08 at 17:58 +0100, Jim Reid wrote:
Hi. I've been fighting a losing battle to get Apple Mail and dovecot
to play nice. When dovecot is told to use mbox-style mailboxes, it's
not possible to create child mailboxes. Apple Mail whines "The IMAP
command “CREATE” failed with server error: Mailbox doesn't allow
inferior mailboxes.". I've looked through the documentation, the wiki
and searched the mail archives without finding a solution. Can anyone
help?
If you want to create e.g. "sub/box", start from nothing. Don't create "sub". Give the mailbox name as "sub/box". The "sub" then can't have messages, but it can have other child mailboxes.
I've tried (and failed) to get a hybrid maildir/mbox setup to work
like that shown on http://wiki.dovecot.org/Namespaces. When that gets
plugged into dovecot.conf, Apple Mail blocks, with the Activity window
saying "waiting for login" or something like that, even though a valid
imaps connection and login has been established.
I don't really know about that. What kind of a namespace configuration exactly did you use?
On 8 Jul 2009, at 18:08, Timo Sirainen wrote:
On Wed, 2009-07-08 at 17:58 +0100, Jim Reid wrote:
Hi. I've been fighting a losing battle to get Apple Mail and dovecot to play nice. When dovecot is told to use mbox-style mailboxes, it's not possible to create child mailboxes. Apple Mail whines "The IMAP command “CREATE” failed with server error: Mailbox doesn't allow inferior mailboxes.". I've looked through the documentation, the wiki and searched the mail archives without finding a solution. Can anyone help?
If you want to create e.g. "sub/box", start from nothing. Don't create "sub". Give the mailbox name as "sub/box". The "sub" then can't have messages, but it can have other child mailboxes.
Thanks for the quick response Timo. Sadly, your suggestion doesn't
look as if it'll work because there are many non-empty parent
mailboxes that have to get shifted to the new dovecot server. ie There
are messages in sub as well as sub/box: too many to move to sub/
whatever. And there are many of these sorts of folders too. Some
mailboxes are even more deeply nested with subfolders: sub/box1/box2
where sub/box1 holds messages. Looks like an all-mbox solution isn't
going to be viable at all. Oh well.
I've tried (and failed) to get a hybrid maildir/mbox setup to work like that shown on http://wiki.dovecot.org/Namespaces. When that gets plugged into dovecot.conf, Apple Mail blocks, with the Activity
window saying "waiting for login" or something like that, even though a
valid imaps connection and login has been established.I don't really know about that. What kind of a namespace configuration exactly did you use?
Here's the last one I tried before hitting a dead end. There were
various combinations of settings for the prefix, hidden and list
variables that were tried unsuccessfully before that.
###namespace private { ### separator = / ### #prefix = "#mbox/" ### location = mbox:INBOX=/var/mail/%u ### inbox = yes ### #hidden = yes ### list = no # for v1.1+ ###} ###namespace private { ### separator = / ### prefix = ### location = maildir:/mail/imap/$u:LAYOUT=fs ### inbox = no ### list = yes ###}
On Wed, 2009-07-08 at 18:33 +0100, Jim Reid wrote:
Thanks for the quick response Timo. Sadly, your suggestion doesn't
look as if it'll work because there are many non-empty parent
mailboxes that have to get shifted to the new dovecot server. ie There
are messages in sub as well as sub/box: too many to move to sub/ whatever. And there are many of these sorts of folders too. Some
mailboxes are even more deeply nested with subfolders: sub/box1/box2
where sub/box1 holds messages. Looks like an all-mbox solution isn't
going to be viable at all. Oh well.
Right, in that case you can't use FS layout. But you could use e.g. Maildir++ layout:
mail_location = mbox:~/mail:LAYOUT=maildir++
Then the mailboxes get created like:
~/mail/.sub ~/mail/.sub.box
I don't really know about that. What kind of a namespace configuration exactly did you use?
Here's the last one I tried before hitting a dead end. There were
various combinations of settings for the prefix, hidden and list
variables that were tried unsuccessfully before that.###namespace private { ### separator = / ### #prefix = "#mbox/" ### location = mbox:INBOX=/var/mail/%u
This is a broken location setting. It's missing the mbox root directory.
### inbox = yes ### #hidden = yes ### list = no # for v1.1+ ###}
It should be list=yes, otherwise mailboxes aren't visible to client. Probably hidden=yes too so it won't confuse other clients.
###namespace private { ### separator = / ### prefix =
Two namespaces can't have the same prefix. You commented out in the first one, so that doesn't work. If you wanted Dovecot to somehow automatically figure out what mailboxes are maildir and what are mboxes, that's not possible yet.
### location = maildir:/mail/imap/$u:LAYOUT=fs
There's no such thing as $u. I guess meant %u.
### inbox = no ### list = yes ###}
Hi Timo. Thanks again for your help. I've got things just about
working as planned. There's one minor irritation however. Users see a
strange mailbox icon at the top of their list of mailboxes on the
dovecot server. It's called #mbox and has a > symbol next to it
indicating that it contains nested mailbox(es). The icon for the
mailbox not filled in, which is usually how Apple Mail indicates
there's something wrong with the mailbox. In this case, it's not
possible to put messages in #mbox. Is there a simple way to make this
mailbox disappear from the list displayed by the client?
# 1.1.16: /usr/local/etc/dovecot.conf # OS: FreeBSD 7.2-RELEASE amd64 base_dir: /var/run/dovecot/ syslog_facility: local4 protocols: imaps listen: *, [::] ssl_cert_file: /usr/local/etc/ssl/certs/dovecot.pem ssl_key_file: /usr/local/etc/ssl/private/dovecot.pem ssl_cipher_list: ALL:!LOW:!SSLv2 login_dir: /var/run/dovecot/login login_executable: /usr/local/libexec/dovecot/imap-login login_max_processes_count: 8 login_max_connections: 32 max_mail_processes: 32 mail_privileged_group: mail mail_debug: yes mbox_write_locks: fcntl namespace: type: private separator: / prefix: #mbox/ location: mbox:~/mail:INBOX=/var/mail/%u inbox: yes hidden: yes list: yes subscriptions: yes namespace: type: private separator: / location: maildir:/mail/imap/%u:LAYOUT=fs list: yes subscriptions: yes auth default: mechanisms: cram-md5 verbose: yes debug: yes passdb: driver: pam passdb: driver: passwd-file args: /usr/local/etc/dovecot-md5 userdb: driver: passwd
Le 13 juil. 09 à 13:53, Jim Reid a écrit :
Hi Timo. Thanks again for your help. I've got things just about
working as planned. There's one minor irritation however. Users see
a strange mailbox icon at the top of their list of mailboxes on the
dovecot server. It's called #mbox and has a > symbol next to it
indicating that it contains nested mailbox(es). The icon for the
mailbox not filled in, which is usually how Apple Mail indicates
there's something wrong with the mailbox. In this case, it's not
possible to put messages in #mbox. Is there a simple way to make
this mailbox disappear from the list displayed by the client?
Hello Jim,
Could you try with " list = no" for your first namespace definition?
Axel
Le 8 juil. 09 à 19:33, Jim Reid a écrit :
[...] Thanks for the quick response Timo. Sadly, your suggestion doesn't
look as if it'll work because there are many non-empty parent
mailboxes that have to get shifted to the new dovecot server. ie
There are messages in sub as well as sub/box: too many to move to
sub/whatever. And there are many of these sorts of folders too. Some
mailboxes are even more deeply nested with subfolders: sub/box1/box2
where sub/box1 holds messages. Looks like an all-mbox solution isn't
going to be viable at all. Oh well. [...]
Hello Jim,
The question may also be: "where are your users coming from?".
It seems you are in the process of changing your server, or?
Could you describe your current server, its setup, and show an example
of how those nested dual-use mailboxes are stored on it?
Who knows, there's perhaps an easy way to re-arrange the layout on the
server so as to (almost) transparently migrate to Dovecot?
Axel
Le 8 juil. 09 à 18:58, Jim Reid a écrit :
Hi. I've been fighting a losing battle to get Apple Mail and dovecot
to play nice. When dovecot is told to use mbox-style mailboxes, it's
not possible to create child mailboxes. Apple Mail whines "The IMAP
command “CREATE” failed with server error: Mailbox doesn't allow
inferior mailboxes.". I've looked through the documentation, the
wiki and searched the mail archives without finding a solution. Can
anyone help? [...]
Hello Jim,
Timo already replied with some hints related to your config and the
LAYOUT setting.
I just wanted to add that Mail.app seems to correctly honor the IMAP
conventions as far as naming is concerned, so that the creation of
child mailboxes is perfectly possible from Mail.app's GUI.
Of course, if the server doesn't allow for dual-use mailboxes, neither
will Mail.app... [1]
So, let's assume an fs layout for mboxes and "/" as hierarchy separator.
If one selects the "New mailbox..." menu item and ask to create an
item named "aaa/" somewhere on the server, this will create a
directory named "aaa" on the server and appear as a greyed folder in
the GUI.
The same way, one may ask to create "aaa/bbb/ccc" at the same
location, or to create "bbb/ccc" under "aaa", or to create "bbb/"
under "aaa" and then "ccc" under "bbb", and everything works as
expected ("ccc" now being a file on the server and appearing as a blue
folder in the GUI).
Axel
[1] Note that Mail.app allows for dual-use mailboxes in the local
storage, but this is thru a trick. If, at the same level, one has:
- a directory named "aaa"
- a directory named "aaa.mbox"
this will appear as a single blue folder named "aaa" in the GUI, and
that folder may contain both messages (they are stored in "aaa.mbox")
and other mailboxes (they are stored in "aaa").
participants (3)
-
Axel Luttgens
-
Jim Reid
-
Timo Sirainen