summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorJeremy Harris <jgh146exb@wizmail.org>2017-04-28 23:54:35 +0100
committerJeremy Harris <jgh146exb@wizmail.org>2017-04-28 23:54:35 +0100
commit328c5688dbe0f4c14418f22350ccd99b3fe8ac71 (patch)
treef4672e184e8964334e394823e6cb9c55db29f5fe /test
parenteeb35890a1eefbdf6bd8fcb86fcc31233835b0df (diff)
Support wire-format spoolfiles
Diffstat (limited to 'test')
-rw-r--r--test/confs/090689
l---------test/confs/45301
-rw-r--r--test/log/09069
-rw-r--r--test/log/453017
-rw-r--r--test/mail/0906.a109
-rw-r--r--test/mail/4530.y26
-rw-r--r--test/mail/4530.z26
-rw-r--r--test/scripts/0000-Basic/0906122
-rw-r--r--test/scripts/4500-DKIM/453066
-rw-r--r--test/stderr/01431
-rw-r--r--test/stderr/01691
-rw-r--r--test/stderr/02751
-rw-r--r--test/stderr/03862
-rw-r--r--test/stderr/03933
-rw-r--r--test/stderr/04022
-rw-r--r--test/stderr/04041
-rw-r--r--test/stderr/04081
-rw-r--r--test/stderr/04761
-rw-r--r--test/stderr/04871
-rw-r--r--test/stderr/05122
-rw-r--r--test/stderr/26001
-rw-r--r--test/stderr/45206
-rw-r--r--test/stderr/50041
-rw-r--r--test/stderr/50052
-rw-r--r--test/stderr/50061
-rw-r--r--test/stderr/50082
-rw-r--r--test/stdout/0906123
-rw-r--r--test/stdout/453075
28 files changed, 688 insertions, 4 deletions
diff --git a/test/confs/0906 b/test/confs/0906
new file mode 100644
index 000000000..2e8d35a91
--- /dev/null
+++ b/test/confs/0906
@@ -0,0 +1,89 @@
+# Exim test configuration 0906
+SERVER=
+
+exim_path = EXIM_PATH
+keep_environment =
+host_lookup_order = bydns
+spool_directory = DIR/spool
+log_file_path = DIR/spool/log/SERVER%slog
+gecos_pattern = ""
+gecos_name = CALLER_NAME
+chunking_advertise_hosts = *
+tls_advertise_hosts = ${if eq {SRV}{tls} {*}}
+
+# ----- Main settings -----
+
+spool_wireformat = true
+
+primary_hostname = testhost.test.ex
+domainlist local_domains = @ : test.ex
+
+acl_smtp_rcpt = accept
+log_selector = +received_recipients
+
+.ifdef _OPT_MAIN_TLS_CERTIFICATE
+tls_certificate = DIR/aux-fixed/cert1
+tls_privatekey = DIR/aux-fixed/cert1
+.endif
+
+# ----- ACL -----
+
+# ----- Routers -----
+
+begin routers
+
+to_server:
+ driver = accept
+ condition = ${if = {$received_port}{PORT_S}}
+ transport = remote_smtp${if eq {OPT}{dkim} {_dkim}}
+ errors_to = ""
+
+fail_remote_domains:
+ driver = redirect
+ domains = ! +local_domains
+ data = :fail: unrouteable mail domain "$domain"
+
+localuser:
+ driver = accept
+ transport = local_delivery
+
+
+# ----- Transports -----
+
+begin transports
+
+local_delivery:
+ driver = appendfile
+ file = DIR/test-mail/$local_part
+ headers_add = "X-body-linecount: $body_linecount\n\
+ X-message-linecount: $message_linecount\n\
+ X-received-count: $received_count"
+ return_path_add
+ user = CALLER
+
+remote_smtp:
+ driver = smtp
+ hosts = 127.0.0.1
+ port = PORT_D
+ allow_localhost
+
+remote_smtp_dkim:
+ driver = smtp
+ hosts = 127.0.0.1
+ port = PORT_D
+ allow_localhost
+
+.ifdef OPT
+ dkim_domain = test.ex
+ dkim_selector = sel
+ dkim_private_key = DIR/aux-fixed/dkim/dkim.private
+.ifndef HEADERS_MAXSIZE
+ dkim_sign_headers = LIST
+.endif
+.endif
+
+# ----- Retry -----
+
+begin retry
+* * F,30m,5m;
+# End
diff --git a/test/confs/4530 b/test/confs/4530
new file mode 120000
index 000000000..a8ce02c97
--- /dev/null
+++ b/test/confs/4530
@@ -0,0 +1 @@
+0906 \ No newline at end of file
diff --git a/test/log/0906 b/test/log/0906
new file mode 100644
index 000000000..e6a99e12d
--- /dev/null
+++ b/test/log/0906
@@ -0,0 +1,9 @@
+
+******** SERVER ********
+1999-03-02 09:44:33 exim x.yz daemon started: pid=pppp, no queue runs, listening for SMTP on port 1225 port 1224
+1999-03-02 09:44:33 10HmaX-0005vi-00 <= sender@dom H=(test.com) [127.0.0.1] P=esmtp K S=sss for a@test.ex
+1999-03-02 09:44:33 10HmaY-0005vi-00 <= <> H=localhost (testhost.test.ex) [127.0.0.1] P=esmtp K S=sss for a@test.ex
+1999-03-02 09:44:33 10HmaY-0005vi-00 => a <a@test.ex> R=localuser T=local_delivery
+1999-03-02 09:44:33 10HmaY-0005vi-00 Completed
+1999-03-02 09:44:33 10HmaX-0005vi-00 => a@test.ex R=to_server T=remote_smtp H=127.0.0.1 [127.0.0.1] K C="250- 8392 byte chunk, total 8599\\n250 OK id=10HmaY-0005vi-00"
+1999-03-02 09:44:33 10HmaX-0005vi-00 Completed
diff --git a/test/log/4530 b/test/log/4530
new file mode 100644
index 000000000..d360cb102
--- /dev/null
+++ b/test/log/4530
@@ -0,0 +1,17 @@
+
+******** SERVER ********
+1999-03-02 09:44:33 exim x.yz daemon started: pid=pppp, no queue runs, listening for SMTP on port 1224 port 1225
+1999-03-02 09:44:33 10HmaX-0005vi-00 <= CALLER@bloggs.com H=(xxx) [127.0.0.1] P=esmtp S=sss for z@test.ex
+1999-03-02 09:44:33 10HmaY-0005vi-00 DKIM: d=test.ex s=sel c=relaxed/relaxed a=rsa-sha256 b=1024 [verification succeeded]
+1999-03-02 09:44:33 10HmaY-0005vi-00 <= <> H=localhost (testhost.test.ex) [127.0.0.1] P=esmtp K S=sss for z@test.ex
+1999-03-02 09:44:33 10HmaY-0005vi-00 => z <z@test.ex> R=localuser T=local_delivery
+1999-03-02 09:44:33 10HmaY-0005vi-00 Completed
+1999-03-02 09:44:33 10HmaX-0005vi-00 => z@test.ex R=to_server T=remote_smtp_dkim H=127.0.0.1 [127.0.0.1] K C="250- 652 byte chunk, total 652\\n250 OK id=10HmaY-0005vi-00"
+1999-03-02 09:44:33 10HmaX-0005vi-00 Completed
+1999-03-02 09:44:33 10HmaZ-0005vi-00 <= CALLER@bloggs.com H=(xxx) [127.0.0.1] P=esmtp K S=sss for y@test.ex
+1999-03-02 09:44:33 10HmbA-0005vi-00 DKIM: d=test.ex s=sel c=relaxed/relaxed a=rsa-sha256 b=1024 [verification succeeded]
+1999-03-02 09:44:33 10HmbA-0005vi-00 <= <> H=localhost (testhost.test.ex) [127.0.0.1] P=esmtp K S=sss for y@test.ex
+1999-03-02 09:44:33 10HmbA-0005vi-00 => y <y@test.ex> R=localuser T=local_delivery
+1999-03-02 09:44:33 10HmbA-0005vi-00 Completed
+1999-03-02 09:44:33 10HmaZ-0005vi-00 => y@test.ex R=to_server T=remote_smtp_dkim H=127.0.0.1 [127.0.0.1] K C="250- 652 byte chunk, total 652\\n250 OK id=10HmbA-0005vi-00"
+1999-03-02 09:44:33 10HmaZ-0005vi-00 Completed
diff --git a/test/mail/0906.a b/test/mail/0906.a
new file mode 100644
index 000000000..e5a07fc2d
--- /dev/null
+++ b/test/mail/0906.a
@@ -0,0 +1,109 @@
+From MAILER-DAEMON Tue Mar 02 09:44:33 1999
+Return-path: <>
+Received: from localhost ([127.0.0.1] helo=testhost.test.ex)
+ by testhost.test.ex with esmtp (Exim x.yz)
+ id 10HmaY-0005vi-00
+ for a@test.ex; Tue, 2 Mar 1999 09:44:33 +0000
+Received: from [127.0.0.1] (helo=test.com)
+ by testhost.test.ex with esmtp (Exim x.yz)
+ (envelope-from <sender@dom>)
+ id 10HmaX-0005vi-00
+ for a@test.ex; Tue, 2 Mar 1999 09:44:33 +0000
+Subject: foo
+X-body-linecount: 0
+X-message-linecount: 10
+X-received-count: 2
+
+1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890
+1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890
+1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890
+1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890
+1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890
+1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890
+1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890
+1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890
+1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890
+1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890
+
+1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890
+1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890
+1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890
+1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890
+1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890
+1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890
+1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890
+1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890
+1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890
+1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890
+
+1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890
+1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890
+1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890
+1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890
+1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890
+1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890
+1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890
+1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890
+1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890
+1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890
+
+1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890
+1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890
+1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890
+1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890
+1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890
+1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890
+1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890
+1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890
+1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890
+1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890
+
+1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890
+1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890
+1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890
+1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890
+1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890
+1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890
+1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890
+1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890
+1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890
+1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890
+
+1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890
+1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890
+1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890
+1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890
+1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890
+1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890
+1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890
+1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890
+1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890
+1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890
+
+1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890
+1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890
+1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890
+1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890
+1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890
+1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890
+1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890
+1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890
+1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890
+1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890
+
+1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890
+1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890
+1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890
+1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890
+1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890
+1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890
+1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890
+1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890
+1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890
+1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890
+
+1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890
+1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890
+.dot
+tail
+
diff --git a/test/mail/4530.y b/test/mail/4530.y
new file mode 100644
index 000000000..580e21dc7
--- /dev/null
+++ b/test/mail/4530.y
@@ -0,0 +1,26 @@
+From MAILER-DAEMON Tue Mar 02 09:44:33 1999
+Return-path: <>
+Received: from localhost ([127.0.0.1] helo=testhost.test.ex)
+ by testhost.test.ex with esmtp (Exim x.yz)
+ id 10HmbA-0005vi-00
+ for y@test.ex; Tue, 2 Mar 1999 09:44:33 +0000
+DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=test.ex;
+ s=sel; h=LIST; bh=CVpkzY75tV/NCKk5pPx4GnM3NX83xwCiT0xVwo0G1Rs=; b=TIqPqpKM5qf
+ ZFlv2H8yio5RybWA3sLCtVmE6HmBhBKqW+uqLKG2grqJhVMJ3qXnvQQ3ixnMjMlJqfCpEBtxfsSR9
+ MGLPP9ZMdlrBNEL6XKlgE+X8bAra5zkuLZs8gy8H3/mtEfoKPs4ltB/ZK/j2FHG2+CEx+TDTIkh9E
+ wkAMrA=;
+Received: from [127.0.0.1] (helo=xxx)
+ by testhost.test.ex with esmtp (Exim x.yz)
+ (envelope-from <CALLER@bloggs.com>)
+ id 10HmaZ-0005vi-00
+ for y@test.ex; Tue, 2 Mar 1999 09:44:33 +0000
+Subject: simple test
+X-body-linecount: 0
+X-message-linecount: 15
+X-received-count: 2
+
+Line 1: This is a simple test.
+Line 2: This is a simple test.
+.Line 3 has a leading dot
+last line: 4
+
diff --git a/test/mail/4530.z b/test/mail/4530.z
new file mode 100644
index 000000000..2e74291f5
--- /dev/null
+++ b/test/mail/4530.z
@@ -0,0 +1,26 @@
+From MAILER-DAEMON Tue Mar 02 09:44:33 1999
+Return-path: <>
+Received: from localhost ([127.0.0.1] helo=testhost.test.ex)
+ by testhost.test.ex with esmtp (Exim x.yz)
+ id 10HmaY-0005vi-00
+ for z@test.ex; Tue, 2 Mar 1999 09:44:33 +0000
+DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=test.ex;
+ s=sel; h=LIST; bh=CVpkzY75tV/NCKk5pPx4GnM3NX83xwCiT0xVwo0G1Rs=; b=TIqPqpKM5qf
+ ZFlv2H8yio5RybWA3sLCtVmE6HmBhBKqW+uqLKG2grqJhVMJ3qXnvQQ3ixnMjMlJqfCpEBtxfsSR9
+ MGLPP9ZMdlrBNEL6XKlgE+X8bAra5zkuLZs8gy8H3/mtEfoKPs4ltB/ZK/j2FHG2+CEx+TDTIkh9E
+ wkAMrA=;
+Received: from [127.0.0.1] (helo=xxx)
+ by testhost.test.ex with esmtp (Exim x.yz)
+ (envelope-from <CALLER@bloggs.com>)
+ id 10HmaX-0005vi-00
+ for z@test.ex; Tue, 2 Mar 1999 09:44:33 +0000
+Subject: simple test
+X-body-linecount: 0
+X-message-linecount: 15
+X-received-count: 2
+
+Line 1: This is a simple test.
+Line 2: This is a simple test.
+.Line 3 has a leading dot
+last line: 4
+
diff --git a/test/scripts/0000-Basic/0906 b/test/scripts/0000-Basic/0906
new file mode 100644
index 000000000..f80899fee
--- /dev/null
+++ b/test/scripts/0000-Basic/0906
@@ -0,0 +1,122 @@
+# CHUNKING, spool_wireformat
+#
+exim -bd -DSERVER=server -oX PORT_D:PORT_S
+****
+#
+# Basic long message
+client 127.0.0.1 PORT_S
+??? 220
+EHLO test.com
+??? 250-
+??? 250-
+??? 250-
+??? 250-
+??? 250-
+??? 250
+MAIL FROM:<sender@dom>
+??? 250
+RCPT TO:<a@test.ex>
+??? 250
+BDAT 8408 LAST
+Subject: foo
+
+1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890
+1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890
+1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890
+1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890
+1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890
+1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890
+1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890
+1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890
+1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890
+1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890
+
+1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890
+1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890
+1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890
+1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890
+1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890
+1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890
+1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890
+1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890
+1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890
+1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890
+
+1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890
+1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890
+1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890
+1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890
+1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890
+1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890
+1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890
+1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890
+1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890
+1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890
+
+1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890
+1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890
+1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890
+1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890
+1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890
+1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890
+1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890
+1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890
+1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890
+1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890
+
+1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890
+1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890
+1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890
+1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890
+1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890
+1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890
+1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890
+1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890
+1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890
+1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890
+
+1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890
+1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890
+1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890
+1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890
+1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890
+1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890
+1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890
+1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890
+1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890
+1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890
+
+1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890
+1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890
+1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890
+1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890
+1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890
+1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890
+1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890
+1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890
+1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890
+1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890
+
+1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890
+1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890
+1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890
+1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890
+1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890
+1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890
+1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890
+1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890
+1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890
+1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890
+
+1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890
+1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890
+.dot
+tail
+??? 250-
+??? 250
+QUIT
+****
+#
+sleep 1
+killdaemon
+no_msglog_check
diff --git a/test/scripts/4500-DKIM/4530 b/test/scripts/4500-DKIM/4530
new file mode 100644
index 000000000..822f2fe02
--- /dev/null
+++ b/test/scripts/4500-DKIM/4530
@@ -0,0 +1,66 @@
+# DKIM, CHUNKING, wireformat-spoolfile
+#
+exim -bd -DSERVER=server -DOPT=dkim -oX PORT_S:PORT_D
+****
+#
+# 1: non-CHUNKING injection; will not be stored as wireformat therefore
+# onward-send will not use sendfile. Should still be signed, and verify correctly.
+client 127.0.0.1 PORT_S
+??? 220
+EHLO xxx
+??? 250-
+??? 250-
+??? 250-
+??? 250-
+??? 250-
+??? 250
+MAIL FROM:<CALLER@bloggs.com>
+??? 250
+RCPT TO:<z@test.ex>
+??? 250
+DATA
+??? 354
+Subject: simple test
+
+Line 1: This is a simple test.
+Line 2: This is a simple test.
+..Line 3 has a leading dot
+last line: 4
+.
+??? 250
+QUIT
+??? 221
+****
+sleep 1
+#
+# 2: CHUNKING injection; should be stored as wireformat therefore
+# onward-send should not use sendfile. Should still be signed, and verify correctly.
+client 127.0.0.1 PORT_S
+??? 220
+EHLO xxx
+??? 250-
+??? 250-
+??? 250-
+??? 250-
+??? 250-
+??? 250
+MAIL FROM:<CALLER@bloggs.com>
+??? 250
+RCPT TO:<y@test.ex>
+??? 250
+BDAT 129 LAST
+Subject: simple test
+
+Line 1: This is a simple test.
+Line 2: This is a simple test.
+.Line 3 has a leading dot
+last line: 4
+??? 250-
+??? 250
+QUIT
+??? 221
+****
+sleep 1
+#
+killdaemon
+no_msglog_check
diff --git a/test/stderr/0143 b/test/stderr/0143
index 3de426629..b1d0ff9b6 100644
--- a/test/stderr/0143
+++ b/test/stderr/0143
@@ -38,6 +38,7 @@ cmd buf flush ddd bytes
cmd buf flush ddd bytes
SMTP<< 354 Send data
SMTP>> writing message and terminating "."
+cannot use sendfile for body: spoolfile not wireformat
writing data block fd=dddd size=sss timeout=300
SMTP<< 250 OK
ok=1 send_quit=1 send_rset=0 continue_more=0 yield=0 first_address is NULL
diff --git a/test/stderr/0169 b/test/stderr/0169
index 70f11bf4f..30ed85f8d 100644
--- a/test/stderr/0169
+++ b/test/stderr/0169
@@ -24,6 +24,7 @@ writing to file TESTSUITE/test-mail/userx
Exim quota = 52428800 old size = sssss this message = sss (included)
file count quota = 0 count = 0
writing data block fd=dddd size=sss timeout=0
+cannot use sendfile for body: spoolfile not wireformat
writing data block fd=dddd size=sss timeout=0
writing data block fd=dddd size=sss timeout=0
quota = 52428800 threshold = 21495808 old size = sssss message size = sss
diff --git a/test/stderr/0275 b/test/stderr/0275
index 3ec0da1d4..5f76af09a 100644
--- a/test/stderr/0275
+++ b/test/stderr/0275
@@ -163,7 +163,6 @@ LOG: MAIN
<= CALLER@test.ex U=CALLER P=local S=sss
created log directory TESTSUITE/spool/log
search_tidyup called
-release cutthrough conn: msg passed for delivery
exec TESTSUITE/eximdir/exim -DEXIM_PATH=TESTSUITE/eximdir/exim -C TESTSUITE/test-config -d=0xfbb95cfd -odi -Mc 10HmaX-0005vi-00
Exim version x.yz ....
changed uid/gid: forcing real = effective
diff --git a/test/stderr/0386 b/test/stderr/0386
index 44e856da2..6fb8a5536 100644
--- a/test/stderr/0386
+++ b/test/stderr/0386
@@ -310,6 +310,7 @@ lock file created
mailbox TESTSUITE/test-mail/2 is locked
writing to file TESTSUITE/test-mail/2
writing data block fd=dddd size=sss timeout=0
+cannot use sendfile for body: spoolfile not wireformat
writing data block fd=dddd size=sss timeout=0
writing data block fd=dddd size=sss timeout=0
appendfile yields 0 with errno=dd more_errno=dd
@@ -490,6 +491,7 @@ lock file created
mailbox TESTSUITE/test-mail/2 is locked
writing to file TESTSUITE/test-mail/2
writing data block fd=dddd size=sss timeout=0
+cannot use sendfile for body: spoolfile not wireformat
writing data block fd=dddd size=sss timeout=0
writing data block fd=dddd size=sss timeout=0
appendfile yields 0 with errno=dd more_errno=dd
diff --git a/test/stderr/0393 b/test/stderr/0393
index dd0887f09..7fb82e35c 100644
--- a/test/stderr/0393
+++ b/test/stderr/0393
@@ -28,6 +28,7 @@ mailbox TESTSUITE/test-mail/userx is locked
writing to file TESTSUITE/test-mail/userx
writing data block fd=dddd size=sss timeout=0
process pppp running as transport filter: fd_write=dddd fd_read=dddd
+cannot use sendfile for body: spoolfile not wireformat
writing data block fd=dddd size=sss timeout=0
process pppp writing to transport filter
copying from the filter
@@ -70,6 +71,7 @@ lock file created
mailbox TESTSUITE/test-mail/userx is locked
writing to file TESTSUITE/test-mail/userx
writing data block fd=dddd size=sss timeout=0
+cannot use sendfile for body: spoolfile not wireformat
writing data block fd=dddd size=sss timeout=0
writing data block fd=dddd size=sss timeout=0
appendfile yields 0 with errno=dd more_errno=dd
@@ -108,6 +110,7 @@ lock file created
mailbox TESTSUITE/test-mail/userx is locked
writing to file TESTSUITE/test-mail/userx
writing data block fd=dddd size=sss timeout=0
+cannot use sendfile for body: spoolfile not wireformat
writing data block fd=dddd size=sss timeout=0
writing data block fd=dddd size=sss timeout=0
appendfile yields 0 with errno=dd more_errno=dd
diff --git a/test/stderr/0402 b/test/stderr/0402
index a007de31c..7f301651b 100644
--- a/test/stderr/0402
+++ b/test/stderr/0402
@@ -487,6 +487,7 @@ writing to file TESTSUITE/test-mail/junk
└─────result: From CALLER@test.ex Tue Mar 02 09:44:33 1999
writing data block fd=dddd size=sss timeout=0
+cannot use sendfile for body: spoolfile not wireformat
writing data block fd=dddd size=sss timeout=0
writing data block fd=dddd size=sss timeout=0
appendfile yields 0 with errno=dd more_errno=dd
@@ -542,6 +543,7 @@ writing to file TESTSUITE/test-mail/junk
└─────result: From CALLER@test.ex Tue Mar 02 09:44:33 1999
writing data block fd=dddd size=sss timeout=0
+cannot use sendfile for body: spoolfile not wireformat
writing data block fd=dddd size=sss timeout=0
writing data block fd=dddd size=sss timeout=0
appendfile yields 0 with errno=dd more_errno=dd
diff --git a/test/stderr/0404 b/test/stderr/0404
index d3d8f4c64..3b7605ba7 100644
--- a/test/stderr/0404
+++ b/test/stderr/0404
@@ -18004,6 +18004,7 @@ writing to file TESTSUITE/test-mail/sender
writing data block fd=dddd size=sss timeout=0
flushing headers buffer
writing data block fd=dddd size=sss timeout=0
+cannot use sendfile for body: spoolfile not wireformat
writing data block fd=dddd size=sss timeout=0
writing data block fd=dddd size=sss timeout=0
appendfile yields 0 with errno=dd more_errno=dd
diff --git a/test/stderr/0408 b/test/stderr/0408
index f3d6d6b1a..9cdb41d96 100644
--- a/test/stderr/0408
+++ b/test/stderr/0408
@@ -159,6 +159,7 @@ lock file created
mailbox TESTSUITE/test-mail/userx is locked
writing to file TESTSUITE/test-mail/userx
writing data block fd=dddd size=sss timeout=0
+cannot use sendfile for body: spoolfile not wireformat
writing data block fd=dddd size=sss timeout=0
writing data block fd=dddd size=sss timeout=0
appendfile yields 0 with errno=dd more_errno=dd
diff --git a/test/stderr/0476 b/test/stderr/0476
index 59ea69f58..675c6239c 100644
--- a/test/stderr/0476
+++ b/test/stderr/0476
@@ -52,6 +52,7 @@ set_process_info: pppp delivering 10HmaX-0005vi-00
LOG: MAIN
** userx@test.ex R=r1 T=t1 H=127.0.0.1 [127.0.0.1]: SMTP error from remote mail server after RCPT TO:<userx@test.ex>: 550 NO
set_process_info: pppp tidying up after delivering 10HmaX-0005vi-00
+cannot use sendfile for body: spoolfile not wireformat
writing data block fd=dddd size=sss timeout=0
Exim version x.yz ....
configuration file is TESTSUITE/test-config
diff --git a/test/stderr/0487 b/test/stderr/0487
index 7319b67dd..70da61fff 100644
--- a/test/stderr/0487
+++ b/test/stderr/0487
@@ -163,6 +163,7 @@ writing to file TESTSUITE/test-mail/userx
writing data block fd=dddd size=sss timeout=0
rewrite_one_header: type=F:
From: unqualified
+cannot use sendfile for body: spoolfile not wireformat
writing data block fd=dddd size=sss timeout=0
writing data block fd=dddd size=sss timeout=0
appendfile yields 0 with errno=dd more_errno=dd
diff --git a/test/stderr/0512 b/test/stderr/0512
index 1cdf5f013..07025d5d7 100644
--- a/test/stderr/0512
+++ b/test/stderr/0512
@@ -59,6 +59,7 @@ LOG: MAIN
== userx@myhost.test.ex R=r1 T=t1 defer (dd): Connection refused
LOG: MAIN
** userx@myhost.test.ex: retry timeout exceeded
+cannot use sendfile for body: spoolfile not wireformat
writing data block fd=dddd size=sss timeout=0
Exim version x.yz ....
configuration file is TESTSUITE/test-config
@@ -122,6 +123,7 @@ LOG: MAIN
== userx@myhost.test.ex R=r1 T=t1 defer (dd): Connection refused
LOG: MAIN
** userx@myhost.test.ex: retry timeout exceeded
+cannot use sendfile for body: spoolfile not wireformat
writing data block fd=dddd size=sss timeout=0
Exim version x.yz ....
configuration file is TESTSUITE/test-config
diff --git a/test/stderr/2600 b/test/stderr/2600
index 4e9974733..599be797a 100644
--- a/test/stderr/2600
+++ b/test/stderr/2600
@@ -439,6 +439,7 @@ lock file created
mailbox TESTSUITE/test-mail/userx is locked
writing to file TESTSUITE/test-mail/userx
writing data block fd=dddd size=sss timeout=0
+cannot use sendfile for body: spoolfile not wireformat
writing data block fd=dddd size=sss timeout=0
writing data block fd=dddd size=sss timeout=0
appendfile yields 0 with errno=dd more_errno=dd
diff --git a/test/stderr/4520 b/test/stderr/4520
index c2a856bb1..c1bafcdcc 100644
--- a/test/stderr/4520
+++ b/test/stderr/4520
@@ -23,18 +23,18 @@ cmd buf flush ddd bytes
SMTP<< 250 OK
SMTP<< 250 Accepted
SMTP<< 354 Enter message, ending with "." on a line by itself
-PDKIM (checking verify key)<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
+PDKIM (checking verify key)>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
PDKIM >> Parsing public key record >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
Raw record: v=DKIM1\;{SP}p=MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQDXRFf+VhT+lCgFhhSkinZKcFNeRzjYdW8vT29Rbb3NadvTFwAd+cVLPFwZL8H5tUD/7JbUPqNTCPxmpgIL+V5T4tEZMorHatvvUM2qfcpQ45IfsZ+YdhbIiAslHCpy4xNxIR3zylgqRUF4+Dtsaqy3a5LhwMiKCLrnzhXk1F1hxwIDAQAB
v=DKIM1\
p=MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQDXRFf+VhT+lCgFhhSkinZKcFNeRzjYdW8vT29Rbb3NadvTFwAd+cVLPFwZL8H5tUD/7JbUPqNTCPxmpgIL+V5T4tEZMorHatvvUM2qfcpQ45IfsZ+YdhbIiAslHCpy4xNxIR3zylgqRUF4+Dtsaqy3a5LhwMiKCLrnzhXk1F1hxwIDAQAB
Error while parsing public key record
WARNING: bad dkim key in dns
-PDKIM (finished checking verify key)<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
+PDKIM (finished checking verify key)<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
content{CR}{LF}
PDKIM [test.ex] Body bytes hashed: 9
PDKIM [test.ex] Body hash computed: fc06f48221d98ad6106c3845b33a2a41152482ab9e697f736ad26db4853fa657
-PDKIM >> Header data for hash, canonicalized, in sequence >>>>>>>>>>>>>>
+PDKIM >> Header data for hash, canonicalized, in sequence >>>>>>>>>>>>
sender:CALLER_NAME{SP}<CALLER@myhost.test.ex>{CR}{LF}
message-id:<E10HmbD-0005vi-00@myhost.test.ex>{CR}{LF}
from:nobody@example.com{CR}{LF}
diff --git a/test/stderr/5004 b/test/stderr/5004
index ad5c9b331..bedf5be2e 100644
--- a/test/stderr/5004
+++ b/test/stderr/5004
@@ -155,6 +155,7 @@ created directory TESTSUITE/test-mail/new
created directory TESTSUITE/test-mail/cur
delivering in maildir format in TESTSUITE/test-mail
writing to tmp/MAILDIR.mail.test.ex
+cannot use sendfile for body: spoolfile not wireformat
writing data block fd=dddd size=sss timeout=0
renaming temporary file
renamed tmp/MAILDIR.mail.test.ex as new/MAILDIR.mail.test.ex
diff --git a/test/stderr/5005 b/test/stderr/5005
index 8b28b7055..a68bc11c9 100644
--- a/test/stderr/5005
+++ b/test/stderr/5005
@@ -149,6 +149,7 @@ delivering in maildir format in TESTSUITE/test-mail/nofile
writing to tmp/MAILDIR.myhost.test.ex
Exim quota = 500 old size = sssss this message = sss (included)
file count quota = 0 count = 0
+cannot use sendfile for body: spoolfile not wireformat
writing data block fd=dddd size=sss timeout=0
added 'ddd 1' to maildirsize file
renaming temporary file
@@ -338,6 +339,7 @@ delivering in maildir format in TESTSUITE/test-mail/userx
writing to tmp/MAILDIR.myhost.test.ex
Exim quota = 500 old size = sssss this message = sss (included)
file count quota = 0 count = 0
+cannot use sendfile for body: spoolfile not wireformat
writing data block fd=dddd size=sss timeout=0
added 'ddd 1' to maildirsize file
renaming temporary file
diff --git a/test/stderr/5006 b/test/stderr/5006
index dce0d0050..771f5fd56 100644
--- a/test/stderr/5006
+++ b/test/stderr/5006
@@ -147,6 +147,7 @@ maildir_compute_size (timestamp_only): ddddddd
returning maildir size=sss filecount=0
delivering in maildir format in TESTSUITE/test-mail/userx
writing to tmp/MAILDIR.myhost.test.ex
+cannot use sendfile for body: spoolfile not wireformat
writing data block fd=dddd size=sss timeout=0
added 'ddd 1' to maildirsize file
renaming temporary file
diff --git a/test/stderr/5008 b/test/stderr/5008
index fd4ae87ec..b3bf8f785 100644
--- a/test/stderr/5008
+++ b/test/stderr/5008
@@ -25,6 +25,7 @@ delivering in maildir format in TESTSUITE/test-mail/userx
writing to tmp/MAILDIR.myhost.test.ex
Exim quota = 1048576 old size = sssss this message = sss (included)
file count quota = 0 count = -1
+cannot use sendfile for body: spoolfile not wireformat
writing data block fd=dddd size=sss timeout=0
renaming temporary file
renamed tmp/MAILDIR.myhost.test.ex as new/MAILDIR.myhost.test.ex
@@ -64,6 +65,7 @@ delivering in maildir format in TESTSUITE/test-mail/userx
writing to tmp/MAILDIR.myhost.test.ex
Exim quota = 1048576 old size = sssss this message = sss (included)
file count quota = 20 count = 4
+cannot use sendfile for body: spoolfile not wireformat
writing data block fd=dddd size=sss timeout=0
renaming temporary file
renamed tmp/MAILDIR.myhost.test.ex as new/MAILDIR.myhost.test.ex
diff --git a/test/stdout/0906 b/test/stdout/0906
new file mode 100644
index 000000000..57be5fe3d
--- /dev/null
+++ b/test/stdout/0906
@@ -0,0 +1,123 @@
+Connecting to 127.0.0.1 port 1224 ... connected
+??? 220
+<<< 220 testhost.test.ex ESMTP Exim x.yz Tue, 2 Mar 1999 09:44:33 +0000
+>>> EHLO test.com
+??? 250-
+<<< 250-testhost.test.ex Hello test.com [127.0.0.1]
+??? 250-
+<<< 250-SIZE 52428800
+??? 250-
+<<< 250-8BITMIME
+??? 250-
+<<< 250-PIPELINING
+??? 250-
+<<< 250-CHUNKING
+??? 250
+<<< 250 HELP
+>>> MAIL FROM:<sender@dom>
+??? 250
+<<< 250 OK
+>>> RCPT TO:<a@test.ex>
+??? 250
+<<< 250 Accepted
+>>> BDAT 8408 LAST
+>>> Subject: foo
+>>>
+>>> 1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890
+>>> 1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890
+>>> 1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890
+>>> 1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890
+>>> 1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890
+>>> 1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890
+>>> 1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890
+>>> 1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890
+>>> 1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890
+>>> 1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890
+>>>
+>>> 1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890
+>>> 1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890
+>>> 1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890
+>>> 1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890
+>>> 1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890
+>>> 1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890
+>>> 1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890
+>>> 1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890
+>>> 1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890
+>>> 1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890
+>>>
+>>> 1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890
+>>> 1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890
+>>> 1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890
+>>> 1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890
+>>> 1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890
+>>> 1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890
+>>> 1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890
+>>> 1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890
+>>> 1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890
+>>> 1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890
+>>>
+>>> 1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890
+>>> 1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890
+>>> 1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890
+>>> 1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890
+>>> 1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890
+>>> 1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890
+>>> 1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890
+>>> 1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890
+>>> 1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890
+>>> 1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890
+>>>
+>>> 1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890
+>>> 1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890
+>>> 1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890
+>>> 1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890
+>>> 1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890
+>>> 1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890
+>>> 1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890
+>>> 1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890
+>>> 1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890
+>>> 1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890
+>>>
+>>> 1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890
+>>> 1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890
+>>> 1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890
+>>> 1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890
+>>> 1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890
+>>> 1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890
+>>> 1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890
+>>> 1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890
+>>> 1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890
+>>> 1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890
+>>>
+>>> 1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890
+>>> 1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890
+>>> 1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890
+>>> 1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890
+>>> 1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890
+>>> 1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890
+>>> 1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890
+>>> 1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890
+>>> 1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890
+>>> 1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890
+>>>
+>>> 1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890
+>>> 1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890
+>>> 1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890
+>>> 1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890
+>>> 1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890
+>>> 1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890
+>>> 1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890
+>>> 1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890
+>>> 1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890
+>>> 1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890
+>>>
+>>> 1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890
+>>> 1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890
+>>> .dot
+>>> tail
+??? 250-
+<<< 250- 8408 byte chunk, total 8408
+??? 250
+<<< 250 OK id=10HmaX-0005vi-00
+>>> QUIT
+End of script
diff --git a/test/stdout/4530 b/test/stdout/4530
new file mode 100644
index 000000000..a1f5cb471
--- /dev/null
+++ b/test/stdout/4530
@@ -0,0 +1,75 @@
+Connecting to 127.0.0.1 port 1224 ... connected
+??? 220
+<<< 220 testhost.test.ex ESMTP Exim x.yz Tue, 2 Mar 1999 09:44:33 +0000
+>>> EHLO xxx
+??? 250-
+<<< 250-testhost.test.ex Hello xxx [127.0.0.1]
+??? 250-
+<<< 250-SIZE 52428800
+??? 250-
+<<< 250-8BITMIME
+??? 250-
+<<< 250-PIPELINING
+??? 250-
+<<< 250-CHUNKING
+??? 250
+<<< 250 HELP
+>>> MAIL FROM:<CALLER@bloggs.com>
+??? 250
+<<< 250 OK
+>>> RCPT TO:<z@test.ex>
+??? 250
+<<< 250 Accepted
+>>> DATA
+??? 354
+<<< 354 Enter message, ending with "." on a line by itself
+>>> Subject: simple test
+>>>
+>>> Line 1: This is a simple test.
+>>> Line 2: This is a simple test.
+>>> ..Line 3 has a leading dot
+>>> last line: 4
+>>> .
+??? 250
+<<< 250 OK id=10HmaX-0005vi-00
+>>> QUIT
+??? 221
+<<< 221 testhost.test.ex closing connection
+End of script
+Connecting to 127.0.0.1 port 1224 ... connected
+??? 220
+<<< 220 testhost.test.ex ESMTP Exim x.yz Tue, 2 Mar 1999 09:44:33 +0000
+>>> EHLO xxx
+??? 250-
+<<< 250-testhost.test.ex Hello xxx [127.0.0.1]
+??? 250-
+<<< 250-SIZE 52428800
+??? 250-
+<<< 250-8BITMIME
+??? 250-
+<<< 250-PIPELINING
+??? 250-
+<<< 250-CHUNKING
+??? 250
+<<< 250 HELP
+>>> MAIL FROM:<CALLER@bloggs.com>
+??? 250
+<<< 250 OK
+>>> RCPT TO:<y@test.ex>
+??? 250
+<<< 250 Accepted
+>>> BDAT 129 LAST
+>>> Subject: simple test
+>>>
+>>> Line 1: This is a simple test.
+>>> Line 2: This is a simple test.
+>>> .Line 3 has a leading dot
+>>> last line: 4
+??? 250-
+<<< 250- 129 byte chunk, total 129
+??? 250
+<<< 250 OK id=10HmaZ-0005vi-00
+>>> QUIT
+??? 221
+<<< 221 testhost.test.ex closing connection
+End of script