# HG changeset patch # User Timo Sirainen # Date 1191158030 -10800 # Node ID 722bef1a0c4e9dbee011a0b0c9aa790d6be9d854 # Parent 392a49f0c69a1ba80877dac3ba605a9358d2a83d If -f parameter is given, use it for deliver_get_return_address() instead of Return-Path: header. 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 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; @@ -178,6 +179,9 @@ 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; addr = message_address_parse(pool_datastack_create(), @@ -659,6 +663,7 @@ "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,