]> git.ipfire.org Git - thirdparty/dovecot/core.git/commitdiff
imapc: gmail-migration: Fetch X-GM-MSGID for new mails as well
authorTimo Sirainen <timo.sirainen@dovecot.fi>
Mon, 25 Dec 2017 20:48:00 +0000 (22:48 +0200)
committerVille Savolainen <ville.savolainen@dovecot.fi>
Thu, 18 Jan 2018 10:07:06 +0000 (12:07 +0200)
I'm not sure why it was originally restricted only for the initial FETCH.
Fetching GUIDs for new mails can be just as useful.

src/lib-storage/index/imapc/imapc-mailbox.c

index 7cf160af77fada459b6b8bb4cad6ee3ca20143ae..385665e5eeda3374dee1896a42a0665639abb821 100644 (file)
@@ -194,8 +194,7 @@ void imapc_mailbox_fetch_state(struct imapc_mailbox *mbox, string_t *str,
        if (IMAPC_BOX_HAS_FEATURE(mbox, IMAPC_FEATURE_GMAIL_MIGRATION)) {
                enum mailbox_info_flags flags;
 
-               if (first_uid == 1 &&
-                   !mail_index_is_in_memory(mbox->box.index)) {
+               if (!mail_index_is_in_memory(mbox->box.index)) {
                        /* these can be efficiently fetched among flags and
                           stored into cache */
                        str_append(str, " X-GM-MSGID");