aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--rules/misc.lua3
1 files changed, 2 insertions, 1 deletions
diff --git a/rules/misc.lua b/rules/misc.lua
index 7fbd9cf1a..f7b63d3c8 100644
--- a/rules/misc.lua
+++ b/rules/misc.lua
@@ -498,7 +498,8 @@ local check_from_id = rspamd_config:register_callback_symbol('CHECK_FROM', 1.0,
-- Check if FROM == TO
if (#to == 1 and to[1].addr:lower() == from[1].addr:lower()) then
task:insert_result('TO_EQ_FROM', 1.0)
- elseif (#to == 1 and to[1].domain:lower() == from[1].domain:lower()) then
+ elseif (#to == 1 and to[1].domain and from[1].domain and
+ to[1].domain:lower() == from[1].domain:lower()) then
task:insert_result('TO_DOM_EQ_FROM_DOM', 1.0)
end
end