ph10 2005/11/14 11:32:16 GMT
Modified files:
exim-doc/doc-txt ChangeLog
exim-src/src/transports autoreply.c
Log:
Correct message autoreply sends when including the original message with
headers_only or body_only.
Revision Changes Path
1.256 +5 -0 exim/exim-doc/doc-txt/ChangeLog
1.6 +13 -9 exim/exim-src/src/transports/autoreply.c
Index: ChangeLog
===================================================================
RCS file: /home/cvs/exim/exim-doc/doc-txt/ChangeLog,v
retrieving revision 1.255
retrieving revision 1.256
diff -u -r1.255 -r1.256
--- ChangeLog 14 Nov 2005 10:46:27 -0000 1.255
+++ ChangeLog 14 Nov 2005 11:32:16 -0000 1.256
@@ -1,4 +1,4 @@
-$Cambridge: exim/exim-doc/doc-txt/ChangeLog,v 1.255 2005/11/14 10:46:27 ph10 Exp $
+$Cambridge: exim/exim-doc/doc-txt/ChangeLog,v 1.256 2005/11/14 11:32:16 ph10 Exp $
Change log file for Exim from version 4.21
-------------------------------------------
@@ -68,6 +68,11 @@
$tod_xxx expansions could be wrong, because the tod_stamp() function was
called by the debug printing, thereby overwriting the timestamp buffer.
Debugging no longer uses the tod_stamp() function when +timestamp is set.
+
+PH/08 When the original message was included in an autoreply transport, it
+ always said "this is a copy of the message, including all the headers",
+ even if body_only or headers_only was set. It now gives an appropriate
+ message.
Exim version 4.54
Index: autoreply.c
===================================================================
RCS file: /home/cvs/exim/exim-src/src/transports/autoreply.c,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -r1.5 -r1.6
--- autoreply.c 27 Jun 2005 14:29:44 -0000 1.5
+++ autoreply.c 14 Nov 2005 11:32:16 -0000 1.6
@@ -1,4 +1,4 @@
-/* $Cambridge: exim/exim-src/src/transports/autoreply.c,v 1.5 2005/06/27 14:29:44 ph10 Exp $ */
+/* $Cambridge: exim/exim-src/src/transports/autoreply.c,v 1.6 2005/11/14 11:32:16 ph10 Exp $ */
/*************************************************
* Exim - an Internet mail transport agent *
@@ -630,28 +630,32 @@
}
/* Copy the original message if required, observing the return size
-limit. */
+limit if we are returning the body. */
if (return_message)
{
- if (bounce_return_size_limit > 0)
+ uschar *rubric = (tblock->headers_only)?
+ US"------ This is a copy of the message's header lines.\n"
+ : (tblock->body_only)?
+ US"------ This is a copy of the body of the message, without the headers.\n"
+ :
+ US"------ This is a copy of the message, including all the headers.\n";
+
+ if (bounce_return_size_limit > 0 && !tblock->headers_only)
{
struct stat statbuf;
int max = (bounce_return_size_limit/DELIVER_IN_BUFFER_SIZE + 1) *
DELIVER_IN_BUFFER_SIZE;
if (fstat(deliver_datafile, &statbuf) == 0 && statbuf.st_size > max)
{
- fprintf(f, "\n"
-"------ This is a copy of the message, including all the headers.\n"
+ fprintf(f, "\n%s"
"------ The body of the message is " OFF_T_FMT " characters long; only the first\n"
-"------ %d or so are included here.\n\n", statbuf.st_size,
+"------ %d or so are included here.\n\n", rubric, statbuf.st_size,
(max/1000)*1000);
}
- else fprintf(f, "\n"
-"------ This is a copy of the message, including all the headers. ------\n\n");
+ else fprintf(f, "\n%s\n", rubric);
}
- else fprintf(f, "\n"
-"------ This is a copy of the message, including all the headers. ------\n\n");
+ else fprintf(f, "\n%s\n", rubric);
fflush(f);
transport_count = 0;