commit 69170b7: [Minor] Multimap: implemented matching authorized user

Pavel Rochnyack pavel2000 at ngs.ru
Fri Nov 22 09:21:07 UTC 2019


Author: Pavel Rochnyack
Date: 2019-11-22 12:15:11 +0700
URL: https://github.com/rspamd/rspamd/commit/69170b751e55c59ccdcce96d11574a0ad4d721c4 (refs/pull/3158/head)

[Minor] Multimap: implemented matching authorized user

---
 src/plugins/lua/multimap.lua | 7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/src/plugins/lua/multimap.lua b/src/plugins/lua/multimap.lua
index 06db71053..3a53d24cb 100644
--- a/src/plugins/lua/multimap.lua
+++ b/src/plugins/lua/multimap.lua
@@ -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,


More information about the Commits mailing list