From: Vsevolod Stakhov Date: Wed, 24 Apr 2019 12:37:32 +0000 (+0100) Subject: [Minor] Do not use `get_symbol` to check existance X-Git-Tag: 1.9.3~74 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=19026c7116f1e394049d063d50147f8a2458f351;p=thirdparty%2Frspamd.git [Minor] Do not use `get_symbol` to check existance --- diff --git a/src/plugins/lua/dmarc.lua b/src/plugins/lua/dmarc.lua index 7f6296bdc7..57031f0766 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'