Fixed headers_only on smtp transports.
authorPhil Pennock <pdp@exim.org>
Sun, 13 May 2012 08:09:25 +0000 (04:09 -0400)
committerPhil Pennock <pdp@exim.org>
Sun, 13 May 2012 08:09:25 +0000 (04:09 -0400)
Was not sending trailing dot.
Added test case to catch this.

fixes bug 1246.

doc/doc-txt/ChangeLog
test/confs/0565 [new file with mode: 0644]
test/log/0565 [new file with mode: 0644]
test/scripts/0000-Basic/0565 [new file with mode: 0644]
test/stdout/0565 [new file with mode: 0644]

index 6a34c57..3315d05 100644 (file)
@@ -96,6 +96,9 @@ PP/22 Added -bw for inetd wait mode support.
 PP/23 Added PCRE_CONFIG=yes support to Makefile for using pcre-config to
       locate the relevant includes and libraries.  Made this the default.
 
+PP/24 Fixed headers_only on smtp transports (was not sending trailing dot).
+      Bugzilla 1246, report and most of solution from Tomasz Kusy.
+
 
 Exim version 4.77
 -----------------
diff --git a/test/confs/0565 b/test/confs/0565
new file mode 100644 (file)
index 0000000..c51fd63
--- /dev/null
@@ -0,0 +1,50 @@
+# Exim test configuration 0565
+
+exim_path = EXIM_PATH
+host_lookup_order = bydns
+primary_hostname = myhost.test.ex
+rfc1413_query_timeout = 0s
+spool_directory = DIR/spool
+log_file_path = DIR/spool/log/%slog
+gecos_pattern = ""
+gecos_name = CALLER_NAME
+
+# ----- Main settings -----
+
+acl_smtp_rcpt = accept
+
+
+# ----- Routers -----
+
+begin routers
+
+hdronly_dnslookup:
+  domains = test.ex
+  driver = manualroute
+  route_data = 127.0.0.1
+  self = send
+  transport = remote_smtp_hdrs
+
+dnslookup:
+  driver = manualroute
+  route_data = 127.0.0.1
+  self = send
+  transport = remote_smtp
+
+
+# ----- Transports -----
+
+begin transports
+
+remote_smtp:
+  driver = smtp
+  port = PORT_S
+  allow_localhost
+
+remote_smtp_hdrs:
+  driver = smtp
+  port = PORT_S
+  allow_localhost
+  headers_only
+
+# End
diff --git a/test/log/0565 b/test/log/0565
new file mode 100644 (file)
index 0000000..1fef38b
--- /dev/null
@@ -0,0 +1,6 @@
+1999-03-02 09:44:33 10HmaX-0005vi-00 <= CALLER@myhost.test.ex U=CALLER P=local-smtp S=sss
+1999-03-02 09:44:33 10HmaX-0005vi-00 => x@y R=dnslookup T=remote_smtp H=127.0.0.1 [127.0.0.1]
+1999-03-02 09:44:33 10HmaX-0005vi-00 Completed
+1999-03-02 09:44:33 10HmaY-0005vi-00 <= CALLER@myhost.test.ex U=CALLER P=local-smtp S=sss
+1999-03-02 09:44:33 10HmaY-0005vi-00 => x@test.ex R=hdronly_dnslookup T=remote_smtp_hdrs H=127.0.0.1 [127.0.0.1]
+1999-03-02 09:44:33 10HmaY-0005vi-00 Completed
diff --git a/test/scripts/0000-Basic/0565 b/test/scripts/0000-Basic/0565
new file mode 100644 (file)
index 0000000..8596233
--- /dev/null
@@ -0,0 +1,58 @@
+# headers_only in SMTP
+need_ipv4
+server -noipv6 PORT_S
+220 ESMTP
+EHLO
+250-OK
+250 HELP
+MAIL FROM:
+250 Sender OK
+RCPT TO:
+250 Receiver OK
+DATA
+354 Send it
+.
+250 OK (wizzle)
+QUIT
+221 bye
+****
+exim -odf -bs
+mail from:<postmaster@y>
+rcpt to:<x@y>
+data
+From: postmaster@y
+To: x@y
+Subject: first test message
+
+This is the FIRST message body.
+.
+quit
+****
+server -noipv6 PORT_S
+220 ESMTP
+EHLO
+250-OK
+250 HELP
+MAIL FROM:
+250 Sender OK
+RCPT TO:
+250 Receiver OK
+DATA
+354 Send it
+.
+250 OK (wizzle)
+QUIT
+221 bye
+****
+exim -odf -bs
+mail from:<postmaster@y>
+rcpt to:<x@test.ex>
+data
+From: postmaster@y
+To: x@y
+Subject: second test message
+
+This is the SECOND message body.
+.
+quit
+****
diff --git a/test/stdout/0565 b/test/stdout/0565
new file mode 100644 (file)
index 0000000..be4e455
--- /dev/null
@@ -0,0 +1,71 @@
+220 myhost.test.ex ESMTP Exim x.yz Tue, 2 Mar 1999 09:44:33 +0000\r
+250 OK\r
+250 Accepted\r
+354 Enter message, ending with "." on a line by itself\r
+250 OK id=10HmaX-0005vi-00\r
+221 myhost.test.ex closing connection\r
+220 myhost.test.ex ESMTP Exim x.yz Tue, 2 Mar 1999 09:44:33 +0000\r
+250 OK\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
+
+******** SERVER ********
+Listening on port 1224 ... 
+Connection request from [127.0.0.1]
+220 ESMTP
+EHLO myhost.test.ex
+250-OK
+250 HELP
+MAIL FROM:<CALLER@myhost.test.ex>
+250 Sender OK
+RCPT TO:<x@y>
+250 Receiver OK
+DATA
+354 Send it
+Received: from CALLER by myhost.test.ex with local-smtp (Exim x.yz)
+       (envelope-from <CALLER@myhost.test.ex>)
+       id 10HmaX-0005vi-00
+       for x@y; Tue, 2 Mar 1999 09:44:33 +0000
+From: postmaster@y
+To: x@y
+Subject: first test message
+Message-Id: <E10HmaX-0005vi-00@myhost.test.ex>
+Sender: CALLER_NAME <CALLER@myhost.test.ex>
+Date: Tue, 2 Mar 1999 09:44:33 +0000
+
+This is the FIRST message body.
+.
+250 OK (wizzle)
+QUIT
+221 bye
+End of script
+Listening on port 1224 ... 
+Connection request from [127.0.0.1]
+220 ESMTP
+EHLO myhost.test.ex
+250-OK
+250 HELP
+MAIL FROM:<CALLER@myhost.test.ex>
+250 Sender OK
+RCPT TO:<x@test.ex>
+250 Receiver OK
+DATA
+354 Send it
+Received: from CALLER by myhost.test.ex with local-smtp (Exim x.yz)
+       (envelope-from <CALLER@myhost.test.ex>)
+       id 10HmaY-0005vi-00
+       for x@test.ex; Tue, 2 Mar 1999 09:44:33 +0000
+From: postmaster@y
+To: x@y
+Subject: second test message
+Message-Id: <E10HmaY-0005vi-00@myhost.test.ex>
+Sender: CALLER_NAME <CALLER@myhost.test.ex>
+Date: Tue, 2 Mar 1999 09:44:33 +0000
+
+.
+250 OK (wizzle)
+QUIT
+221 bye
+End of script