diff options
Diffstat (limited to 'test')
-rw-r--r-- | test/confs/5401 | 2 | ||||
-rw-r--r-- | test/log/5401 | 5 | ||||
-rw-r--r-- | test/rejectlog/5401 | 2 | ||||
-rwxr-xr-x | test/runtest | 2 | ||||
-rw-r--r-- | test/scripts/5400-cutthrough/5401 | 87 | ||||
-rw-r--r-- | test/stderr/5401 | 43 | ||||
-rw-r--r-- | test/stdout/5401 | 86 |
7 files changed, 181 insertions, 46 deletions
diff --git a/test/confs/5401 b/test/confs/5401 index 2263bc0bf..636a3b614 100644 --- a/test/confs/5401 +++ b/test/confs/5401 @@ -22,7 +22,7 @@ begin acl acl_rcpt: accept control = cutthrough_delivery - verify = recipient + verify = recipient/callout=use_sender # ----- Routers ----- diff --git a/test/log/5401 b/test/log/5401 index 37ad46794..dc4027b47 100644 --- a/test/log/5401 +++ b/test/log/5401 @@ -1,3 +1,8 @@ 1999-03-02 09:44:33 10HmaX-0005vi-00 >> userx@domain.com R=all T=smtp H=127.0.0.1 [127.0.0.1] C="250 OK" 1999-03-02 09:44:33 10HmaX-0005vi-00 <= CALLER@myhost.test.ex U=CALLER P=local-esmtp S=sss 1999-03-02 09:44:33 10HmaX-0005vi-00 Completed +1999-03-02 09:44:33 U=CALLER F=<CALLER@myhost.test.ex> rejected RCPT <no@domain.com>: response to "RCPT TO:<no@domain.com>" from 127.0.0.1 [127.0.0.1] was: 550 No mate +1999-03-02 09:44:33 U=CALLER F=<CALLER@myhost.test.ex> rejected RCPT <no@domain.com>: response to "RCPT TO:<no@domain.com>" from 127.0.0.1 [127.0.0.1] was: 550 Not that one +1999-03-02 09:44:33 10HmaY-0005vi-00 <= CALLER@myhost.test.ex U=CALLER P=local-esmtp S=sss +1999-03-02 09:44:33 10HmaY-0005vi-00 => userx@domain.com R=all T=smtp H=127.0.0.1 [127.0.0.1] C="250 OK" +1999-03-02 09:44:33 10HmaY-0005vi-00 Completed diff --git a/test/rejectlog/5401 b/test/rejectlog/5401 new file mode 100644 index 000000000..abcc5c6a6 --- /dev/null +++ b/test/rejectlog/5401 @@ -0,0 +1,2 @@ +1999-03-02 09:44:33 U=CALLER F=<CALLER@myhost.test.ex> rejected RCPT <no@domain.com>: response to "RCPT TO:<no@domain.com>" from 127.0.0.1 [127.0.0.1] was: 550 No mate +1999-03-02 09:44:33 U=CALLER F=<CALLER@myhost.test.ex> rejected RCPT <no@domain.com>: response to "RCPT TO:<no@domain.com>" from 127.0.0.1 [127.0.0.1] was: 550 Not that one diff --git a/test/runtest b/test/runtest index 96f5c11e9..1431e5754 100755 --- a/test/runtest +++ b/test/runtest @@ -1972,7 +1972,7 @@ if (/^sleep\s+(.*)$/) # Various Unix management commands are recognized if (/^(ln|ls|du|mkdir|mkfifo|touch|cp|cat)\s/ || - /^sudo (rmdir|rm|chown|chmod)\s/) + /^sudo\s(rmdir|rm|chown|chmod)\s/) { run_system("$_ >>test-stdout 2>>test-stderr"); return 1; diff --git a/test/scripts/5400-cutthrough/5401 b/test/scripts/5400-cutthrough/5401 index d92110ce5..726d1f29e 100644 --- a/test/scripts/5400-cutthrough/5401 +++ b/test/scripts/5400-cutthrough/5401 @@ -16,7 +16,7 @@ DATA QUIT 250 OK **** -exim -d-all+acl+transport -bs +exim -bs -odf EHLO myhost.test.ex MAIL FROM:<CALLER@myhost.test.ex> RCPT TO:<userx@domain.com> @@ -25,3 +25,88 @@ DATA . QUIT **** +# +# +# +# cutthrough for denied recipient +# deny should be reflected to originator +# as this was a real rcpt-verify +server PORT_S +220 ESMTP +EHLO +250 OK +MAIL FROM: +250 Sender OK +RCPT TO: +550 No mate +QUIT +250 OK +*eof +**** +exim -bs -odf +EHLO myhost.test.ex +MAIL FROM:<CALLER@myhost.test.ex> +RCPT TO:<no@domain.com> +QUIT +**** +# +# +# lose the cached callout fail record +sudo rm DIR/spool/db/callout +# +# cutthrough for 2 recipients in one domain +# first one denied +# so we get a 3rd conn with the traditional delivery +# (for just the second because it was a real verify=recipient) +server PORT_S 3 +220 ESMTP +EHLO +250 OK +MAIL FROM: +250 Sender OK +RCPT TO: +550 Not that one +QUIT +250 OK +*eof +220 ESMTP +EHLO +250 OK +MAIL FROM: +250 Sender OK +RCPT TO: +250 ok rcpt-1 +QUIT +250 OK +*eof +220 ESMTP +EHLO +250 OK +MAIL FROM: +250 Sender OK +RCPT TO: +250 ok rcpt-1 +DATA +354 Send data +. +250 OK +QUIT +250 OK +*eof +**** +# +# Foregound delivery needed else the following subtest reception logging happens before this ones +# delivery process logs and terminates; the interlock is only on the parent exim terminating. +exim -bs -odf +EHLO myhost.test.ex +MAIL FROM:<CALLER@myhost.test.ex> +RCPT TO:<no@domain.com> +RCPT TO:<userx@domain.com> +DATA + +. +QUIT +**** +# +# +# diff --git a/test/stderr/5401 b/test/stderr/5401 deleted file mode 100644 index 1b42441d9..000000000 --- a/test/stderr/5401 +++ /dev/null @@ -1,43 +0,0 @@ -Exim version x.yz .... -configuration file is TESTSUITE/test-config -admin user -LOG: smtp_connection MAIN - SMTP connection from CALLER -using ACL "acl_rcpt" -processing "accept" -check control = cutthrough_delivery -check verify = recipient ------------ end verify ------------ -accept: condition test succeeded in ACL "acl_rcpt" -end of ACL "acl_rcpt": ACCEPT ------------ start cutthrough setup ------------ -Connecting to 127.0.0.1 [127.0.0.1]:1224 from ip4.ip4.ip4.ip4 ... connected - SMTP<< 220 ESMTP - SMTP>> EHLO myhost.test.ex - SMTP<< 250 OK - SMTP>> MAIL FROM:<CALLER@myhost.test.ex> - SMTP<< 250 Sender OK - SMTP>> RCPT TO:<userx@domain.com> - SMTP<< 250 Recipient OK ------------ end cutthrough setup ------------ -processing "accept" -accept: condition test succeeded in inline ACL -end of inline ACL: ACCEPT - SMTP>> DATA - SMTP<< 354 Send data ------------ start cutthrough headers send ----------- ------------ done cutthrough headers send ------------ - SMTP>> . - SMTP<< 250 OK -LOG: MAIN - >> userx@domain.com R=all T=smtp H=127.0.0.1 [127.0.0.1] C="250 OK" -created log directory TESTSUITE/spool/log - SMTP>> QUIT ------------ cutthrough shutdown (delivered) ------------ -LOG: MAIN - <= CALLER@myhost.test.ex U=CALLER P=local-esmtp S=sss -LOG: MAIN - Completed -LOG: smtp_connection MAIN - SMTP connection from CALLER closed by QUIT ->>>>>>>>>>>>>>>> Exim pid=pppp terminating with rc=0 >>>>>>>>>>>>>>>> diff --git a/test/stdout/5401 b/test/stdout/5401 index 1ceb0bffb..c0089f856 100644 --- a/test/stdout/5401 +++ b/test/stdout/5401 @@ -9,6 +9,29 @@ 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-myhost.test.ex Hello CALLER at myhost.test.ex
+250-SIZE 52428800
+250-8BITMIME
+250-PIPELINING
+250 HELP
+250 OK
+550-Callout verification failed:
+550 550 No mate
+221 myhost.test.ex closing connection
+220 myhost.test.ex ESMTP Exim x.yz Tue, 2 Mar 1999 09:44:33 +0000
+250-myhost.test.ex Hello CALLER at myhost.test.ex
+250-SIZE 52428800
+250-8BITMIME
+250-PIPELINING
+250 HELP
+250 OK
+550-Callout verification failed:
+550 550 Not that one
+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 ... @@ -36,3 +59,66 @@ Date: Tue, 2 Mar 1999 09:44:33 +0000 QUIT 250 OK End of script +Listening on port 1224 ... +Connection request from [ip4.ip4.ip4.ip4] +220 ESMTP +EHLO myhost.test.ex +250 OK +MAIL FROM:<CALLER@myhost.test.ex> +250 Sender OK +RCPT TO:<no@domain.com> +550 No mate +QUIT +250 OK +Expected EOF read from client +End of script +Listening on port 1224 ... +Connection request from [ip4.ip4.ip4.ip4] +220 ESMTP +EHLO myhost.test.ex +250 OK +MAIL FROM:<CALLER@myhost.test.ex> +250 Sender OK +RCPT TO:<no@domain.com> +550 Not that one +QUIT +250 OK +Expected EOF read from client +Listening on port 1224 ... +Connection request from [ip4.ip4.ip4.ip4] +220 ESMTP +EHLO myhost.test.ex +250 OK +MAIL FROM:<CALLER@myhost.test.ex> +250 Sender OK +RCPT TO:<userx@domain.com> +250 ok rcpt-1 +QUIT +250 OK +Expected EOF read from client +Listening on port 1224 ... +Connection request from [ip4.ip4.ip4.ip4] +220 ESMTP +EHLO myhost.test.ex +250 OK +MAIL FROM:<CALLER@myhost.test.ex> +250 Sender OK +RCPT TO:<userx@domain.com> +250 ok rcpt-1 +DATA +354 Send data +Received: from CALLER (helo=myhost.test.ex) + by myhost.test.ex with local-esmtp (Exim x.yz) + (envelope-from <CALLER@myhost.test.ex>) + id 10HmaY-0005vi-00 + for userx@domain.com; Tue, 2 Mar 1999 09:44:33 +0000 +Message-Id: <E10HmaY-0005vi-00@myhost.test.ex> +From: CALLER_NAME <CALLER@myhost.test.ex> +Date: Tue, 2 Mar 1999 09:44:33 +0000 + +. +250 OK +QUIT +250 OK +Expected EOF read from client +End of script |