ph10 2007/06/29 10:20:38 BST
Modified files:
exim-src/src receive.c
exim-test patchexim
exim-test/confs 0542
exim-test/log 0542
exim-test/scripts/0000-Basic 0542
exim-test/stdout 0542
Log:
Fix stupid oversight in $max_received_linelength.
Revision Changes Path
1.39 +8 -0 exim/exim-src/src/receive.c
1.3 +1 -0 exim/exim-test/confs/0542
1.3 +1 -0 exim/exim-test/log/0542
1.2 +1 -1 exim/exim-test/patchexim
1.5 +23 -0 exim/exim-test/scripts/0000-Basic/0542
1.6 +18 -2 exim/exim-test/stdout/0542
Index: receive.c
===================================================================
RCS file: /home/cvs/exim/exim-src/src/receive.c,v
retrieving revision 1.38
retrieving revision 1.39
diff -u -r1.38 -r1.39
--- receive.c 22 Jun 2007 14:38:58 -0000 1.38
+++ receive.c 29 Jun 2007 09:20:37 -0000 1.39
@@ -1,4 +1,4 @@
-/* $Cambridge: exim/exim-src/src/receive.c,v 1.38 2007/06/22 14:38:58 ph10 Exp $ */
+/* $Cambridge: exim/exim-src/src/receive.c,v 1.39 2007/06/29 09:20:37 ph10 Exp $ */
/*************************************************
* Exim - an Internet mail transport agent *
@@ -728,6 +728,7 @@
{
int ch_state = 0;
register int ch;
+register int linelength = 0;
while ((ch = (RECEIVE_GETC)()) != EOF)
{
@@ -749,6 +750,9 @@
{
ch_state = 0;
body_linecount++;
+ if (linelength > max_received_linelength)
+ max_received_linelength = linelength;
+ linelength = -1;
}
else if (ch == '\r')
{
@@ -759,6 +763,9 @@
case 2: /* After (unwritten) CR */
body_linecount++;
+ if (linelength > max_received_linelength)
+ max_received_linelength = linelength;
+ linelength = -1;
if (ch == '\n')
{
ch_state = 0;
@@ -800,6 +807,7 @@
next. */
message_size++;
+ linelength++;
if (fout != NULL)
{
if (fputc(ch, fout) == EOF) return END_WERROR;
Index: patchexim
===================================================================
RCS file: /home/cvs/exim/exim-test/patchexim,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- patchexim 6 Feb 2006 16:07:10 -0000 1.1
+++ patchexim 29 Jun 2007 09:20:37 -0000 1.2
@@ -1,6 +1,6 @@
#! /usr/bin/perl -w
-# $Cambridge: exim/exim-test/patchexim,v 1.1 2006/02/06 16:07:10 ph10 Exp $
+# $Cambridge: exim/exim-test/patchexim,v 1.2 2007/06/29 09:20:37 ph10 Exp $
###############################################################################
# This is an auxiliary script that is part of the Exim test suite. It must be #
@@ -18,7 +18,7 @@
while(<IN>)
{
s/>>>running<<</<<<testing>>>/;
- s/(\d+\.\d+(?:\.\d+)?(-RC\d+)?\0<<eximversion>>)/"x.yz\0" . ("*" x (length($1) - 5))/e;
+ s/(\d+\.\d+(?:\.\d+)?(-RC\d+|-dev)?\0<<eximversion>>)/"x.yz\0" . ("*" x (length($1) - 5))/e;
print OUT;
}
Index: 0542
===================================================================
RCS file: /home/cvs/exim/exim-test/confs/0542,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- 0542 19 Dec 2006 16:40:27 -0000 1.2
+++ 0542 29 Jun 2007 09:20:37 -0000 1.3
@@ -11,6 +11,7 @@
# ----- Main settings -----
+acl_smtp_rcpt = accept
queue_only
trusted_users = CALLER
Index: 0542
===================================================================
RCS file: /home/cvs/exim/exim-test/log/0542,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- 0542 19 Dec 2006 16:40:27 -0000 1.2
+++ 0542 29 Jun 2007 09:20:38 -0000 1.3
@@ -1 +1,2 @@
1999-03-02 09:44:33 10HmaX-0005vi-00 <= userz@??? U=userz P=local S=sss
+1999-03-02 09:44:33 10HmaY-0005vi-00 <= userz@??? U=CALLER P=local-smtp S=sss
Index: 0542
===================================================================
RCS file: /home/cvs/exim/exim-test/scripts/0000-Basic/0542,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -r1.4 -r1.5
--- 0542 22 Jun 2007 14:38:58 -0000 1.4
+++ 0542 29 Jun 2007 09:20:38 -0000 1.5
@@ -16,6 +16,29 @@
max_received_linelength=$max_received_linelength
recipients=$recipients
****
+exim -bs
+mail from:<userz@???>
+rcpt to:<userx@???>
+rcpt to:<usery@???>
+data
+From: Himself <himself@???>
+To: Yourself <you@???>
+Subject: The subject is not the object
+
+This is the body of the message. Make the line much longer than any header.
+.
+quit
+****
+sudo exim -be -Mset $msg2
+From: $h_from:
+Subject: $h_subject:
+message_body_size=$message_body_size
+message_size=$message_size
+message_id=$message_id
+message_exim_id=$message_exim_id
+max_received_linelength=$max_received_linelength
+recipients=$recipients
+****
write test-data
From: A Person <a.person@???>
To: First <first@???>, Second <second@???>
Index: 0542
===================================================================
RCS file: /home/cvs/exim/exim-test/stdout/0542,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -r1.5 -r1.6
--- 0542 22 Jun 2007 14:38:58 -0000 1.5
+++ 0542 29 Jun 2007 09:20:38 -0000 1.6
@@ -7,12 +7,28 @@
> max_received_linelength=70
> recipients=userx@???, usery@???
>
+220 myhost.test.ex ESMTP Exim x.yz Tue, 2 Mar 1999 09:44:33 +0000
+250 OK
+250 Accepted
+250 Accepted
+354 Enter message, ending with "." on a line by itself
+250 OK id=10HmaY-0005vi-00
+221 myhost.test.ex closing connection
+> From: Himself <himself@???>
+> Subject: The subject is not the object
+> message_body_size=76
+> message_size=416
+> message_id=10HmaY-0005vi-00
+> message_exim_id=10HmaY-0005vi-00
+> max_received_linelength=75
+> recipients=userx@???, usery@???
+>
> from: A Person <a.person@???>
> to: First <first@???>, Second <second@???>
> subject: The subject is moot
> message_size=197
> message_body_size=77
-> message_exim_id=10HmaY-0005vi-00
+> message_exim_id=10HmaZ-0005vi-00
> message_linecount=6
> message_body_linecount=2
> max_received_linelength=50
@@ -20,7 +36,7 @@
> From: A Person <a.person@???>
To: First <first@???>, Second <second@???>
Subject: The subject is moot
-Message-Id: <E10HmaY-0005vi-00@???>
+Message-Id: <E10HmaZ-0005vi-00@???>
Date: Tue, 2 Mar 1999 09:44:33 +0000
>
> body --------------------