ph10 2007/08/23 12:01:49 BST
Modified files:
exim-doc/doc-txt ChangeLog NewStuff OptionLists.txt
exim-src/src expand.c globals.c globals.h readconf.c
exim-test/confs 0046
exim-test/log 0046
exim-test/mail 0046.userx
exim-test/scripts/0000-Basic 0046
Log:
Add message_body_newlines.
Revision Changes Path
1.527 +4 -2 exim/exim-doc/doc-txt/ChangeLog
1.157 +5 -0 exim/exim-doc/doc-txt/NewStuff
1.34 +1 -0 exim/exim-doc/doc-txt/OptionLists.txt
1.90 +8 -2 exim/exim-src/src/expand.c
1.78 +1 -0 exim/exim-src/src/globals.c
1.59 +1 -0 exim/exim-src/src/globals.h
1.33 +1 -0 exim/exim-src/src/readconf.c
1.3 +3 -0 exim/exim-test/confs/0046
1.2 +3 -0 exim/exim-test/log/0046
1.2 +22 -0 exim/exim-test/mail/0046.userx
1.2 +7 -0 exim/exim-test/scripts/0000-Basic/0046
Index: ChangeLog
===================================================================
RCS file: /home/cvs/exim/exim-doc/doc-txt/ChangeLog,v
retrieving revision 1.526
retrieving revision 1.527
diff -u -r1.526 -r1.527
--- ChangeLog 23 Aug 2007 10:16:51 -0000 1.526
+++ ChangeLog 23 Aug 2007 11:01:49 -0000 1.527
@@ -1,4 +1,4 @@
-$Cambridge: exim/exim-doc/doc-txt/ChangeLog,v 1.526 2007/08/23 10:16:51 ph10 Exp $
+$Cambridge: exim/exim-doc/doc-txt/ChangeLog,v 1.527 2007/08/23 11:01:49 ph10 Exp $
Change log file for Exim from version 4.21
-------------------------------------------
@@ -88,13 +88,15 @@
bounce if the delivery eventually timed out. Change 4.67/27 below applied
only to a quota excession during the actual writing of the file.
-PH/10 It seems that peer DN values may contain newlines (and other non-printing
+PH/19 It seems that peer DN values may contain newlines (and other non-printing
characters?) which causes problems in log lines. The DN values are now
passed through string_printing() before being added to log lines.
-PH/11 Added the "servers=" facility to MySQL and PostgreSQL lookups. (Oracle
+PH/20 Added the "servers=" facility to MySQL and PostgreSQL lookups. (Oracle
and InterBase are left for another time.)
+PH/21 Added message_body_newlines option.
+
Exim version 4.67
-----------------
Index: NewStuff
===================================================================
RCS file: /home/cvs/exim/exim-doc/doc-txt/NewStuff,v
retrieving revision 1.156
retrieving revision 1.157
diff -u -r1.156 -r1.157
--- NewStuff 23 Aug 2007 10:16:51 -0000 1.156
+++ NewStuff 23 Aug 2007 11:01:49 -0000 1.157
@@ -1,4 +1,4 @@
-$Cambridge: exim/exim-doc/doc-txt/NewStuff,v 1.156 2007/08/23 10:16:51 ph10 Exp $
+$Cambridge: exim/exim-doc/doc-txt/NewStuff,v 1.157 2007/08/23 11:01:49 ph10 Exp $
New Features in Exim
--------------------
@@ -151,6 +151,11 @@
${lookup pgsql{servers=master/db/name/pw; UPDATE ...}
+11. The message_body_newlines option (default FALSE, for backwards
+ compatibility) can be used to control whether newlines are present in
+ $message_body and $message_body_end. If it is FALSE, they are replaced by
+ spaces.
+
Version 4.67
------------
Index: OptionLists.txt
===================================================================
RCS file: /home/cvs/exim/exim-doc/doc-txt/OptionLists.txt,v
retrieving revision 1.33
retrieving revision 1.34
diff -u -r1.33 -r1.34
--- OptionLists.txt 27 Jun 2007 11:01:51 -0000 1.33
+++ OptionLists.txt 23 Aug 2007 11:01:49 -0000 1.34
@@ -1,4 +1,4 @@
-$Cambridge: exim/exim-doc/doc-txt/OptionLists.txt,v 1.33 2007/06/27 11:01:51 ph10 Exp $
+$Cambridge: exim/exim-doc/doc-txt/OptionLists.txt,v 1.34 2007/08/23 11:01:49 ph10 Exp $
LISTS OF EXIM OPTIONS
---------------------
@@ -337,6 +337,7 @@
max_rcpt integer 100 smtp 1.60
max_user_name_length integer 0 main
mbx_format boolean false appendfile 2.10
+message_body_newlines boolean false main 4.68
message_body_visible integer 500 main
message_id_header_domain string* unset main 4.11
message_id_header_text string* unset main
Index: expand.c
===================================================================
RCS file: /home/cvs/exim/exim-src/src/expand.c,v
retrieving revision 1.89
retrieving revision 1.90
diff -u -r1.89 -r1.90
--- expand.c 22 Aug 2007 10:10:23 -0000 1.89
+++ expand.c 23 Aug 2007 11:01:49 -0000 1.90
@@ -1,4 +1,4 @@
-/* $Cambridge: exim/exim-src/src/expand.c,v 1.89 2007/08/22 10:10:23 ph10 Exp $ */
+/* $Cambridge: exim/exim-src/src/expand.c,v 1.90 2007/08/23 11:01:49 ph10 Exp $ */
/*************************************************
* Exim - an Internet mail transport agent *
@@ -1506,9 +1506,15 @@
if (len > 0)
{
body[len] = 0;
- while (len > 0)
+ if (message_body_newlines) /* Separate loops for efficiency */
{
- if (body[--len] == '\n' || body[len] == 0) body[len] = ' ';
+ while (len > 0)
+ { if (body[--len] == 0) body[len] = ' '; }
+ }
+ else
+ {
+ while (len > 0)
+ { if (body[--len] == '\n' || body[len] == 0) body[len] = ' '; }
}
}
}
Index: globals.c
===================================================================
RCS file: /home/cvs/exim/exim-src/src/globals.c,v
retrieving revision 1.77
retrieving revision 1.78
diff -u -r1.77 -r1.78
--- globals.c 22 Aug 2007 10:10:23 -0000 1.77
+++ globals.c 23 Aug 2007 11:01:49 -0000 1.78
@@ -1,4 +1,4 @@
-/* $Cambridge: exim/exim-src/src/globals.c,v 1.77 2007/08/22 10:10:23 ph10 Exp $ */
+/* $Cambridge: exim/exim-src/src/globals.c,v 1.78 2007/08/23 11:01:49 ph10 Exp $ */
/*************************************************
* Exim - an Internet mail transport agent *
@@ -754,6 +754,7 @@
int message_age = 0;
uschar *message_body = NULL;
uschar *message_body_end = NULL;
+BOOL message_body_newlines = FALSE;
int message_body_size = 0;
int message_body_visible = 500;
int message_ended = END_NOTSTARTED;
Index: globals.h
===================================================================
RCS file: /home/cvs/exim/exim-src/src/globals.h,v
retrieving revision 1.58
retrieving revision 1.59
diff -u -r1.58 -r1.59
--- globals.h 22 Aug 2007 10:10:23 -0000 1.58
+++ globals.h 23 Aug 2007 11:01:49 -0000 1.59
@@ -1,4 +1,4 @@
-/* $Cambridge: exim/exim-src/src/globals.h,v 1.58 2007/08/22 10:10:23 ph10 Exp $ */
+/* $Cambridge: exim/exim-src/src/globals.h,v 1.59 2007/08/23 11:01:49 ph10 Exp $ */
/*************************************************
* Exim - an Internet mail transport agent *
@@ -438,6 +438,7 @@
extern int message_age; /* In seconds */
extern uschar *message_body; /* Start of message body for filter */
extern uschar *message_body_end; /* End of message body for filter */
+extern BOOL message_body_newlines; /* FALSE => remove newlines */
extern int message_body_size; /* Sic */
extern int message_body_visible; /* Amount visible in message_body */
extern int message_ended; /* State of message reading and how ended */
Index: readconf.c
===================================================================
RCS file: /home/cvs/exim/exim-src/src/readconf.c,v
retrieving revision 1.32
retrieving revision 1.33
diff -u -r1.32 -r1.33
--- readconf.c 22 Aug 2007 10:10:23 -0000 1.32
+++ readconf.c 23 Aug 2007 11:01:49 -0000 1.33
@@ -1,4 +1,4 @@
-/* $Cambridge: exim/exim-src/src/readconf.c,v 1.32 2007/08/22 10:10:23 ph10 Exp $ */
+/* $Cambridge: exim/exim-src/src/readconf.c,v 1.33 2007/08/23 11:01:49 ph10 Exp $ */
/*************************************************
* Exim - an Internet mail transport agent *
@@ -265,6 +265,7 @@
{ "log_timezone", opt_bool, &log_timezone },
{ "lookup_open_max", opt_int, &lookup_open_max },
{ "max_username_length", opt_int, &max_username_length },
+ { "message_body_newlines", opt_bool, &message_body_newlines },
{ "message_body_visible", opt_mkint, &message_body_visible },
{ "message_id_header_domain", opt_stringptr, &message_id_domain },
{ "message_id_header_text", opt_stringptr, &message_id_text },
Index: 0046
===================================================================
RCS file: /home/cvs/exim/exim-test/confs/0046,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- 0046 4 Jul 2007 10:37:04 -0000 1.2
+++ 0046 23 Aug 2007 11:01:49 -0000 1.3
@@ -1,5 +1,7 @@
# Exim test configuration 0046
+NL=FALSE
+
exim_path = EXIM_PATH
host_lookup_order = bydns
rfc1413_query_timeout = 0s
@@ -10,6 +12,7 @@
# ----- Main settings -----
+message_body_newlines = NL
message_id_header_domain = test.ex
qualify_domain = test.ex
# Omit Received: so as to keep the header size fixed
Index: 0046
===================================================================
RCS file: /home/cvs/exim/exim-test/log/0046,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- 0046 7 Feb 2006 10:34:46 -0000 1.1
+++ 0046 23 Aug 2007 11:01:49 -0000 1.2
@@ -7,3 +7,6 @@
1999-03-02 09:44:33 10HmaZ-0005vi-00 <= usery@??? U=CALLER P=local S=sss
1999-03-02 09:44:33 10HmaZ-0005vi-00 => userx <userx@???> R=localuser T=local_delivery
1999-03-02 09:44:33 10HmaZ-0005vi-00 Completed
+1999-03-02 09:44:33 10HmbA-0005vi-00 <= usery@??? U=CALLER P=local S=sss
+1999-03-02 09:44:33 10HmbA-0005vi-00 => userx <userx@???> R=localuser T=local_delivery
+1999-03-02 09:44:33 10HmbA-0005vi-00 Completed
Index: 0046.userx
===================================================================
RCS file: /home/cvs/exim/exim-test/mail/0046.userx,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
Binary files /tmp/cvsl0LR5F and /tmp/cvsfVBzw9 differ
Index: 0046
===================================================================
RCS file: /home/cvs/exim/exim-test/scripts/0000-Basic/0046,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
Binary files /tmp/cvsFH1loJ and /tmp/cvs5fHZTc differ