From e505fd0eae4f416d46a704dc46315e0c9c2e41a0 Mon Sep 17 00:00:00 2001 From: Steve Kemp Date: Thu, 2 Apr 2009 13:11:58 +0200 Subject: [PATCH] Only append -- to $sendmail if not present. Closes #3168. This allows users to add custom recipients via $sendmail. --- ChangeLog | 13 +++++++++++++ init.h | 3 ++- sendlib.c | 6 +++++- 3 files changed, 20 insertions(+), 2 deletions(-) diff --git a/ChangeLog b/ChangeLog index 342a6cd0b..689431e05 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,16 @@ +2009-04-02 12:57 +0200 Rocco Rutte (bfb12cf02417) + + * init.h: Clarify what $attach_charset does, closes #3165. + +2009-04-02 11:49 +0200 Rocco Rutte (1759a509dd0a) + + * ChangeLog, doc/Makefile.am: Add 'sortcheck' target to + doc/Makefile.am + + This should be used from time to time to check if vars are sorted. + + Closes #3191. + 2009-04-02 11:47 +0200 Rocco Rutte (e8cdc049cf84) * init.h: Sort $pgp_* and $crypt_* vars, see #3191. diff --git a/init.h b/init.h index cfb451f8d..be0bb00a1 100644 --- a/init.h +++ b/init.h @@ -2427,7 +2427,8 @@ struct option_t MuttVars[] = { ** .pp ** Specifies the program and arguments used to deliver mail sent by Mutt. ** Mutt expects that the specified program interprets additional - ** arguments as recipient addresses. + ** arguments as recipient addresses. Mutt appends all recipients after + ** adding \fC--\fP as delimiter (if not already present). */ { "sendmail_wait", DT_NUM, R_NONE, UL &SendmailWait, 0 }, /* diff --git a/sendlib.c b/sendlib.c index 1c9c352d4..3cb9feabf 100644 --- a/sendlib.c +++ b/sendlib.c @@ -2206,7 +2206,11 @@ mutt_invoke_sendmail (ADDRESS *from, /* the sender */ args = add_option (args, &argslen, &argsmax, "-R"); args = add_option (args, &argslen, &argsmax, DsnReturn); } - args = add_option (args, &argslen, &argsmax, "--"); + if (strstr (args, "--") == NULL) + { + /* Only append "--" if not already present. */ + args = add_option (args, &argslen, &argsmax, "--"); + } args = add_args (args, &argslen, &argsmax, to); args = add_args (args, &argslen, &argsmax, cc); args = add_args (args, &argslen, &argsmax, bcc); -- 2.40.0