Mercurial > dovecot > core-2.2
changeset 12147:3f04426b00fb
Maildir: If POP3 UIDL is specified for saved message, add it to uidlist.
author | Timo Sirainen <tss@iki.fi> |
---|---|
date | Tue, 21 Sep 2010 15:22:57 +0100 |
parents | ad81284d43ff |
children | c758655c6270 |
files | src/lib-storage/index/maildir/maildir-save.c |
diffstat | 1 files changed, 8 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/src/lib-storage/index/maildir/maildir-save.c Tue Sep 21 15:22:38 2010 +0100 +++ b/src/lib-storage/index/maildir/maildir-save.c Tue Sep 21 15:22:57 2010 +0100 @@ -29,6 +29,7 @@ struct maildir_filename { struct maildir_filename *next; const char *tmp_name, *dest_basename; + const char *pop3_uidl; uoff_t size, vsize; enum mail_flags flags; @@ -179,6 +180,8 @@ sizeof(unsigned int) * keyword_count); ctx->have_keywords = TRUE; } + if (_ctx->pop3_uidl != NULL) + mf->pop3_uidl = p_strdup(ctx->pool, _ctx->pop3_uidl); /* insert into index */ mail_index_append(ctx->trans, _ctx->uid, &ctx->seq); @@ -855,6 +858,11 @@ maildir_uidlist_sync_set_ext(ctx->uidlist_sync_ctx, rec, MAILDIR_UIDLIST_REC_EXT_GUID, mf->tmp_name); } + if (mf->pop3_uidl != NULL) { + maildir_uidlist_sync_set_ext(ctx->uidlist_sync_ctx, rec, + MAILDIR_UIDLIST_REC_EXT_POP3_UIDL, + mf->pop3_uidl); + } } T_END; i_assert(!seq_range_array_iter_nth(&iter, n, &uid)); }