dovecot-2.2: imapc: With gmail-labels-keyword feature add the $G...
dovecot at dovecot.org
dovecot at dovecot.org
Fri Jan 23 23:55:38 UTC 2015
details: http://hg.dovecot.org/dovecot-2.2/rev/f2fac7c857f2
changeset: 18198:f2fac7c857f2
user: Timo Sirainen <tss at iki.fi>
date: Fri Jan 23 23:18:01 2015 +0200
description:
imapc: With gmail-labels-keyword feature add the $GMailHaveLabels only to \All mailbox
This is primarily intended for migration, and with this behavior dsync can
be run just once so it's faster.
diffstat:
src/lib-storage/index/imapc/imapc-sync.c | 11 +++++++++--
1 files changed, 9 insertions(+), 2 deletions(-)
diffs (21 lines):
diff -r e30e9b2b0e37 -r f2fac7c857f2 src/lib-storage/index/imapc/imapc-sync.c
--- a/src/lib-storage/index/imapc/imapc-sync.c Wed Jan 21 02:21:35 2015 +0200
+++ b/src/lib-storage/index/imapc/imapc-sync.c Fri Jan 23 23:18:01 2015 +0200
@@ -281,8 +281,15 @@
string_t *cmd = t_str_new(64);
str_printfa(cmd, "UID FETCH %u:* (FLAGS", first_uid);
- if (IMAPC_BOX_HAS_FEATURE(ctx->mbox, IMAPC_FEATURE_GMAIL_LABELS_KEYWORD))
- str_append(cmd, " X-GM-LABELS");
+ if (IMAPC_BOX_HAS_FEATURE(ctx->mbox, IMAPC_FEATURE_GMAIL_LABELS_KEYWORD)) {
+ /* do this only for the \All mailbox */
+ enum mailbox_info_flags flags;
+
+ if (imapc_list_get_mailbox_flags(ctx->mbox->box.list,
+ ctx->mbox->box.name, &flags) == 0 &&
+ (flags & MAILBOX_SPECIALUSE_ALL) != 0)
+ str_append(cmd, " X-GM-LABELS");
+ }
str_append_c(cmd, ')');
imapc_sync_cmd(ctx, str_c(cmd));
More information about the dovecot-cvs
mailing list