-/* $Cambridge: exim/src/src/receive.c,v 1.38 2007/06/22 14:38:58 ph10 Exp $ */
+/* $Cambridge: exim/src/src/receive.c,v 1.39 2007/06/29 09:20:37 ph10 Exp $ */
/*************************************************
* Exim - an Internet mail transport agent *
{
int ch_state = 0;
register int ch;
+register int linelength = 0;
while ((ch = (RECEIVE_GETC)()) != EOF)
{
{
ch_state = 0;
body_linecount++;
+ if (linelength > max_received_linelength)
+ max_received_linelength = linelength;
+ linelength = -1;
}
else if (ch == '\r')
{
case 2: /* After (unwritten) CR */
body_linecount++;
+ if (linelength > max_received_linelength)
+ max_received_linelength = linelength;
+ linelength = -1;
if (ch == '\n')
{
ch_state = 0;
next. */
message_size++;
+ linelength++;
if (fout != NULL)
{
if (fputc(ch, fout) == EOF) return END_WERROR;
# ----- Main settings -----
+acl_smtp_rcpt = accept
queue_only
trusted_users = CALLER
1999-03-02 09:44:33 10HmaX-0005vi-00 <= userz@test.ex U=userz P=local S=sss
+1999-03-02 09:44:33 10HmaY-0005vi-00 <= userz@test.ex U=CALLER P=local-smtp S=sss
#! /usr/bin/perl -w
-# $Cambridge: exim/test/patchexim,v 1.1 2006/02/06 16:07:10 ph10 Exp $
+# $Cambridge: 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 #
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;
}
max_received_linelength=$max_received_linelength
recipients=$recipients
****
+exim -bs
+mail from:<userz@test.ex>
+rcpt to:<userx@test.x>
+rcpt to:<usery@test.ex>
+data
+From: Himself <himself@there.tld>
+To: Yourself <you@here.tld>
+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@a.domain.tld>
To: First <first@test.ex>, Second <second@test.ex>
> max_received_linelength=70
> recipients=userx@test.x, usery@test.ex
>
+220 myhost.test.ex ESMTP Exim x.yz Tue, 2 Mar 1999 09:44:33 +0000\r
+250 OK\r
+250 Accepted\r
+250 Accepted\r
+354 Enter message, ending with "." on a line by itself\r
+250 OK id=10HmaY-0005vi-00\r
+221 myhost.test.ex closing connection\r
+> From: Himself <himself@there.tld>
+> 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@test.x, usery@test.ex
+>
> from: A Person <a.person@a.domain.tld>
> to: First <first@test.ex>, Second <second@test.ex>
> 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
> From: A Person <a.person@a.domain.tld>
To: First <first@test.ex>, Second <second@test.ex>
Subject: The subject is moot
-Message-Id: <E10HmaY-0005vi-00@myhost.test.ex>
+Message-Id: <E10HmaZ-0005vi-00@myhost.test.ex>
Date: Tue, 2 Mar 1999 09:44:33 +0000
>
> body --------------------