Bug 127214

Summary: Trouble with certain attachment's sizes, saving
Product: [Unmaintained] kmail Reporter: mi+kde
Component: IMAPAssignee: kdepim bugs <kdepim-bugs>
Status: RESOLVED DUPLICATE    
Severity: normal    
Priority: NOR    
Version: 1.9.1   
Target Milestone: ---   
Platform: unspecified   
OS: FreeBSD   
Latest Commit: Version Fixed In:
Sentry Crash Report:
Attachments: A mailbox with the single test message in it

Description mi+kde 2006-05-12 18:52:44 UTC
Version:           1.9.1 (using KDE 3.5.2, compiled sources)
Compiler:          gcc version 3.4.4 [FreeBSD] 20050518
OS:                FreeBSD (i386) release 6.1-RC

Our office-wide IP-telephony system is configured to deliver voice-mail messages via e-mail as .wav files.

Whenever I get such messages, dealing with them using KMail is a pain, because it mishnadles saving them.

Although the e-mail .wav file is 16378 bytes long, the attachment pane claimes, the encoded size is only 481 bytes. The decoded size of 202 bytes is what gets passed to noatun and what gets saved to disk too.

Only by right-clicking on the attachment and explicitly asking for it to be saved to disk for the second time do I get the complete file.

I'll happily resend the sample messages to anybody who wishes to try reproducing/fixing this problem. Thanks...
Comment 1 Thiago Macieira 2006-05-18 23:49:34 UTC
Can you zip them and attach here?
Comment 2 mi+kde 2007-07-18 16:26:54 UTC
Created attachment 21178 [details]
A mailbox with the single test message in it

I suspect, I know, what triggers this bug... The messages' Content-Type is
neither text/* nor multipart/mixed, but directly audio/x-wav. The audio is not
attached, in other words, but is the message itself.

I have just encountered the same problem with an e-mail consisting of a PNG
image. Not an attachment, again, but the image (in its 8-bit glory) is the body
of the message.

Even though the Content-Type is duly set to image/png, the image is not
displayed inside the message pane. Clicking on it offers me to view it with
kview, but the launched kview can not find the file to show me...

Attaching the message for you.
Comment 3 Thomas McGuire 2007-07-18 21:04:28 UTC
Are you using IMAP? Then this is probably the same as bug 143237. Please check.
Comment 4 mi+kde 2007-07-18 22:22:54 UTC
Yes, this seems like it. Can I, please, have the relevant patch, which is supposed to fix the problem? Thanks!
Comment 5 Thomas McGuire 2007-07-19 21:35:21 UTC
>Yes, this seems like it. Can I, please, have the relevant patch, which is supposed to fix the problem? Thanks!
The bugreport says that the revision which fixes this is r653900.

The patches for the two modified files are at:
http://websvn.kde.org/branches/KDE/3.5/kdepim/kioslaves/imap4/imap4.cc?r1=653900&r2=653899&pathrev=653900&view=patch
http://websvn.kde.org/branches/KDE/3.5/kdepim/kmail/imapaccountbase.cpp?r1=653900&r2=653899&pathrev=653900&view=patch

You probably need to adjust the paths.


*** This bug has been marked as a duplicate of 143237 ***