From: Alexander Moisseev Date: Sun, 18 Sep 2016 08:02:44 +0000 (+0300) Subject: [Fix] Skip MX check for authenticated users and local networks X-Git-Tag: 1.4.0~412^2 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=e1953731d1886a6bbba8733d2afe0fd219560885;p=rspamd.git [Fix] Skip MX check for authenticated users and local networks --- diff --git a/src/plugins/lua/mx_check.lua b/src/plugins/lua/mx_check.lua index 002ff46ab..0a41632f6 100644 --- a/src/plugins/lua/mx_check.lua +++ b/src/plugins/lua/mx_check.lua @@ -32,6 +32,11 @@ local settings = { local redis_params local function mx_check(task) + local ip_addr = task:get_ip() + if task:get_user() or (ip_addr and ip_addr:is_local()) then + return + end + local from = task:get_from('smtp') local mx_domain