From 9d792e5d1dc9375284d963d3e43400d303f41393 Mon Sep 17 00:00:00 2001 From: Vsevolod Stakhov Date: Wed, 23 Mar 2022 20:23:04 +0000 Subject: [PATCH] [Minor] Micro-optimisation Suggested by: @citrin --- src/plugins/lua/rbl.lua | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/plugins/lua/rbl.lua b/src/plugins/lua/rbl.lua index fa543e73d..f1c20fa13 100644 --- a/src/plugins/lua/rbl.lua +++ b/src/plugins/lua/rbl.lua @@ -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 -- 2.39.5