From 5f92dbf67a632ba4df55a39ddb963656ad8499ac Mon Sep 17 00:00:00 2001 From: Jan Engelhardt Date: Wed, 28 Aug 2024 10:47:42 +0200 Subject: [PATCH] daemons: emit log message when HAPROXY protocol is mandated References: GXH-93 --- mda/smtp/main.cpp | 2 ++ mra/imap/main.cpp | 2 ++ mra/pop3/main.cpp | 2 ++ 3 files changed, 6 insertions(+) diff --git a/mda/smtp/main.cpp b/mda/smtp/main.cpp index f11689f1f..0f3ba064d 100644 --- a/mda/smtp/main.cpp +++ b/mda/smtp/main.cpp @@ -123,6 +123,8 @@ static bool dq_reload_config(std::shared_ptr gxcfg = nullptr, } g_rcpt_delimiter = znul(gxcfg->get_value("lda_recipient_delimiter")); g_haproxy_level = gxcfg->get_ll("lda_accept_haproxy"); + if (g_haproxy_level > 0) + mlog(LV_NOTICE, "All incoming connections must be HAPROXY type %u", g_haproxy_level); return true; } diff --git a/mra/imap/main.cpp b/mra/imap/main.cpp index 8efd0db0c..b825ac2b0 100644 --- a/mra/imap/main.cpp +++ b/mra/imap/main.cpp @@ -170,6 +170,8 @@ static bool imap_reload_config(std::shared_ptr gxcfg = nullptr, return false; } g_haproxy_level = gxcfg->get_ll("imap_accept_haproxy"); + if (g_haproxy_level > 0) + mlog(LV_NOTICE, "All incoming connections must be HAPROXY type %u", g_haproxy_level); return true; } diff --git a/mra/pop3/main.cpp b/mra/pop3/main.cpp index 4dc516bbb..0ec920a5f 100644 --- a/mra/pop3/main.cpp +++ b/mra/pop3/main.cpp @@ -146,6 +146,8 @@ static bool pop3_reload_config(std::shared_ptr gxcfg = nullptr, return false; } g_haproxy_level = gxcfg->get_ll("pop3_accept_haproxy"); + if (g_haproxy_level > 0) + mlog(LV_NOTICE, "All incoming connections must be HAPROXY type %u", g_haproxy_level); return true; }