From: Andrew Lewis Date: Sat, 24 Jun 2017 11:18:48 +0000 (+0200) Subject: [Feature] Milter headers: remove-header routine X-Git-Tag: 1.6.2~82 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=b08cb355816d56329343d3b8db7042d5067ec6aa;p=rspamd.git [Feature] Milter headers: remove-header routine --- diff --git a/src/plugins/lua/milter_headers.lua b/src/plugins/lua/milter_headers.lua index bdf246a5a..4ee674ddc 100644 --- a/src/plugins/lua/milter_headers.lua +++ b/src/plugins/lua/milter_headers.lua @@ -35,6 +35,9 @@ local settings = { authenticated_headers = {}, extended_headers_rcpt = {}, routines = { + ['remove-header'] = { + remove = 1, + }, ['x-spamd-result'] = { header = 'X-Spamd-Result', remove = 1, @@ -196,6 +199,13 @@ local function milter_headers(task) end end + routines['remove-header'] = function() + if skip_wanted('remove-header') then return end + if settings.routines['remove-header'].header and settings.routines['x-rspamd-server'].remove then + remove[settings.routines['remove-header'].header] = settings.routines['remove-header'].remove + end + end + routines['x-rspamd-server'] = function() if skip_wanted('x-rspamd-server') then return end if settings.routines['x-rspamd-server'].remove then