From: Jeremy Harris Date: Sun, 8 Mar 2020 15:20:10 +0000 (+0000) Subject: Testsuite: testcases for bug 2538 X-Git-Url: https://git.exim.org/users/jgh/exim.git/commitdiff_plain/4bcc0ff50b9dd7fceded6164b554861dab8ea751?ds=sidebyside;hp=e68def51cb753d730249565e630b549a73857ec1 Testsuite: testcases for bug 2538 --- diff --git a/test/confs/0092 b/test/confs/0092 index e5cdf119a..cdcf52330 100644 --- a/test/confs/0092 +++ b/test/confs/0092 @@ -14,8 +14,11 @@ primary_hostname = myhost.test.ex # ----- Main settings ----- OPT = 2s + +.ifndef COM smtp_receive_timeout = OPT receive_timeout = 2s +.endif begin acl diff --git a/test/log/0092 b/test/log/0092 index c5ce71a53..e4c372530 100644 --- a/test/log/0092 +++ b/test/log/0092 @@ -4,3 +4,6 @@ 1999-03-02 09:44:33 10HmaX-0005vi-00 timed out while reading local message 1999-03-02 09:44:33 SMTP command timeout on connection from CALLER 1999-03-02 09:44:33 SMTP data timeout (message abandoned) on connection from local process F= +1999-03-02 09:44:33 SMTP command timeout on connection from CALLER +1999-03-02 09:44:33 SMTP command timeout on connection from CALLER +1999-03-02 09:44:33 timed out while reading local message diff --git a/test/scripts/0000-Basic/0092 b/test/scripts/0000-Basic/0092 index 153431753..d22feebb3 100644 --- a/test/scripts/0000-Basic/0092 +++ b/test/scripts/0000-Basic/0092 @@ -1,16 +1,24 @@ # SMTP incoming timeout + receive_timeout +# +# stdin-smtp, no cmds, smtp command timeout 2s 1 3 exim -bs **** +# +# stdin-smtp, cmds then pause in dataphase, smtp command timeout 2s 1 3 exim -bs mail from: userx@test.ex rcpt to: userx@test.ex data **** +# +# stdin-smtp, no cmds, smtp command timeout 2s 1 3 exim -bh V4NET.0.0.1 **** +# +# stdin-smtp, cmds then pause in dataphase, smtp command timeout 2s 1 3 exim -bh V4NET.0.0.1 mail from:userx@test.ex @@ -18,6 +26,9 @@ rcpt to:userx@test.ex data The quick brown fox **** +# +# stdin-smtp, cmds then pause in dataphase, smtp command timeout 2s +# late-expansion of smtp_receive_timeout 1 3 exim -d+expand '-DOPT=${if eq {V4NET.0.0.1} {$sender_host_address} {2} {30}}s' -bh V4NET.0.0.1 mail from:userx@test.ex @@ -25,24 +36,53 @@ rcpt to:userx@test.ex data The quick brown fox **** +# +# cmdline mail, no stdin, receive_timeout 2s 1 3 exim userx@test.ex **** +# +# cmdline mail, some data then pause, receive_timeout 2s 1 3 exim userx@test.ex The quick brown fox jumps over the lazy dog. **** +# +# stdin-smtp, cmds then pause before dataphase, smtp command timeout 2s 1 3 exim -bh V4NET.0.0.1 mail from: userx@test.ex rcpt to: verify@test.ex **** +# +# stdin-bsmtp, no stdin, smtp command timeout 2s 2 3 exim -bS **** +# +# stdin-bsmtp, some data then pause, smtp command timeout 2s 2 3 exim -bS mail from: userx@test.ex rcpt to: userx@test.ex data +**** +# +# stdin-smtp, no cmds, smtp command timeout 2s set by cmdline +1 +3 exim -DCOM=y -bs -os 2s +**** +1 +3 exim -DCOM=y -os 2s -bs +**** +# +# cmdline mail, no stdin, receive_timeout 2s set by cmdline +1 +3 exim -DCOM=y -or 2s userx@test.ex +**** +# +# stdin-bsmtp, no stdin, receive_timeout 2s set by cmdline +# should not timeout +3 exim -DCOM=y -bS -or 2s +**** diff --git a/test/stderr/0092 b/test/stderr/0092 index 7db741e6d..e07e8494d 100644 --- a/test/stderr/0092 +++ b/test/stderr/0092 @@ -16,16 +16,16 @@ LOG: SMTP command timeout on connection from [V4NET.0.0.1] >>> host in helo_try_verify_hosts? no (option unset) >>> host in helo_accept_junk_hosts? no (option unset) >>> using ACL "check_recipient" ->>> processing "accept" (TESTSUITE/test-config 24) +>>> processing "accept" (TESTSUITE/test-config 27) >>> check hosts = : >>> host in ":"? no (end of list) >>> accept: condition test failed in ACL "check_recipient" ->>> processing "deny" (TESTSUITE/test-config 25) +>>> processing "deny" (TESTSUITE/test-config 28) >>> message: unrouteable address >>> check recipients = verify@test.ex >>> userx@test.ex in "verify@test.ex"? no (end of list) >>> deny: condition test failed in ACL "check_recipient" ->>> processing "accept" (TESTSUITE/test-config 28) +>>> processing "accept" (TESTSUITE/test-config 31) >>> check domains = +local_domains >>> test.ex in "test.ex : *.test.ex"? yes (matched "test.ex") >>> test.ex in "+local_domains"? yes (matched "+local_domains") @@ -84,17 +84,17 @@ log directory space = nnnnnK inodes = nnnnn check_space = 10240K inodes = 100 SMTP>> 250 OK SMTP<< rcpt to:userx@test.ex using ACL "check_recipient" -processing "accept" (TESTSUITE/test-config 24) +processing "accept" (TESTSUITE/test-config 27) check hosts = : host in ":"? no (end of list) accept: condition test failed in ACL "check_recipient" -processing "deny" (TESTSUITE/test-config 25) +processing "deny" (TESTSUITE/test-config 28) message: unrouteable address check recipients = verify@test.ex address match test: subject=userx@test.ex pattern=verify@test.ex userx@test.ex in "verify@test.ex"? no (end of list) deny: condition test failed in ACL "check_recipient" -processing "accept" (TESTSUITE/test-config 28) +processing "accept" (TESTSUITE/test-config 31) check domains = +local_domains test.ex in "test.ex : *.test.ex"? yes (matched "test.ex") test.ex in "+local_domains"? yes (matched "+local_domains") @@ -121,11 +121,11 @@ exim: timed out while reading - message abandoned >>> host in helo_try_verify_hosts? no (option unset) >>> host in helo_accept_junk_hosts? no (option unset) >>> using ACL "check_recipient" ->>> processing "accept" (TESTSUITE/test-config 24) +>>> processing "accept" (TESTSUITE/test-config 27) >>> check hosts = : >>> host in ":"? no (end of list) >>> accept: condition test failed in ACL "check_recipient" ->>> processing "deny" (TESTSUITE/test-config 25) +>>> processing "deny" (TESTSUITE/test-config 28) >>> message: unrouteable address >>> check recipients = verify@test.ex >>> test.ex in "test.ex"? yes (matched "test.ex") @@ -161,3 +161,4 @@ The SMTP transaction started in line 0. The error was detected in line 3. 0 previous messages were successfully processed. The rest of the batch was abandoned. +exim: timed out while reading - message abandoned diff --git a/test/stdout/0092 b/test/stdout/0092 index 6e8d05716..a4df25c4d 100644 --- a/test/stdout/0092 +++ b/test/stdout/0092 @@ -47,3 +47,7 @@ Error detected in line 0 421 SMTP incoming data timeout - message abandoned Transaction started in line 0 Error detected in line 3 +220 myhost.test.ex ESMTP Exim x.yz Tue, 2 Mar 1999 09:44:33 +0000 +421 myhost.test.ex: SMTP command timeout - closing connection +220 myhost.test.ex ESMTP Exim x.yz Tue, 2 Mar 1999 09:44:33 +0000 +421 myhost.test.ex: SMTP command timeout - closing connection