]> source.dussan.org Git - rspamd.git/commitdiff
[Feature] Allow to set rewrite subject pattern from settings
authorVsevolod Stakhov <vsevolod@highsecure.ru>
Tue, 26 Feb 2019 12:25:12 +0000 (12:25 +0000)
committerVsevolod Stakhov <vsevolod@highsecure.ru>
Tue, 26 Feb 2019 12:25:12 +0000 (12:25 +0000)
Issue: #2766
Closes: #2766
src/plugins/lua/settings.lua

index 8d2122868e878cf47a42e67c23c657026ce254ef..4e7afbf8426e445a7706787f3caa3bbb54e1cf79 100644 (file)
@@ -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