This forum has been archived. All content is frozen. Please use KDE Discuss instead.

Optimize KMail mails archives

Tags: None
(comma "," separated)
User avatar
qdlaty
Registered Member
Posts
40
Karma
0

Optimize KMail mails archives

Wed Apr 29, 2009 7:54 pm
Hi,

I've PLENTY of mails stored in few mail boxes and each Kontact/KMail run I've few minutes lock-up before I can use the application.
If I've over 20000 mails KMail is processing them each run keeping me on hold.

Is there any way to make KMail to store it more efficient way?
How to convert already collected mails into something more efficient?

Marcin


Chaos, panic and disorder - my work here is done.
User avatar
Alec
Registered Member
Posts
565
Karma
1
OS

RE: Optimize KMail mails archives

Thu Apr 30, 2009 3:32 am
I'm not sure it would help, but it won't hurt to try ;)

By default, KMail stores messages in maildir format. This means that each email is a file, and you have thousands of them scattered all over your hard drive. So every time it wants to read a mail, it has to find and open each one.

Try creating a folder in mbox format. MBox is one large file which holds all the messages together in one place. Move all your mail there, and see if the speeds up at all.


Get problems solved faster - get reply notifications through Jabber!
User avatar
qdlaty
Registered Member
Posts
40
Karma
0

RE: Optimize KMail mails archives

Thu Apr 30, 2009 6:12 am
Alec wrote:Try creating a folder in mbox format. MBox is one large file which holds all the messages together in one place. Move all your mail there, and see if the speeds up at all.


Thanks, the idea is exactly what I had in mind but how to convert maildir into MBox?

Marcin


Chaos, panic and disorder - my work here is done.
User avatar
Alec
Registered Member
Posts
565
Karma
1
OS

RE: Optimize KMail mails archives

Thu Apr 30, 2009 6:37 am
That's tricky.

I did quite a long time ago, so I don't remember everything exactly (it was back before KDE 4 was out. When I switched to 4.2, I just copied over 3.5's mail directory), so be careful and use your own discretion.


The mail is stored in [font=Courier]~/.kde4.2/share/apps/kmail/[/font], and as the first step, exit KMail, and I'd back it up in case something breaks.

Next, start it back up, and create new directories as MBoxes. For example, if you have "Inbox", create "Inbox.new", and move all the mail from one to the other. (I left folders that have mails added and deleted often in MailDir format)

Next, quit KMail again. Go into the mail directory, and enable viewing hidden files. Delete all the old folders and other files that have that name, and rename the mbox files to take their place.

Now, cross your fingers and start KMail. Hopefully it will work out, but if something goes wrong, quit KMail and replace what's there with your backup.

Hope that helps!


Get problems solved faster - get reply notifications through Jabber!
User avatar
qdlaty
Registered Member
Posts
40
Karma
0

RE: Optimize KMail mails archives

Sat May 02, 2009 7:03 pm
Alec wrote:That's tricky.
...


Was not so hard, but...
I've lost half of the messages (only topic remain on the list while the contents and recipients are gone).
But I did revert to KDE4 4.2.2 and since that I don't see the problem of long start with mail fetch :|
With 4.2.70 running Kontact from console gave me huge text output showing KMail processing all mails, the stable version is running clear.

I guess I'll stick with 4.2.2 for a while before I'll be tempted again to try 4.3-dev branch :D


Chaos, panic and disorder - my work here is done.
User avatar
anda_skoa
KDE Developer
Posts
783
Karma
4
OS

RE: Optimize KMail mails archives

Sun May 03, 2009 8:09 am
qdlaty wrote:I've lost half of the messages (only topic remain on the list while the contents and recipients are gone).


Sounds like a corrupted index, which can usually be fixed by explicitly rebuilding it. There is a respective action for that in the folder's context menu.

Cheers,
_


anda_skoa, proud to be a member of KDE forums since 2008-Oct.
User avatar
qdlaty
Registered Member
Posts
40
Karma
0

RE: Optimize KMail mails archives

Sun May 03, 2009 8:40 pm
Sad I didn't think about rebuilding index when I found the corruption. I just restored from backup.
I couldn't resist the temptation and installed 4.71 with KMail 1.11.90.
No lock-ups since that. Even with MailDir and encrypted home partition.


Chaos, panic and disorder - my work here is done.


Bookmarks



Who is online

Registered users: Bing [Bot], claydoh, gfielding, Google [Bot], markhm, sethaaaa, Sogou [Bot], Yahoo [Bot]