> On September 30, 2016 at 4:39 PM Steven Xu <steven...@lba.ca> wrote:
>
>
>
>
> Dovecot version:2.2.25
>
> Since we used to keep our email files on widows server, I made the following
> changes in maildir-storage.h
>
> #define MAILDIR_EXTRA_SEP ','
>
> #define MAILDIR_INFO_SEP_S ":" to "+".
>
>
>
> Everything seems working except EXPUNG, The dovecot log is flooded by
> messages like following:
>
> imap(xxxxx): Error: Mailbox INBOX: Expunged GUID mismatch for UID 7039
>
>
>
>
>
> Then I read the source code, and found the following lines in
> maildir-sync-index.c
>
>
>
> T_BEGIN {
>
> guid = maildir_uidlist_lookup_ext(ctx->mbox->uidlist, uid,
>
> MAILDIR_UIDLIST_REC_EXT_GUID);
>
> if (guid == NULL)
>
> guid = t_strcut(filename, ':');
>
> mail_generate_guid_128_hash(guid, guid_128);
>
> } T_END;
>
>
>
> I have to change the code to guid = t_strcut(filename, '+');
>
>
>
>
>
> So, should MAILDIR_EXTRA_SEP be used here instead of ':'?
>
>
>
> Thanks,
>
>
>
> Steven
>
>
Hi!
Can you try out the attached patch?
Aki
diff --git a/src/lib-storage/index/maildir/maildir-sync-index.c b/src/lib-storage/index/maildir/maildir-sync-index.c
index 6ad8bac..e821f24 100644
--- a/src/lib-storage/index/maildir/maildir-sync-index.c
+++ b/src/lib-storage/index/maildir/maildir-sync-index.c
@@ -64,7 +64,7 @@ maildir_expunge_is_valid_guid(struct maildir_index_sync_context *ctx,
guid = maildir_uidlist_lookup_ext(ctx->mbox->uidlist, uid,
MAILDIR_UIDLIST_REC_EXT_GUID);
if (guid == NULL)
- guid = t_strcut(filename, ':');
+ guid = t_strcut(filename, *MAILDIR_INFO_SEP_S);
mail_generate_guid_128_hash(guid, guid_128);
} T_END;
diff --git a/src/lib-storage/index/maildir/maildir-uidlist.c b/src/lib-storage/index/maildir/maildir-uidlist.c
index 99db5c7..df13222 100644
--- a/src/lib-storage/index/maildir/maildir-uidlist.c
+++ b/src/lib-storage/index/maildir/maildir-uidlist.c
@@ -1301,7 +1301,7 @@ static int maildir_uidlist_write_fd(struct maildir_uidlist *uidlist, int fd,
}
}
str_append(str, " :");
- strp = strchr(rec->filename, ':');
+ strp = strchr(rec->filename, *MAILDIR_INFO_SEP_S);
if (strp == NULL)
str_append(str, rec->filename);
else