]> git.ipfire.org Git - thirdparty/dovecot/core.git/commitdiff
deliver: When forwarding messages, use -f parameter as return path and fallback to...
authorTimo Sirainen <tss@iki.fi>
Mon, 20 Apr 2009 16:21:48 +0000 (12:21 -0400)
committerTimo Sirainen <tss@iki.fi>
Mon, 20 Apr 2009 16:21:48 +0000 (12:21 -0400)
--HG--
branch : HEAD

src/lib-lda/mail-send.c

index 6380771ba8393af21cd4681fc54c8cc46186fd30..4d97428b2bb10fea3fded89d6dce318f36308975 100644 (file)
@@ -178,9 +178,7 @@ int mail_send_forward(struct mail_deliver_context *ctx, const char *forwardto)
     if (mail_get_stream(ctx->src_mail, NULL, NULL, &input) < 0)
            return -1;
 
-    if (mail_get_first_header(ctx->src_mail, "Return-Path", &return_path) <= 0)
-           return_path = "";
-
+    return_path = mail_deliver_get_return_address(ctx);
     if (mailbox_get_settings(ctx->src_mail->box)->mail_debug) {
            i_info("Sending a forward to <%s> with return path <%s>",
                   forwardto, return_path);