diff options
author | Tobias Mädel <t.maedel@alfeld.de> | 2021-01-14 15:29:01 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-01-14 15:29:01 +0100 |
commit | c562c27e0c8a48b6838d9b08a06cdebf7959d547 (patch) | |
tree | 714403ab525d6b571e499899be2b7918e463c06d /src/plugins | |
parent | 7de0d515d16928d6dbdaa3965a54626f4b38d815 (diff) | |
download | rspamd-c562c27e0c8a48b6838d9b08a06cdebf7959d547.tar.gz rspamd-c562c27e0c8a48b6838d9b08a06cdebf7959d547.zip |
[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.
Diffstat (limited to 'src/plugins')
-rw-r--r-- | src/plugins/lua/milter_headers.lua | 8 |
1 files changed, 4 insertions, 4 deletions
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 |