diff options
author | Vsevolod Stakhov <vsevolod@highsecure.ru> | 2021-11-21 16:36:26 +0000 |
---|---|---|
committer | Vsevolod Stakhov <vsevolod@highsecure.ru> | 2021-11-21 16:36:50 +0000 |
commit | 86904bf22bbceb18718db0d3e7f11592d8a120ba (patch) | |
tree | 2c6d83bb87f5d9b862e170b5c2c6599959d7fc73 /src/plugins | |
parent | b0fb0517a7537fa53d23c274861116f1dcefbe59 (diff) | |
download | rspamd-86904bf22bbceb18718db0d3e7f11592d8a120ba.tar.gz rspamd-86904bf22bbceb18718db0d3e7f11592d8a120ba.zip |
[Minor] Mx check: Add wait_for_greeting option
Issue: #3966
Diffstat (limited to 'src/plugins')
-rw-r--r-- | src/plugins/lua/mx_check.lua | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/src/plugins/lua/mx_check.lua b/src/plugins/lua/mx_check.lua index 678c21566..a7ea7aee7 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 |