Bug 98845 - kmail loses mail body and attachments when moving mails from imap to local folder
Summary: kmail loses mail body and attachments when moving mails from imap to local fo...
Status: RESOLVED FIXED
Alias: None
Product: kmail
Classification: Applications
Component: general (show other bugs)
Version: 1.7.2
Platform: Gentoo Packages Linux
: NOR normal
Target Milestone: ---
Assignee: kdepim bugs
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2005-02-08 14:14 UTC by ian
Modified: 2007-09-14 12:17 UTC (History)
0 users

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


Attachments
email (327.90 KB, text/MIME)
2005-02-08 14:19 UTC, ian
Details
snapshot of kmail with lost mail content (235.29 KB, image/jpeg)
2005-02-08 14:24 UTC, ian
Details

Note You need to log in before you can comment on or make changes to this bug.
Description ian 2005-02-08 14:14:43 UTC
Version:           1.7.2 (using KDE KDE 3.3.2)
Installed from:    Gentoo Packages
Compiler:          gcc version 3.3.4 20040623 (Gentoo Linux 3.3.4-r1, ssp-3.3.2-2, pie-8.7.6) 
OS:                Linux

I have my mail account on a IMAP server and a number of local folders to sort my mails.  Sometimes when I move a mail the text and attachments are lost.  This does not happen with every mail.  It happens most often when I move a mail with multiple jpeg image attachments.  

The most recent instance occurred for me now.  Yesterday I forwarded a mail with several attachments, then the today moved that mail from my IMAP box to a local folder and the attachments were lost, as well as the text of the mail.

This behaviour is relatively random.  It seems that kmail is OK for a while, then has a time where it loses the content of mails, then works again.  As mentioned, it happens most often with jpg images.  

I will attempt to later make an attachment to this report with the mail where the body and attachments were lost.
Comment 1 ian 2005-02-08 14:19:46 UTC
Created attachment 9481 [details]
email

This is the forwarded mail that remained in my sent box.  The original mail had
all content, except headers, lost when I moved it from my IMAP inbox to my
local folder.
Comment 2 ian 2005-02-08 14:24:50 UTC
Created attachment 9482 [details]
snapshot of kmail with lost mail content

As you can see in this snapshot, there are several mails where the attachments
and body have been lost where the sender was dora.....	These mails varied
between approx 50Kb to 8Mb in size.
Comment 3 ian 2005-02-08 15:12:49 UTC
It may also be important info - I leave my machine running 24 hours, and usually kmail stays open the whole time.  What I do know is that if I move the mail immediately after first opening it, everything is moved as normal.
Comment 4 Andreas Greve 2005-04-14 11:36:08 UTC
The same problem here with kmail 1.8. Maybe this is important: The folders to sort the mails here are in mbox format.
Comment 5 Andreas Greve 2005-04-15 10:52:43 UTC
This is what our test show:
Haeder and attachments are lost by moving the mail from inbox to an other folder if the attachments were SAVED out of the inbox befor moving (no matter if the folders are in mbox or mdir format). Viewing only don't causes the mistake.
So a temporary work around is to move the mail first and than store the attachments to the local disk.
Comment 6 Carsten Burghardt 2005-04-17 21:36:24 UTC
CVS commit by burghard: 

Do not set the message as complete but do not pass it to the parent command.
That way the message is not changed and it should not cause problems anymore.
Will backport.
BUGS:98845


  M +1 -4      kmcommands.cpp   1.206


--- kdepim/kmail/kmcommands.cpp  #1.205:1.206
@@ -2112,9 +2112,6 @@ KMSaveAttachmentsCommand::KMSaveAttachme
 KMSaveAttachmentsCommand::KMSaveAttachmentsCommand( QWidget *parent, QPtrList<partNode>& attachments,
                                                     KMMessage *msg, bool encoded )
-  : KMCommand( parent, msg ), mImplicitAttachments( false ),
-    mEncoded( encoded )
+  : KMCommand( parent ), mImplicitAttachments( false ), mEncoded( encoded )
 {
-  // do not load the complete message but only parts
-  msg->setComplete( true );
   for ( QPtrListIterator<partNode> it( attachments ); it.current(); ++it ) {
     mAttachmentMap.insert( it.current(), msg );
Comment 7 gmud 2005-09-21 17:05:11 UTC
This has hapened to me with version 1.8.2 recently. I moved a message (containing attachments) from an imap folder to a local folder and lost the message body and all attachments.
Comment 8 gmud 2005-09-21 17:19:54 UTC
Bug 92307 seems to be the problem with my tc. Please ignore my last comment.