aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/lua/lua_util.c3
-rw-r--r--src/plugins/lua/emails.lua2
2 files changed, 3 insertions, 2 deletions
diff --git a/src/lua/lua_util.c b/src/lua/lua_util.c
index 64b25c14a..50fa6d397 100644
--- a/src/lua/lua_util.c
+++ b/src/lua/lua_util.c
@@ -183,7 +183,7 @@ LUA_FUNCTION_DEF (util, get_tld);
LUA_FUNCTION_DEF (util, glob);
/***
- * @function util.parse_mail_address(str)
+ * @function util.parse_mail_address(str, pool)
* Parses email address and returns a table of tables in the following format:
*
* - `name` - name of internet address in UTF8, e.g. for `Vsevolod Stakhov <blah@foo.com>` it returns `Vsevolod Stakhov`
@@ -192,6 +192,7 @@ LUA_FUNCTION_DEF (util, glob);
* - `domain` - domain part (if present), e.g. `foo.com`
*
* @param {string} str input string
+ * @param {rspamd_mempool} pool memory pool to use
* @return {table/tables} parsed list of mail addresses
*/
LUA_FUNCTION_DEF (util, parse_mail_address);
diff --git a/src/plugins/lua/emails.lua b/src/plugins/lua/emails.lua
index 12e94a932..f4d95d0ba 100644
--- a/src/plugins/lua/emails.lua
+++ b/src/plugins/lua/emails.lua
@@ -157,7 +157,7 @@ local function gen_check_emails(rule)
local replyto = get_raw_header('Reply-To')
if not replyto then return false end
- local rt = util.parse_mail_address(replyto)
+ local rt = util.parse_mail_address(replyto, task:get_mempool())
if rt and rt[1] then
rspamd_lua_utils.remove_email_aliases(rt[1])