[Dovecot] dsync / separator / namespace config-problem
Guess I don't quite get namespaces, but we have the following namespace configured:
$ doveconf namespace
namespace {
hidden = no
inbox = yes
list = yes
location =
prefix = INBOX.
separator =
subscriptions = yes
type = private
}
But when I try running dsync it complains:
$ sudo -u atmail dsync -u janfrode@tanso.net mirror mdbox:/tmp/janfrodeboks
dsync(atmail): Error: user janfrode@tanso.net: Initialization failed: namespace configuration error: list=yes requires prefix=INBOX. to end with separator dsync(atmail): Fatal: User init failed
I can fix this by adding "separator = ." to the namespace and dsync is happy, but is changing this now safe, or will this affect existing clients?
-jf
On 29.12.2011, at 13.14, Jan-Frode Myklebust wrote:
Guess I don't quite get namespaces, but we have the following namespace configured:
$ doveconf namespace namespace { hidden = no inbox = yes list = yes location = prefix = INBOX. separator = subscriptions = yes type = private }
Since separator is empty, it defaults to whatever the mailbox format's internal separator is.
But when I try running dsync it complains:
$ sudo -u atmail dsync -u janfrode@tanso.net mirror mdbox:/tmp/janfrodeboks dsync(atmail): Error: user janfrode@tanso.net: Initialization failed: namespace configuration error: list=yes requires prefix=INBOX. to end with separator dsync(atmail): Fatal: User init failed
With mdbox the internal separator is '/', but it's not valid to have "INBOX." prefix then (it should be "INBOX/").
I can fix this by adding "separator = ." to the namespace and dsync is happy, but is changing this now safe, or will this affect existing clients?
Since you were using Maildir, which uses '.' as the default separator, setting this explicitly won't break anything.
On Thu, Dec 29, 2011 at 03:10:20PM +0200, Timo Sirainen wrote:
With mdbox the internal separator is '/', but it's not valid to have "INBOX." prefix then (it should be "INBOX/").
But how should this be handled in the migration phase from maildir to mdbox then? Can we have different namespaces for users with maildirs vs. mdboxes? (..or am i misunderstanding something?)
I can fix this by adding "separator = ." to the namespace and dsync is happy, but is changing this now safe, or will this affect existing clients?
Since you were using Maildir, which uses '.' as the default separator, setting this explicitly won't break anything.
Great, I'll fix our config then. Thanks!
-jf
On 29.12.2011, at 15.42, Jan-Frode Myklebust wrote:
On Thu, Dec 29, 2011 at 03:10:20PM +0200, Timo Sirainen wrote:
With mdbox the internal separator is '/', but it's not valid to have "INBOX." prefix then (it should be "INBOX/").
But how should this be handled in the migration phase from maildir to mdbox then? Can we have different namespaces for users with maildirs vs. mdboxes? (..or am i misunderstanding something?)
You'll most likely want to keep the '.' separator with mdbox, at least initially. Some clients don't like if the separator changes. Perhaps in future if you want to allow users to use '.' character in mailbox names you could change it, or possibly make it a per-user setting.
On Thu, Dec 29, 2011 at 03:49:57PM +0200, Timo Sirainen wrote:
With mdbox the internal separator is '/', but it's not valid to have "INBOX." prefix then (it should be "INBOX/").
But how should this be handled in the migration phase from maildir to mdbox then? Can we have different namespaces for users with maildirs vs. mdboxes? (..or am i misunderstanding something?)
You'll most likely want to keep the '.' separator with mdbox, at least initially. Some clients don't like if the separator changes. Perhaps in future if you want to allow users to use '.' character in mailbox names you could change it, or possibly make it a per-user setting.
Sorry for being so dense, but I don't quite get it still. Do you suggest dropping the trailing dot from prefix=INBOX. ? I.e.
namespace {
inbox = yes
location =
prefix = INBOX
type = private
separator = .
}
when we do the migration to mdbox? And this should work without issues for both current maildir users, and mdbox users ?
Ideally I don't want to use the . as a separator, since it's causing problems for our users who expect to be able to use them in folder names. But I don't understand if I can change them without causing problems to existing users.. or how these problems will appear to the users.
-jf
On Thu, 2011-12-29 at 21:03 +0100, Jan-Frode Myklebust wrote:
On Thu, Dec 29, 2011 at 03:49:57PM +0200, Timo Sirainen wrote:
With mdbox the internal separator is '/', but it's not valid to have "INBOX." prefix then (it should be "INBOX/").
But how should this be handled in the migration phase from maildir to mdbox then? Can we have different namespaces for users with maildirs vs. mdboxes? (..or am i misunderstanding something?)
You'll most likely want to keep the '.' separator with mdbox, at least initially. Some clients don't like if the separator changes. Perhaps in future if you want to allow users to use '.' character in mailbox names you could change it, or possibly make it a per-user setting.
Sorry for being so dense, but I don't quite get it still. Do you suggest dropping the trailing dot from prefix=INBOX. ? I.e.
namespace { inbox = yes location = prefix = INBOX type = private separator = . }
when we do the migration to mdbox? And this should work without issues for both current maildir users, and mdbox users ?
With that setup you can't even start up Dovecot. The prefix must end with the separator. So initially just do it like above, but with "prefix=INBOX."
Ideally I don't want to use the . as a separator, since it's causing problems for our users who expect to be able to use them in folder names. But I don't understand if I can change them without causing problems to existing users.. or how these problems will appear to the users.
It's going to be problematic to change the separator for existing users. Clients can become confused.
participants (2)
-
Jan-Frode Myklebust
-
Timo Sirainen