dovecot: If -f parameter is given, use it for deliver_get_return...
dovecot at dovecot.org
dovecot at dovecot.org
Sun Sep 30 16:13:53 EEST 2007
details: http://hg.dovecot.org/dovecot/rev/722bef1a0c4e
changeset: 6508:722bef1a0c4e
user: Timo Sirainen <tss at iki.fi>
date: Sun Sep 30 16:13:50 2007 +0300
description:
If -f parameter is given, use it for deliver_get_return_address() instead of
Return-Path: header.
diffstat:
1 file changed, 5 insertions(+)
src/deliver/deliver.c | 5 +++++
diffs (29 lines):
diff -r 392a49f0c69a -r 722bef1a0c4e src/deliver/deliver.c
--- a/src/deliver/deliver.c Sun Sep 30 15:52:26 2007 +0300
+++ b/src/deliver/deliver.c Sun Sep 30 16:13:50 2007 +0300
@@ -54,6 +54,7 @@ static bool saved_mail = FALSE;
static bool saved_mail = FALSE;
static bool tried_default_save = FALSE;
static bool no_mailbox_autocreate = FALSE;
+static const char *explicit_envelope_sender = NULL;
static struct module *modules;
static struct ioloop *ioloop;
@@ -177,6 +178,9 @@ const char *deliver_get_return_address(s
{
struct message_address *addr;
const char *str;
+
+ if (explicit_envelope_sender != NULL)
+ return explicit_envelope_sender;
if (mail_get_first_header(mail, "Return-Path", &str) <= 0)
return NULL;
@@ -659,6 +663,7 @@ int main(int argc, char *argv[])
"Missing envelope argument");
}
envelope_sender = argv[i];
+ explicit_envelope_sender = argv[i];
} else if (argv[i][0] != '\0') {
print_help();
i_fatal_status(EX_USAGE,
More information about the dovecot-cvs
mailing list