2011-11-27 16:51:57 +01:00
|
|
|
ask when sending list message replies to author only - Armin Wolfermann (aw)
|
|
|
|
|
2015-01-26 17:35:10 +01:00
|
|
|
---
|
2017-06-13 10:54:24 +02:00
|
|
|
init.h | 7 +++++++
|
|
|
|
mutt.h | 1 +
|
|
|
|
send.c | 18 ++++++++++++++++++
|
|
|
|
3 files changed, 26 insertions(+)
|
2015-01-26 17:35:10 +01:00
|
|
|
|
2016-05-12 16:10:16 +02:00
|
|
|
--- init.h
|
2017-06-13 10:54:24 +02:00
|
|
|
+++ init.h 2017-06-13 08:07:08.641344928 +0000
|
|
|
|
@@ -1631,6 +1631,13 @@ struct Option MuttVars[] = {
|
2017-04-28 16:47:43 +02:00
|
|
|
** ``$$keywords_standard'' are \fCfalse\fP, mutt will save keywords
|
|
|
|
** to legacy headers to ensure that it does not lose your labels.
|
2011-11-27 16:51:57 +01:00
|
|
|
*/
|
2017-04-28 16:47:43 +02:00
|
|
|
+ { "list_reply", DT_QUAD, R_NONE, OPT_LISTREPLY, MUTT_NO },
|
2011-11-27 16:51:57 +01:00
|
|
|
+ /*
|
|
|
|
+ ** .pp
|
|
|
|
+ ** When set, address replies to the mailing list the original message came
|
2016-04-11 14:08:25 +02:00
|
|
|
+ ** from (instead to the author only). Setting this option to ``ask-yes'' or
|
2011-11-27 16:51:57 +01:00
|
|
|
+ ** ``ask-no'' will ask if you really intended to reply to the author only.
|
|
|
|
+ */
|
2017-04-28 16:47:43 +02:00
|
|
|
{ "mail_check", DT_NUM, R_NONE, UL &BuffyTimeout, 5 },
|
2011-11-27 16:51:57 +01:00
|
|
|
/*
|
|
|
|
** .pp
|
2016-05-12 16:10:16 +02:00
|
|
|
--- mutt.h
|
2017-06-13 10:54:24 +02:00
|
|
|
+++ mutt.h 2017-06-13 08:07:08.641344928 +0000
|
|
|
|
@@ -249,6 +249,7 @@ enum
|
2011-11-27 16:51:57 +01:00
|
|
|
#endif
|
|
|
|
OPT_SUBJECT,
|
2017-04-28 16:47:43 +02:00
|
|
|
OPT_VERIFYSIG, /* verify PGP signatures */
|
2011-11-27 16:51:57 +01:00
|
|
|
+ OPT_LISTREPLY,
|
2016-05-31 14:38:26 +02:00
|
|
|
#ifdef USE_NNTP
|
|
|
|
OPT_TOMODERATED,
|
|
|
|
OPT_CATCHUP,
|
2016-05-12 16:10:16 +02:00
|
|
|
--- send.c
|
2017-06-13 10:54:24 +02:00
|
|
|
+++ send.c 2017-06-13 08:08:46.631548101 +0000
|
|
|
|
@@ -512,6 +512,7 @@ static int include_reply(struct Context
|
|
|
|
static int default_to(struct Address **to, struct Envelope *env, int flags, int hmfupto)
|
2011-11-27 16:51:57 +01:00
|
|
|
{
|
|
|
|
char prompt[STRING];
|
2017-06-13 10:54:24 +02:00
|
|
|
+ struct Address *tmp;
|
2011-11-27 16:51:57 +01:00
|
|
|
|
2017-04-28 16:47:43 +02:00
|
|
|
if (flags && env->mail_followup_to && hmfupto == MUTT_YES)
|
2011-11-27 16:51:57 +01:00
|
|
|
{
|
2017-06-13 10:54:24 +02:00
|
|
|
@@ -525,6 +526,23 @@ static int default_to(struct Address **t
|
2011-11-27 16:51:57 +01:00
|
|
|
if (flags & SENDLISTREPLY)
|
|
|
|
return 0;
|
|
|
|
|
|
|
|
+ /* If this message came from a mailing list, ask the user if he really
|
|
|
|
+ * intended to reply to the author only.
|
|
|
|
+ */
|
|
|
|
+ if (!(flags & SENDGROUPREPLY) && mutt_is_list_cc (0, env->to, env->cc)) {
|
|
|
|
+ switch (query_quadoption (OPT_LISTREPLY,
|
|
|
|
+ _("Message came from a mailing list. Reply to author only?")))
|
|
|
|
+ {
|
2017-04-28 16:47:43 +02:00
|
|
|
+ case MUTT_NO:
|
2011-11-27 16:51:57 +01:00
|
|
|
+ tmp = find_mailing_lists (env->to, env->cc);
|
|
|
|
+ rfc822_append (to, tmp, 0);
|
|
|
|
+ rfc822_free_address (&tmp);
|
|
|
|
+ return 0;
|
|
|
|
+ case -1:
|
|
|
|
+ return -1; /* abort */
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+
|
2017-04-28 16:47:43 +02:00
|
|
|
if (!option(OPTREPLYSELF) && mutt_addr_is_user(env->from))
|
2011-11-27 16:51:57 +01:00
|
|
|
{
|
|
|
|
/* mail is from the user, assume replying to recipients */
|