summaryrefslogtreecommitdiffstats
path: root/rules
diff options
context:
space:
mode:
authorKako, Chang <49464540+kakochang@users.noreply.github.com>2020-05-05 18:35:20 +0800
committerGitHub <noreply@github.com>2020-05-05 18:35:20 +0800
commitbd55a0ffde66116017b8891c006087f60a741016 (patch)
treeafe01220281b1f2ec0badc11d824258fe2fdcb5e /rules
parent569825264466b743f741514f117afae29c4b8dad (diff)
downloadrspamd-bd55a0ffde66116017b8891c006087f60a741016.tar.gz
rspamd-bd55a0ffde66116017b8891c006087f60a741016.zip
[Fix] Fix FREEMAIL_REPLYTO_NEQ_FROM_DOM
Diffstat (limited to 'rules')
-rw-r--r--rules/misc.lua14
1 files changed, 7 insertions, 7 deletions
diff --git a/rules/misc.lua b/rules/misc.lua
index 5dcf6ea05..88895c2b9 100644
--- a/rules/misc.lua
+++ b/rules/misc.lua
@@ -345,14 +345,14 @@ rspamd_config.HAS_ATTACHMENT = {
-- Requires freemail maps loaded in multimap
local function freemail_reply_neq_from(task)
- local frt = task:get_symbol('FREEMAIL_REPLYTO')
- local ff = task:get_symbol('FREEMAIL_FROM')
- if (frt and ff and frt['options'] and ff['options'] and
- frt['options'][1] ~= ff['options'][1])
- then
- return true
+ if not task:has_symbol('FREEMAIL_REPLYTO') or not task:has_symbol('FREEMAIL_FROM') then
+ return false
end
- return false
+ local frt = task:get_symbol('FREEMAIL_REPLYTO')
+ local ff = task:get_symbol('FREEMAIL_FROM')
+ local frt_opts = frt[1]['options']
+ local ff_opts = ff[1]['options']
+ return ( frt_opts and ff_opts and frt_opts[1] ~= ff_opts[1] )
end
rspamd_config:register_symbol({