Bug 83773 - kmail does not compact *local* folders if messages are deleted from those folders
Summary: kmail does not compact *local* folders if messages are deleted from those fol...
Status: RESOLVED UNMAINTAINED
Alias: None
Product: kmail
Classification: Applications
Component: general (show other bugs)
Version: 1.6.2
Platform: unspecified Linux
: NOR normal
Target Milestone: ---
Assignee: kdepim bugs
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2004-06-21 16:26 UTC by krienke
Modified: 2015-04-12 09:50 UTC (History)
0 users

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 krienke 2004-06-21 16:26:34 UTC
Version:           1.6.2 (using KDE 3.2.3, SuSE)
Compiler:          gcc version 3.3.3 (SuSE Linux)
OS:                Linux (i686) release 2.6.5-7.75-default

My Bug seems to be identical to Number 59273, but allthough this bug was reported to be in KDE 3.1.2 and was marked resolved I have this bug in 3.2.3 and it seems still not to be resolved. Anyway:

When I deleted messages from local folders in kameil they seem to be deleted but actually are not. Even not if I compact all folders or try to compact the folder in question. The byte size of the folder with the deleted messages does not change. When removing the index file for this folder the deleted messages reappear after the next start of kmail. The folder has a size of 13MBytes.

Rainer
Comment 1 Joseph Reagle 2004-09-13 16:01:06 UTC
I am using KMail 1.7 with 3.3 and the compact folders on exit no longer seems to work.  previously, I'd see little time bar indicating that on exit it was compacting the folders.  now there's no such indication and if I look at the text file the old E-mails are still present. 
Comment 2 David Faure 2004-09-13 16:59:36 UTC
Feature, not bug. Compaction happens in the background automatically (much better
than waiting on exit).

Comment 3 Joseph Reagle 2004-09-13 17:34:05 UTC
But it means when I exit, I have mboxes that have spam in them still even though they've been moved. This screws up my backup/synchs, and my scripts that send the compacted mboxes to bofofilter. (I know there's new spam capabilities in KMail but they aren't working for me properly and are very slow.) I'd still like this to be an exit feature.
Comment 4 krienke 2004-09-14 08:20:41 UTC
The Problem however still is (now using kde 3.3; kmail 1.6.2) that kmail does NOT remove deleted messages from local folders. Neither when deleting them in kmail nor when exiting from kmail. I just tested this once again by  deleting all messages from my sent-mail folder in kmail, then compacting all folders and exiting kmail. In the filesystem I could see, that the sent-mail folder did not change at all. Starting kmail again, the folder shows all messages again.
Comment 5 David Faure 2004-09-14 17:24:08 UTC
> The Problem however still is (now using kde 3.3; kmail 1.6.2) that kmail does NOT remove deleted messages from local folders. 

Yes: this is the well-known problem that gets triggered by the safety measure,
to not compact after the index is found to be out of sync.
See comment #4 in http://bugs.kde.org/show_bug.cgi?id=52751 for more details,
including a workaround.

Comment 6 David Faure 2004-09-14 17:29:02 UTC

*** This bug has been marked as a duplicate of 52751 ***
Comment 7 David Faure 2004-09-14 17:36:07 UTC
> But it means when I exit, I have mboxes that have spam in them still even though they've been moved.
> This screws up my backup/synchs, and my scripts that send the compacted mboxes to bofofilter. 
Ah, I see the problem. Of course you could use "Compact all folders" before quitting, but that's not
very easy to remember doing each time... Well it's a solution if you do a backup or sync only
now and then :)

> I'd still like this to be an exit feature.  
Hmm. I wonder if this need will still exist after the compaction actually works (e.g. if you remove
all Compactable=false from kmailrc). The folders will then be automatically compacted every
4 hours (the first time being 5 minutes after you start kmail). How much spam can you get
in 4 hours? :-) I know, too much for everyone's taste, but still: if compaction works, you
have at most 4 hours of spam left in the mailboxes when exiting kmail, not more.
I can easily be convinced to turn this into e.g. 1 hour btw :)

Comment 8 Joseph Reagle 2004-09-14 17:55:44 UTC
I'm a little confused about what is buggy and what is a feature, but what of just reenabling the way it used to work?
Comment 9 David Faure 2004-09-15 00:13:51 UTC
The way it used to work led to lots of problems, including broken session management
due to the "compaction on exit" taking more time than the session manager allowed.

Background compaction is a feature.
Compaction getting automatically disabled when the index is out of sync is a bug,
and we need to track down why and when the index gets out of sync, and to
implement some kind of "index merging" to avoid losing mail status etc. - see that other bug report.


Comment 10 Joseph Reagle 2004-09-15 17:27:24 UTC
On Wednesday 15 September 2004 00:13, David Faure wrote:
> ------- Additional Comments From faure kde org  2004-09-15 00:13 -------
> Background compaction is a feature.
> Compaction getting automatically disabled when the index is out of sync
> is a bug, and we need to track down why and when the index gets out of
> sync, and to implement some kind of "index merging" to avoid losing mail
> status etc. - see that other bug report.

For what it is worth, I can confirm that it is not automatically compacting 
my mailbox in the background -- I left the application open for more than 5 
minutes and still it didn't work.

Comment 11 David Faure 2004-09-15 23:22:40 UTC
Please open your ~/.kde/share/config/kmailrc and check for Compactable=false!
(Exit kmail before editing that file)

Comment 12 Joseph Reagle 2004-09-16 15:19:53 UTC
On Wednesday 15 September 2004 23:22, David Faure wrote:
> Please open your ~/.kde/share/config/kmailrc and check for
> Compactable=false! (Exit kmail before editing that file)

urd:/home/reagle> g "Compactable=" ~/.kde/share/config/kmailrc
Compactable=true
Compactable=true
Compactable=true
Compactable=true
Compactable=true
Compactable=true
Compactable=true
...

Comment 13 David Faure 2004-09-16 16:09:57 UTC
On Thursday 16 September 2004 15:19, Joseph Reagle wrote:
> Compactable=true

Hmm, weird. I stand corrected, it must be another problem them.

Does manual compaction (using the menu item "Compact" on a folder) work?

If yes, and the problem is only the background compaction not happening,
can you send me kmail's debug output, after leaving it run for 5 minutes?
The interesting part is "starting to compact in folder ..." and either
"successfully compacted" or "Error occured while compacting".

Oh, is it simply that you keep the inbox open during that time? The background
compaction can only happen if the inbox isn't opened, i.e. if you select another
folder in kmail at some point.

Comment 14 Joseph Reagle 2004-09-16 20:03:50 UTC
On Thursday 16 September 2004 16:09, David Faure wrote:
> ------- You are receiving this mail because: -------
> If yes, and the problem is only the background compaction not happening,
> can you send me kmail's debug output, after leaving it run for 5 minutes?
> The interesting part is "starting to compact in folder ..." and either
> "successfully compacted" or "Error occured while compacting".

how to get debug output?


> Oh, is it simply that you keep the inbox open during that time? The
> background compaction can only happen if the inbox isn't opened, i.e. if
> you select another folder in kmail at some point.

ah, then yes, it will manually compact the inbox.

Comment 15 David Faure 2004-09-16 20:15:06 UTC
On Thursday 16 September 2004 20:03, Joseph Reagle wrote:
> how to get debug output?

Either
1) look into ~/.xsession-errors (assuming you use a login manager like kdm, NOT startx
2) start kmail from a terminal like konsole (try Alt-F2 konsole). Best way to collect
the debug output is to type
kmail 2>&1 | tee log
and send me the file called "log"

> > Oh, is it simply that you keep the inbox open during that time? The
> > background compaction can only happen if the inbox isn't opened, i.e. if
> > you select another folder in kmail at some point.
> 
> ah, then yes, it will manually compact the inbox.
I'm confused by that answer - another paragraph talked about manual compaction,
but you answered the one about automatic compaction with a line about manual compaction,
so I'm confused :)

Comment 16 Joseph Reagle 2004-09-16 22:02:25 UTC
On Thursday 16 September 2004 20:15, David Faure wrote:
> kmail 2>&1 | tee log
> and send me the file called "log"

That's empty... in any case, I think I'm just muddying the waters so I'll 
just hang on till the other problems are fixed.

Comment 17 Rudolf Kollien 2006-09-27 12:09:13 UTC
Hmm, the bug is marked reopened, but the last post was on 2004-09-16. I see some Bug-Ids (#82259/#83773/#37898) but they only give some workarounds but not real solution. 

I still have this bug in KDE 3.5.4 "release 78.1" SuSE RPMS, KMail 1.9.4. In my case it is the drafts folder. On the filesystem i found four files. Three of them are old and deleted in Kmail a long time ago. In the folder view of KMail there is only one (the correct) mail shown. In the kmailrc i verified, that "Compactable=true" is set for the draft folder. A manual "Compact Folder" doesn't help. 

After some "look-around" on our server, i found that _every_ mailbox of our users (currently 79) has orphants in different folders. Projecting this i came to the result, that this results in about 1,5GB of corpses.

The workarounds talked over in the other bug reports may be practical for advanced users. But i'm glad about users who are able of correct addressing a mail :-( And - of course - no one of the users know about there mail corpses! There is not warning about "Uiii - Kmail complains about the difference about 'shown mails' vs. 'orphant mails'. May be this would be a solution along with the option tho choose "Use shown mails and clear orphants" or "Use orphants and rebuild index".
Comment 18 Thomas McGuire 2007-05-24 17:08:03 UTC
Isn't this the same as bug 37898?
Comment 19 Laurent Montel 2015-04-12 09:50:16 UTC
Thank you for taking the time to file a bug report.

KMail2 was released in 2011, and the entire code base went through significant changes. We are currently in the process of porting to Qt5 and KF5. It is unlikely that these bugs are still valid in KMail2.

We welcome you to try out KMail 2 with the KDE 4.14 release and give your feedback.