From: Timo Sirainen Date: Mon, 2 Feb 2009 17:48:41 +0000 (-0500) Subject: deliver: If -f was specified and -a not, the sender was used also as the... X-Git-Tag: 1.2.beta1~42 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=9350b6f776580d171778a7a563b3cce44db58258;p=thirdparty%2Fdovecot%2Fcore.git deliver: If -f was specified and -a not, the sender was used also as the destination. %f in deliver_log_format was also expanded to the sender. --HG-- branch : HEAD --- diff --git a/src/deliver/deliver.c b/src/deliver/deliver.c index fb0ac7ec0b..0cdfbe9b62 100644 --- a/src/deliver/deliver.c +++ b/src/deliver/deliver.c @@ -84,9 +84,6 @@ static const char *deliver_get_address(struct mail *mail, const char *header) struct message_address *addr; const char *str; - if (explicit_envelope_sender != NULL) - return explicit_envelope_sender; - if (mail_get_first_header(mail, header, &str) <= 0) return NULL; addr = message_address_parse(pool_datastack_create(), @@ -263,6 +260,9 @@ int deliver_save(struct mail_namespace *namespaces, const char *deliver_get_return_address(struct mail *mail) { + if (explicit_envelope_sender != NULL) + return explicit_envelope_sender; + return deliver_get_address(mail, "Return-Path"); }