aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorVsevolod Stakhov <vsevolod@highsecure.ru>2018-12-27 10:54:00 +0000
committerVsevolod Stakhov <vsevolod@highsecure.ru>2018-12-27 10:54:00 +0000
commit4c9f28da7bf34e49d833990cb9560a26171cdc2d (patch)
treef361a3ff7b83a86fa14d407dc7fb20d40500ec0e
parent7ccec2afee518dc4ee4765f2b6a5b45d525fab98 (diff)
downloadrspamd-4c9f28da7bf34e49d833990cb9560a26171cdc2d.tar.gz
rspamd-4c9f28da7bf34e49d833990cb9560a26171cdc2d.zip
[Minor] Milter_headers: Allow to set routines in milter_headers config
Issue: #2698 Closes: #2698
-rw-r--r--src/plugins/lua/milter_headers.lua6
1 files 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')