summaryrefslogtreecommitdiffstats
path: root/rules/misc.lua
diff options
context:
space:
mode:
authorVsevolod Stakhov <vsevolod@highsecure.ru>2018-03-31 17:48:50 +0100
committerVsevolod Stakhov <vsevolod@highsecure.ru>2018-03-31 17:48:50 +0100
commit51e2a8c05682c0bbbfb940681bf12b93b4719f7f (patch)
treedc04847adb8be1be153f681344d924c5feb0b551 /rules/misc.lua
parent7c09818f4165382cbd65a6a33b655a2def0ffc65 (diff)
downloadrspamd-51e2a8c05682c0bbbfb940681bf12b93b4719f7f.tar.gz
rspamd-51e2a8c05682c0bbbfb940681bf12b93b4719f7f.zip
[Fix] Fix usage of util.parse_mail_address
Diffstat (limited to 'rules/misc.lua')
-rw-r--r--rules/misc.lua4
1 files changed, 2 insertions, 2 deletions
diff --git a/rules/misc.lua b/rules/misc.lua
index 9d6cd01c2..f4591c9a2 100644
--- a/rules/misc.lua
+++ b/rules/misc.lua
@@ -487,7 +487,7 @@ local check_from_display_name = rspamd_config:register_symbol{
local from = task:get_from(2)
if not (from and from[1] and from[1].name) then return false end
-- See if we can parse an email address from the name
- local parsed = util.parse_mail_address(from[1].name)
+ local parsed = util.parse_mail_address(from[1].name, task:get_mempool())
if not parsed then return false end
if not (parsed[1] and parsed[1]['addr']) then return false end
-- Make sure we did not mistake e.g. <something>@<name> for an email address
@@ -567,7 +567,7 @@ rspamd_config.SPOOF_REPLYTO = {
end
if not found_fromdom then return false end
-- Parse Reply-To header
- local parsed = ((util.parse_mail_address(rt) or E)[1] or E).domain
+ local parsed = ((util.parse_mail_address(rt, task:get_mempool()) or E)[1] or E).domain
if not parsed then return false end
-- Reply-To domain must be different to From domain
if not util.strequal_caseless(parsed, from[1].domain) then