Bug 155119 - ClamAV filtering corrupts mails
Summary: ClamAV filtering corrupts mails
Status: RESOLVED WORKSFORME
Alias: None
Product: kmail
Classification: Applications
Component: filtering (show other bugs)
Version: 1.9.5
Platform: openSUSE Linux
: NOR grave
Target Milestone: ---
Assignee: kdepim bugs
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2008-01-04 23:41 UTC by A. Lofaro
Modified: 2011-02-15 10:49 UTC (History)
3 users (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description A. Lofaro 2008-01-04 23:41:12 UTC
Version:           1.9.5 (using KDE KDE 3.5.5)
Installed from:    SuSE RPMs
OS:                Linux

Problem with kmail 1.9.5 on OpenSuse 10.2, KDE 3.5.5, clamav 0.91.2. More or less the same problem had been reported also in with previous versions of kmail and kde and up to this version, in bugs 121272 and (it seems to me) 55838,138071,99460, 54834, but they were all closed as "duplicate" without a real solution of problem source found - programmers reported being unable to reproduce problem.
  Both with folders in mbox format and in Maildir format, messages are displayed as empty, with "Unknown" as date and sender, and empty subject.  This happened to some messages that had been download previously, and then also started to happen systematically to all new messages (in this, one of my comments to 121272 was wrong). This had already happened to me in the past to a few old messages, but at the time I had tought was an mbox file corruption problem and a "lost cause", only when it become systematic (end December 2007), touched also folders after I converted them to maildir format and touched new messages becoming systematic, I realised was something else. 
  After doing some testing (see my comments to case 121272), I can confirm at least in case like mine the problem is linked to the use of clamav with kmail. Disabling (deleting) the piping through clamav eliminates the problem. To recover the lost messages, the only (fast) way I found is:
1) "convert" the folders to maildir format;
2) find the temporary filese created by clamav and called something like clammailxxxxxx in the /tmp directory (at least on my distribution);
3) close kmail (quit, not minimise);
4) copy these files (no need to change name) in the maildir directory in the "cur" subfolder;
5) delete the index find and then have it recreated by starting kmail (it seems it is not really needed, at least if the folder is in "maildir" format, for some mail I didn't delete the index and kmail happily took up the messages as "unread")

   I am not constantly on-line, but I am willing to cooperate for testing - eliminating the antivirus check is a workaround, but not a solution. In my case I recovered 105 e-mail going back a couple of weeks, but I do not know if it was luck or clamav realised there was a problem and kept the temporary files, but anyway it is not something that can be done systematically.
Comment 1 Jaime Torres 2009-03-15 11:08:59 UTC
Are you still able to reproduce it with a more modern kmail?

I've clamscan enabled for every incoming mail and right now, no empty mail using kmail since 1.11.0 (kde 4.2.0) until 1.11.90 (kde 4.2.65).
Comment 2 A. Lofaro 2009-03-16 18:46:39 UTC
I just turned on the filtering through clamav, I will need a bit more than one week or so before I can see if the problem reappears or not - right now I am using OpenSuSe 11, kmail 1.9.9 with kde 3.5.9 "release 49.1", clamav 0.94.2, so pretty much everything has changed
Comment 3 RussianNeuroMancer 2011-02-15 06:45:29 UTC
Looks like this is not issue amymore.
Comment 4 Christophe Marin 2011-02-15 10:49:05 UTC
Thanks for the feedback. Closing then.