From: Timo Sirainen Date: Mon, 13 Feb 2017 18:44:31 +0000 (+0200) Subject: lib-lda: Remove %{storage_id} setting for now. X-Git-Tag: 2.3.0.rc1~2111 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=796d1ca5e01126f1328ac4cdec0c23491d0e3f10;p=thirdparty%2Fdovecot%2Fcore.git lib-lda: Remove %{storage_id} setting for now. It doesn't work with Sieve. The following patches add it back properly. --- diff --git a/src/lib-lda/mail-deliver.c b/src/lib-lda/mail-deliver.c index f466e321ca..fd15cd7724 100644 --- a/src/lib-lda/mail-deliver.c +++ b/src/lib-lda/mail-deliver.c @@ -65,7 +65,7 @@ mail_deliver_log_update_cache(struct mail_deliver_context *ctx) { struct mail *mail; const char *message_id = NULL, *subject = NULL, *from_envelope = NULL; - const char *from, *storage_id = NULL; + const char *from; if (ctx->cache == NULL) ctx->cache = p_new(ctx->pool, struct mail_deliver_cache, 1); @@ -90,9 +90,6 @@ mail_deliver_log_update_cache(struct mail_deliver_context *ctx) from_envelope = str_sanitize(from_envelope, 80); update_cache(ctx, &ctx->cache->from_envelope, from_envelope); - (void)mail_get_special(mail, MAIL_FETCH_STORAGE_ID, &storage_id); - update_cache(ctx, &ctx->cache->storage_id, storage_id); - if (mail_get_physical_size(mail, &ctx->cache->psize) < 0) ctx->cache->psize = 0; if (mail_get_virtual_size(mail, &ctx->cache->vsize) < 0) @@ -395,21 +392,6 @@ int mail_deliver_save(struct mail_deliver_context *ctx, const char *mailbox, mail_free(&ctx->dest_mail); mailbox_transaction_rollback(&t); } - /* might as well get the storage_id */ - (void)mail_get_special(ctx->dest_mail, MAIL_FETCH_STORAGE_ID, - &ctx->cache->storage_id); - } else if (var_has_key(ctx->set->deliver_log_format, '\0', "storage_id")) { - /* storage ID is available only after commit. */ - struct mail *mail = mail_deliver_open_mail(box, &changes, - MAIL_FETCH_STORAGE_ID, &t); - if (mail != NULL) { - const char *str; - - (void)mail_get_special(mail, MAIL_FETCH_STORAGE_ID, &str); - ctx->cache->storage_id = t_strdup(str); - mail_free(&mail); - (void)mailbox_transaction_commit(&t); - } } mail_deliver_log(ctx, "saved mail to %s", mailbox_name); pool_unref(&changes.pool);