summaryrefslogtreecommitdiff
path: root/test/scripts/5400-cutthrough
diff options
context:
space:
mode:
authorHeiko Schlittermann (HS12-RIPE) <hs@schlittermann.de>2016-11-25 11:23:26 +0100
committerHeiko Schlittermann (HS12-RIPE) <hs@schlittermann.de>2016-11-25 11:25:08 +0100
commit4fab92fbc2b63bac2d89c1dae69fa1845cb640b7 (patch)
tree3f1ff4523e24671e5992008e6ac2d9f299942cfa /test/scripts/5400-cutthrough
parent7a28511635d0d5f385a7c389bc5ec95dfed95581 (diff)
Merge from master into 4.next
Done with git merge --squash -x theirs master
Diffstat (limited to 'test/scripts/5400-cutthrough')
-rw-r--r--test/scripts/5400-cutthrough/540011
-rw-r--r--test/scripts/5400-cutthrough/540185
-rw-r--r--test/scripts/5400-cutthrough/540237
-rw-r--r--test/scripts/5400-cutthrough/540342
-rw-r--r--test/scripts/5400-cutthrough/540430
-rw-r--r--test/scripts/5400-cutthrough/5405228
6 files changed, 415 insertions, 18 deletions
diff --git a/test/scripts/5400-cutthrough/5400 b/test/scripts/5400-cutthrough/5400
index 109b43928..10406c255 100644
--- a/test/scripts/5400-cutthrough/5400
+++ b/test/scripts/5400-cutthrough/5400
@@ -120,8 +120,7 @@ QUIT
#
# cutthrough for 2 recipients in one domain
# first one denied
-# so we get a 2nd conn with the traditional delivery
-# (for both because it's not a real verify=recipient)
+# so we get a 2nd conn with the traditional delivery for the second
server PORT_S 2
220 ESMTP
EHLO
@@ -140,8 +139,6 @@ MAIL FROM:
250 Sender OK
RCPT TO:
250 ok rcpt-1
-RCPT TO:
-250 ok rcpt-2
DATA
354 Send data
.
@@ -168,8 +165,7 @@ QUIT
#
# cutthrough for 2 recipients in one domain
# second one denied
-# so we get a 2nd conn with the traditional delivery
-# (for both because it's not a real verify=recipient)
+# so we get a 2nd conn with the traditional delivery of the 1st
server PORT_S 2
220 ESMTP
EHLO
@@ -190,8 +186,6 @@ MAIL FROM:
250 Sender OK
RCPT TO:
250 ok rcpt-1
-RCPT TO:
-250 ok rcpt-2
DATA
354 Send data
.
@@ -449,4 +443,5 @@ QUIT
****
#
#
+sortlog
# End
diff --git a/test/scripts/5400-cutthrough/5401 b/test/scripts/5400-cutthrough/5401
index d92110ce5..b7837b342 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,86 @@ 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
+****
+#
+#
+#
+# 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/scripts/5400-cutthrough/5402 b/test/scripts/5400-cutthrough/5402
index dbe7ef3c5..1113c6d32 100644
--- a/test/scripts/5400-cutthrough/5402
+++ b/test/scripts/5400-cutthrough/5402
@@ -1,13 +1,33 @@
-# cutthrough_delivery with MAIL SIZE=
+# cutthrough_delivery vs. recipient-verify cache entry
need_ipv4
-munge loopback
+#
+# Set up callout cache
#
server PORT_S
220 ESMTP
EHLO
-250-OK
-250 SIZE 65536
-MAIL FROM:<fred@myhost.test.ex> SIZE=1123
+250 OK
+MAIL FROM:
+250 Sender OK
+RCPT TO:
+250 Recipient OK
+QUIT
+250 OK
+****
+exim -bs -odf
+EHLO myhost.test.ex
+MAIL FROM:<CALLER@myhost.test.ex>
+RCPT TO:<dest@domain.com>
+QUIT
+****
+#
+# Send message with cutthrough
+#
+server PORT_S
+220 ESMTP
+EHLO
+250 OK
+MAIL FROM:
250 Sender OK
RCPT TO:
250 Recipient OK
@@ -18,13 +38,12 @@ DATA
QUIT
250 OK
****
-exim -bs
+exim -DOPT=CUTTHROUGH -bs -odf
EHLO myhost.test.ex
-MAIL FROM:<fred@myhost.test.ex> SIZE=99
-RCPT TO:<userx@domain.com>
+MAIL FROM:<CALLER@myhost.test.ex>
+RCPT TO:<dest@domain.com>
DATA
.
QUIT
****
-# End
diff --git a/test/scripts/5400-cutthrough/5403 b/test/scripts/5400-cutthrough/5403
new file mode 100644
index 000000000..ad1b44646
--- /dev/null
+++ b/test/scripts/5400-cutthrough/5403
@@ -0,0 +1,42 @@
+# cutthrough_delivery and -bhc
+need_ipv4
+munge loopback
+no_msglog_check
+#
+# Despite config for cutthrough should not make onward conn
+server -t -2 PORT_S
+****
+exim -bhc 1.2.3.4
+EHLO myhost.test.ex
+MAIL FROM:<CALLER@myhost.test.ex>
+RCPT TO:<plain@domain.com>
+DATA
+
+.
+QUIT
+****
+#
+# Onward conn made for r-verify but cleared before DATA
+server PORT_S
+220 server ready
+EHLO
+250 OK
+MAIL
+250 OK
+RCPT
+250 OK
+QUIT
+220 OK
+*eof
+****
+exim -bhc 1.2.3.4
+EHLO myhost.test.ex
+MAIL FROM:<sender@myhost.test.ex>
+RCPT TO:<verify@domain.com>
+DATA
+
+.
+QUIT
+****
+#
+# End
diff --git a/test/scripts/5400-cutthrough/5404 b/test/scripts/5400-cutthrough/5404
new file mode 100644
index 000000000..dbe7ef3c5
--- /dev/null
+++ b/test/scripts/5400-cutthrough/5404
@@ -0,0 +1,30 @@
+# cutthrough_delivery with MAIL SIZE=
+need_ipv4
+munge loopback
+#
+server PORT_S
+220 ESMTP
+EHLO
+250-OK
+250 SIZE 65536
+MAIL FROM:<fred@myhost.test.ex> SIZE=1123
+250 Sender OK
+RCPT TO:
+250 Recipient OK
+DATA
+354 Send data
+.
+250 OK
+QUIT
+250 OK
+****
+exim -bs
+EHLO myhost.test.ex
+MAIL FROM:<fred@myhost.test.ex> SIZE=99
+RCPT TO:<userx@domain.com>
+DATA
+
+.
+QUIT
+****
+# End
diff --git a/test/scripts/5400-cutthrough/5405 b/test/scripts/5400-cutthrough/5405
new file mode 100644
index 000000000..2e7a33388
--- /dev/null
+++ b/test/scripts/5400-cutthrough/5405
@@ -0,0 +1,228 @@
+# cutthrough_delivery tmp-rejects
+need_ipv4
+munge loopback
+#
+# basic operation. Should deliver in cutthrough mode.
+server PORT_S
+220 ESMTP
+EHLO
+250 OK
+MAIL FROM:
+250 Sender OK
+RCPT TO:
+250 Recipient OK
+DATA
+354 Send data
+.
+250 OK
+QUIT
+250 OK
+****
+exim -bs
+EHLO myhost.test.ex
+MAIL FROM:<CALLER@myhost.test.ex>
+RCPT TO:<usera@domain.com>
+DATA
+
+.
+QUIT
+****
+######################################################
+# RCPT-time
+#
+# temp-reject (at RCPT), default. Should spool msg.
+server PORT_S
+220 ESMTP
+EHLO
+250 OK
+MAIL FROM:
+250 Sender OK
+RCPT TO:
+450 not right now
+QUIT
+250 OK
+****
+exim -bs
+EHLO myhost.test.ex
+MAIL FROM:<CALLER@myhost.test.ex>
+RCPT TO:<userb@domain.com>
+DATA
+
+.
+QUIT
+****
+#
+# temp-reject (at RCPT), option "spool". Should spool msg (again).
+server PORT_S
+220 ESMTP
+EHLO
+250 OK
+MAIL FROM:
+250 Sender OK
+RCPT TO:
+450 not right now
+QUIT
+250 OK
+****
+exim -DCONTROL=/defer=spool -bs
+EHLO myhost.test.ex
+MAIL FROM:<CALLER@myhost.test.ex>
+RCPT TO:<userc@domain.com>
+DATA
+
+.
+QUIT
+****
+#
+# temp-reject (at RCPT), option "pass". Should tmp-rej source, at RCPT.
+server PORT_S
+220 ESMTP
+EHLO
+250 OK
+MAIL FROM:
+250 Sender OK
+RCPT TO:
+450 not right now
+QUIT
+250 OK
+****
+exim -DCONTROL=/defer=pass -bs
+EHLO myhost.test.ex
+MAIL FROM:<CALLER@myhost.test.ex>
+RCPT TO:<userd@domain.com>
+QUIT
+****
+#########################################################
+# DATA-time
+#
+#
+# temp-reject (at DATA-dot), default. Should spool msg.
+server PORT_S
+220 ESMTP
+EHLO
+250 OK
+MAIL FROM:
+250 Sender OK
+RCPT TO:
+250 good rcpt
+DATA
+354 Send data
+.
+459 content reject
+QUIT
+250 OK
+****
+exim -bs
+EHLO myhost.test.ex
+MAIL FROM:<CALLER@myhost.test.ex>
+RCPT TO:<usere@domain.com>
+DATA
+
+.
+QUIT
+****
+#
+# temp-reject (at DATA-dot), option "spool". Should spool msg (again).
+server PORT_S
+220 ESMTP
+EHLO
+250 OK
+MAIL FROM:
+250 Sender OK
+RCPT TO:
+250 good rcpt
+DATA
+354 Send data
+.
+459 content reject
+QUIT
+250 OK
+****
+exim -DCONTROL=/defer=spool -bs
+EHLO myhost.test.ex
+MAIL FROM:<CALLER@myhost.test.ex>
+RCPT TO:<userf@domain.com>
+DATA
+
+.
+QUIT
+****
+#
+# temp-reject (at DATA-dot), option "pass". Should tmp-rej source, at DATA.
+server PORT_S
+220 ESMTP
+EHLO
+250 OK
+MAIL FROM:
+250 Sender OK
+RCPT TO:
+250 good rcpt
+DATA
+354 Send data
+.
+459 content reject
+QUIT
+250 OK
+****
+exim -DCONTROL=/defer=pass -bs
+EHLO myhost.test.ex
+MAIL FROM:<CALLER@myhost.test.ex>
+RCPT TO:<userg@domain.com>
+DATA
+
+.
+QUIT
+****
+#
+#########################################################
+#, Now using a conn opened by a recipient verify
+#
+# basic operation. Should deliver in cutthrough mode.
+server PORT_S
+220 ESMTP
+EHLO
+250 OK
+MAIL FROM:
+250 Sender OK
+RCPT TO:
+250 Recipient OK
+DATA
+354 Send data
+.
+250 OK
+QUIT
+250 OK
+****
+exim -DOPT=verify=recipient/callout=use_sender -bs
+EHLO myhost.test.ex
+MAIL FROM:<CALLER@myhost.test.ex>
+RCPT TO:<userh@domain.com>
+DATA
+
+.
+QUIT
+****
+#
+# temp-reject (at RCPT), default. Should tmp-rej, due to the r-verify
+server PORT_S
+220 ESMTP
+EHLO
+250 OK
+MAIL FROM:
+250 Sender OK
+RCPT TO:
+450 not right now
+QUIT
+250 OK
+****
+exim -DOPT=verify=recipient/callout=use_sender -bs
+EHLO myhost.test.ex
+MAIL FROM:<CALLER@myhost.test.ex>
+RCPT TO:<useri@domain.com>
+DATA
+
+.
+QUIT
+****
+#
+no_msglog_check