From c562c27e0c8a48b6838d9b08a06cdebf7959d547 Mon Sep 17 00:00:00 2001 From: Tobias Mädel Date: Thu, 14 Jan 2021 15:29:01 +0100 Subject: [Fix] #3400 milter_headers: fix inverted logic for extended_headers_rcpt This commit fixes the inverted logic of skip_wanted/match_extended_headers_rcpt to allow a user to enable extended headers selectively for only a specific set of recipients. --- src/plugins/lua/milter_headers.lua | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'src/plugins') diff --git a/src/plugins/lua/milter_headers.lua b/src/plugins/lua/milter_headers.lua index ec9e2c659..e88d85b3d 100644 --- a/src/plugins/lua/milter_headers.lua +++ b/src/plugins/lua/milter_headers.lua @@ -158,10 +158,6 @@ local function milter_headers(task) 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() if (ip and ip:is_local()) then return true end @@ -171,6 +167,10 @@ 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 + return true + end + return false end -- cgit v1.2.3