Browse Source

[Fix] Fix FROM_NEQ_ENVFROM

Regression was introduced in 2367506006
tags/2.6
Anton Yuzhaninov 4 years ago
parent
commit
e45b8715fe
1 changed files with 7 additions and 6 deletions
  1. 7
    6
      rules/headers_checks.lua

+ 7
- 6
rules/headers_checks.lua View File

@@ -656,13 +656,14 @@ local check_from_id = rspamd_config:register_symbol{
task:insert_result('FROM_NAME_EXCESS_SPACE', 1.0)
end
end
if (envfrom and envfrom[1] and
util.strequal_caseless(envfrom[1].addr, from[1].addr))
then
task:insert_result('FROM_EQ_ENVFROM', 1.0)

if envfrom then
if util.strequal_caseless(envfrom[1].addr, from[1].addr) then
task:insert_result('FROM_EQ_ENVFROM', 1.0)
elseif envfrom[1].addr ~= '' then
task:insert_result('FROM_NEQ_ENVFROM', 1.0, from[1].addr, envfrom[1].addr)
end
end
elseif (envfrom and envfrom[1] and envfrom[1].addr) then
task:insert_result('FROM_NEQ_ENVFROM', 1.0, ((from or E)[1] or E).addr or '', envfrom[1].addr)
end

local to = task:get_recipients(2)

Loading…
Cancel
Save