shaneodoo
I tried to patch the current running stable version as descripted above. Still the same bug.
Just for clarification, I edited “mailcow-dockerized/data/conf/rspamd/lua/rspamd.local.luca”.
Somewhere below line 600 I did have the – add footer. There I replaced everything in the function "local function rewrite with your patch/code from above:
local function rewrite_ct_cb(name, hdr)
if rewrite.need_rewrite_ct then
if name:lower() == 'content-type' then
-- NEW: include boundary if present
local boundary_part = rewrite.new_ct.boundary and
string.format('; boundary="%s"', rewrite.new_ct.boundary) or ''
local nct = string.format('%s: %s/%s; charset=utf-8%s',
'Content-Type', rewrite.new_ct.type, rewrite.new_ct.subtype, boundary_part)
out[#out + 1] = nct
-- update Content-Type header (include boundary if present)
task:set_milter_reply({
remove_headers = {['Content-Type'] = 0},
})
task:set_milter_reply({
add_headers = {['Content-Type'] = string.format('%s/%s; charset=utf-8%s',
rewrite.new_ct.type, rewrite.new_ct.subtype, boundary_part)}
})
return
elseif name:lower() == 'content-transfer-encoding' then
out[#out + 1] = string.format('%s: %s',
'Content-Transfer-Encoding', 'quoted-printable')
-- update Content-Transfer-Encoding header
task:set_milter_reply({
remove_headers = {['Content-Transfer-Encoding'] = 0},
})
task:set_milter_reply({
add_headers = {['Content-Transfer-Encoding'] = 'quoted-printable'}
})
seen_cte = true
return
end
end
out[#out + 1] = hdr.raw:gsub('\r?\n?$', '')
end
… the next line after the exchanged function is task:headers_foreach(rewrite….) which I left untouched.
Next I did restart the container (and even the whole Server) with:
docker compose restart rspamd-mailcow
Now I replied to a mail and attached for example a second pdf file, the receiver does not see it (although it is as mentioned above in the raw data of the mail).
Did I miss something?
In gerneral I do wonder that anyone can use Mailcow with this bug - it makes the product unusable :-) Since I am new to mailcow I am not the one to decide, but I would raise it to create a Hotfix ASAP.
I for now decided to Set “Ignore footer on reply e-mails:”, but this is of course just a temporarly solution.
PS: I appriciate the work in this community, not to missunderstand me. Mailcow in general comes close to perfection.
Regards, Jens