summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorPhilip Hazel <ph10@hermes.cam.ac.uk>2005-04-27 13:29:32 +0000
committerPhilip Hazel <ph10@hermes.cam.ac.uk>2005-04-27 13:29:32 +0000
commit2e0c1448cf7e5612a17b4ff09fe7a05235cce7f2 (patch)
tree6ba2527d93ce7a497da8cfa59d1d4fd41558cc66 /src
parent0612b0985db3e7592fe9a6a7fef05ac49d0b83b7 (diff)
Install Tony's patch for $message_linecount.
Diffstat (limited to 'src')
-rw-r--r--src/ACKNOWLEDGMENTS3
-rw-r--r--src/src/expand.c3
-rw-r--r--src/src/receive.c15
-rw-r--r--src/src/smtp_in.c3
4 files changed, 15 insertions, 9 deletions
diff --git a/src/ACKNOWLEDGMENTS b/src/ACKNOWLEDGMENTS
index acba7b758..e33abe3c8 100644
--- a/src/ACKNOWLEDGMENTS
+++ b/src/ACKNOWLEDGMENTS
@@ -1,4 +1,4 @@
-$Cambridge: exim/src/ACKNOWLEDGMENTS,v 1.23 2005/04/27 10:00:18 ph10 Exp $
+$Cambridge: exim/src/ACKNOWLEDGMENTS,v 1.24 2005/04/27 13:29:32 ph10 Exp $
EXIM ACKNOWLEDGEMENTS
@@ -127,6 +127,7 @@ Tony Finch Expansion extensions
Patch for mxh lookup type in dnsdb
Patch for defer_foo in dndsb
Patch for ${dlfunc
+ Patch for $message_linecount
Ian Freislich Patch for spamd timeout problem
Giuliano Gavazzi Patches for OSX compilation
Dominic Germain Patch for exiqgrep MacOS X bug
diff --git a/src/src/expand.c b/src/src/expand.c
index fda06c61d..b1f7d3f96 100644
--- a/src/src/expand.c
+++ b/src/src/expand.c
@@ -1,4 +1,4 @@
-/* $Cambridge: exim/src/src/expand.c,v 1.18 2005/03/22 16:52:06 ph10 Exp $ */
+/* $Cambridge: exim/src/src/expand.c,v 1.19 2005/04/27 13:29:32 ph10 Exp $ */
/*************************************************
* Exim - an Internet mail transport agent *
@@ -394,6 +394,7 @@ static var_entry var_table[] = {
{ "message_body_size", vtype_int, &message_body_size },
{ "message_headers", vtype_msgheaders, NULL },
{ "message_id", vtype_stringptr, &message_id },
+ { "message_linecount", vtype_int, &message_linecount },
{ "message_size", vtype_int, &message_size },
#ifdef WITH_CONTENT_SCAN
{ "mime_anomaly_level", vtype_int, &mime_anomaly_level },
diff --git a/src/src/receive.c b/src/src/receive.c
index c83bca664..58c64f7c8 100644
--- a/src/src/receive.c
+++ b/src/src/receive.c
@@ -1,4 +1,4 @@
-/* $Cambridge: exim/src/src/receive.c,v 1.15 2005/04/07 15:40:50 ph10 Exp $ */
+/* $Cambridge: exim/src/src/receive.c,v 1.16 2005/04/27 13:29:32 ph10 Exp $ */
/*************************************************
* Exim - an Internet mail transport agent *
@@ -1339,11 +1339,9 @@ received_count = 1; /* For the one we will add */
if (thismessage_size_limit <= 0) thismessage_size_limit = INT_MAX;
-/* While reading the message, body_linecount and body_zerocount is computed.
-The full message_ linecount is set up only when the headers are read back in
-from the spool for delivery. */
+/* While reading the message, the following counts are computed. */
-body_linecount = body_zerocount = 0;
+message_linecount = body_linecount = body_zerocount = 0;
#ifdef EXPERIMENTAL_DOMAINKEYS
/* Call into DK to set up the context. Check if DK is to be run are carried out
@@ -1573,7 +1571,11 @@ for (;;)
/* End of header line reached */
EOL:
- receive_linecount++; /* For BSMTP errors */
+
+ /* Keep track of lines for BSMTP errors and overall message_linecount. */
+
+ receive_linecount++;
+ message_linecount++;
/* Now put in the terminating newline. There is always space for
at least two more characters. */
@@ -2633,6 +2635,7 @@ if (!ferror(data_file) && !(receive_feof)() && message_ended != END_DOT)
else message_ended = read_message_data(data_file);
receive_linecount += body_linecount; /* For BSMTP errors mainly */
+ message_linecount += body_linecount;
/* Handle premature termination of SMTP */
diff --git a/src/src/smtp_in.c b/src/src/smtp_in.c
index bdc323325..6e62b99e0 100644
--- a/src/src/smtp_in.c
+++ b/src/src/smtp_in.c
@@ -1,4 +1,4 @@
-/* $Cambridge: exim/src/src/smtp_in.c,v 1.16 2005/04/27 10:55:20 ph10 Exp $ */
+/* $Cambridge: exim/src/src/smtp_in.c,v 1.17 2005/04/27 13:29:32 ph10 Exp $ */
/*************************************************
* Exim - an Internet mail transport agent *
@@ -804,6 +804,7 @@ store_reset(reset_point);
recipients_list = NULL;
rcpt_count = rcpt_defer_count = rcpt_fail_count =
raw_recipients_count = recipients_count = recipients_list_max = 0;
+message_linecount = 0;
message_size = -1;
acl_warn_headers = NULL;
queue_only_policy = FALSE;