[exim-cvs] Fixed headers_only on smtp transports.

Top Page
Delete this message
Reply to this message
Author: Exim Git Commits Mailing List
Date:  
To: exim-cvs
Subject: [exim-cvs] Fixed headers_only on smtp transports.
Gitweb: http://git.exim.org/exim.git/commitdiff/12dd53c7a900b323936790a9e6fc4ae617920968
Commit:     12dd53c7a900b323936790a9e6fc4ae617920968
Parent:     6a6084f8fd44dc65dce40536198ec5d282deb126
Author:     Phil Pennock <pdp@???>
AuthorDate: Sun May 13 04:09:25 2012 -0400
Committer:  Phil Pennock <pdp@???>
CommitDate: Sun May 13 04:09:25 2012 -0400


    Fixed headers_only on smtp transports.


    Was not sending trailing dot.
    Added test case to catch this.


    fixes bug 1246.
---
 doc/doc-txt/ChangeLog        |    3 ++
 test/confs/0565              |   50 +++++++++++++++++++++++++++++
 test/log/0565                |    6 +++
 test/scripts/0000-Basic/0565 |   58 ++++++++++++++++++++++++++++++++++
 test/stdout/0565             |   71 ++++++++++++++++++++++++++++++++++++++++++
 5 files changed, 188 insertions(+), 0 deletions(-)


diff --git a/doc/doc-txt/ChangeLog b/doc/doc-txt/ChangeLog
index 6a34c57..3315d05 100644
--- a/doc/doc-txt/ChangeLog
+++ b/doc/doc-txt/ChangeLog
@@ -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
index 0000000..c51fd63
--- /dev/null
+++ b/test/confs/0565
@@ -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
index 0000000..1fef38b
--- /dev/null
+++ b/test/log/0565
@@ -0,0 +1,6 @@
+1999-03-02 09:44:33 10HmaX-0005vi-00 <= CALLER@??? 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@??? U=CALLER P=local-smtp S=sss
+1999-03-02 09:44:33 10HmaY-0005vi-00 => x@??? 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
index 0000000..8596233
--- /dev/null
+++ b/test/scripts/0000-Basic/0565
@@ -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@???>
+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
index 0000000..be4e455
--- /dev/null
+++ b/test/stdout/0565
@@ -0,0 +1,71 @@
+220 myhost.test.ex ESMTP Exim x.yz Tue, 2 Mar 1999 09:44:33 +0000
+250 OK
+250 Accepted
+354 Enter message, ending with "." on a line by itself
+250 OK id=10HmaX-0005vi-00
+221 myhost.test.ex closing connection
+220 myhost.test.ex ESMTP Exim x.yz Tue, 2 Mar 1999 09:44:33 +0000
+250 OK
+250 Accepted
+354 Enter message, ending with "." on a line by itself
+250 OK id=10HmaY-0005vi-00
+221 myhost.test.ex closing connection
+
+******** 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@???>
+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@???>)
+    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@???>
+Sender: CALLER_NAME <CALLER@???>
+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@???>
+250 Sender OK
+RCPT TO:<x@???>
+250 Receiver OK
+DATA
+354 Send it
+Received: from CALLER by myhost.test.ex with local-smtp (Exim x.yz)
+    (envelope-from <CALLER@???>)
+    id 10HmaY-0005vi-00
+    for x@???; Tue, 2 Mar 1999 09:44:33 +0000
+From: postmaster@y
+To: x@y
+Subject: second test message
+Message-Id: <E10HmaY-0005vi-00@???>
+Sender: CALLER_NAME <CALLER@???>
+Date: Tue, 2 Mar 1999 09:44:33 +0000
+
+.
+250 OK (wizzle)
+QUIT
+221 bye
+End of script