瀏覽代碼

[Minor] Mx check: Add wait_for_greeting option

Issue: #3966
tags/3.2
Vsevolod Stakhov 2 年之前
父節點
當前提交
86904bf22b
共有 1 個文件被更改,包括 7 次插入0 次删除
  1. 7
    0
      src/plugins/lua/mx_check.lua

+ 7
- 0
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

Loading…
取消
儲存