[Dovecot] vpopmail and shared mailbox
hi all,
I'm a long time courier-imap user and just switched to dovecot-1.2.1. my MTA is qmail and all user accounts are virtual vpopmail users.
getting dovecot to work was mostly painless, but I am desperately trying to share a user's mailbox and can't seem to figure out how. unfortunately the documentation is not very helpful.
I am trying to share the mailbox /home/vpopmail/domains/ example.com/someuser/Maildir
here's what I put in dovecot.conf:
namespace shared { separator = . prefix = shared.%%u. location = maildir:/home/vpopmail/domains/%%d/%%n/Maildir:INDEX=~/Maildir/shared/%%u subscriptions = no list = yes }
I then logged in as someuser and did a "setacl anyone Inbox lrip". /home/vpopmail/domains/example.com/shared-mailboxes.db now contains an entry
shared/shared-boxes/anyone/someuser@example.com 1
and /home/vpopmail/domains/example.com/someuser/Maildir/dovecot-acl has
anyone ilpr
however, when I connect to the server, the client does not see the "shared" namespace. also, dovecot seems to be creating empty shared-mailboxes.db in /home/vpopmail/domains/example/ (missing .com!).
I'm very confused at this point, but I'm sure someone has gotten this to work and can help me out. fwiw, the output of dovecot -n is appended.
thanks!
- Dave.
On Mon, 2009-07-20 at 10:46 -0700, David Fuchs wrote:
namespace shared { separator = . prefix = shared.%%u. location = maildir:/home/vpopmail/domains/%%d/%%n/Maildir:INDEX=~/Maildir/shared/%%u subscriptions = no list = yes } .. however, when I connect to the server, the client does not see the "shared" namespace. also, dovecot seems to be creating empty shared-mailboxes.db in /home/vpopmail/domains/example/ (missing .com!).
The problem is hierarchy separator. If you have user@example.com, the mailbox looks like:
shared.user@example.com.INBOX
And Dovecot thinks you're opening "user@example"'s "com.INBOX" mailbox. So you can't really use domains with '.' separator. One solution would be to use another separator, like '/'. Another would be to create separate namespaces for each domain, like:
namespace shared { prefix = shared.example_com. location = maildir:/home/vpopmail/domains/example.com/%%n/Maildir:INDEX=~/Maildir/shared/%%n@example.com }
thanks for the quick reply!
tried to create a shared namespace shared.example_com. still no success, unfortunately -
location = maildir:/home/vpopmail/domains/example.com/%%n/Maildir:INDEX=~/Maildir/shared/%%n@example.com
now it's creating an empty /home/vpopmail/domains/example.com/%n/Maildir/dovecot-acl-list :(
- Dave.
On Mon, Jul 20, 2009 at 11:01 AM, Timo Sirainen tss@iki.fi wrote:
On Mon, 2009-07-20 at 10:46 -0700, David Fuchs wrote:
namespace shared { separator = . prefix = shared.%%u. location = maildir:/home/vpopmail/domains/%%d/%%n/Maildir:INDEX=~/Maildir/shared/%%u subscriptions = no list = yes } .. however, when I connect to the server, the client does not see the "shared" namespace. also, dovecot seems to be creating empty shared-mailboxes.db in /home/vpopmail/domains/example/ (missing .com!).
The problem is hierarchy separator. If you have user@example.com, the mailbox looks like:
shared.user@example.com.INBOX
And Dovecot thinks you're opening "user@example"'s "com.INBOX" mailbox. So you can't really use domains with '.' separator. One solution would be to use another separator, like '/'. Another would be to create separate namespaces for each domain, like:
namespace shared { prefix = shared.example_com. location = maildir:/home/vpopmail/domains/example.com/%%n/Maildir:INDEX=~/Maildir/shared/%%n@example.com }
Do you want users to be able to share mailboxes across different domains?
On Mon, 2009-07-20 at 11:16 -0700, David Fuchs wrote:
thanks for the quick reply!
tried to create a shared namespace shared.example_com. still no success, unfortunately -
location = maildir:/home/vpopmail/domains/example.com/%%n/Maildir:INDEX=~/Maildir/shared/%%n@example.com
now it's creating an empty /home/vpopmail/domains/example.com/%n/Maildir/dovecot-acl-list :(
- Dave.
On Mon, Jul 20, 2009 at 11:01 AM, Timo Sirainen tss@iki.fi wrote:
On Mon, 2009-07-20 at 10:46 -0700, David Fuchs wrote:
namespace shared { separator = . prefix = shared.%%u. location = maildir:/home/vpopmail/domains/%%d/%%n/Maildir:INDEX=~/Maildir/shared/%%u subscriptions = no list = yes } .. however, when I connect to the server, the client does not see the "shared" namespace. also, dovecot seems to be creating empty shared-mailboxes.db in /home/vpopmail/domains/example/ (missing .com!).
The problem is hierarchy separator. If you have user@example.com, the mailbox looks like:
shared.user@example.com.INBOX
And Dovecot thinks you're opening "user@example"'s "com.INBOX" mailbox. So you can't really use domains with '.' separator. One solution would be to use another separator, like '/'. Another would be to create separate namespaces for each domain, like:
namespace shared { prefix = shared.example_com. location = maildir:/home/vpopmail/domains/example.com/%%n/Maildir:INDEX=~/Maildir/shared/%%n@example.com }
On Mon, Jul 20, 2009 at 11:19 AM, Timo Sirainentss@iki.fi wrote:
Do you want users to be able to share mailboxes across different domains?
not really necessary.
On Mon, 2009-07-20 at 11:16 -0700, David Fuchs wrote:
thanks for the quick reply!
tried to create a shared namespace shared.example_com. still no success, unfortunately -
location = maildir:/home/vpopmail/domains/example.com/%%n/Maildir:INDEX=~/Maildir/shared/%%n@example.com
now it's creating an empty /home/vpopmail/domains/example.com/%n/Maildir/dovecot-acl-list :(
- Dave.
On Mon, Jul 20, 2009 at 11:01 AM, Timo Sirainen tss@iki.fi wrote:
On Mon, 2009-07-20 at 10:46 -0700, David Fuchs wrote:
namespace shared { separator = . prefix = shared.%%u. location = maildir:/home/vpopmail/domains/%%d/%%n/Maildir:INDEX=~/Maildir/shared/%%u subscriptions = no list = yes } .. however, when I connect to the server, the client does not see the "shared" namespace. also, dovecot seems to be creating empty shared-mailboxes.db in /home/vpopmail/domains/example/ (missing .com!).
The problem is hierarchy separator. If you have user@example.com, the mailbox looks like:
shared.user@example.com.INBOX
And Dovecot thinks you're opening "user@example"'s "com.INBOX" mailbox. So you can't really use domains with '.' separator. One solution would be to use another separator, like '/'. Another would be to create separate namespaces for each domain, like:
namespace shared { prefix = shared.example_com. location = maildir:/home/vpopmail/domains/example.com/%%n/Maildir:INDEX=~/Maildir/shared/%%n@example.com }
On Mon, 2009-07-20 at 11:22 -0700, David Fuchs wrote:
On Mon, Jul 20, 2009 at 11:19 AM, Timo Sirainentss@iki.fi wrote:
Do you want users to be able to share mailboxes across different domains?
not really necessary.
Apply this patch: http://hg.dovecot.org/dovecot-1.2/raw-rev/518963e8a20d
And then try with a bit cleaned up configuration that would work for all domains:
namespace shared { separator = . prefix = shared.%%n. location = maildir:/home/vpopmail/domains/%d/%%n/Maildir:INDEX=~/Maildir/shared/%%u subscriptions = no list = yes }
I got one step further with this! now I see the shared namespace in the client.
however, when I try to subscribe I get:
Query: SUBSCRIBE "shared.someuser.INBOX" Reason Given: Unknown subscription namespace
thanks,
- Dave.
On Mon, Jul 20, 2009 at 11:35 AM, Timo Sirainentss@iki.fi wrote:
On Mon, 2009-07-20 at 11:22 -0700, David Fuchs wrote:
On Mon, Jul 20, 2009 at 11:19 AM, Timo Sirainentss@iki.fi wrote:
Do you want users to be able to share mailboxes across different domains?
not really necessary.
Apply this patch: http://hg.dovecot.org/dovecot-1.2/raw-rev/518963e8a20d
And then try with a bit cleaned up configuration that would work for all domains:
namespace shared { separator = . prefix = shared.%%n. location = maildir:/home/vpopmail/domains/%d/%%n/Maildir:INDEX=~/Maildir/shared/%%u subscriptions = no list = yes }
On Mon, 2009-07-20 at 12:41 -0700, David Fuchs wrote:
I got one step further with this! now I see the shared namespace in the client.
however, when I try to subscribe I get:
Query: SUBSCRIBE "shared.someuser.INBOX" Reason Given: Unknown subscription namespace
I guess your primary namespace has INBOX. prefix? You could decide to either deprecate the INBOX. prefix and use it only for compatibility with old clients:
namespace private { prefix = inbox = yes } namespace private { prefix = INBOX. alias_for = list = no hidden = yes }
Or you could keep the INBOX. as the primary namespace and use a kludgy workaround to catch the subscriptions:
namespace private { prefix = alias_for = INBOX. list = no hidden = yes }
I removed the INBOX. prefix, and things work like a charm now! (I actually didn't include the alias for compatibility, it's not necessary with thunderbird and rather seems to confuse it as it lists folders twice under "folder" and "Inbox/folder".)
thank you, Timo, for the excellent support and of course for dovecot!
- Dave.
On Mon, Jul 20, 2009 at 12:58 PM, Timo Sirainentss@iki.fi wrote:
On Mon, 2009-07-20 at 12:41 -0700, David Fuchs wrote:
I got one step further with this! now I see the shared namespace in the client.
however, when I try to subscribe I get:
Query: SUBSCRIBE "shared.someuser.INBOX" Reason Given: Unknown subscription namespace
I guess your primary namespace has INBOX. prefix? You could decide to either deprecate the INBOX. prefix and use it only for compatibility with old clients:
namespace private { prefix = inbox = yes } namespace private { prefix = INBOX. alias_for = list = no hidden = yes }
Or you could keep the INBOX. as the primary namespace and use a kludgy workaround to catch the subscriptions:
namespace private { prefix = alias_for = INBOX. list = no hidden = yes }
participants (2)
-
David Fuchs
-
Timo Sirainen