# HG changeset patch # User Timo Sirainen # Date 1452781686 -7200 # Node ID 464859d2230212529e74c3e02b9edb252d968106 # Parent 8a084edb4b6d2d12050c57454304bc2eb90185ca imapc: Don't duplicate standard mailbox flags in LIST replies. We added the standard \NoSelect, \NonExistent, \NoInferiors and \Subscribed to special_use string, which caused them to be sent duplicated. diff -r 8a084edb4b6d -r 464859d22302 src/lib-storage/index/imapc/imapc-list.c --- a/src/lib-storage/index/imapc/imapc-list.c Wed Jan 13 14:30:03 2016 +0200 +++ b/src/lib-storage/index/imapc/imapc-list.c Thu Jan 14 16:28:06 2016 +0200 @@ -660,7 +660,8 @@ str_truncate(ctx->special_use, 0); for (i = 0; i < N_ELEMENTS(imap_list_flags); i++) { - if ((node->flags & imap_list_flags[i].flag) != 0) { + if ((node->flags & imap_list_flags[i].flag) != 0 && + (node->flags & MAILBOX_SPECIALUSE_MASK) != 0) { str_append(ctx->special_use, imap_list_flags[i].str); str_append_c(ctx->special_use, ' '); } diff -r 8a084edb4b6d -r 464859d22302 src/lib-storage/mailbox-list.h --- a/src/lib-storage/mailbox-list.h Wed Jan 13 14:30:03 2016 +0200 +++ b/src/lib-storage/mailbox-list.h Thu Jan 14 16:28:06 2016 +0200 @@ -59,6 +59,7 @@ MAILBOX_SPECIALUSE_SENT = 0x00200000, MAILBOX_SPECIALUSE_TRASH = 0x00400000, MAILBOX_SPECIALUSE_IMPORTANT = 0x00800000, +#define MAILBOX_SPECIALUSE_MASK 0x00ff0000 /* Internally used by lib-storage: */ MAILBOX_SELECT = 0x20000000,