Open Bug 1367973 Opened 7 years ago Updated 8 months ago

Some attachments appear in the message source but do not displayed as such. Make TB more tolerant to incorrect MIME structure: multipart/alternative where last part is a PDF attachment.

Categories

(MailNews Core :: MIME, defect)

defect

Tracking

(Not tracked)

People

(Reporter: david, Unassigned)

References

(Blocks 2 open bugs)

Details

Attachments

(1 file)

11.68 KB, application/mbox
Details
Attached file Test
User Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/58.0.3029.110 Safari/537.36

Steps to reproduce:

I received an email from a government department for which the attachment was not visible, but it is visible in other email clients.

The easiest way to reproduce this is to attach a complete mail folder file to this defect, which I will do.  I've stripped the mail headers down and replaced the contents.

Copy the attached file into your folders directory and restart Thunderbird, then open the single email in the folder and try to view the attachment that is contained there.


Actual results:

Email attachment is not visible.


Expected results:

The attachment should have been visible.
Sadly the e-mail sent by the government department has an incorrect MIME structure. The content type multipart/alternative is wrong, it should be multipart/mixed. Edit the message/mailbox and you will see that the attachment is detected.

All I can suggest is to set the preference mailnews.display.show_all_body_parts_menu to true
(Tools > Options, Advanced, General, Config Editor) and then under "View > Message Body As" you can view all body parts including the attachment.

Instead of marking the bug "invalid", I'll make it an enhancement, but there is little chance that this will be actioned any time soon. I checked in TB 45 and the behaviour is just the same.

Please contact the (Australian?) government department and tell them not to waste taxpayers money by sending invalid messages, greetings from an Ozzie ex-pat.
Severity: normal → enhancement
Summary: Some attachments appear in the message source but do not show as attachments in Thunderbird at all → Some attachments appear in the message source but do not show as attachments in Thunderbird at all - Make TB more tolerant to incorrect MIME structure: multipart/alternative where last part is a PDF attachment
Component: Untriaged → MIME
Product: Thunderbird → MailNews Core
Version: 52 Branch → 52
Isn't this a duplicate of bug 1362539?
Summary: Some attachments appear in the message source but do not show as attachments in Thunderbird at all - Make TB more tolerant to incorrect MIME structure: multipart/alternative where last part is a PDF attachment → Some attachments appear in the message source but do not displayed as such. Make TB more tolerant to incorrect MIME structure: multipart/alternative where last part is a PDF attachment.
(In reply to Wayne Mery (:wsmwk, NI for questions) from comment #2)
> Isn't this a duplicate of bug 1362539?
No ... and yes in a way, but no. You can do bad MIME structure in many different ways, so these two bugs cover two different cases. In fact, the MIME structure in bug 1362539 is not even incorrect, but the users wants us to treat that "unfortunate" case better.

In the end, neither of those bugs will ever get fixed since we only touch MIME code under extreme duress due to the absolutely high regression risk (as recent regressions in TB 52 show). So there is no way we will change code for these enhancements.

Maybe in TB Mark 2 this might be taken into account. I'm collecting all those bugs giving them a summary of "Make TB more tolerant to incorrect MIME structure".
Thanks for making the distinction
Status: UNCONFIRMED → NEW
Ever confirmed: true
See Also: → 1362539
Attachments sent by Twitter are also affected. Do we have a contact there to report the problem?
Version: 52 → Trunk

This broken structure is used by one of the major banks in Sweden for their automated invoices, which unfortunately means that the most important of the mail is missing. I've reported it to them but I doubt they'll fix it as they'll likely (incorrectly) conclude it's a bug in Thunderbird as "it works for everyone else".

This is the MIME structure of this mail:

Content-Type: multipart/alternative;
 boundary="--==_mimepart_607445c4c86f8_e94214bbc411411310";
 charset=UTF-8
Content-Transfer-Encoding: 7bit


----==_mimepart_607445c4c86f8_e94214bbc411411310
Content-Type: text/plain;
 charset=UTF-8
Content-Transfer-Encoding: quoted-printable

...

----==_mimepart_607445c4c86f8_e94214bbc411411310
Content-Type: text/html;
 charset=UTF-8
Content-Transfer-Encoding: quoted-printable

...

----==_mimepart_607445c4c86f8_e94214bbc411411310
Content-Type: application/octet-stream
Content-Transfer-Encoding: base64
Content-Disposition: attachment;
 filename=Faktura.pdf
Content-ID: <607445c4c9fda_e94214bbc411411455@rbp-postal-app-001.wa.loc.mail>

...

----==_mimepart_607445c4c86f8_e94214bbc411411310--

This is an issue also for me on Thunderbird 102.2.1: emails from the Italian Tax Authority with important PDF attachments are sent as "Content-Type: multipart/alternative" and the attachments are not displayed in Thunderbird, even though the webmail (Roundcube in my case) shows them correctly. So luckily there are easy workarounds, i.e. just open the mail elsewhere if you know it has attachments, but this is annoying nevertheless.

Severity: normal → S3

What is the current status of these things? Has the MIME parsing been improved so that it is no longer so fragile?

I just tested the "Test" folder [attached to the defect] and nothing has changed. No attachment is visible with it.

I can confirm this bug for Thunderbird 102.15.0 (64-bit) running on Linux (newly installed Linux Mint 21.3).

Both Apple Mail and Microsoft Exchange produce double MIME boundaries. Thunderbird should be more tolerant with handling incorrect MIME boundaries.

You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: