summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--rules/forwarding.lua6
1 files changed, 4 insertions, 2 deletions
diff --git a/rules/forwarding.lua b/rules/forwarding.lua
index c5ac81c52..dfd197b50 100644
--- a/rules/forwarding.lua
+++ b/rules/forwarding.lua
@@ -16,6 +16,8 @@ limitations under the License.
-- Rules to detect forwarding
+local rspamd_util = require "rspamd_util"
+
rspamd_config.FWD_GOOGLE = {
callback = function (task)
if not (task:has_from(1) and task:has_recipients(1)) then
@@ -135,9 +137,9 @@ rspamd_config.FORWARDED = {
addr = normalize_addr(addr)
matches = matches + 1
-- Check that it doesn't match the envrcpt
- if addr ~= envrcpts[1].addr:lower() then
+ if not rspamd_util.strequal_caseless(addr, envrcpts[1].addr) then
-- Check for mailing-lists as they will have the same signature
- if matches < 2 and lu and to and to[1].addr:lower() == addr then
+ if matches < 2 and lu and to and rspamd_util.strequal_caseless(to[1].addr, addr) then
return false
else
return true, 1.0, addr