BUG/MINOR: mailers: negotiate SMTP, not ESMTP
authorLukas Tribus <lukas@ltri.eu>
Thu, 17 Feb 2022 14:40:51 +0000 (15:40 +0100)
committerChristopher Faulet <cfaulet@haproxy.com>
Fri, 25 Feb 2022 13:36:01 +0000 (14:36 +0100)
As per issue #1552 the mailer code currently breaks on ESMTP multiline
responses. Let's negotiate SMTP instead.

Should be backported to 2.0.

(cherry picked from commit 1a16e4ebcb6d5848dd867a4ef3edda3760c60124)
Signed-off-by: William Lallemand <wlallemand@haproxy.org>
(cherry picked from commit 667c78079f0a6e33a670495c8f0728400c98700c)
Signed-off-by: Christopher Faulet <cfaulet@haproxy.com>
(cherry picked from commit 35bb0e59efa1a3bc4cb295826079cbb40f73e5fd)
Signed-off-by: Christopher Faulet <cfaulet@haproxy.com>

src/mailers.c

index 7da2efd..2eb43e3 100644 (file)
@@ -197,7 +197,7 @@ static int enqueue_one_email_alert(struct proxy *p, struct server *s,
                goto error;
 
        {
-               const char * const strs[4] = { "EHLO ", p->email_alert.myhostname, "\r\n" };
+               const char * const strs[4] = { "HELO ", p->email_alert.myhostname, "\r\n" };
                if (!add_tcpcheck_send_strs(&alert->rules, strs))
                        goto error;
        }