]> git.ipfire.org Git - thirdparty/rspamd.git/commitdiff
[Minor] Multimap: implemented matching authorized user 3158/head
authorPavel Rochnyack <pavel2000@ngs.ru>
Fri, 22 Nov 2019 05:15:11 +0000 (12:15 +0700)
committerPavel Rochnyack <pavel2000@ngs.ru>
Fri, 22 Nov 2019 05:15:11 +0000 (12:15 +0700)
src/plugins/lua/multimap.lua

index 06db71053ee8623c46c975051fc2038f0f2b8c12..3a53d24cb0fce6646a6695448a8aece181d79a1c 100644 (file)
@@ -866,6 +866,12 @@ local function multimap_callback(task, rule)
         end
       end
     end,
+    user = function()
+      local user = task:get_user()
+      if user then
+        match_rule(rule, user)
+      end
+    end,
     filename = function()
       local parts = task:get_parts()
 
@@ -1037,6 +1043,7 @@ local function add_multimap_rule(key, newrule)
     symbol_options = true,
     filename = true,
     url = true,
+    user = true,
     content = true,
     hostname = true,
     asn = true,