Skip to content

Commit

Permalink
Merge pull request #5546 from mailcow/fix/domain-wide-footer
Browse files Browse the repository at this point in the history
Fix: Domain Wide Disclaimer breaks attachments visualization on Gmail and Outlook #5529
  • Loading branch information
DerLinkman authored Nov 21, 2023
2 parents f55c3c0 + 8ba1e1b commit 3b3c2b7
Showing 1 changed file with 13 additions and 9 deletions.
22 changes: 13 additions & 9 deletions data/conf/rspamd/lua/rspamd.local.lua
Original file line number Diff line number Diff line change
Expand Up @@ -631,15 +631,19 @@ rspamd_config:register_symbol({
end
local out_parts = {}
for _,o in ipairs(out) do
if type(o) ~= 'table' then
out_parts[#out_parts + 1] = o
out_parts[#out_parts + 1] = newline_s
else
out_parts[#out_parts + 1] = o[1]
if o[2] then
out_parts[#out_parts + 1] = newline_s
end
end
if type(o) ~= 'table' then
out_parts[#out_parts + 1] = o
out_parts[#out_parts + 1] = newline_s
else
local removePrefix = "--\x0D\x0AContent-Type"
if string.lower(string.sub(tostring(o[1]), 1, string.len(removePrefix))) == string.lower(removePrefix) then
o[1] = string.sub(tostring(o[1]), string.len("--\x0D\x0A") + 1)
end
out_parts[#out_parts + 1] = o[1]
if o[2] then
out_parts[#out_parts + 1] = newline_s
end
end
end
task:set_message(out_parts)
else
Expand Down

0 comments on commit 3b3c2b7

Please sign in to comment.