Hi, I've got a problem with user shared folders and subscriptions. When I try to subscribe a folder, dovecot returns "OK Subscribe completed", but the newly subscribed folder is not listed with LSUB: a1 login test at example.com ******* a1 OK [CAP..... a2 list "" "*" * LIST (\HasChildren) "/" "INBOX" * LIST (\Noselect \HasChildren) "/" "#User" * LIST (\Noselect \HasChildren) "/" "#User/markus at example.com" * LIST (\HasNoChildren) "/" "#User/markus at example.com/ForTest" a3 subscribe "#User/markus at example.com/ForTest" a3 OK Subscribe completed. a4 lsub "" "*" * LSUB (\Noselect) "/" "#User/markus at example.com" Dovecot is 1.2-rc3, namespace configuration as follows: namespace private { separator = / prefix = INBOX/ inbox = yes subscriptions = yes } namespace public { separator = / prefix = "#Shared/" location = maildir:/var/spool/dovecot/sharedfolders:INDEX=~/Maildir/index/public:CONTROL=~/Maildir/control/public subscriptions = yes } namespace shared { separator = / prefix = "#User/%%u/" location = maildir:%%h/Maildir:INDEX=~/Maildir/index/shared/%%u:CONTROL=~/Maildir/control/shared subscriptions = yes list = yes } I tried without CONTROL= directory in the shared namespace, but that made no difference. Contents of the subscriptions (with CONTROL=) file after subscribing: ForTestUser Regards, Markus
On Fri, 2009-04-17 at 22:48 +0200, Markus Werner wrote:> namespace shared { > separator = / > prefix = "#User/%%u/" > location = maildir:%%h/Maildir:INDEX=~/Maildir/index/shared/%%u:CONTROL=~/Maildir/control/shared > subscriptions = yes > list = yes > }The CONTROL must have also %%u in it, otherwise different shared users' control files get mixed together and everything breaks. Preferably you should also be using subscriptions=no so you wouldn't have to specify CONTROL at all, but for that you'd need to have a namespace with prefix="". Anyway, this fixes subscriptions=yes: http://hg.dovecot.org/dovecot-1.2/rev/0dcb7e34a216 -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 197 bytes Desc: This is a digitally signed message part URL: <http://dovecot.org/pipermail/dovecot/attachments/20090417/c69eec25/attachment-0002.bin>
On Fri, Apr 17, 2009 at 05:22:32PM -0400, Timo Sirainen wrote:> On Fri, 2009-04-17 at 22:48 +0200, Markus Werner wrote: > > namespace shared { > > separator = / > > prefix = "#User/%%u/" > > location = maildir:%%h/Maildir:INDEX=~/Maildir/index/shared/%%u:CONTROL=~/Maildir/control/shared > > subscriptions = yes > > list = yes > > } > > The CONTROL must have also %%u in it, otherwise different shared users' > control files get mixed together and everything breaks.Thanks. I completely overlooked that missing part.> Preferably you should also be using subscriptions=no so you wouldn't > have to specify CONTROL at all, but for that you'd need to have a > namespace with prefix="".Would an additional namespace, for subscriptions only, work? I would like to keep all subfolders of an Mailbox under INBOX/ .> Anyway, this fixes subscriptions=yes: > http://hg.dovecot.org/dovecot-1.2/rev/0dcb7e34a216Works, thanks.
On Fri, Apr 17, 2009 at 07:07:49PM -0400, Timo Sirainen wrote:>> I tried this. The following is logged: >> >> Apr 18 00:12:01 asterix dovecot: IMAP(markus at example.com): >> fchown(/var/spool/dovecot/users/example.com/markus/Maildir/control/ >> shared/subscriptions.lock, >> -1, 0) failed: Operation not permitted > > It tries to preserve the group. Try chmod g+s to the empty directory.That worked. Thanks again.
Possibly Parallel Threads
- Thunderbird subscription bug ?
- unexpected LSUB / LIST (SUBSCRIBED) output Re: Panic: file mailbox-list-subscriptions.c: line 66 (mailbox_list_subscription_fill_one): assertion failed: (ns!= NULL && (ns->flags & NAMESPACE_FLAG_AUTOCREATED) != 0)
- Imap Ghost folder
- Children, HasChildren
- A previously unreported lsub/list discrepancy in 1.1rc5 and earlier