]> git.ipfire.org Git - thirdparty/dovecot/core.git/commitdiff
lib-lda: If FROM envelope is known, tell about it to lib-storage when saving mail
authorTimo Sirainen <tss@iki.fi>
Wed, 14 Jul 2010 12:58:48 +0000 (13:58 +0100)
committerTimo Sirainen <tss@iki.fi>
Wed, 14 Jul 2010 12:58:48 +0000 (13:58 +0100)
src/lib-lda/mail-deliver.c

index 22b2a51e3d6f4aff2b04be7b90fdaf404c6f5b66..fc4e53baaf2ded7877a433ba9b927e605003b457 100644 (file)
@@ -203,6 +203,8 @@ int mail_deliver_save(struct mail_deliver_context *ctx, const char *mailbox,
        kw = str_array_length(keywords) == 0 ? NULL :
                mailbox_keywords_create_valid(box, keywords);
        save_ctx = mailbox_save_alloc(t);
+       if (ctx->src_envelope_sender != NULL)
+               mailbox_save_set_from_envelope(save_ctx, ctx->src_envelope_sender);
        mailbox_save_set_flags(save_ctx, flags, kw);
        if (mailbox_copy(&save_ctx, ctx->src_mail) < 0)
                ret = -1;