public
nobgit
read
NobMail
Based on mailcow: dockerized
Languages
Repository composition by tracked source files.
PHP
49%
JavaScript
35%
HTML
9%
CSS
4%
Shell
2%
Python
1%
Lua
0%
Perl
0%
Ruby
0%
SCSS
0%
Create file
Wiki Documentation
Clone
https://nobgit.com/orgs/nobgit/nobmail.git
ssh://[email protected]:2222/orgs/nobgit/nobmail.git
Commit
[Rspamd] workaround - remove "--\x0D\x0A" prefix from rewritten cts
8ba1e1ba
data/conf/rspamd/lua/rspamd.local.lua | 22 +++++++++++++---------
1 file changed, 13 insertions(+), 9 deletions(-)
Diff
diff --git a/data/conf/rspamd/lua/rspamd.local.lua b/data/conf/rspamd/lua/rspamd.local.lua
index acc40559..c255ea8a 100644
--- a/data/conf/rspamd/lua/rspamd.local.lua
+++ b/data/conf/rspamd/lua/rspamd.local.lua
@@ -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