]> git.ipfire.org Git - thirdparty/rspamd.git/commitdiff
[Minor] Improve addr_parse usage in plugins
authorVsevolod Stakhov <vsevolod@highsecure.ru>
Thu, 22 Dec 2016 23:49:00 +0000 (23:49 +0000)
committerVsevolod Stakhov <vsevolod@highsecure.ru>
Thu, 22 Dec 2016 23:49:00 +0000 (23:49 +0000)
src/plugins/lua/multimap.lua

index 9947fb9175618b921f1acc8c8761f2e269847a98..5b32343b719645e8a425d83072e9738f2d6d5ba2 100644 (file)
@@ -177,22 +177,22 @@ end
 
 local function apply_addr_filter(task, filter, input, rule)
   if filter == 'email:addr' or filter == 'email' then
-    local addr = util.parse_mail_address(input)
+    local addr = util.parse_mail_address(input, task:get_mempool())
     if addr and addr[1] then
       return addr[1]['addr']
     end
   elseif filter == 'email:user' then
-    local addr = util.parse_mail_address(input)
+    local addr = util.parse_mail_address(input, task:get_mempool())
     if addr and addr[1] then
       return addr[1]['user']
     end
   elseif filter == 'email:domain' then
-    local addr = util.parse_mail_address(input)
+    local addr = util.parse_mail_address(input, task:get_mempool())
     if addr and addr[1] then
       return addr[1]['domain']
     end
   elseif filter == 'email:name' then
-    local addr = util.parse_mail_address(input)
+    local addr = util.parse_mail_address(input, task:get_mempool())
     if addr and addr[1] then
       return addr[1]['name']
     end