aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorVsevolod Stakhov <vsevolod@highsecure.ru>2017-07-22 11:09:35 +0100
committerVsevolod Stakhov <vsevolod@highsecure.ru>2017-07-22 11:09:35 +0100
commit55af1d497f8c3302d12a3b0ae7e7baedfe2fb973 (patch)
tree2bd13d8daac03cc6ab1868f4845130508079231c
parentf409a6f3e09a1174606eba7d4927f0cc141380cf (diff)
downloadrspamd-55af1d497f8c3302d12a3b0ae7e7baedfe2fb973.tar.gz
rspamd-55af1d497f8c3302d12a3b0ae7e7baedfe2fb973.zip
[Feature] Allow to set headers from settings
-rw-r--r--src/plugins/lua/settings.lua8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/plugins/lua/settings.lua b/src/plugins/lua/settings.lua
index 54b6d65cd..3e8b6d2af 100644
--- a/src/plugins/lua/settings.lua
+++ b/src/plugins/lua/settings.lua
@@ -83,6 +83,14 @@ local function check_query_settings(task)
local elt = settings_ids[id_str]
if elt and elt['apply'] then
task:set_settings(elt['apply'])
+
+ if elt.apply['add_headers'] or elt.apply['remove_headers'] then
+ local rep = {
+ add_headers = elt.apply['add_headers'] or {},
+ remove_headers = elt.apply['remove_headers'] or {},
+ }
+ task:set_rmilter_reply(rep)
+ end
rspamd_logger.infox(task, "applying settings id %s", id_str)
return true