Closed Bug 1733745 Opened 4 years ago Closed 4 years ago

Mime messages not forwarded properly (forward inline as plain text)

Categories

(MailNews Core :: MIME, defect)

defect

Tracking

(Not tracked)

RESOLVED INVALID

People

(Reporter: msbaker, Unassigned)

Details

Attachments

(6 files)

User Agent: Mozilla/5.0 (Windows NT 6.1; Win64; x64; rv:92.0) Gecko/20100101 Firefox/92.0

Steps to reproduce:

Using Thunderbird 78.13.0 (32-bit), the current release update channel, when a mime message is forwarded, the text is no longer formatted with mime encoding. This garbles the view of the message for the recipient of the forwarded email for many email messages encoded in mail.

An example:

The originally received message after headers include the following:

========== EXAMPLE #1 EXCERPT START

This is a multi-part message in MIME format

--_----------=_MCPart_1221199712
Content-Type: text/plain; charset="utf-8"; format="fixed"
Content-Transfer-Encoding: quoted-printable

EV Discounts are here! And we=E2=80=99re excited that our EV Discount Camp=
aign falls right in the middle of National Drive Electric Week

https://drivecleanbayarea.org
https://drivecleanbayarea.org/ev-discount-campaign-engagement-page/

Hello=2C Happy October!
EV Discounts are here! And we=E2=80=99re excited that our EV Discount Camp=
aign (https://drivecleanbayarea.org/ev-discount-campaign-engagement-page/)=
falls right in the middle of National Drive Electric Week when there are=
so many EVents going on throughout the Bay Area - in-person and online. I=
t=E2=80=99s a great time to electrify your ride with an EV so check out th=
e EV discounts and then join us for one of the many events happening throu=
ghout the Bay Area.
REGISTER (https://drivecleanbayarea.org/ev-discount-campaign/)

.....

EXAMPLE #1 EXCERPT END

Actual results:

When the source of the forwarded sent message is viewed or the received message is viewed as message source by the received, the following is seen.

========== FORWARDED EXAMPLE #2 EXCERPT START ===

EV Discount Campaign and Lots of EV Events! EV Discounts are here! And
we’re excited that our EV Discount Campaign falls right in the middle of
National Drive Electric Week
https://drivecleanmarin.us20.list-manage.com/track/click?u=791457b29adf971703ce0f608&id=c424934976&e=427cec27b9

https://drivecleanmarin.us20.list-manage.com/track/click?u=791457b29adf971703ce0f608&id=0e7032df50&e=427cec27b9

Hello, Happy October!
EV Discounts are here! And we’re excited that our EV Discount Campaign
https://drivecleanmarin.us20.list-manage.com/track/click?u=791457b29adf971703ce0f608&id=1532529bc8&e=427cec27b9
falls right in the middle of National Drive Electric Week when there
are so many EVents going on throughout the Bay Area - in-person and
online. It’s a great time to electrify your ride with an EV so check out
the EV discounts and then join us for one of the many events happening
throughout the Bay Area.

REGISTER
https://drivecleanmarin.us20.list-manage.com/track/click?u=791457b29adf971703ce0f608&id=152d1f7659&e=427cec27b9

Expected results:

Note that Thunderbird has removed the mime encoding information which results in many forwarded messages as being almost unintelligible, particularly those with when

Content-Transfer-Encoding: quoted-printable

The expected behavior is that the entire message with mime encoding is sent as the forwarded email.

Forwarded messages used to be sent properly in earlier versions of Thunderbird. so this is a regression in behavior.

NOTE: Properly forwarded email messages area a major troubleshooting tool used by system admins everywhere to troubleshoot email received by users for issues.

The mime block start and end blocks were omitted. Example"

This is a multi-part message in MIME format

--_----------=_MCPart_1221199712
Content-Type: text/plain; charset="utf-8"; format="fixed"
Content-Transfer-Encoding: quoted-printable

Steven, can you please try the current release channel version, Thunderbird 91 (www.thunderbird.net)?
Automatic updates are only enabled a bit later after new release.

Component: Untriaged → MIME
Flags: needinfo?(msbaker)
Product: Thunderbird → MailNews Core
Summary: Thuderbird not forwarding mime messages properly → Mime messages not forwarded properly (involving Content-Transfer-Encoding: quoted-printable?)
Summary: Mime messages not forwarded properly (involving Content-Transfer-Encoding: quoted-printable?) → Mime messages not forwarded properly (fails on UTF8 apostrophy we=E2=80=99re vs. we’re. Involving Content-Transfer-Encoding: quoted-printable?)

In reply to comment 0:

NOTE: Properly forwarded email messages area a major troubleshooting tool used by system admins everywhere to troubleshoot email received by users for issues.

Also Steven, are you aware of the difference between the following?
Right-click on message, Forward as...

  • Inline vs.
  • As attachment

I think you want As attachment, but the default for single messages is Inline. You can change the default, too. Multiple selected messages always get forwarded as attachment.

Please save the message that shows issues when forwarded as .eml file, remove/obfuscate any personal information and then attach it here to the bug for inspection ("Attach new file"). Does the forwarded message look bad/garbled in your Sent folder or did you get feedback from the recipient that it arrived there garbled?

I am adding two attachments.

FILE: Bug17333745-Original_Mail_Message.txt
Contains TEXT of original email message as shown by View->Message Source option. Only a few relevant headers are included to exclude irrelevant private information.

File: Bug17333745-Sent_Forwarded_Mail_Message.txt
Contains TEXT of the forwarded email message as shown by View->Message Source. Only a few relevant headers are included to exclude irrelevant private information.

As you can see, Thunderbird has removed all of the important MIME blocks from the forwarded message and the resulting email received is gibberish to the recipient.

For this mail account I have the following settings for Composition:

unchecked - Compose Messages in HTML format
checked - Automatically quote the original message when replying
When quoting: start my reply above the quote
and place my signature: below the quote (recommended)
checked - Include signature for replies
unchecked - include signature for forwards

Based on previous Thunderbird behavior, the only option that should affect forwarded email is the "include signature for forwards". Thunderbird should not be removing the Mime blocks when forwarding a mail message. I am familiar with the MIME and other Mail RFCs developed by IETF going back to the 1980s.

Forwarded email from users is a feature commonly used by system administrators to troubleshoot email received by users. Also the entire purpose of forwarded email is to forward an email message intact. Forwarded email is also commonly used to quickly and easily send some announcement or information received in email to another email user.

If I make the following change to this mail account setting:
checked - Compose Messages in HTML format
Then forwarding works as expected and the forwarded email message is has all of the MIME blocks.

I consider myself a typical email user and I don't need to author in HTML I'm not an online marketing or advertising firm. Sending email as plain text results in smaller email messages. Composed in HTML, an email message is typically 2-3 times larger than the equivalent plain text message. So all most users do is use more space and fill up their mail storage quicker.

It makes no sense to have to walk a naive email user through changing some account settings before forwarding a message and then changing the settings back afterward.

I am familiar with the option to attach a forwarded message as a file. In my opinion, this is an even worse option. Opening attached files in email messages is a major vector for infecting computer users with viruses and spyware.

Flags: needinfo?(msbaker)

I've imported the original message (attachment 9246333 [details]) and forwarded it as plain text which is what you're doing with "Compose Messages in HTML format" turned off. That works correctly, the result is the same as in the forwarded message you attached (not sure why you have an invalid UTF-8 character in the file you attached, clearly visible with Notepad++). Of course if you forward as plain text, the original MIME structure of the message is not maintained since that is not necessary. You're only forwarding a text part, not two parts as in the original message. You don't need to change settings to use HTML for forwarding, you can just hold down the shift key while clicking on "Forward".

A can't see any encoding issues either, and it works just the same in TB 91. Yes, the message source shows "we’re", but that can be fixed by selecting the correct encoding. (The summary of the bug shouldn't have been changed, so please revert to the original state.)

Overall the report is based on a misunderstanding and is invalid.

Note: Testcase of attachment 9246333 [details] has some extraneous lines on top, ellipses etc. which prevent correct rendering as-is. Removing these and ensuring one blank line after the header make testcase actionable.

As newsfan said in comment 8, nothing wrong when forwarding the testcase.
Testcase1 (attachment 9246333 [details]), forwarded inline as plain text message displays correctly, even when viewed as plain text.
Of course, the source of the forwarded message may have all sorts of weird characters as required by the encoding, but as this screenshot shows, those will render correctly when displayed.

Hey Steven, thanks for your time to report what you believed to be a bug in Thunderbird. Exactly as explained in newsfan's comment 8 (thanks!), and verified by my own tests (see screenshots in comment 9, comment 10), we're not seeing anything wrong here, so indeed, this seems based on a misunderstanding on your side.

If you're still facing challenges, consider asking for support:
https://support.mozilla.org/en-US/questions/new/thunderbird/form

Status: UNCONFIRMED → RESOLVED
Closed: 4 years ago
Resolution: --- → INVALID
Summary: Mime messages not forwarded properly (fails on UTF8 apostrophy we=E2=80=99re vs. we’re. Involving Content-Transfer-Encoding: quoted-printable?) → Mime messages not forwarded properly (forward inline as plain text)

(In reply to newsfan from comment #8)

A can't see any encoding issues either, and it works just the same in TB 91. Yes, the message source shows "we’re", but that can be fixed by selecting the correct encoding.

Screenshot 3: Source of forwarded message displays correctly when viewed with Unicode text encoding

BTW, the bug that "View Source" comes up in the wrong charset is bug 1017768. Also note that switching encoding in the source window in TB 91 is mostly broken, bug 1736248. Repair text encoding in the normal mail window was also broken, bug 1713786, should be fixed in TB 91.3 soon. Should all still work in TB 78.

My expectations based on using email and a variety of email clients for the last 40 years is the following:

  1. When I forward an email, the original message is sent intact. I can add comments above or below the message based on the settings in the email client, but I can't alter in any way the original email that is forwarded.
  2. If I want to alter the original message in any way, I reply to the original message, make whatever changes I desire, and change the recipient to be the recipient I want to forward the message to.

This was the behavior that early versions of Thunderbird exhibited along with all previous email clients I have used.

If the newer versions of Thunderbird change these expectations, then Thunderbird documentation and help files should make this glaring clear to users that the forward option no longer send the received message intact to the recipient.

I installed the latest official release of Thunderbird 91.2.1 as requested and it displays the same behavior when forwarding messages that I observed with version 78.3. The mime blocks and some parts of the message not in plain text are deleted from the forwarded email. In some cases, this results in a recipient using Thunderbird or other email programs receiving somewhat unintelligible forwarded email. The expected behavior which worked in the past with earlier versions of Thunderbird is that the forwarded message contained the identical message I received with maybe some comments added above or below the forwarded message.


Scenario 1: I receive a message with mime encoding and forward the message to another user. The forwarded message is somewhat garbled and partially unintelligible by the recipient. The recipient might be using Outlook, Apple Mail, or some other email client. Not everyone on the planet uses Thunderbird.

For my email account using Thunderbird, I have the following settings for Composition:

unchecked - Compose Messages in HTML format
checked - Automatically quote the original message when replying
When quoting: start my reply above the quote
and place my signature: below the quote (recommended)
checked - Include signature for replies
unchecked - include signature for forwards


Scenario 2: An email user receives a questionable message and contacts me as the system administrator. I ask them to forward the message to me so I can review the message in detail. When the message is forwarded, the mime blocks and some of the text in these mimes blocks has been deleted by Thunderbird, so I no longer have an intact message to review. In almost all cases, malware using email depends on various mime encodings not plain text to hide the malware exploit vectors.

For their email account using Thunderbird, they have the following settings for Composition or they another email client with similar settings:

unchecked - Compose Messages in HTML format
checked - Automatically quote the original message when replying
When quoting: start my reply above the quote
and place my signature: below the quote (recommended)
checked - Include signature for replies
unchecked - include signature for forwards

It is certainly possible to set specific Thunderbird options for which these scenarios function properly abnd forward the original messaeg intact (Compose messages in HTML format, for example). But this does resolve not the issue Many Thunderbird email users, include myself, don't have the "Compose Messages in HTML format" checked for obvious reasons. If you compose in HTML, you more than double the size of the message and the storage space used by sent email.

It also doesn't resolve the issue that a special set of keystrokes that enable composing this particular message in HTML result in the expected behavior. Most Thunderbird users are not sophisticated enough to know and remember possible special keystrokes that might make this work.

You can't expect most Thunderbird users to know to make sure the Compose Messages in HTML format is checked before forwarding email and then change this setting back to unchecked after forwarding a message.

I am adding an attachment after this comment that shows the forwarded message using View Message Source that I previously attached but forwarded with Thunderbird 92.1.

Attaching a copy of the text from the forwarded message that was forwarded using Thunderbird 92.1. I used View Message Source on the received forwarded email using Thunderbird 92.1 and copied the message source into this file. The file with the forwarded email message has had extraneous information removed from the Header block that would compromise security and privacy. The message body is completely intact.

Attaching file

When I forward an email, the original message is sent intact.

That is the case. But intact doesn't mean that the exact same MIME structure is sent out. Basically, the message to be forwarded can have three different basic MIME structures: Text only, HTML only, Text + HTML. With embedded pictures or attachments it becomes more complicated.

The forwarded message can also have those three formats, depending on TB settings and on whether you switch between formats when forwarding by using the shift key.

So whilst the content is mostly the same, the MIME structure can be different. "Mostly" means that you can forward HTML messages as text-only in which case to lose the formatting.

To forward a message 1:1 without changes, you need to forward it as attachment.

None of this has changed in years.

This behavior has changed and relatively recently. I looked through my forwarded email for information on when this change occurred. I can't determine exacting when this change occurred in Thunderbird. I am only able to check the limited number of email I forwarded that contained certain mime blocks. I checked back to November 2013 (Thunderbird Thunderbird/17.0.8

For
Content-Type: multipart/mixed
or
Content-Type: multipart/alternative

An example where I found that mime blocks were preserved up through at least the following:
PRESERVED ORIGINAL MIME BLOCKS IN FORWARDED EMAIL
RESULTING MESSAGE WAS READABLE
Original message
Date: Tue, 14 May 2019 19:42:41 +0000
Content-Type: multipart/mixed;

Forwarded message with Thunderbird with mime blocks preserved
Date: Tue, 14 May 2019 13:26:42 -0700
User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:60.0) Gecko/20100101
Thunderbird/60.6.1
Content-Type: multipart/mixed;

Somewhere between Thunderbird 80.6.1 in May 2019 and latest version of Thunderbird this behavior changed. I found the followng recent example:

STOPPED PRESERVING MIME BLOCKS WHEN Content-Type: multipart/alternative;
Original message:
Date: 18 Aug 2021 19:52:38 -0700
Content-Type: multipart/alternative;

Message forwarded with Thunderbird:
Date: Thu, 19 Aug 2021 13:51:36 -0700
User-Agent: Mozilla/5.0 (Windows NT 6.1; Win64; x64; rv:78.0) Gecko/20100101
Thunderbird/78.13.0
Content-Type: text/plain; charset=utf-8; format=flowed
Content-Transfer-Encoding: 8bit

The resulting forwarded message is partly unintelligible.

I can include these message for your review but I think this may be a waste of my time. The two bug reviewers have already decided that any email changes made by Thunderbird in forwarded email are acceptable, even if the resulting message is partly unintelligible. Also you have decided that the expectation of email users based on the last 30+ years that forwarded email preserves the message is no longer valid for Thunderbird.

Yes, I can forward an email as an attachment or set composition to HTML. But other email clients don't require this behavior.

You might want to forward this comment to other Thunderbird members that review bugs for a second opinion.

There may well be other Content-Type: settings other than multipart when this change to Thunderbird occurred earlier.

Corrected text:

Somewhere between Thunderbird 60.6.1 in May 2019 and latest version of Thunderbird this behavior changed.

As I said in comment #17, there are a lot of factors that determine how a message is forwarded. You can still achieve the same result as with TB 60.

multipart/mixed is the MIME type for a message with attachments. If you forward such a message, the attachments are maintained and the resulting forwarded message is also multipart/mixed.

If the original message was multipart/alternative, then it contained "alternative" text and HTML parts. If the resulting message is only text/plain than obviously a format change has occurred. The format of the forwarded message is determined by many factors. If you compose in plain text only, the forwarded message is reduced to text/plain. You should "Shift+Forward" as already stated in comment #8 and comment #17 to forward as HTML.

To bring this matter to a close I forwarded the original multipart/alternative you supplied with TB 91 and the setting "unchecked - Compose Messages in HTML format". The resulting forwarded message is text/plain only which is the correct behavior. Next I repeated this with TB 52 (which I had still installed). The result was the same. So whatever you did in TB 60, you used different settings. Please install TB 60 on a new profile, switch HTML composition off, import the message and you will see that the forwarded result is just the same.

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

Attachment

General

Creator:
Created:
Updated:
Size: