Only in dovecot-1.0.rc2: Maildir diff -u -r dovecot-1.0.rc2.dist/src/imap/cmd-list.c dovecot-1.0.rc2/src/imap/cmd-list.c --- dovecot-1.0.rc2.dist/src/imap/cmd-list.c Sat Jan 14 11:47:21 2006 +++ dovecot-1.0.rc2/src/imap/cmd-list.c Wed Jul 19 22:16:03 2006 @@ -135,20 +135,22 @@ } name = str_c(name_str); - if (*ctx->ns->prefix != '\0') { - /* With masks containing '*' we do the checks here - so prefix is included in matching */ - if (ctx->glob != NULL && - imap_match(ctx->glob, name) != IMAP_MATCH_YES) - continue; - } else if (strcasecmp(list->name, "INBOX") == 0) { - if (!ctx->ns->inbox) + if (strcasecmp(list->name, "INBOX") == 0) { + if (!ctx->ns->inbox || ctx->inbox_found) continue; name = "INBOX"; ctx->inbox_found = TRUE; } + if (*ctx->ns->prefix != '\0') { + /* With masks containing '*' we do the checks here + so prefix is included in matching */ + if (ctx->glob != NULL && + imap_match(ctx->glob, name) != IMAP_MATCH_YES) + continue; + } + str_truncate(str, 0); str_printfa(str, "* %s (%s) \"%s\" ", ctx->lsub ? "LSUB" : "LIST",