Bug 13040

Summary: Mail messages sent by IPFire for testmail and wio cause email clients to show attachment icon
Product: IPFire Reporter: Adolf Belka <adolf.belka>
Component: ---Assignee: Adolf Belka <adolf.belka>
Status: CLOSED FIXED QA Contact:
Severity: Aesthetic Issue    
Priority: Will affect an average number of users CC: michael.tremer, peter.mueller
Version: 2   
Hardware: all   
OS: Unspecified   

Description Adolf Belka 2023-02-20 14:04:54 UTC
The MIME type multipart/mixed is used for the mail messages used in mail.cgi, wio-lib.pl and acct.pl

Clients such as Thunderbird, Outlook and Roundcube look at the Content-Type multipart/mixed and treat this as meaning that an attachment is provided even when there is no Disposition attachment in the email source.

RFC1341 does not indicate that multipart/mixed means an attachment is attached, only that there are different sections containing different content types.

Therefore the use of multipart/mixed in IPFire is not incorrect but in many email clients it results in messages being flagged as having attachments when they don't.
Comment 1 Adolf Belka 2023-02-20 14:10:55 UTC
acct.pl sends a pdf attachment with its messages therefore this must stay with multipart/mixed.

mail.cgi and wio-lib.pl only send a single text message with no attachments or separate sections of different content.

These two usages, if changed to multipart/alternative stop Thunderbird or Roundcube from showing the attachment icon with those messages.

I have tested this change out and confirmed that changing from multipart/mixed to multipart/alternativce for these two usages fixes the problem of the attachment icon being shown in Thunderbird or Roundcube.
Comment 2 Michael Tremer 2023-02-20 14:12:20 UTC
Oh sorry for being too fast with assigning this to someone :)
Comment 3 Adolf Belka 2023-02-20 16:33:56 UTC
Bug fix created and tested out. Changed multipart/mixed to multipart/alternative in mail.cgi and wio-lib.pl

Patches submitted to dev mailing list and patchwork.

https://lists.ipfire.org/pipermail/development/2023-February/015469.html
https://lists.ipfire.org/pipermail/development/2023-February/015470.html

https://patchwork.ipfire.org/project/ipfire/list/?series=3408
Comment 6 Adolf Belka 2023-03-21 22:14:02 UTC
This has been tested on my vm testbed with CU174 Testing. Sending a test email from the Mail Service page in the WUI no longer results in an attachment icon being shown for the message.

This confirms that the bug has been fixed.