Skip to content

Commit

Permalink
[Minor] Remove all headers with the specific name, not just the first…
Browse files Browse the repository at this point in the history
… one
  • Loading branch information
vstakhov committed Feb 13, 2019
1 parent 9389d49 commit ebe42b7
Showing 1 changed file with 13 additions and 13 deletions.
26 changes: 13 additions & 13 deletions src/plugins/lua/milter_headers.lua
Expand Up @@ -43,35 +43,35 @@ local settings = {
},
['add-headers'] = {
headers = {},
remove = 1,
remove = 0,
},
['remove-header'] = {
remove = 1,
remove = 0,
},
['x-spamd-result'] = {
header = 'X-Spamd-Result',
remove = 1,
remove = 0,
stop_chars = ' '
},
['x-rspamd-server'] = {
header = 'X-Rspamd-Server',
remove = 1,
remove = 0,
},
['x-rspamd-queue-id'] = {
header = 'X-Rspamd-Queue-Id',
remove = 1,
remove = 0,
},
['remove-spam-flag'] = {
header = 'X-Spam',
},
['spam-header'] = {
header = 'Deliver-To',
value = 'Junk',
remove = 1,
remove = 0,
},
['x-virus'] = {
header = 'X-Virus',
remove = 1,
remove = 0,
status_clean = nil,
status_infected = nil,
status_fail = nil,
Expand All @@ -83,20 +83,20 @@ local settings = {
positive = '+',
negative = '-',
neutral = '/',
remove = 1,
remove = 0,
},
['x-spam-level'] = {
header = 'X-Spam-Level',
char = '*',
remove = 1,
remove = 0,
},
['x-spam-status'] = {
header = 'X-Spam-Status',
remove = 1,
remove = 0,
},
['authentication-results'] = {
header = 'Authentication-Results',
remove = 1,
remove = 0,
spf_symbols = {
pass = 'R_SPF_ALLOW',
fail = 'R_SPF_FAIL',
Expand Down Expand Up @@ -127,7 +127,7 @@ local settings = {
},
['stat-signature'] = {
header = 'X-Stat-Signature',
remove = 1,
remove = 0,
},
['fuzzy-hashes'] = {
header = 'X-Rspamd-Fuzzy',
Expand Down Expand Up @@ -353,7 +353,7 @@ local function milter_headers(task)
end

routines['remove-spam-flag'] = function()
remove[settings.routines['remove-spam-flag'].header] = 1
remove[settings.routines['remove-spam-flag'].header] = 0
end

routines['x-virus'] = function()
Expand Down

0 comments on commit ebe42b7

Please sign in to comment.