Bug 319204 - Mailbodies are deleted by Kmails spam-bogofilter on the remote IMAP Server!
Summary: Mailbodies are deleted by Kmails spam-bogofilter on the remote IMAP Server!
Status: RESOLVED WORKSFORME
Alias: None
Product: kmail2
Classification: Applications
Component: commands and actions (show other bugs)
Version: 4.10.2
Platform: Arch Linux Linux
: NOR critical
Target Milestone: ---
Assignee: kdepim bugs
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-05-02 04:46 UTC by piedro
Modified: 2015-09-08 19:38 UTC (History)
2 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 piedro 2013-05-02 04:46:05 UTC
As happened before and this was fixed as I could tell now it's back again: 
Kmail filters destroy the mailbody of mails but not locally but ON THE SERVER! 

This is really damaging - it happens whith the standard set of kmail2 spam filters as created by the spam assistant in connection with bogofilter. Spam filtering worked for quite a while now, now this problem is back (though I haven't found the related bug). 

Maybe this has to do with another thing: everytime I change a setting in the filter configuration dialog - afterwards the mail filter progress bar (bottom right) shows the mail filter agent stuck at 0% until I restart kmail or via akonadi console the mail filter agent (here it doesn't indicate any malfunction. 

Also it seems that both of these problems start after KDE has a lot of uptime - more than 24 hours I'd guess. 

 

Reproducible: Sometimes

Actual Results:  
Mails appear in the inbox, that could have been mistaken for spam and the mailbody is gone - I mean really gone - I checked on the IMAP servers directly... Happens in different accounts with different IMAP servers, so I am pretty sure it's the mail filter agent ... 



Expected Results:  
It's absolutely unacceptable that mail is destroyed - I expect this to be top priority of any mail client ... 

It's absolutely unacceptable that mail is destroyed - I expect this to be top priority of any mail client ...
Comment 1 piedro 2013-05-02 04:57:15 UTC
BTW: it also seems that after a while most akonadi modules for mail stop working without indicating any malfunction -  trying to send a mail does also only work after restarting the mail dispatcher agent (though the condition shown by akonadi console is "working") 

p.
Comment 2 piedro 2013-05-02 05:27:19 UTC
After a complete restart of the system and reactivating the spam filter for testing on an unimportant account, mail filter work again as expected ... 

So there has to be a time a uptime related or just random condition that causes massive malfunction of the mail filtering including the deletion of mail content. 

Let me guess: Could it have something to do with akonadi/nepomuk not working like expected ??? 
In my opinion, there has to be a fallback security feature that keeps kmail as one of the most vital applications for everyday 24/7 work running - maybe without filtering - but it has to work even when akonadi/nepomuk crashed/freezed/mailfuncioned  once more ... 
(maybe not important for the machine but vital for any productive user!)
Comment 3 piedro 2013-05-03 09:08:58 UTC
The old bug I am referring to is this one: 
https://bugs.kde.org/show_bug.cgi?id=293013 

I am not usre whether it's a duplicate or just the same symptoms. plz check someone ... 

thx, 
piedro
Comment 4 piedro 2013-05-03 14:26:06 UTC
Today the spam filering worked but still after looking into my spam folder again there have been mails without mailbody - again deleted ON THE SERVER! 

plz comment someone, 
thx for reading, 
piedro
Comment 5 piedro 2013-05-03 14:31:52 UTC
BTW: I don't see anything unusual in the filterprotokoll as collected through kmail: 

----------------------
[15:35:24] Filterung beginnt bei Nachricht „Ihre Bestellung“ von „Zukie.de “ um „Fri, 03 May 2013 14:30:57 +0100“ :
[15:35:24] Filterregeln werden geprüft: (match all messages) "Subject" <contains> "Antwort auf das Thema: 'How to avoid that my monitor goes blank after about 20min?'"
[15:35:24] Filterregeln wurden angewandt.
[15:35:24] Applying filter action: Copy Into Folder "Lokale Ordner/Posteingang"
[15:35:24] Filterregeln werden geprüft: (match all of the following) "<size>" <less-or-equal> "256000"
[15:35:24] 1 = "<size>" <less-or-equal> "256000" ( 10649 )
[15:35:24] Filterregeln wurden angewandt.
[15:35:24] Applying filter action: Pipe Through "bogofilter -p -e"
[15:35:24] Filterregeln werden geprüft: (match any of the following) "X-Bogosity" <regexp> "(yes)|(spam\b)"
[15:35:24] 1 = "X-Bogosity" <regexp> "(yes)|(spam\b)" (Spam, tests=bogofilter, spamicity=1.000000, version=1.2.3)
[15:35:24] Filterregeln wurden angewandt.
[15:35:24] Applying filter action: Move Into Folder "Lokale Ordner/Spam"
[15:35:24] Applying filter action: Mark As "Spam"
[16:21:34] Filterregeln werden geprüft: (match all of the following) "<size>" <greater-or-equal> "0"
[16:21:34] 1 = "<size>" <greater-or-equal> "0" ( 8456 )
[16:21:34] Filterregeln wurden angewandt


thx, p.
Comment 6 Martin Steigerwald 2013-11-10 10:22:54 UTC
Maybe there is a relation ship with

Bug 319226 - produces 1-byte-sized on processing crm114 spam filter rules
https://bugs.kde.org/319226

It is with POP3 tough, but at least in both cases Akonadi pipes a mail through an external program.

Would be pretty good to get confirmation and even better to actually find on why this is happening.

I am still not using those CRM114 spam filter rules due to this bug.
Comment 7 Martin Steigerwald 2013-11-10 10:24:42 UTC
One indication of a relationship of the two bugs would be one byte sized files on the IMAP server. Can you check there with

find -size 1c

?
Comment 8 piedro 2013-11-11 08:12:31 UTC
Thx for you looking into that. I don't know how to access any of my IMAP servers directly. They are all different hosted servers. I don't have command line access. Sry. 

I disabled all the spam filtering in kmail, cause I can't afford to loose these mails. But I know for sure the mails I am loosing are NOT one byte sized. Because there has been a mailbody before - just after filtering they turn up empty (without any content in the mailbody). maybe they are zero size after filtering? 

Sry if that's not helping but I can't experiment at the moment - I don't have another system set up for testing - it have only my production box atm. :-( 

thx very much anyway, 
piedro
Comment 9 Martin Steigerwald 2015-04-12 10:16:39 UTC
Piedro, did you ever try using a spam filter again? If so, did you have some data loss again? In

Bug 319226 - produces 1-byte-sized on processing crm114 spam filter rules
https://bugs.kde.org/319226

András wrote in my bug report:

András Manţia 2013-11-17 11:18:04 UTC
This is tentatively fixed in master, after a little more testing I will backport to 4.12.

So I think if our two issues are related yours might be fixed as well. I may try again one of the next days, but I know its scary. But if you want to try it once again, please do so. Maybe setup some kind automatic mail duplicating first, so you have a backup. I think I will test it, as I have a mail duplication already. But if you have some newer experiences, please share. Thank you, Martin
Comment 10 Martin Steigerwald 2015-04-12 11:47:29 UTC
Setting to waiting for information after I received bugzilla rights to do that.
Comment 11 piedro 2015-04-12 12:11:01 UTC
Hi, I had these problems with bogofilter until half a year ago. Then I switched to spambayes which works fine after training... 

So I am very sorry I cannot comment on bogofilter anymore. 

thx anyway, 
piedro
Comment 12 Martin Steigerwald 2015-04-12 12:42:57 UTC
Thanks, Piedro. Do you use spambayes integrated client side within KMail? Then I think the same mechanism is used. I think in that case either you would still see mail body losses or it would have been a configuration issue with your bogofilter setup. Hmmm, since it is a data loss bug I am not comfortable with closing it completely without any confirmation that it is really fixed, so… I will just keep it as waiting for info for now.
Comment 13 piedro 2015-07-14 16:20:41 UTC
Sorry for the long wait. First I missed your comment and than I took a month too really check for any more losses... just to make sure... 

So: Yes I use spambayes within kmail and this is the client side as it is filtered by spambayes on my computer... I have been using it for quite some time now and have not experienced any data loss anymore. 

I'd wish I could be more helpful here regarding bogofilter but I dare not to touch it on my production system again. 

BTW: I do not think there has been a bad bogofilter setup on my part as I sticked to clean defaults as created by the Arch packages. Years ago I used bogofilter with Kubuntu in the old kmail for KDE3 and this has always been working fine. 

Thank you very much to take this seriously, 
I know am really no big help here but I reported everything I could from my level of understanding... 

cheers, piedro
Comment 14 Martin Steigerwald 2015-09-08 19:38:42 UTC
Piedro, thank you. As you didn´t see any data loss anymore I am closing this bug. Feel free to reopen if it happens again.