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: http://git.ipfire.org/?a=commitdiff_plain;h=refs%2Fpull%2F956%2Fhead;p=thirdparty%2Frspamd.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 002ff46abb..0a41632f6b 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