]> source.dussan.org Git - rspamd.git/commitdiff
[Minor] Micro-optimisation
authorVsevolod Stakhov <vsevolod@highsecure.ru>
Wed, 23 Mar 2022 20:23:04 +0000 (20:23 +0000)
committerVsevolod Stakhov <vsevolod@highsecure.ru>
Wed, 23 Mar 2022 20:23:04 +0000 (20:23 +0000)
Suggested by: @citrin

src/plugins/lua/rbl.lua

index fa543e73d8e730bf7e6e02a8ab070969c56392a5..f1c20fa132687da9e571a00dd04abf0ee59dd713 100644 (file)
@@ -662,8 +662,8 @@ local function gen_rbl_callback(rule)
     email_tbl.domain = email_tbl.domain:lower()
     email_tbl.user = email_tbl.user:lower()
 
-    if #email_tbl.domain == 0 or #email_tbl.user == 0 then
-      rspamd_logger.infox(task, "got empty/invalid email: '%s@%s'; skip it in the checks",
+    if email_tbl.domain == '' or email_tbl.user == '' then
+      rspamd_logger.infox(task, "got an email with some empty parts: '%s@%s'; skip it in the checks",
           email_tbl.user, email_tbl.domain)
       return
     end