]> git.ipfire.org Git - thirdparty/rspamd.git/commitdiff
[Fix] Fix emails filtering in emails module
authorVsevolod Stakhov <vsevolod@highsecure.ru>
Mon, 3 Dec 2018 17:08:20 +0000 (17:08 +0000)
committerVsevolod Stakhov <vsevolod@highsecure.ru>
Mon, 3 Dec 2018 17:08:20 +0000 (17:08 +0000)
src/plugins/lua/emails.lua

index 282f53bb4c1999c5e139de23b608c4becac092d2..1727e49e1a36a2aa84d476a05c2ecb228c51b99c 100644 (file)
@@ -185,14 +185,15 @@ local function gen_check_emails(rule)
       end
 
       local replyto = get_raw_header('Reply-To')
-      if not replyto then return false end
-      local rt = util.parse_mail_address(replyto, task:get_mempool())
-
-      if rt and rt[1] then
-        rspamd_lua_utils.remove_email_aliases(rt[1])
-        if not checked[rt[1].addr] then
-          check_email_rule(task, rule, rt[1])
-          checked[rt[1].addr] = true
+      if replyto then
+        local rt = util.parse_mail_address(replyto, task:get_mempool())
+
+        if rt and rt[1] then
+          rspamd_lua_utils.remove_email_aliases(rt[1])
+          if not checked[rt[1].addr] then
+            check_email_rule(task, rule, rt[1])
+            checked[rt[1].addr] = true
+          end
         end
       end
     end