Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix: Domain Wide Disclaimer breaks attachments visualization on Gmail and Outlook #5529 #5546

Merged
merged 1 commit into from
Nov 21, 2023

Conversation

FreddleSpl0it
Copy link
Collaborator

When Rspamd function lua_mime.add_text_footer(task, html_footer, text_footer) (https://rspamd.com/doc/lua/lua_mime.html#fa3d82) adds the Domain Wide Disclaimer, it will return new content types for rewriting. These new content types are somehow prefixed with "--\x0D\x0A" which breaks attachments visualization on Gmail and Outlook.
This PR will remove the prefix before rewriting the content type as a workaround.

@DerLinkman DerLinkman merged commit 3b3c2b7 into staging Nov 21, 2023
2 checks passed
@DerLinkman DerLinkman deleted the fix/domain-wide-footer branch November 21, 2023 09:01
Copy link

@thomisus thomisus left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Unfortunately, this fix introduce another bug.
Domain Wide Disclaimer now is "inline" with message instead of on a new line.
At least it should be after a new blank line .

@thomisus
Copy link

Actually, the domain wide disclaimer is added outside <html></html> tags, so it result displayed inline instead of on a new line.

@FreddleSpl0it
Copy link
Collaborator Author

Domain Wide Disclaimer now is "inline" with message instead of on a new line.

This was also the case before the fix. I'm not sure if this is a big problem. You can add a newline for plain text or a <br> for html at the beginning.

Actually, the domain-wide disclaimer is added outside the tags, so it ends up being displayed inline instead of on a new line.

This is how the Rspamd function behaves (https://rspamd.com/doc/lua/lua_mime.html#fa3d82), and unfortunately, I can't fix this.

@thomisus
Copy link

thomisus commented Nov 24, 2023

It's not a big problem I think, but to be 100% correct footer should be inside <html></html> tags.
Maybe this is a bug in raspamd and not in mailcow.

Best regards

------=_=-_OpenGroupware_org_NGMime-66-1700652219.440647-1------
Content-Type: text/html; charset=utf-8
Content-Transfer-Encoding: 7bit

<html>test</html>

<br>
<br/>
FOOTER

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants