(*** This bug was imported into bugs.kde.org ***) Package: kmail Version: CVS 11/3/2 (using KDE 2.9.2 CVS/CVSup/Snapshot) Severity: normal Installed from: Compiled sources Compiler: gcc OS: Linux OS/Compiler notes: Not Specified My inbox folder cann't be compacted whatever I do my 27Meg inbox won't shrink when I use compact or Compact all folders if when I move all the messages to another folder and do the compact on the "empty" inbox. (Submitted via bugs.kde.org)
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 On Tuesday 12 March 2002 10:30 toivo@ucs.uwa.edu.au wrote: > My inbox folder can't be compacted > whatever I do my 27Meg inbox won't > shrink when I use compact or Compact > all folders if when I move all > the messages to another folder and > do the compact on the "empty" inbox. For some reason KMail seems to think that you inbox is not compactable.=20 Please try the following: Move all messages from inbox to another folder. Empty the inbox. Exit KMail. Open the KMail configuration file (~/.kde/share/config/kmailrc) in your favourite editor and search for "[Folder-inbox]". Directly below this line you'll see "Compactable=3Dtrue" or "Compactable=3Dfalse". In the latter case change "false" to "true". Save the edited config file. Start KMail. Move all messages back to the inbox. Now everything should work. Regards Ingo -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.0.6 (GNU/Linux) Comment: For info see http://www.gnupg.org iD8DBQE8y927GnR+RTDgudgRAjfyAJ9hpeqWpTW9OiF7E5d1DCoVgeGLuQCeN4Q2 f6EYGeCmmMrGGhPjJae/y8I=3D =3DB6UV -----END PGP SIGNATURE-----
Hi, I'm running kde 3.1 with and see exactly the same problem. There also another kde user on debian with this problem. See: http://lists.debian.org/debian-kde/2003/debian-kde-200303/msg00331.html Because the bug was reported for 2.9.2 and I'm on 3.1 it can't be fixed. Would be really nice if one would get a warning when one tries to compact an uncompactable folder or if compact is deactivated in the menues for uncompactable folder. ach@lost(0) ~ $ # delete some msg, try compact/expire/compact all folders, nothing happens: -rw------- 1 ach ach 16221717 Mar 12 15:43 Mail/inbox ach@lost(0) ~ $ l Mail/inbox -rw------- 1 ach ach 16221717 Mar 12 15:43 Mail/inbox ach@lost(0) ~ $ l Mail/inbox -rw------- 1 ach ach 16221717 Mar 12 15:43 Mail/inbox ach@lost(0) ~ $ l Mail/inbox -rw------- 1 ach ach 16221717 Mar 12 15:43 Mail/inbox ach@lost(0) ~ $ l Mail/inbox -rw------- 1 ach ach 16221717 Mar 12 15:43 Mail/inbox ach@lost(0) ~ $ l Mail/inbox -rw------- 1 ach ach 16221717 Mar 12 15:43 Mail/inbox Workaround the bug is to create a new folder, move all msg from inbox to new folder. In inbox move all msg to trash and move the messges back: ach@lost(0) ~ $ # create new folder, move all msg to this folder ach@lost(0) ~ $ l Mail/inbox -rw------- 1 ach ach 16221717 Mar 12 15:45 Mail/inbox ach@lost(0) ~ $ # compact inbox ach@lost(0) ~ $ l Mail/inbox -rw------- 1 ach ach 16221717 Mar 12 15:45 Mail/inbox ach@lost(0) ~ $ # move all msg to trash ach@lost(0) ~ $ l Mail/inbox -rw------- 1 ach ach 0 Mar 12 15:47 Mail/inbox ach@lost(0) ~ $ # move all msg from the other folder back ach@lost(0) ~ $ l Mail/inbox -rw------- 1 ach ach 5365662 Mar 12 15:48 Mail/inbox
It happens to me also, still looking for a reason thought
Achim, still can reproduce the problem with 3.1.3? I use maildir, so I can't say and with maildir it definitly works.
This might be related to my bug 43773. I think Till was working on that one some months ago...
Hi Stefan, I'm running 3.14 now and moved by inbox and several others to use maildir. I've only one old mbox folder compactable=false. I've deleted one msg their, called compact and (as I now expect) the size did not change. I did a quick grep on an server with KDE 3.1.3 and found 5 out of 65 inboxes with compactable=false (2 mbox and 3 maildir in format). Together there are 26 line with ^Compactable=false in the all kmailrc. Let me know if and what information you'll need and I contact the users to get their okay to collect the information. Achim
I assume you use some kind of NFS, right? (that makes index out of sync much more likely)
Hi Coolo, no, sorry. no NFS on those hosts. home partions are all ext3 with default mount options. kernels 2.4.18 ... 2.4.21 over the time of this bug report.
If I understood problem correctly it doesn't seem to affect the 1.5.93 [KDE 3.1.93 (CVS>=20031028)] version. I've tried to replicate the bug several times on ~100 mail messages in folder in maildir fromat. The directory size was affected each time I removed the messages and selected "compact folder" option. The only unaffected file was folder.index [+index.sorted] but also until emptying the folder. To check everything out I've also created another folder in mbox format and copied some messages. Compacting also worked correctly on this folder. Each folder in my kmailrc was set compactable=true by default. I must admit that I have clean kde installation [from cvs] and thus other people might have different experiences.
I am on KDE 3.2 beta (home compiled), and this problem is still not solved. My inbox is 43 Mo big, for 100 messages. Impossible to compact it. the other forders are compacted when I quit. (I made Compactable=true) It is the same when using french or english language. The only way I can get my inbox empty is to move all the messages to another folder, then clicking on "Move all messages to trash".
Subject: kdepim/kmail CVS commit by tilladam: Handle empty lines before the first mbox delimiter gracefully. This fixes compaction of notoriously non-compactible mboxes. Don't reset the needCompacting flag until the compaction has actually suceeded. CCMAIL: 39290-done@bugs.kde.org CCMAIL: 43773-done@bugs.kde.org One cookie my way, please. M +2 -2 kmfoldermbox.cpp 1.91 --- kdepim/kmail/kmfoldermbox.cpp #1.90:1.91 @@ -1156,5 +1156,5 @@ int KMFolderMbox::compact() fread(mtext.data(), 20, 1, mStream); if(i <= 0) { //woops we've reached the top of the file, last try.. - if(!strncasecmp(mtext.data(), "from ", 5)) { + if ( mtext.contains( "from ", false ) ) { if (mtext.size() < (size_t)folder_offset) mtext.resize(folder_offset); @@ -1222,4 +1222,5 @@ int KMFolderMbox::compact() close(true); mAutoCreateIndex = autoCreate; + needsCompact = false; // We are clean now } else @@ -1237,5 +1238,4 @@ int KMFolderMbox::compact() } emit changed(); - needsCompact = false; // We are clean now return 0;
Reopened because this problem is unfortunately still there. The reason for this is the following code in kmfolder.cpp: // sanity check if (mCompactable && (!msg || (msg->subject().isEmpty() != mbSubject.isEmpty()))) { kdDebug(5006) << "Error: " << location() << " Index file is inconsistent with folder file. This should never happen." << endl; mCompactable = FALSE; // Don't compact Instead of marking a folder as non-compactable we have to regenerate the index. But we should have some smart index recovery code so that the message status and probably other information isn't unnecessarily lost during index regeneration. But that's for after KDE 3.2.
As I wrote this can't be fixed for KDE 3.2.