Skip to content

Commit

Permalink
Merge pull request #5221 from mailcow/fix/dot-stuffing-bcc
Browse files Browse the repository at this point in the history
[Rspamd] add dot-stuffing to bcc forwarding
  • Loading branch information
FreddleSpl0it authored Jul 10, 2023
2 parents da8e496 + 97a492b commit a0723f6
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions data/conf/rspamd/lua/rspamd.local.lua
Original file line number Diff line number Diff line change
Expand Up @@ -340,15 +340,19 @@ rspamd_config:register_symbol({
if not bcc_dest then
return -- stop
end
-- dot stuff content before sending
local email_content = tostring(task:get_content())
email_content = string.gsub(email_content, "\r\n%.", "\r\n..")
-- send mail
lua_smtp.sendmail({
task = task,
host = os.getenv("IPV4_NETWORK") .. '.253',
port = 591,
from = task:get_from(stp)[1].addr,
recipients = bcc_dest,
helo = 'bcc',
timeout = 10,
}, task:get_content(), sendmail_cb)
timeout = 20,
}, email_content, sendmail_cb)
end

-- determine from
Expand Down

0 comments on commit a0723f6

Please sign in to comment.