From 75def545d117dbbceecc720827c6042144512aa0 Mon Sep 17 00:00:00 2001 From: Philip Hazel Date: Wed, 1 Mar 2006 16:07:16 +0000 Subject: Bugs in temporary error message handling for smtp in lmtp mode. --- test/confs/0531 | 58 ++++++++++++++++++++++++++ test/log/0531 | 25 +++++++++++ test/mail/0531.CALLER | 99 ++++++++++++++++++++++++++++++++++++++++++++ test/scripts/0000-Basic/0215 | 2 +- test/scripts/0000-Basic/0531 | 85 +++++++++++++++++++++++++++++++++++++ test/stdout/0531 | 95 ++++++++++++++++++++++++++++++++++++++++++ 6 files changed, 363 insertions(+), 1 deletion(-) create mode 100644 test/confs/0531 create mode 100644 test/log/0531 create mode 100644 test/mail/0531.CALLER create mode 100644 test/scripts/0000-Basic/0531 create mode 100644 test/stdout/0531 (limited to 'test') diff --git a/test/confs/0531 b/test/confs/0531 new file mode 100644 index 000000000..56f679ed8 --- /dev/null +++ b/test/confs/0531 @@ -0,0 +1,58 @@ +# Exim test configuration 0531 + +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 ----- + +domainlist local_domains = test.ex : *.test.ex +log_selector = +sender_on_delivery + + +# ----- Routers ----- + +begin routers + +bounces: + driver = accept + senders = : + transport = t1 + +smartuser: + driver = accept + retry_use_local_part + transport = lmtp + + +# ----- Transports ----- + +begin transports + +t1: + driver = appendfile + file = DIR/test-mail/$local_part + user = CALLER + +lmtp: + driver = smtp + allow_localhost + hosts = 127.0.0.1 + port = PORT_S + protocol = LMTP + + +# ----- Retry ----- + + +begin retry + +retry.test.ex * F,1s,1s + + +# End diff --git a/test/log/0531 b/test/log/0531 new file mode 100644 index 000000000..90293aae1 --- /dev/null +++ b/test/log/0531 @@ -0,0 +1,25 @@ +1999-03-02 09:44:33 10HmaX-0005vi-00 <= CALLER@myhost.test.ex U=CALLER P=local S=sss +1999-03-02 09:44:33 10HmaX-0005vi-00 == userx@test.ex R=smartuser T=lmtp defer (0): LMTP error after DATA: 450 TEMPERROR +1999-03-02 09:44:33 10HmaX-0005vi-00 => usery@test.ex F= R=smartuser T=lmtp H=127.0.0.1 [127.0.0.1] +1999-03-02 09:44:33 10HmaX-0005vi-00 ** userx@test.ex: retry timeout exceeded +1999-03-02 09:44:33 10HmaY-0005vi-00 <= <> R=10HmaX-0005vi-00 U=EXIMUSER P=local S=sss +1999-03-02 09:44:33 10HmaY-0005vi-00 => CALLER F=<> R=bounces T=t1 +1999-03-02 09:44:33 10HmaY-0005vi-00 Completed +1999-03-02 09:44:33 10HmaX-0005vi-00 Completed +1999-03-02 09:44:33 10HmaZ-0005vi-00 <= CALLER@myhost.test.ex U=CALLER P=local S=sss +1999-03-02 09:44:33 10HmaZ-0005vi-00 == userx@retry.test.ex R=smartuser T=lmtp defer (0): LMTP error after DATA: 450 TEMPERROR +1999-03-02 09:44:33 Start queue run: pid=pppp +1999-03-02 09:44:33 10HmaZ-0005vi-00 == userx@retry.test.ex R=smartuser T=lmtp defer (0): LMTP error after DATA: 450 TEMPERROR +1999-03-02 09:44:33 10HmaZ-0005vi-00 ** userx@retry.test.ex: retry timeout exceeded +1999-03-02 09:44:33 10HmbA-0005vi-00 <= <> R=10HmaZ-0005vi-00 U=EXIMUSER P=local S=sss +1999-03-02 09:44:33 10HmbA-0005vi-00 => CALLER F=<> R=bounces T=t1 +1999-03-02 09:44:33 10HmbA-0005vi-00 Completed +1999-03-02 09:44:33 10HmaZ-0005vi-00 Completed +1999-03-02 09:44:33 End queue run: pid=pppp +1999-03-02 09:44:33 10HmbB-0005vi-00 <= CALLER@myhost.test.ex U=CALLER P=local S=sss +1999-03-02 09:44:33 10HmbB-0005vi-00 == userx@test.ex R=smartuser T=lmtp defer (-44): SMTP error from remote mail server after RCPT TO:: host 127.0.0.1 [127.0.0.1]: 450 TEMPERROR +1999-03-02 09:44:33 10HmbB-0005vi-00 ** userx@test.ex: retry timeout exceeded +1999-03-02 09:44:33 10HmbC-0005vi-00 <= <> R=10HmbB-0005vi-00 U=EXIMUSER P=local S=sss +1999-03-02 09:44:33 10HmbC-0005vi-00 => CALLER F=<> R=bounces T=t1 +1999-03-02 09:44:33 10HmbC-0005vi-00 Completed +1999-03-02 09:44:33 10HmbB-0005vi-00 Completed diff --git a/test/mail/0531.CALLER b/test/mail/0531.CALLER new file mode 100644 index 000000000..a35a78259 --- /dev/null +++ b/test/mail/0531.CALLER @@ -0,0 +1,99 @@ +From MAILER-DAEMON Tue Mar 02 09:44:33 1999 +Received: from EXIMUSER by myhost.test.ex with local (Exim x.yz) + id 10HmaY-0005vi-00 + for CALLER@myhost.test.ex; Tue, 2 Mar 1999 09:44:33 +0000 +X-Failed-Recipients: userx@test.ex +Auto-Submitted: auto-replied +From: Mail Delivery System +To: CALLER@myhost.test.ex +Subject: Mail delivery failed: returning message to sender +Message-Id: +Date: Tue, 2 Mar 1999 09:44:33 +0000 + +This message was created automatically by mail delivery software. + +A message that you sent could not be delivered to one or more of its +recipients. This is a permanent error. The following address(es) failed: + + userx@test.ex + LMTP error after DATA: 450 TEMPERROR: retry timeout exceeded + +------ This is a copy of the message, including all the headers. ------ + +Return-path: +Received: from CALLER by myhost.test.ex with local (Exim x.yz) + (envelope-from ) + id 10HmaX-0005vi-00; Tue, 2 Mar 1999 09:44:33 +0000 +Message-Id: +From: CALLER_NAME +Date: Tue, 2 Mar 1999 09:44:33 +0000 + +This is a test message. + +From MAILER-DAEMON Tue Mar 02 09:44:33 1999 +Received: from EXIMUSER by myhost.test.ex with local (Exim x.yz) + id 10HmbA-0005vi-00 + for CALLER@myhost.test.ex; Tue, 2 Mar 1999 09:44:33 +0000 +X-Failed-Recipients: userx@retry.test.ex +Auto-Submitted: auto-replied +From: Mail Delivery System +To: CALLER@myhost.test.ex +Subject: Mail delivery failed: returning message to sender +Message-Id: +Date: Tue, 2 Mar 1999 09:44:33 +0000 + +This message was created automatically by mail delivery software. + +A message that you sent could not be delivered to one or more of its +recipients. This is a permanent error. The following address(es) failed: + + userx@retry.test.ex + LMTP error after DATA: 450 TEMPERROR: retry timeout exceeded + +------ This is a copy of the message, including all the headers. ------ + +Return-path: +Received: from CALLER by myhost.test.ex with local (Exim x.yz) + (envelope-from ) + id 10HmaZ-0005vi-00 + for userx@retry.test.ex; Tue, 2 Mar 1999 09:44:33 +0000 +Message-Id: +From: CALLER_NAME +Date: Tue, 2 Mar 1999 09:44:33 +0000 + +This is a test message. + +From MAILER-DAEMON Tue Mar 02 09:44:33 1999 +Received: from EXIMUSER by myhost.test.ex with local (Exim x.yz) + id 10HmbC-0005vi-00 + for CALLER@myhost.test.ex; Tue, 2 Mar 1999 09:44:33 +0000 +X-Failed-Recipients: userx@test.ex +Auto-Submitted: auto-replied +From: Mail Delivery System +To: CALLER@myhost.test.ex +Subject: Mail delivery failed: returning message to sender +Message-Id: +Date: Tue, 2 Mar 1999 09:44:33 +0000 + +This message was created automatically by mail delivery software. + +A message that you sent could not be delivered to one or more of its +recipients. This is a permanent error. The following address(es) failed: + + userx@test.ex + SMTP error from remote mail server after RCPT TO:: + host 127.0.0.1 [127.0.0.1]: 450 TEMPERROR: retry timeout exceeded + +------ This is a copy of the message, including all the headers. ------ + +Return-path: +Received: from CALLER by myhost.test.ex with local (Exim x.yz) + (envelope-from ) + id 10HmbB-0005vi-00 + for userx@test.ex; Tue, 2 Mar 1999 09:44:33 +0000 +Message-Id: +From: CALLER_NAME +Date: Tue, 2 Mar 1999 09:44:33 +0000 + +This is a test message. + diff --git a/test/scripts/0000-Basic/0215 b/test/scripts/0000-Basic/0215 index 47f1f1cc8..066612047 100644 --- a/test/scripts/0000-Basic/0215 +++ b/test/scripts/0000-Basic/0215 @@ -1,4 +1,4 @@ -# LMTP over TCP/IP (with log_sender_on_delivery) +# LMTP over TCP/IP need_ipv4 # server PORT_S diff --git a/test/scripts/0000-Basic/0531 b/test/scripts/0000-Basic/0531 new file mode 100644 index 000000000..5e89595b7 --- /dev/null +++ b/test/scripts/0000-Basic/0531 @@ -0,0 +1,85 @@ +# LMTP over TCP/IP - temporary error handling +need_ipv4 +# This one has no retry time, so will be bounced immediately. +# +server PORT_S +220 ESMTP +LHLO +250-OK +250 HELP +MAIL FROM: +250 Sender OK +RCPT TO: +250 Receiver OK +RCPT TO: +250 Receiver OK +DATA +354 Send it +. +450 TEMPERROR +250 OK +QUIT +250 OK +**** +exim -odi userx@test.ex usery@test.ex +This is a test message. +**** +# This one has a retry time, so will be deferred. +# +server PORT_S +220 ESMTP +LHLO +250-OK +250 HELP +MAIL FROM: +250 Sender OK +RCPT TO: +250 Receiver OK +DATA +354 Send it +. +450 TEMPERROR +QUIT +250 OK +**** +exim -odi userx@retry.test.ex +This is a test message. +**** +sleep 1 +# Should by now have exceeded retry time. +server PORT_S +220 ESMTP +LHLO +250-OK +250 HELP +MAIL FROM: +250 Sender OK +RCPT TO: +250 Receiver OK +DATA +354 Send it +. +450 TEMPERROR +QUIT +250 OK +**** +exim -q +**** +# This one gives a temporary error for RCPT, no retry +# +server PORT_S +220 ESMTP +LHLO +250-OK +250 HELP +MAIL FROM: +250 Sender OK +RCPT TO: +450 TEMPERROR +QUIT +250 OK +**** +exim -odi userx@test.ex +This is a test message. +**** +no_msglog_check diff --git a/test/stdout/0531 b/test/stdout/0531 new file mode 100644 index 000000000..01438bd35 --- /dev/null +++ b/test/stdout/0531 @@ -0,0 +1,95 @@ + +******** SERVER ******** +Listening on port 1224 ... +Connection request from [127.0.0.1] +220 ESMTP +LHLO myhost.test.ex +250-OK +250 HELP +MAIL FROM: +250 Sender OK +RCPT TO: +250 Receiver OK +RCPT TO: +250 Receiver OK +DATA +354 Send it +Received: from CALLER by myhost.test.ex with local (Exim x.yz) + (envelope-from ) + id 10HmaX-0005vi-00; Tue, 2 Mar 1999 09:44:33 +0000 +Message-Id: +From: CALLER_NAME +Date: Tue, 2 Mar 1999 09:44:33 +0000 + +This is a test message. +. +450 TEMPERROR +250 OK +QUIT +250 OK +End of script +Listening on port 1224 ... +Connection request from [127.0.0.1] +220 ESMTP +LHLO 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 (Exim x.yz) + (envelope-from ) + id 10HmaZ-0005vi-00 + for userx@retry.test.ex; Tue, 2 Mar 1999 09:44:33 +0000 +Message-Id: +From: CALLER_NAME +Date: Tue, 2 Mar 1999 09:44:33 +0000 + +This is a test message. +. +450 TEMPERROR +QUIT +250 OK +End of script +Listening on port 1224 ... +Connection request from [127.0.0.1] +220 ESMTP +LHLO 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 (Exim x.yz) + (envelope-from ) + id 10HmaZ-0005vi-00 + for userx@retry.test.ex; Tue, 2 Mar 1999 09:44:33 +0000 +Message-Id: +From: CALLER_NAME +Date: Tue, 2 Mar 1999 09:44:33 +0000 + +This is a test message. +. +450 TEMPERROR +QUIT +250 OK +End of script +Listening on port 1224 ... +Connection request from [127.0.0.1] +220 ESMTP +LHLO myhost.test.ex +250-OK +250 HELP +MAIL FROM: +250 Sender OK +RCPT TO: +450 TEMPERROR +QUIT +250 OK +End of script -- cgit v1.2.3