Bug 83414 - KMail doesn't conform to RFC, when encodes 8-bit text to Base64
Summary: KMail doesn't conform to RFC, when encodes 8-bit text to Base64
Status: RESOLVED WORKSFORME
Alias: None
Product: kmail
Classification: Unmaintained
Component: general (show other bugs)
Version: 1.6.2
Platform: Debian testing Linux
: NOR normal
Target Milestone: ---
Assignee: kdepim bugs
URL:
Keywords:
: 122892 (view as bug list)
Depends on:
Blocks:
 
Reported: 2004-06-15 12:22 UTC by Eugene Konev
Modified: 2013-02-03 14:02 UTC (History)
7 users (show)

See Also:
Latest Commit:
Version Fixed In:
Sentry Crash Report:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Eugene Konev 2004-06-15 12:22:14 UTC
Version:           1.6.2 (using KDE KDE 3.2.2)
Installed from:    Debian testing/unstable Packages
OS:                Linux

When KMail Base64 encodes 8-bit text, it doesn't produces canonical form of it by replacing LFs with CRLFs.
As a result, mailers on 8-bit clean channels strip the LFs from the message on decoding and it becomes quite unreadable.
Comment 1 Dmitry Ivanov 2005-04-05 21:21:06 UTC
Looks like this bug causes problems with my ISP mail server which recodes messages from base64 to 8 bits.
Comment 2 Dmitry Ivanov 2005-04-05 22:06:34 UTC
My little research shows that kmail has this problem for several years now. It was discussed elsewhere:

http://lists.altlinux.ru/pipermail/sisyphus/2003-January/017525.html

When kmail base64-encoded messages are recoded to 8-bit by MTA linefeeds are stripped out.
Comment 3 Max Dmitrichenko 2005-06-16 09:55:21 UTC
The situation is the same for versions 1.7.1 and 1.7.2.
Comment 4 Artem Chuprina 2005-06-16 10:24:05 UTC
*** This bug has been confirmed by popular vote. ***
Comment 5 Mikhail Ramendik 2005-09-05 02:25:38 UTC
The situation is the same for 1.8.2 !
Comment 6 Anatoly Pugachev 2005-09-26 14:28:29 UTC
I have same bug with email messages going from gmail.com accounts. I wonder how come gmail.com suffered with a same bug.
Comment 7 Dmitriy Nezhevenko 2005-11-19 13:15:57 UTC
As for me this is not kmail problem
Comment 8 Mikhail Ramendik 2005-11-19 14:22:31 UTC
then which problem is it?
Comment 9 Casus Improvisus 2005-12-01 23:10:25 UTC
KMail just need to replace \n with \r\n before encoding (to base64 or quoted-printable) and before sending letters. 
Comment 10 Mikhail Ramendik 2006-09-07 00:14:40 UTC
Apparently works correctly in 3.5.2 ! Could anyone else check on 3.5.2 or later? 
Comment 11 Anatoly Pugachev 2007-07-02 15:36:01 UTC
any update on kmail in current linux distros? or maybe close as this bug is old and may not reproduce on current kmail version. can't try myself since not using kde for a long time now, just revisiting bugs i'm voted on.
Comment 12 Max Dmitrichenko 2007-07-02 15:50:42 UTC
I'll check it in a few days. Don't close it for a while.
Comment 13 Luciano Montanaro 2008-03-30 11:40:43 UTC
...so, is this still valid?
Comment 14 Rolf Eike Beer 2009-02-24 22:33:39 UTC
This seems to be no issue anymore. Closed as remind. Please reopen if it still exists.
Comment 15 Andrey Cherepanov 2009-02-25 11:26:35 UTC
Yes, it is valid for KMail 1.11.0 from KDE 4.2.0.
Comment 16 Andrey Cherepanov 2009-04-30 12:06:27 UTC
*** Bug 122892 has been marked as a duplicate of this bug. ***
Comment 17 András Manţia 2011-09-22 05:57:34 UTC
Is it valid with KMail2? I have a feeling it is not, but please confirm it.
Comment 18 Christophe Marin 2012-01-09 00:55:02 UTC
No feedback since September. Closing
Comment 19 Martin Walch 2013-02-03 14:02:42 UTC
Please correct me if I get this wrong. This is bascially about RFC2045 – RFC2049? When creating an attachment of MIME type text/plain, it may be encoded as base64. According to RFC2049, it must be converted into a canonical form, which means for text/plain that LF must be converted to CRLF.

If this is correct, then this seems to be still broken. I just sent an email through KMail2 with a text file "res.txt" attached that consists only of LF LF.

In the transmitted email, the attachment looks like this:
 
Content-Transfer-Encoding: base64
Content-Type: text/plain; charset="UTF-8"; name="res.txt"

Cgo=

When decoding Cgo=, you will notice that it still reads LF LF instead of CRLF CRLF.