I think I've found a minor bug in the LSUB command: . LSUB "" "*" gives ... * LIST (\Noselect) "/" "#maildir" ^^^^ * LSUB () "/" "#maildir/test4" where I have a namespace with prefix "#maildir/". Here's a patch to make it not list the namespace prefix in an LSUB command (or should it list it as 'LSUB (\Noselect) "/" "#maildir"'?) :- --- dovecot-1.0-stable.orig/src/imap/cmd-list.c Fri Mar 18 20:00:44 2005 +++ dovecot-1.0-stable/src/imap/cmd-list.c Mon Apr 11 18:29:33 2005 @@ -218,7 +218,7 @@ match = ns->hidden ? IMAP_MATCH_NO : imap_match(ctx->glob, cur_prefix); - if (match == IMAP_MATCH_YES) { + if ((match == IMAP_MATCH_YES) && !ctx->lsub) { /* The prefix itself matches */ enum mailbox_flags flags; string_t *str = t_str_new(128); Best Wishes, Chris --+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+-- 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
On Mon, 2005-04-11 at 18:35 +0100, Chris Wakelin wrote:> Here's a patch to make it not list the namespace prefix in an LSUB > command (or should it list it as 'LSUB (\Noselect) "/" "#maildir"'?) :-The namespace isn't subscribed (unless it's actually subscribed using SUBSCRIBE..).> --- dovecot-1.0-stable.orig/src/imap/cmd-list.c Fri Mar 18 20:00:44 2005 > +++ dovecot-1.0-stable/src/imap/cmd-list.c Mon Apr 11 18:29:33 2005 > @@ -218,7 +218,7 @@ > match = ns->hidden ? IMAP_MATCH_NO : > imap_match(ctx->glob, cur_prefix); > > - if (match == IMAP_MATCH_YES) { > + if ((match == IMAP_MATCH_YES) && !ctx->lsub) {Thanks. I used "(ctx->list_flags & MAILBOX_LIST_SUBSCRIBED) == 0" so LISTEXT extension's "list subscribed mailboxes" will also work (although LISTEXT is still going through major changes and Dovecot is very far behind). -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 189 bytes Desc: This is a digitally signed message part URL: <http://dovecot.org/pipermail/dovecot/attachments/20050417/202218e6/attachment-0001.bin>