summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorHeiko Schlittermann (HS12-RIPE) <hs@schlittermann.de>2020-10-04 12:22:01 +0200
committerHeiko Schlittermann (HS12-RIPE) <hs@schlittermann.de>2020-10-05 10:46:49 +0200
commit4c7f095f4f32a2259017fa5acab6b1278af9e702 (patch)
tree907d039c457ae1f6cf1064e546c6f2e57db4fd25 /test
parentd0de84b2d250e2f066286db3a3f5400a0f931b67 (diff)
Add proxy_protocol_timeout main config option.
Diffstat (limited to 'test')
-rw-r--r--test/confs/40302
-rw-r--r--test/scripts/4030-proxy-protocol/403014
-rw-r--r--test/scripts/4030-proxy-protocol/40316
-rw-r--r--test/stderr/403010
-rw-r--r--test/stderr/403116
-rw-r--r--test/stdout/403020
-rw-r--r--test/stdout/403110
7 files changed, 72 insertions, 6 deletions
diff --git a/test/confs/4030 b/test/confs/4030
index e64859769..86bf6b31c 100644
--- a/test/confs/4030
+++ b/test/confs/4030
@@ -5,6 +5,8 @@
primary_hostname = myhost.test.ex
hosts_proxy = HOSTIPV4
+# default timeout is 3s, speed up the timeout test here
+proxy_protocol_timeout = 1s
queue_only
# ----- Main settings -----
diff --git a/test/scripts/4030-proxy-protocol/4030 b/test/scripts/4030-proxy-protocol/4030
index 1eece1112..868a2581c 100644
--- a/test/scripts/4030-proxy-protocol/4030
+++ b/test/scripts/4030-proxy-protocol/4030
@@ -5,7 +5,7 @@ munge loopback
exim -bd -DSERVER=server -oX PORT_D
****
#
-# non-prox plain receive
+### non-prox plain receive
client 127.0.0.1 PORT_D
??? 220
HELO clientname
@@ -25,7 +25,7 @@ QUIT
??? 221
****
#
-# protocol v1 plain receive
+### protocol v1 plain receive
client HOSTIPV4 PORT_D
PROXY TCP4 127.0.0.2 127.42.42.42 64000 25
??? 220
@@ -48,7 +48,7 @@ QUIT
#
#
#
-# protocol v2 plain receive
+### protocol v2 plain receive
client HOSTIPV4 PORT_D
>>> \x0D\x0A\x0D\x0A\x00\x0D\x0A\x51\x55\x49\x54\x0A\x21\x11\x00\x0c\x7f\x00\x00\x02\x7f\x2a\x2a\x2a\xc2\x95\x04\x01
??? 220
@@ -71,5 +71,13 @@ QUIT
#
#
#
+### proxy timeout
+client HOSTIPV4 PORT_D
+??? 220
+PROXY TCP4 127.0.0.2 127.42.42.42 64000 25
+??? 503
+QUIT
+??? 221
+****
killdaemon
no_msglog_check
diff --git a/test/scripts/4030-proxy-protocol/4031 b/test/scripts/4030-proxy-protocol/4031
index f3d2456ec..55e8ba806 100644
--- a/test/scripts/4030-proxy-protocol/4031
+++ b/test/scripts/4030-proxy-protocol/4031
@@ -38,3 +38,9 @@ body v2
.
QUIT
****
+### proxy timeout
+exim -bh HOSTIPV4
+:sleep:3
+PROXY TCP4 127.0.0.2 127.42.42.42 64000 25
+QUIT
+****
diff --git a/test/stderr/4030 b/test/stderr/4030
new file mode 100644
index 000000000..00cf8eabc
--- /dev/null
+++ b/test/stderr/4030
@@ -0,0 +1,10 @@
+### non-prox plain receive
+### protocol v1 plain receive
+### protocol v2 plain receive
+### proxy timeout
+
+******** SERVER ********
+### non-prox plain receive
+### protocol v1 plain receive
+### protocol v2 plain receive
+### proxy timeout
diff --git a/test/stderr/4031 b/test/stderr/4031
index c5336cb25..b0d6a4aaf 100644
--- a/test/stderr/4031
+++ b/test/stderr/4031
@@ -9,7 +9,7 @@
>>> host in helo_accept_junk_hosts? no (option unset)
>>> clientname in helo_lookup_domains? no (end of list)
>>> using ACL "r_acl"
->>> processing "accept" (TESTSUITE/test-config 20)
+>>> processing "accept" (TESTSUITE/test-config 22)
>>> check logwrite = proxy session: $proxy_session
>>> = proxy session: no
LOG: proxy session: no
@@ -42,7 +42,7 @@ LOG: 10HmaX-0005vi-00 <= a@test.ex H=(clientname) [127.0.0.2] P=smtp S=sss
LOG: no host name found for IP address 127.0.0.2
>>> clientname in helo_lookup_domains? no (end of list)
>>> using ACL "r_acl"
->>> processing "accept" (TESTSUITE/test-config 20)
+>>> processing "accept" (TESTSUITE/test-config 22)
>>> check logwrite = proxy session: $proxy_session
>>> = proxy session: yes
LOG: proxy session: yes
@@ -75,7 +75,7 @@ LOG: 10HmaY-0005vi-00 <= a@test.ex H=(clientname) [127.0.0.2]:1113 P=smtp PRX=ip
LOG: no host name found for IP address 127.0.0.2
>>> clientname in helo_lookup_domains? no (end of list)
>>> using ACL "r_acl"
->>> processing "accept" (TESTSUITE/test-config 20)
+>>> processing "accept" (TESTSUITE/test-config 22)
>>> check logwrite = proxy session: $proxy_session
>>> = proxy session: yes
LOG: proxy session: yes
@@ -95,8 +95,18 @@ LOG: remote [127.0.0.2]:1115
>>> end of ACL "r_acl": ACCEPT
>>> host in ignore_fromline_hosts? no (option unset)
LOG: 10HmaZ-0005vi-00 <= a@test.ex H=(clientname) [127.0.0.2]:1115 P=smtp PRX=ip4.ip4.ip4.ip4 S=sss
+### proxy timeout
+>>> host in hosts_connection_nolog? no (option unset)
+>>> host in host_lookup? no (option unset)
+>>> host in host_reject_connection? no (option unset)
+>>> host in sender_unqualified_hosts? no (option unset)
+>>> host in recipient_unqualified_hosts? no (option unset)
+>>> host in helo_verify_hosts? no (option unset)
+>>> host in helo_try_verify_hosts? no (option unset)
+>>> host in helo_accept_junk_hosts? no (option unset)
******** SERVER ********
### non-prox plain receive
### protocol v1 receive
### protocol v2 receive
+### proxy timeout
diff --git a/test/stdout/4030 b/test/stdout/4030
index c37aaa963..d6dcda718 100644
--- a/test/stdout/4030
+++ b/test/stdout/4030
@@ -1,3 +1,4 @@
+### non-prox plain receive
Connecting to 127.0.0.1 port 1225 ... connected
??? 220
<<< 220 myhost.test.ex ESMTP Exim x.yz Tue, 2 Mar 1999 09:44:33 +0000
@@ -23,6 +24,7 @@ Connecting to 127.0.0.1 port 1225 ... connected
??? 221
<<< 221 myhost.test.ex closing connection
End of script
+### protocol v1 plain receive
Connecting to ip4.ip4.ip4.ip4 port 1225 ... connected
>>> PROXY TCP4 127.0.0.2 127.42.42.42 64000 25
??? 220
@@ -49,6 +51,7 @@ Connecting to ip4.ip4.ip4.ip4 port 1225 ... connected
??? 221
<<< 221 myhost.test.ex closing connection
End of script
+### protocol v2 plain receive
Connecting to ip4.ip4.ip4.ip4 port 1225 ... connected
>>> \x0D\x0A\x0D\x0A\x00\x0D\x0A\x51\x55\x49\x54\x0A\x21\x11\x00\x0c\x7f\x00\x00\x02\x7f\x2a\x2a\x2a\xc2\x95\x04\x01
??? 220
@@ -75,3 +78,20 @@ Connecting to ip4.ip4.ip4.ip4 port 1225 ... connected
??? 221
<<< 221 myhost.test.ex closing connection
End of script
+### proxy timeout
+Connecting to ip4.ip4.ip4.ip4 port 1225 ... connected
+??? 220
+<<< 220 myhost.test.ex ESMTP Exim x.yz Tue, 2 Mar 1999 09:44:33 +0000
+>>> PROXY TCP4 127.0.0.2 127.42.42.42 64000 25
+??? 503
+<<< 503 Command refused, required Proxy negotiation failed
+>>> QUIT
+??? 221
+<<< 221 myhost.test.ex closing connection
+End of script
+
+******** SERVER ********
+### non-prox plain receive
+### protocol v1 plain receive
+### protocol v2 plain receive
+### proxy timeout
diff --git a/test/stdout/4031 b/test/stdout/4031
index a0cddc62d..d53009cc1 100644
--- a/test/stdout/4031
+++ b/test/stdout/4031
@@ -46,8 +46,18 @@
**** SMTP testing: that is not a real message id!
221 myhost.test.ex closing connection
+### proxy timeout
+
+**** SMTP testing session as if from host ip4.ip4.ip4.ip4
+**** but without any ident (RFC 1413) callback.
+**** This is not for real!
+
+220 myhost.test.ex ESMTP Exim x.yz Tue, 2 Mar 1999 09:44:33 +0000
+503 Command refused, required Proxy negotiation failed
+221 myhost.test.ex closing connection
******** SERVER ********
### non-prox plain receive
### protocol v1 receive
### protocol v2 receive
+### proxy timeout