Open daschr opened 5 months ago
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs.
@FreddleSpl0it Can you look at this?
@daschr Can you give me the same e-mail once with footer and once without footer as .eml? So that I can see what exactly is going wrong.
Hi. Let me add the emails. In eml.zip - two letters. With and without footer. And two screenshots in the screen.zip how these emails are seen by MS Outlook.
Contribution guidelines
I've found a bug and checked that ...
Description
Adding a domain wide footer leads to broken attachments due to misplacement of the closing delimiter of the text body (below the attachment).
See https://gist.github.com/daschr/62b89f81a64c4b286f3eb12a8f785d97 In the
test.eml
the closing tag (----==_mimepart_66600c884d7d2_12466c31756--
) is below the attachment and before the closing boundary delimiter of the attachment. This leads to that some E-Mail Clients (FairEmail, the MacOS one, and email parsers like https://github.com/stalwartlabs/mail-parser) are unable to parse the mail correctly and do not recognize the attachment.However, if one puts the closing boundary delimiter of the body before the attachment boundary delimiter (see
test-fixed.eml
), the mail can be correctly displayed.Here is the diff between the original and fixed email:
Logs:
Steps to reproduce:
Which branch are you using?
master
Which architecture are you using?
x86
Operating System:
Debian GNU/Linux 11 (bullseye)
Server/VM specifications:
90G RAM, 12 Cores
Is Apparmor, SELinux or similar active?
yes
Virtualization technology:
KVM
Docker version:
20.10.5+dfsg1, build 55c4c88
docker-compose version or docker compose version:
v2.12.2
mailcow version:
2024-04
Reverse proxy:
Nginx
Logs of git diff:
Logs of iptables -L -vn:
Logs of ip6tables -L -vn:
Logs of iptables -L -vn -t nat:
Logs of ip6tables -L -vn -t nat:
DNS check: