2018-05-21 22:39:16 +02:00
|
|
|
--- PATCHES.orig 2018-05-19 20:39:17 UTC
|
2005-05-29 11:39:44 +02:00
|
|
|
+++ PATCHES
|
2018-05-21 22:39:16 +02:00
|
|
|
@@ -1 +1,2 @@
|
2005-05-29 11:39:44 +02:00
|
|
|
+patch-1.5.6.cb.reverse_reply.2
|
2018-05-21 22:39:16 +02:00
|
|
|
patch-1.5.4.cd.ifdef.1
|
|
|
|
--- init.h.orig 2018-05-19 20:37:42 UTC
|
2017-04-22 13:52:48 +02:00
|
|
|
+++ init.h
|
2018-05-21 22:39:16 +02:00
|
|
|
@@ -2748,6 +2748,13 @@
|
2017-04-22 13:52:48 +02:00
|
|
|
** possibly including eventual real names. When it is \fIunset\fP, mutt will
|
|
|
|
** override any such real names with the setting of the $$realname variable.
|
2005-05-29 11:39:44 +02:00
|
|
|
*/
|
|
|
|
+ { "reverse_reply", DT_BOOL, R_NONE, OPTREVREPLY, 0 },
|
|
|
|
+ /*
|
|
|
|
+ ** .pp
|
|
|
|
+ ** When set, this variable uses the name from your aliases in the To and Cc
|
|
|
|
+ ** headers of reply mails you send, like $reverse_alias does in the index.
|
|
|
|
+ ** When unset, the headers taken from the original mail are left unchanged.
|
|
|
|
+ */
|
|
|
|
{ "rfc2047_parameters", DT_BOOL, R_NONE, OPTRFC2047PARAMS, 0 },
|
|
|
|
/*
|
|
|
|
** .pp
|
2018-05-21 22:39:16 +02:00
|
|
|
--- mutt.h.orig 2018-05-19 20:36:22 UTC
|
2017-04-22 13:52:48 +02:00
|
|
|
+++ mutt.h
|
2018-05-21 22:39:16 +02:00
|
|
|
@@ -466,6 +466,7 @@
|
2005-05-29 11:39:44 +02:00
|
|
|
OPTREVALIAS,
|
|
|
|
OPTREVNAME,
|
|
|
|
OPTREVREAL,
|
|
|
|
+ OPTREVREPLY,
|
|
|
|
OPTRFC2047PARAMS,
|
|
|
|
OPTSAVEADDRESS,
|
|
|
|
OPTSAVEEMPTY,
|
2018-05-21 22:39:16 +02:00
|
|
|
--- protos.h.orig 2018-05-19 20:33:53 UTC
|
2017-04-22 13:52:48 +02:00
|
|
|
+++ protos.h
|
2018-05-21 22:39:16 +02:00
|
|
|
@@ -93,6 +93,7 @@
|
2005-05-29 11:39:44 +02:00
|
|
|
ADDRESS *mutt_lookup_alias (const char *s);
|
|
|
|
ADDRESS *mutt_remove_duplicates (ADDRESS *);
|
2006-07-18 17:16:43 +02:00
|
|
|
ADDRESS *mutt_remove_xrefs (ADDRESS *, ADDRESS *);
|
2005-05-29 11:39:44 +02:00
|
|
|
+ADDRESS *mutt_reverse_address (ADDRESS *);
|
|
|
|
ADDRESS *mutt_expand_aliases (ADDRESS *);
|
|
|
|
ADDRESS *mutt_parse_adrlist (ADDRESS *, const char *);
|
2017-04-22 13:52:48 +02:00
|
|
|
|
2018-05-21 22:39:16 +02:00
|
|
|
--- send.c.orig 2018-05-19 20:33:53 UTC
|
2017-04-22 13:52:48 +02:00
|
|
|
+++ send.c
|
2018-05-21 22:39:16 +02:00
|
|
|
@@ -598,6 +598,10 @@
|
2005-05-29 11:39:44 +02:00
|
|
|
/* the CC field can get cluttered, especially with lists */
|
|
|
|
env->to = mutt_remove_duplicates (env->to);
|
|
|
|
env->cc = mutt_remove_duplicates (env->cc);
|
|
|
|
+ if (option (OPTREVREPLY)){
|
|
|
|
+ env->to = mutt_reverse_address (env->to);
|
|
|
|
+ env->cc = mutt_reverse_address (env->cc);
|
|
|
|
+ }
|
|
|
|
env->cc = mutt_remove_xrefs (env->to, env->cc);
|
2017-04-22 13:52:48 +02:00
|
|
|
|
|
|
|
if (env->cc && !env->to)
|
2018-05-21 22:39:16 +02:00
|
|
|
--- sendlib.c.orig 2018-05-19 20:33:53 UTC
|
2017-04-22 13:52:48 +02:00
|
|
|
+++ sendlib.c
|
2018-05-21 22:39:16 +02:00
|
|
|
@@ -2753,6 +2753,35 @@
|
2005-05-29 11:39:44 +02:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
+/* given a list of addresses, return a list of reverse_alias'ed addresses */
|
|
|
|
+ADDRESS *mutt_reverse_address (ADDRESS *addr)
|
|
|
|
+{
|
|
|
|
+ ADDRESS *top,*tmp,*alias;
|
|
|
|
+
|
|
|
|
+ if (addr == NULL)
|
|
|
|
+ return NULL;
|
|
|
|
+
|
|
|
|
+ if ((alias = alias_reverse_lookup (addr)) && alias->personal) {
|
|
|
|
+ tmp = rfc822_cpy_adr_real(alias);
|
|
|
|
+ tmp->next = addr->next;
|
|
|
|
+ addr->next = NULL;
|
|
|
|
+ rfc822_free_address(&addr);
|
|
|
|
+ addr = tmp;
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ for (top = addr; top->next != NULL; top = tmp) {
|
|
|
|
+ tmp = top->next;
|
|
|
|
+ if ((alias = alias_reverse_lookup (tmp)) && alias->personal) {
|
|
|
|
+ top->next = rfc822_cpy_adr_real(alias);
|
|
|
|
+ top->next->next = tmp->next;
|
|
|
|
+ tmp->next = NULL;
|
|
|
|
+ rfc822_free_address(&tmp);
|
|
|
|
+ tmp = top->next;
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ return addr;
|
|
|
|
+}
|
|
|
|
+
|
|
|
|
int mutt_write_fcc (const char *path, HEADER *hdr, const char *msgid, int post, char *fcc)
|
|
|
|
{
|
|
|
|
CONTEXT f;
|