summaryrefslogtreecommitdiffstats
path: root/debian/patches/75_13-Use-dsn_from-for-success-DSN-messages.-Bug-2404.patch
blob: 0eb4d4bed14f5c182ebdfcd4ece39d380a33680c (plain)
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
From 454bab46ae6812e29652d10c390451c962a6f806 Mon Sep 17 00:00:00 2001
From: Jeremy Harris <jgh146exb@wizmail.org>
Date: Tue, 4 Jun 2019 18:13:21 +0100
Subject: [PATCH 2/2] Use dsn_from for success-DSN messages.  Bug 2404

(cherry picked from commit 87abcb247b4444bab5fd0bcb212ddb26d5fd9191)
---
 doc/ChangeLog | 4 ++++
 src/deliver.c     | 4 ++--
 2 files changed, 6 insertions(+), 2 deletions(-)

diff --git a/doc/ChangeLog b/doc/ChangeLog
index 5a3e453d..1a12c014 100644
--- a/doc/ChangeLog
+++ b/doc/ChangeLog
@@ -65,6 +65,10 @@ JH/20 Bug 2389: fix server advertising of usable certificates, under GnuTLS in
       directory-of-certs mode.  Previously they were advertised despite the
       documentation.
 
+JH/27 Bug 2404: Use the main-section configuration option "dsn_from" for
+      success-DSN messages.  Previously the From: header was always the default
+      one for these; the option was ignored.
+
 
 Exim version 4.92
 -----------------
diff --git a/src/deliver.c b/src/deliver.c
index e1799411..4720f596 100644
--- a/src/deliver.c
+++ b/src/deliver.c
@@ -7365,8 +7365,8 @@ if (addr_senddsn)
     if (errors_reply_to)
       fprintf(f, "Reply-To: %s\n", errors_reply_to);
 
+    moan_write_from(f);
     fprintf(f, "Auto-Submitted: auto-generated\n"
-	"From: Mail Delivery System <Mailer-Daemon@%s>\n"
 	"To: %s\n"
 	"Subject: Delivery Status Notification\n"
 	"Content-Type: multipart/report; report-type=delivery-status; boundary=%s\n"
@@ -7377,7 +7377,7 @@ if (addr_senddsn)
 
 	"This message was created automatically by mail delivery software.\n"
 	" ----- The following addresses had successful delivery notifications -----\n",
-      qualify_domain_sender, sender_address, bound, bound);
+      sender_address, bound, bound);
 
     for (addr_dsntmp = addr_senddsn; addr_dsntmp;
 	 addr_dsntmp = addr_dsntmp->next)
-- 
2.20.1