From 19026c7116f1e394049d063d50147f8a2458f351 Mon Sep 17 00:00:00 2001 From: Vsevolod Stakhov Date: Wed, 24 Apr 2019 13:37:32 +0100 Subject: [PATCH] [Minor] Do not use `get_symbol` to check existance --- src/plugins/lua/dmarc.lua | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/plugins/lua/dmarc.lua b/src/plugins/lua/dmarc.lua index 7f6296bdc..57031f076 100644 --- a/src/plugins/lua/dmarc.lua +++ b/src/plugins/lua/dmarc.lua @@ -514,13 +514,13 @@ local function dmarc_validate_policy(task, policy, hdrfromdom, dmarc_esld) elseif spf_tmpfail then spf_result = 'temperror' else - if task:get_symbol(symbols.spf_deny_symbol) then + if task:has_symbol(symbols.spf_deny_symbol) then spf_result = 'fail' - elseif task:get_symbol(symbols.spf_softfail_symbol) then + elseif task:has_symbol(symbols.spf_softfail_symbol) then spf_result = 'softfail' - elseif task:get_symbol(symbols.spf_neutral_symbol) then + elseif task:has_symbol(symbols.spf_neutral_symbol) then spf_result = 'neutral' - elseif task:get_symbol(symbols.spf_permfail_symbol) then + elseif task:has_symbol(symbols.spf_permfail_symbol) then spf_result = 'permerror' else spf_result = 'none' -- 2.39.5