From 12dd53c7a900b323936790a9e6fc4ae617920968 Mon Sep 17 00:00:00 2001 From: Phil Pennock Date: Sun, 13 May 2012 04:09:25 -0400 Subject: 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(+) create mode 100644 test/confs/0565 create mode 100644 test/log/0565 create mode 100644 test/scripts/0000-Basic/0565 create mode 100644 test/stdout/0565 diff --git a/doc/doc-txt/ChangeLog b/doc/doc-txt/ChangeLog index 6a34c5757..3315d0594 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 000000000..c51fd6354 --- /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 000000000..1fef38b61 --- /dev/null +++ b/test/log/0565 @@ -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 index 000000000..859623378 --- /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: +rcpt to: +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: +rcpt to: +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 000000000..be4e45594 --- /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: +250 Sender OK +RCPT TO: +250 Receiver OK +DATA +354 Send it +Received: from CALLER by myhost.test.ex with local-smtp (Exim x.yz) + (envelope-from ) + 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: +Sender: CALLER_NAME +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: +250 Sender OK +RCPT TO: +250 Receiver OK +DATA +354 Send it +Received: from CALLER by myhost.test.ex with local-smtp (Exim x.yz) + (envelope-from ) + 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: +Sender: CALLER_NAME +Date: Tue, 2 Mar 1999 09:44:33 +0000 + +. +250 OK (wizzle) +QUIT +221 bye +End of script -- cgit v1.2.3