commit f92d884: [Minor] forged_recipients: fix for uppercase RFC5321.MailFrom domain
Anton Yuzhaninov
citrin+git at citrin.ru
Sat Oct 31 20:49:06 UTC 2020
Author: Anton Yuzhaninov
Date: 2020-10-30 17:44:22 +0000
URL: https://github.com/rspamd/rspamd/commit/f92d884a1a12b7dbe3ada416734697b7e83aeda5 (refs/pull/3537/head)
[Minor] forged_recipients: fix for uppercase RFC5321.MailFrom domain
If RFC5321.MailFrom has an address with uppercase domain following error
happens:
/usr/share/rspamd/plugins/forged_recipients.lua:129: attempt to index a nil value; trace: [1]:{/usr/share/rspamd/plugins/forged_recipients.lua:129 - <unknown> [Lua]};
Lowercase a domain.
---
src/plugins/lua/forged_recipients.lua | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/plugins/lua/forged_recipients.lua b/src/plugins/lua/forged_recipients.lua
index 4f7942f79..de5ceb87d 100644
--- a/src/plugins/lua/forged_recipients.lua
+++ b/src/plugins/lua/forged_recipients.lua
@@ -126,7 +126,7 @@ local function check_forged_headers(task)
end
for _,smtp_rcpt in ipairs(smtp_rcpts) do
if not smtp_rcpt.matched then
- if not smtp_rcpt_domain_map[smtp_rcpt.domain]._seen_mime_domain then
+ if not smtp_rcpt_domain_map[smtp_rcpt.domain:lower()]._seen_mime_domain then
seen_smtp_unmatched = true
table.insert(opts, 's:' .. smtp_rcpt.addr)
end
More information about the Commits
mailing list