View | Details | Raw Unified | Return to bug 81549
Collapse All | Expand All

(-)ports/mail/mutt-devel/Makefile (+8 lines)
Lines 93-98 Link Here
93
# If you do not want mutt to use the flock() function define:
93
# If you do not want mutt to use the flock() function define:
94
#  WITHOUT_MUTT_FLOCK
94
#  WITHOUT_MUTT_FLOCK
95
#
95
#
96
# If you want to enable reverse_reply option define:
97
#  WITH_MUTT_REVERSE_REPLY_PATCH
98
#
96
99
97
PORTNAME=	mutt-devel
100
PORTNAME=	mutt-devel
98
PORTVERSION=	1.5.9
101
PORTVERSION=	1.5.9
Lines 307-312 Link Here
307
.if defined(WITH_MUTT_ASPELL)
310
.if defined(WITH_MUTT_ASPELL)
308
pre-configure::
311
pre-configure::
309
	@${PATCH} ${PATCH_ARGS} < ${PATCHDIR}/extra-patch-aspell
312
	@${PATCH} ${PATCH_ARGS} < ${PATCHDIR}/extra-patch-aspell
313
.endif
314
315
.if defined(WITH_MUTT_REVERSE_REPLY_PATCH)
316
pre-configure::
317
	@${PATCH} ${PATCH_ARGS} < ${PATCHDIR}/extra-patch-reverse_reply
310
.endif
318
.endif
311
319
312
.if defined(WITHOUT_MUTT_FLOCK)
320
.if defined(WITHOUT_MUTT_FLOCK)
(-)ports/mail/mutt-devel/files/extra-patch-reverse_reply (+87 lines)
Line 0 Link Here
1
--- init.h.orig	2005-03-01 16:56:02.000000000 +0100
2
+++ init.h	2005-05-25 18:20:57.000000000 +0200
3
@@ -2257,6 +2257,13 @@
4
   ** possibly including eventual real names.  When it is unset, mutt will
5
   ** override any such real names with the setting of the $realname variable.
6
   */
7
+  { "reverse_reply",	DT_BOOL, R_NONE, OPTREVREPLY, 0 },
8
+  /*
9
+  ** .pp
10
+  ** When set, this variable uses the name from your aliases in the To and Cc
11
+  ** headers of reply mails you send, like $reverse_alias does in the index.
12
+  ** When unset, the headers taken from the original mail are left unchanged.
13
+  */
14
   { "rfc2047_parameters", DT_BOOL, R_NONE, OPTRFC2047PARAMS, 0 },
15
   /*
16
   ** .pp
17
--- mutt.h.orig	2005-02-28 16:13:57.000000000 +0100
18
+++ mutt.h	2005-05-25 18:20:57.000000000 +0200
19
@@ -410,6 +410,7 @@
20
   OPTREVALIAS,
21
   OPTREVNAME,
22
   OPTREVREAL,
23
+  OPTREVREPLY,
24
   OPTRFC2047PARAMS,
25
   OPTSAVEADDRESS,
26
   OPTSAVEEMPTY,
27
--- protos.h.orig	2005-02-01 09:59:02.000000000 +0100
28
+++ protos.h	2005-05-25 18:20:57.000000000 +0200
29
@@ -84,6 +84,7 @@
30
 ADDRESS *mutt_get_address (ENVELOPE *, char **);
31
 ADDRESS *mutt_lookup_alias (const char *s);
32
 ADDRESS *mutt_remove_duplicates (ADDRESS *);
33
+ADDRESS *mutt_reverse_address (ADDRESS *);
34
 ADDRESS *mutt_expand_aliases (ADDRESS *);
35
 ADDRESS *mutt_parse_adrlist (ADDRESS *, const char *);
36
 
37
--- send.c.orig	2005-02-03 19:47:53.000000000 +0100
38
+++ send.c	2005-05-25 18:20:57.000000000 +0200
39
@@ -588,6 +588,10 @@
40
   /* the CC field can get cluttered, especially with lists */
41
   env->to = mutt_remove_duplicates (env->to);
42
   env->cc = mutt_remove_duplicates (env->cc);
43
+  if (option (OPTREVREPLY)){
44
+	env->to = mutt_reverse_address (env->to);
45
+	env->cc = mutt_reverse_address (env->cc);
46
+  }
47
   env->cc = mutt_remove_xrefs (env->to, env->cc);
48
 }
49
 
50
--- sendlib.c.orig	2005-02-21 05:45:57.000000000 +0100
51
+++ sendlib.c	2005-05-25 18:20:57.000000000 +0200
52
@@ -2341,6 +2341,35 @@
53
   }
54
 }
55
 
56
+/* given a list of addresses, return a list of reverse_alias'ed addresses */
57
+ADDRESS *mutt_reverse_address (ADDRESS *addr)
58
+{
59
+  ADDRESS *top,*tmp,*alias;
60
+
61
+  if (addr == NULL)
62
+    return NULL;
63
+
64
+  if ((alias = alias_reverse_lookup (addr)) && alias->personal) {
65
+    tmp = rfc822_cpy_adr_real(alias);
66
+    tmp->next = addr->next;
67
+    addr->next = NULL;
68
+    rfc822_free_address(&addr);
69
+    addr = tmp;
70
+  }
71
+
72
+  for (top = addr; top->next != NULL; top = tmp) {
73
+    tmp = top->next;
74
+    if ((alias = alias_reverse_lookup (tmp)) && alias->personal) {
75
+      top->next = rfc822_cpy_adr_real(alias);
76
+      top->next->next = tmp->next;
77
+      tmp->next = NULL;
78
+      rfc822_free_address(&tmp);
79
+      tmp = top->next;
80
+    }
81
+  }
82
+  return addr;
83
+}
84
+
85
 int mutt_write_fcc (const char *path, HEADER *hdr, const char *msgid, int post, char *fcc)
86
 {
87
   CONTEXT f;

Return to bug 81549