KMail mangles HTML emails since update to KDE 4.8

I just updated to KDE 4.8 from 4.7.4. Since the update, e-mails received in html format appear as text only. Any attachments to the html email also appear in-line, undecoded as text. The structure panel shows the email as a plain text document with the e-mail’s subject line appearing in the description field. HTML emails that I received prior to the update appear properly as html, so the problem is in the reception not the display. For example, an html email from one correspondent that I received prior to the update shows, properly, a text document labeled body part and an html document labeled body part in the structure panel. If I click on the html icon, the html portion appears and can be displayed as html. An email received from the same correspondent after the update shows only a text document in the structure panel labeled with the message’s subject line - nothing identified as body part with the html code showing as text in the body of the email.

As an experiment, I sent myself two identical emails from a different account each with a spreadsheet as an attachment. One was sent in text format, one as html. The one sent as text showed up correctly - the structure panel shows a text document labeled body part and an open doc spreadsheet which can be opened as an attachment. The one sent as html shows only a text document in the structure panel identified with the subject line. There is no spreadsheet object in the structure panel and the spreadsheet itself appears as undecoded text in-line and cannot be opened as an attachment.

Note also that both KDE 4.8 and KDE 4.7.4 use KMail/2 so the issue is not due to a change of version of KMail.

I’m desperate for a solution.

One addition - I’m running 4.8 on Opensuse 12.1.

Have you checked kmail settings>security and made sure that Prefer HTML is
enabled?

Yes, it happens with prefer html checked, though that should’nt matter.

It seems to be related to multipart messages. Messages that have a single part and have one content-type header, come through correctly as html. Those that have both text and html parts get mangled. For example, I sent myself a html message. KMail sends a message with both text and html sections. If I click on the message in the sent mail folder, where it appears correctly, here are the headers:

Content-Type: multipart/alternative; boundary=“nextPart1780305.FbR4I2QCuP”
Content-Transfer-Encoding: 7Bit

–nextPart1780305.FbR4I2QCuP
Content-Transfer-Encoding: 7Bit
Content-Type: text/plain; charset=“us-ascii”

Test message content.
–nextPart1780305.FbR4I2QCuP
Content-Transfer-Encoding: 7Bit
Content-Type: text/html; charset=“us-ascii”

In the inbox of the receiving account, where the message appears incorrectly as only text, here are the headers.

Content-Type: text/plain; charset=“US-ASCII”
Content-Transfer-Encoding: 7Bit

–nextPart1780305.FbR4I2QCuP
Content-Transfer-Encoding: 7Bit
Content-Type: text/plain; charset=“us-ascii”

Test message content.
–nextPart1780305.FbR4I2QCuP
Content-Transfer-Encoding: 7Bit
Content-Type: text/html; charset=“us-ascii”

Somehow, after KMail received the message, it changed the first header from multipart/alternative to text/plain. This is the content type of the first section of the message. Having erased the multipart header, the whole message shows up as text. Oddly, when the message first arrives, I can fleetingly see it correctly displayed and then it turns into text only. This happens almost instantaneously. So Kmail is doing something to the headers.

It looks like this is somehow being done by a filter maybe???

Wow, that is weird. Sounds like you should start a developer chat somewhere
and find the source of the bug. At least file a bugzilla entry.

On Wed, 01 Feb 2012 07:06:02 +0530, bearymore
<bearymore@no-mx.forums.opensuse.org> wrote:

>
> GofBorg;2436142 Wrote:
>> Have you checked kmail settings>security and made sure that Prefer HTML
>> is
>> enabled?
> Yes, it happens with prefer html checked, though that should’nt
> matter.
>
> It seems to be related to multipart messages. Messages that have a
> single part and have one content-type header, come through correctly as
> html. Those that have both text and html parts get mangled. For example,
> I sent myself a html message. KMail sends a message with both text and
> html sections. If I click on the message in the sent mail folder, where
> it appears correctly, here are the headers:
>
> Content-Type: multipart/alternative;
> boundary=“nextPart1780305.FbR4I2QCuP”
> Content-Transfer-Encoding: 7Bit
>
>
> --nextPart1780305.FbR4I2QCuP
> Content-Transfer-Encoding: 7Bit
> Content-Type: text/plain; charset=“us-ascii”
>
> Test message content.
> --nextPart1780305.FbR4I2QCuP
> Content-Transfer-Encoding: 7Bit
> Content-Type: text/html; charset=“us-ascii”
>
> In the inbox of the receiving account, where the message appears
> incorrectly as only text, here are the headers.
>
> Content-Type: text/plain; charset=“US-ASCII”
> Content-Transfer-Encoding: 7Bit
>
>
> --nextPart1780305.FbR4I2QCuP
> Content-Transfer-Encoding: 7Bit
> Content-Type: text/plain; charset=“us-ascii”
>
> Test message content.
> --nextPart1780305.FbR4I2QCuP
> Content-Transfer-Encoding: 7Bit
> Content-Type: text/html; charset=“us-ascii”
>
> Somehow, after KMail received the message, it changed the first header
> from multipart/alternative to text/plain. This is the content type of
> the first section of the message. Having erased the multipart header,
> the whole message shows up as text. Oddly, when the message first
> arrives, I can fleetingly see it correctly displayed and then it turns
> into text only. This happens almost instantaneously. So Kmail is doing
> something to the headers.
>
> It looks like this is somehow being done by a filter maybe???
>

i’m using kmail2 / KDE 4.8, and i’m not seeing this. if it’s a bug, it’s
not one that strikes everyone. filter might be possible, or some other
config. issue. how about trying a new user account and see if that behaves
the same?


phani.

I’ll try a new account and see what happens. This is distressing, though.

Yes, it’s right!

I had the same issue and I tried disabling any filters and than reactivating one for each try.

Problem reappeared when I reactivated the “Bogofilter Check”.

Bogo filter comes with spam checking or virus checking? I removed virus handling and all my filters seemed to have stopped working, but the problem went away.

Yes, I disable just the one that sends messages through pipe to bogofilter.
All others filters still work, even antispam, but the problem is gone.

bearymore wrote:

>
> I just updated to KDE 4.8 from 4.7.4. Since the update, e-mails received
> in html format appear as text only. Any attachments to the html email
> also appear in-line, undecoded as text. The structure panel shows the
> email as a plain text document with the e-mail’s subject line appearing
> in the description field.

Yes, I also started receiving mangled messages. Most annoying!!!
I will try disabling spamassassin in case this is the culprit.

-G-

GofBorg wrote:

> Wow, that is weird. Sounds like you should start a developer chat
> somewhere and find the source of the bug. At least file a bugzilla entry.
I’m also seeing this on some emails. I am running openSUSE 12.1, KDE 4.8.00
release 462 and kmail2 4.8.0.

have you reported this as a bug?


Russ

upscope wrote:

> GofBorg wrote:
>
>> Wow, that is weird. Sounds like you should start a developer chat
>> somewhere and find the source of the bug. At least file a bugzilla entry.
> I’m also seeing this on some emails. I am running openSUSE 12.1, KDE
> 4.8.00 release 462 and kmail2 4.8.0.
>
> have you reported this as a bug?
>
Did not read far enough. I will try diabling ClamAV as I have not enabled
SpamAssassin yet.

Russ

I had to disable SpamAssassin and ClamAV to get this behavior to stop.

According to report Bug 291171 - Spam filtering breaks HTML / multipart mail headers on POP3 accounts this issue should be fixed for KDE 4.8.1.

I would dispute that it is fixed

Kmail 4.84

Kmail working fine until I installed bogofilter

now getting headers that look like this


--047d7bdc0b0caa030b04c959adc8
Content-Type: text/plain; charset=ISO-8859-1


(message)



(large amount of html code)


remove bogofilter and things are back to normal.