commit 4c9f28d: [Minor] Milter_headers: Allow to set routines in milter_headers config

Vsevolod Stakhov vsevolod at highsecure.ru
Thu Dec 27 18:28:15 UTC 2018


Author: Vsevolod Stakhov
Date: 2018-12-27 10:54:00 +0000
URL: https://github.com/rspamd/rspamd/commit/4c9f28da7bf34e49d833990cb9560a26171cdc2d

[Minor] Milter_headers: Allow to set routines in milter_headers config
Issue: #2698
Closes: #2698

---
 src/plugins/lua/milter_headers.lua | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/src/plugins/lua/milter_headers.lua b/src/plugins/lua/milter_headers.lua
index 7659a3fe6..037a0fa13 100644
--- a/src/plugins/lua/milter_headers.lua
+++ b/src/plugins/lua/milter_headers.lua
@@ -519,7 +519,7 @@ local function milter_headers(task)
   end
 end
 
-local config_schema = ts.shape{
+local config_schema = ts.shape({
   use = ts.array_of(ts.string) + ts.string / function(s) return {s} end,
   remove_upstream_spam_flag = ts.boolean:is_optional(),
   extended_spam_headers = ts.boolean:is_optional(),
@@ -530,7 +530,9 @@ local config_schema = ts.shape{
   extended_headers_rcpt =
       (ts.array_of(ts.string) + ts.string / function(s) return {s} end):is_optional(),
   custom = ts.map_of(ts.string, ts.string):is_optional(),
-}
+}, {
+  extra_fields = ts.map_of(ts.string, ts.any)
+})
 
 local opts = rspamd_config:get_all_opt(N) or
              rspamd_config:get_all_opt('rmilter_headers')


More information about the Commits mailing list