[Dovecot] Namespaces and subscriptions

Chris Wakelin c.d.wakelin at reading.ac.uk
Thu Mar 17 14:43:46 EET 2005


I've got a yucky workaround that doesn't prepend the namespace when 
listing subscriptions and the namespace is marked as hidden:-

--- dovecot-1.0-stable/src/imap/cmd-list.c.orig Mon Jan 31 16:37:54 2005
+++ dovecot-1.0-stable/src/imap/cmd-list.c      Thu Mar 17 12:36:38 2005
@@ -107,7 +107,8 @@
        name_str = t_str_new(256);
        while ((list = mail_storage_mailbox_list_next(ctx->list_ctx)) != NULL) {
                str_truncate(name_str, 0);
-               str_append(name_str, ctx->ns->prefix);
+               if (!(ctx->ns->hidden && ctx->lsub))
+                       str_append(name_str, ctx->ns->prefix);
                str_append(name_str, list->name);

                if (ctx->ns->sep != ctx->ns->real_sep) {


This at least means that UW-IMAP refugees don't need to update their 
subscriptions or change their prefix.

Perhaps we need another namespace option, or is there a better way? 

On a related subject, would it be a good idea to make the 
SUBSCRIPTION_FILE an option in the same way that INDEX=, CONTROL= etc. 
are?

Chris

On Thu, 17 Mar 2005 11:05:55 +0000 (GMT Standard Time) Chris Wakelin 
<c.d.wakelin at reading.ac.uk> wrote:

> I've got a problem with subscriptions in 1.0-stable when migrating from 
> UW-IMAP.
> 
> I've modified the SUBSCRIPTION_FILE_NAME entries as suggested in the 
> Wiki http://wiki.dovecot.org/Migration and included the "~/mail/" etc. 
> hidden namespaces.
> 

...

> 
> In other words, Dovecot is prepending the namespace to the list of 
> folders stored in .mailboxlist.

...

--+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+--
Christopher Wakelin,                                c.d.wakelin at reading.ac.uk
IT Services Centre, The University of Reading,       Tel: +44 (0)118 378 8439
Whiteknights, Reading, RG6 2AF, UK                   Fax: +44 (0)118 975 3094




More information about the dovecot mailing list