From: Vsevolod Stakhov Date: Sat, 22 Jul 2017 10:09:35 +0000 (+0100) Subject: [Feature] Allow to set headers from settings X-Git-Tag: 1.7.0~819 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=55af1d497f8c3302d12a3b0ae7e7baedfe2fb973;p=rspamd.git [Feature] Allow to set headers from settings --- 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