From 5d03669979a0faed6caec3d32f7caac9321eb160 Mon Sep 17 00:00:00 2001 From: Jeremy Harris Date: Mon, 2 Jan 2017 17:20:26 +0000 Subject: PROXY: fix v2 protocol decode. Bugs 2003, 1747 --- test/scripts/4030-proxy-protocol/4030 | 75 +++++++++++++++++++++++++++++++ test/scripts/4030-proxy-protocol/REQUIRES | 1 + 2 files changed, 76 insertions(+) create mode 100644 test/scripts/4030-proxy-protocol/4030 create mode 100644 test/scripts/4030-proxy-protocol/REQUIRES (limited to 'test/scripts') 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: +??? 250 +RCPT TO: +??? 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: +??? 250 +RCPT TO: +??? 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: +??? 250 +RCPT TO: +??? 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 -- cgit v1.2.3