]> git.ipfire.org Git - thirdparty/haproxy.git/commit
BUG/MINOR: smtpchk: SMTP Service check should gracefully close SMTP transaction
authorwrightlaw <wrightlaw@users.noreply.github.com>
Thu, 8 Sep 2022 15:10:48 +0000 (16:10 +0100)
committerChristopher Faulet <cfaulet@haproxy.com>
Wed, 21 Sep 2022 14:01:42 +0000 (16:01 +0200)
commit9a8d8a3fd0828a1cb64745318dcc5704a0b4b1a9
tree70fb0c470a79bb16448212165d582a9af7c56a4a
parent2ec1ffaed061cd3560934c7525b204dbca25ace3
BUG/MINOR: smtpchk: SMTP Service check should gracefully close SMTP transaction

At present option smtpchk closes the TCP connection abruptly on completion of service checking,
even if successful. This can result in a very high volume of errors in backend SMTP server logs.
This patch ensures an SMTP QUIT is sent and a positive 2xx response is received from the SMTP
server prior to disconnection.

This patch depends on the following one:

 * MINOR: smtpchk: Update expect rule to fully match replies to EHLO commands

This patch should fix the issue #1812. It may be backported as far as 2.2
with the commit above On the 2.2, proxy_parse_smtpchk_opt() function is
located in src/check.c

[cf: I updated reg-tests script accordingly]
reg-tests/checks/4be_1srv_smtpchk_httpchk_layer47errors.vtc
reg-tests/checks/smtp-check.vtc
src/tcpcheck.c