From: Timo Sirainen Date: Mon, 20 Apr 2009 16:21:48 +0000 (-0400) Subject: deliver: When forwarding messages, use -f parameter as return path and fallback to... X-Git-Tag: 2.0.alpha1~913 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=445128b9008d1ddd34a75d1c72690fee2cc5a2dd;p=thirdparty%2Fdovecot%2Fcore.git deliver: When forwarding messages, use -f parameter as return path and fallback to normalized Return-Path: header. --HG-- branch : HEAD --- diff --git a/src/lib-lda/mail-send.c b/src/lib-lda/mail-send.c index 6380771ba8..4d97428b2b 100644 --- a/src/lib-lda/mail-send.c +++ b/src/lib-lda/mail-send.c @@ -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);