From: Vsevolod Stakhov Date: Sun, 21 Nov 2021 16:36:26 +0000 (+0000) Subject: [Minor] Mx check: Add wait_for_greeting option X-Git-Tag: 3.2~240 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=86904bf22bbceb18718db0d3e7f11592d8a120ba;p=thirdparty%2Frspamd.git [Minor] Mx check: Add wait_for_greeting option Issue: #3966 --- diff --git a/src/plugins/lua/mx_check.lua b/src/plugins/lua/mx_check.lua index 678c21566d..a7ea7aee74 100644 --- a/src/plugins/lua/mx_check.lua +++ b/src/plugins/lua/mx_check.lua @@ -38,6 +38,7 @@ local settings = { greylist_invalid = true, -- Greylist first message with invalid MX (require greylist plugin) key_prefix = 'rmx', max_mx_a_records = 5, -- Maximum number of A records to check per MX request + wait_for_greeting = false, -- Wait for SMTP greeting and emit `quit` command } local redis_params local exclude_domains @@ -155,6 +156,12 @@ local function mx_check(task) valid = true mxes[name].working = true end + + -- Disconnect without SMTP dialog + if not settings.wait_for_greeting then + check_results(mxes) + conn:close() + end end if err or not results or #results == 0 then