Browse Source

[Minor] Mx check: Add wait_for_greeting option

Issue: #3966
tags/3.2
Vsevolod Stakhov 2 years ago
parent
commit
86904bf22b
1 changed files with 7 additions and 0 deletions
  1. 7
    0
      src/plugins/lua/mx_check.lua

+ 7
- 0
src/plugins/lua/mx_check.lua View File

@@ -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…
Cancel
Save