commit 19026c7: [Minor] Do not use `get_symbol` to check existance

Vsevolod Stakhov vsevolod at highsecure.ru
Wed Apr 24 12:42:03 UTC 2019


Author: Vsevolod Stakhov
Date: 2019-04-24 13:37:32 +0100
URL: https://github.com/rspamd/rspamd/commit/19026c7116f1e394049d063d50147f8a2458f351 (HEAD -> master)

[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'


More information about the Commits mailing list