commit c562c27: [Fix] #3400 milter_headers: fix inverted logic for extended_headers_rcpt
GitHub
noreply at github.com
Thu Jan 14 15:28:06 UTC 2021
Author: Tobias Mädel
Date: 2021-01-14 15:29:01 +0100
URL: https://github.com/rspamd/rspamd/commit/c562c27e0c8a48b6838d9b08a06cdebf7959d547 (refs/pull/3607/head)
[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(-)
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
More information about the Commits
mailing list