diff options
author | Andrew Lewis <nerf@judo.za.org> | 2017-02-13 18:45:02 +0200 |
---|---|---|
committer | Andrew Lewis <nerf@judo.za.org> | 2017-02-13 18:45:02 +0200 |
commit | 28d3143551376428e17505ddbd43326662445734 (patch) | |
tree | 9ee77ab58859780b2285cfe85241a02a359273fd /src/plugins/lua | |
parent | b031412b168dd53c26948bc559d7b47ed679c06b (diff) | |
download | rspamd-28d3143551376428e17505ddbd43326662445734.tar.gz rspamd-28d3143551376428e17505ddbd43326662445734.zip |
[Minor] Filter artificial Received header in multimap by default
- Also filter headers in CHECK_RECEIVED rule
Diffstat (limited to 'src/plugins/lua')
-rw-r--r-- | src/plugins/lua/multimap.lua | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/plugins/lua/multimap.lua b/src/plugins/lua/multimap.lua index bdd9d3069..5afada789 100644 --- a/src/plugins/lua/multimap.lua +++ b/src/plugins/lua/multimap.lua @@ -712,6 +712,11 @@ local function multimap_callback(task, rule) received = function() local hdrs = task:get_received_headers() if hdrs and hdrs[1] then + if not rule['artificial'] then + hdrs = fun.filter(function(h) + return not h['artificial'] + end, hdrs):totable() + end for pos, h in ipairs(hdrs) do match_received_header(rule, pos, #hdrs, h) end |