aboutsummaryrefslogtreecommitdiffstats
path: root/src/plugins
diff options
context:
space:
mode:
authorVsevolod Stakhov <vsevolod@highsecure.ru>2021-01-18 16:13:10 +0000
committerGitHub <noreply@github.com>2021-01-18 16:13:10 +0000
commit40698f757d9c0b34fd45f4b688b17e213a187a2b (patch)
tree5f4afc62599b093979fc053ef586c1ddc60a5c44 /src/plugins
parent0e453e750e4fb71f1385dc50ace56e0907459c93 (diff)
parent480bfebb1326bdc8dab0b8f0ff5c2103a593fd11 (diff)
downloadrspamd-40698f757d9c0b34fd45f4b688b17e213a187a2b.tar.gz
rspamd-40698f757d9c0b34fd45f4b688b17e213a187a2b.zip
Merge pull request #3610 from Manawyrm/master
[Minor] milter_headers: new option skip_all
Diffstat (limited to 'src/plugins')
-rw-r--r--src/plugins/lua/milter_headers.lua10
1 files changed, 9 insertions, 1 deletions
diff --git a/src/plugins/lua/milter_headers.lua b/src/plugins/lua/milter_headers.lua
index e88d85b3d..7dd590faa 100644
--- a/src/plugins/lua/milter_headers.lua
+++ b/src/plugins/lua/milter_headers.lua
@@ -35,6 +35,7 @@ local settings = {
remove_upstream_spam_flag = true;
skip_local = true,
skip_authenticated = true,
+ skip_all = false,
local_headers = {},
authenticated_headers = {},
routines = {
@@ -157,6 +158,9 @@ local function milter_headers(task)
return found
end
+ if settings.extended_headers_rcpt and match_extended_headers_rcpt() then
+ return false
+ end
if settings.skip_local and not settings.local_headers[hdr] then
local ip = task:get_ip()
@@ -167,7 +171,7 @@ local function milter_headers(task)
if task:get_user() ~= nil then return true end
end
- if settings.extended_headers_rcpt and not match_extended_headers_rcpt() then
+ if settings.skip_all then
return true
end
@@ -637,6 +641,10 @@ if type(opts['skip_authenticated']) == 'boolean' then
settings.skip_authenticated = opts['skip_authenticated']
end
+if type(opts['skip_all']) == 'boolean' then
+ settings.skip_all = opts['skip_all']
+end
+
for _, s in ipairs(opts['use']) do
if not have_routine[s] then
activate_routine(s)