]> Pileus Git - ~andy/fetchmail/commitdiff
Fix bounce message detail regression from 6.3.0.
authorMatthias Andree <matthias.andree@gmx.de>
Mon, 25 May 2009 10:37:41 +0000 (10:37 -0000)
committerMatthias Andree <matthias.andree@gmx.de>
Mon, 25 May 2009 10:37:41 +0000 (10:37 -0000)
Non-delivery messages now mention the original reason for the bounce
message again.  It was lost in merging Holger Mauermann's patch before
6.3.0, and caused a sink.c compiler warning ever since.

svn path=/branches/BRANCH_6-3/; revision=5332

NEWS
sink.c

diff --git a/NEWS b/NEWS
index 6382fe1d3a568ab9e29cb4c98d7b663f5eaf22f1..944e8afc053c64f7f5e6319930d6f66e35aa6574 100644 (file)
--- a/NEWS
+++ b/NEWS
@@ -78,6 +78,8 @@ fetchmail 6.3.10 (not yet released):
   illogical, and documentation hadn't matched real behaviour for long.
 * For NTLM authentication, use dynamically allocated buffers.
   Fixes Debian Bug#449179, reported by Stepan Golosunov.
+* Non-delivery notices ("bounce mail") now mentions the original reason again,
+  before the address list. This fixes a regression introduced in 6.3.0.
 
 # CHANGES
 * Make the comparison of the SSL fingerprints case insensitive, to
diff --git a/sink.c b/sink.c
index 56801c8daaa3fc4786e1e7e4db9ef05987c270a2..edf1ae08562e1458caa5d722e9a3f7a785293b2b 100644 (file)
--- a/sink.c
+++ b/sink.c
@@ -251,7 +251,7 @@ char *rcpt_address(struct query *ctl, const char *id,
 }
 
 static int send_bouncemail(struct query *ctl, struct msgblk *msg,
-                          int userclass, char *message,
+                          int userclass, char *message /* should have \r\n at the end */,
                           int nerrors, char *errors[])
 /* bounce back an error report a la RFC 1892 */
 {
@@ -322,10 +322,14 @@ static int send_bouncemail(struct query *ctl, struct msgblk *msg,
     SockPrintf(sock, "--%s\r\n", boundary); 
     SockPrintf(sock,"Content-Type: text/plain\r\n");
     SockPrintf(sock, "\r\n");
-    SockPrintf(sock, "This message was created automatically by mail delivery software.\r\n\r\n");
+    SockPrintf(sock, "This message was created automatically by mail delivery software.\r\n");
+    SockPrintf(sock, "\r\n");
     SockPrintf(sock, "A message that you sent could not be delivered to one or more of its\r\n");
-    SockPrintf(sock, "recipients. This is a permanent error. The following address(es) failed:\r\n");
+    SockPrintf(sock, "recipients. This is a permanent error.\r\n");
+    SockPrintf(sock, "\r\n");
+    SockPrintf(sock, "Reason: %s", message);
     SockPrintf(sock, "\r\n");
+    SockPrintf(sock, "The following address(es) failed:\r\n");
 
     if (nerrors)
     {