Package: bsd-mailx / 8.1.2-0.20141216cvs-2

12-REPLYTO-can-be-set-in-.mailrc-too.patch Patch series | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
From: Robert Luberda <robert@debian.org>
Date: Thu, 12 Jul 2001 19:00:00 +0200
Subject: 12 REPLYTO can be set in .mailrc too.

REPLYTO can be set in ~/.mailrc too.
---
 cmd3.c | 4 ++--
 main.c | 4 +++-
 send.c | 2 +-
 3 files changed, 6 insertions(+), 4 deletions(-)

diff --git a/cmd3.c b/cmd3.c
index db16208..abc247f 100644
--- a/cmd3.c
+++ b/cmd3.c
@@ -242,7 +242,7 @@ _respond(msgvec)
 		head.h_cc = NULL;
 	head.h_bcc = NULL;
 	head.h_smopts = NULL;
-	head.h_replyto = getenv("REPLYTO");
+	head.h_replyto = value("REPLYTO");
 	head.h_inreplyto = skin(hfield("message-id", mp), 1);
 
 	mail1(&head, 1);
@@ -630,7 +630,7 @@ _Respond(int *msgvec)
 	head.h_cc = NULL;
 	head.h_bcc = NULL;
 	head.h_smopts = NULL;
-	head.h_replyto = getenv("REPLYTO");
+	head.h_replyto = value("REPLYTO");
 	head.h_inreplyto = mid;
 
 	mail1(&head, 1);
diff --git a/main.c b/main.c
index 944c6ad..434ea6d 100644
--- a/main.c
+++ b/main.c
@@ -97,6 +97,8 @@ main(int argc, char **argv)
 		assign("MBOX", cmd);
 	if ((cmd = getenv("DEAD")))
 		assign("DEAD", cmd);
+	if ((cmd = getenv("REPLYTO")))
+		assign("REPLYTO", cmd);
 	image = -1;
 	/*
 	 * Now, determine how we are being used.
@@ -249,7 +251,7 @@ main(int argc, char **argv)
 	spreserve();
 	if (!nosrc)
 		load(_PATH_MASTER_RC);
-	replyto = getenv("REPLYTO");
+	replyto = value("REPLYTO");
 	/*
 	 * Expand returns a savestr, but load only uses the file name
 	 * for fopen, so it's safe to do this.
diff --git a/send.c b/send.c
index f778fee..4b31a61 100644
--- a/send.c
+++ b/send.c
@@ -312,7 +312,7 @@ sendmail(void *v)
 	head.h_header = NULL;
 	head.h_cc = NULL;
 	head.h_bcc = NULL;
-	head.h_replyto = getenv("REPLYTO");
+	head.h_replyto = value("REPLYTO");
 	head.h_inreplyto = NULL;
 	head.h_smopts = NULL;
 	mail1(&head, 0);