[X] ... I understand that not following the below instructions will result in immediate closure and/or deletion of my issue.
[X] ... I have understood that this bug report is dedicated for bugs, and not for support-related inquiries.
[X] ... I have understood that answers are voluntary and community-driven, and not commercial support.
[X] ... I have verified that my issue has not been already answered in the past. I also checked previous issues.
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:
1. go into the mailcow web interface and add a domain wide footer to one domain
2. send an email with an attachment
3. open the sent email in a Mail-Reader like FairEmail or Apple Mail (Thunderbird is able to parse the mail)
4. recognize that the attachment wont be displayed
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: