commit 83e473f: [Feature] Allow to set rewrite subject pattern from settings

Vsevolod Stakhov vsevolod at highsecure.ru
Tue Feb 26 12:28:03 UTC 2019


Author: Vsevolod Stakhov
Date: 2019-02-26 12:25:12 +0000
URL: https://github.com/rspamd/rspamd/commit/83e473fa183b66e75443591e9f897b06db549622 (HEAD -> master)

[Feature] Allow to set rewrite subject pattern from settings
Issue: #2766
Closes: #2766

---
 src/plugins/lua/settings.lua | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/src/plugins/lua/settings.lua b/src/plugins/lua/settings.lua
index 8d2122868..4e7afbf84 100644
--- a/src/plugins/lua/settings.lua
+++ b/src/plugins/lua/settings.lua
@@ -78,6 +78,10 @@ local function apply_settings(task, to_apply)
               to_apply.symbols))
     end
   end
+
+  if to_apply.subject then
+    task:set_metric_subject(to_apply.subject)
+  end
 end
 
 -- Checks for overridden settings within query params and returns 'true' if


More information about the Commits mailing list