diff options
author | Vsevolod Stakhov <vsevolod@highsecure.ru> | 2016-10-27 10:32:34 +0200 |
---|---|---|
committer | Vsevolod Stakhov <vsevolod@highsecure.ru> | 2016-10-27 10:32:34 +0200 |
commit | d517ff598510688f2b4b0ff4619c95467a742e29 (patch) | |
tree | 7d34784c835a6574d25af0c26a3472c7ec332d08 /src/plugins/lua/mx_check.lua | |
parent | 8a5401d02dc40ce5fd570d98d5214507b18d7909 (diff) | |
download | rspamd-d517ff598510688f2b4b0ff4619c95467a742e29.tar.gz rspamd-d517ff598510688f2b4b0ff4619c95467a742e29.zip |
[Minor] Use one MX in options
Diffstat (limited to 'src/plugins/lua/mx_check.lua')
-rw-r--r-- | src/plugins/lua/mx_check.lua | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/src/plugins/lua/mx_check.lua b/src/plugins/lua/mx_check.lua index bdd33a8e5..40dc87188 100644 --- a/src/plugins/lua/mx_check.lua +++ b/src/plugins/lua/mx_check.lua @@ -156,7 +156,7 @@ local function mx_check(task) task = task, forced = true }) - task:insert_result(settings.symbol_no_mx, 1.0) + task:insert_result(settings.symbol_no_mx, 1.0, err) else table.sort(results, function(r1, r2) return r1['priority'] < r2['priority'] @@ -202,7 +202,8 @@ local function mx_check(task) if data == '0' then task:insert_result(settings.symbol_bad_mx, 1.0, 'cached') else - task:insert_result(settings.symbol_good_mx, 1.0, {'cached', data}) + local mxes = rspamd_str_split(data, ';') + task:insert_result(settings.symbol_good_mx, 1.0, 'cached: ' .. mxes[1]) end end end @@ -274,7 +275,7 @@ if opts then rspamd_config:set_metric_symbol({ name = settings.symbol_no_mx, score = 1.5, - description = 'Domain has no working MX', + description = 'Domain has no resolvable MX', group = 'MX', one_shot = true, }) |