summaryrefslogtreecommitdiffstats
path: root/src/plugins/lua/whitelist.lua
diff options
context:
space:
mode:
authorVsevolod Stakhov <vsevolod@highsecure.ru>2016-02-08 00:18:01 +0000
committerVsevolod Stakhov <vsevolod@highsecure.ru>2016-02-08 00:22:38 +0000
commit1f9916144e1de13431d341efa9d67272ee3773ee (patch)
tree81f0f7c759f8da29f2be01012a87e4399c554fad /src/plugins/lua/whitelist.lua
parent9cb4f26bd048aaa3a292d7a1ac8161288cbf7bf9 (diff)
downloadrspamd-1f9916144e1de13431d341efa9d67272ee3773ee.tar.gz
rspamd-1f9916144e1de13431d341efa9d67272ee3773ee.zip
Use has symbol when no need to get extra data for a symbol
Diffstat (limited to 'src/plugins/lua/whitelist.lua')
-rw-r--r--src/plugins/lua/whitelist.lua4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/plugins/lua/whitelist.lua b/src/plugins/lua/whitelist.lua
index 3b2b5b25d..0b620c1e5 100644
--- a/src/plugins/lua/whitelist.lua
+++ b/src/plugins/lua/whitelist.lua
@@ -54,7 +54,7 @@ local function whitelist_cb(symbol, rule, task)
if found then
if rule['valid_spf'] then
-- Check for spf symbol
- if not task:get_symbol(options['spf_allow_symbol']) then
+ if not task:has_symbol(options['spf_allow_symbol']) then
found = false
rspamd_logger.debugx(task, "domain %s has been found in whitelist %s" ..
" but it doesn't have valid SPF record", domain, symbol)
@@ -85,7 +85,7 @@ local function whitelist_cb(symbol, rule, task)
end
end
if rule['valid_dmarc'] then
- if not task:get_symbol(options['dmarc_allow_symbol']) then
+ if not task:has_symbol(options['dmarc_allow_symbol']) then
found = false
rspamd_logger.debugx(task, "domain %s has been found in whitelist %s" ..
" but it doesn't have valid DMARC", domain, symbol)