summaryrefslogtreecommitdiff
path: root/test/scripts
diff options
context:
space:
mode:
authorJeremy Harris <jgh146exb@wizmail.org>2017-01-02 17:20:26 +0000
committerJeremy Harris <jgh146exb@wizmail.org>2017-01-02 18:46:20 +0000
commit5d03669979a0faed6caec3d32f7caac9321eb160 (patch)
tree914d616f517eb2975f3a7803e14cc16cfc7286bb /test/scripts
parent2eec84caa477a4b3b1f9fff999000768f65bd936 (diff)
PROXY: fix v2 protocol decode. Bugs 2003, 1747
Diffstat (limited to 'test/scripts')
-rw-r--r--test/scripts/4030-proxy-protocol/403075
-rw-r--r--test/scripts/4030-proxy-protocol/REQUIRES1
2 files changed, 76 insertions, 0 deletions
diff --git a/test/scripts/4030-proxy-protocol/4030 b/test/scripts/4030-proxy-protocol/4030
new file mode 100644
index 000000000..8b560bcbc
--- /dev/null
+++ b/test/scripts/4030-proxy-protocol/4030
@@ -0,0 +1,75 @@
+# proxy-protocol proxy on inbound smtp
+#
+munge loopback
+#
+exim -bd -DSERVER=server -oX PORT_D
+****
+#
+# non-prox plain receive
+client 127.0.0.1 PORT_D
+??? 220
+HELO clientname
+??? 250
+MAIL FROM:<a@test.ex>
+??? 250
+RCPT TO:<b@test.ex>
+??? 250
+DATA
+??? 354
+Subject: test
+
+body
+.
+??? 250
+QUIT
+??? 221
+****
+#
+# protocol v1 plain receive
+client HOSTIPV4 PORT_D
+PROXY TCP4 127.0.0.2 127.42.42.42 64000 25
+??? 220
+HELO clientname
+??? 250
+MAIL FROM:<c@test.ex>
+??? 250
+RCPT TO:<d@test.ex>
+??? 250
+DATA
+??? 354
+Subject: test
+
+body
+.
+??? 250
+QUIT
+??? 221
+****
+#
+#
+#
+# protocol v2 plain receive
+client HOSTIPV4 PORT_D
+>>> \x0D\x0A\x0D\x0A\x00\x0D\x0A\x51\x55\x49\x54\x0A\x21\x11\x00\x0c\xc0\xa8\x00\x0f\xc0\xa8\x00\05\xc2\x95\x04\01
+??? 220
+HELO clientname
+??? 250
+MAIL FROM:<e@test.ex>
+??? 250
+RCPT TO:<f@test.ex>
+??? 250
+DATA
+??? 354
+Subject: test
+
+body
+.
+??? 250
+QUIT
+??? 221
+****
+#
+#
+#
+killdaemon
+no_msglog_check
diff --git a/test/scripts/4030-proxy-protocol/REQUIRES b/test/scripts/4030-proxy-protocol/REQUIRES
new file mode 100644
index 000000000..244d6e168
--- /dev/null
+++ b/test/scripts/4030-proxy-protocol/REQUIRES
@@ -0,0 +1 @@
+support PROXY