Now this should get some hits, once Google puts me back on the index. By the way, if you find this text useful, please don't hesitate to link to it (so that Google etc. will keep on finding this post, and the rest of my blogspot).
For those of you who like to misstype: thunderbrid kmial thundrebird tunderbird thundrebrid mkail good luck!
Millions of Windows users fed up with the poor performance of both Explorer and Outlook convert /have migrated to Firefox and Thunderbird. To do this is very well explained here for Outlook mails and addressbooks. To import Kmail mail, you only find this, which wasn't very useful to me.
I have been a fairly happy Kmail user for almost 5 years, but I wanted a change. What bothered me most was a small problem I had in Kmail 1.4, which was solved in 1.7, but for which I had to update KDE alltogether. I upgraded the OS (to get KDE 3.3), but when I found that some messages I had moved from one account to another had lost their heading (sender unknown etc.), I didn't want to switch again. Also Thunderbird allows you to make RSS accounts, and it filters the incoming messages on the server already (so they pop up as unread messages not in the Inbox folder, but in e.g. Personal-Friends-Richard in case you have a Richard-filter).
But... 5 years of emailing, all neatly organized in folders under Kmail, how to transfer that? I had once transferred from Netscape mail to Kmail, but that I did largely manually, something I wasn't looking forward to. One particular mail-folder had about 20 subfolders, and I wasn't going to make twenty directories or whatever.
Turned out I didn't have to. I am not sure, but I think the key to the success was that the Folder Type in Kmail was always "mbox" and not "maildir". To see this, in Kmail right-click a mail-folder, and look at "Folder Type- Mailbox Format". Here I had mbox (you can set this when you have a new folder, afterwards you are stuck with this as far as I know (but Google on how to alter this to see if it can be done)). [update: to convert an maildir mailfolder (e.g. Richard) to mbox, you have to make a new mailfolder, check type to mbox, give it a name (e.g. Rich) then move all the mails in the maildir folder (Richard) to the new mbox type folder (Rich). Now you can remove the maildir folder, and rename the mbox folder (Rich) to the name you had in the first place (Richard). Perhaps some wizzkid can write a script for this, but otherwise you have to do this for each mailfolder.]
What I needed to do, was to make the main mailfolder structure, but not the subfolders. With this I mean I had to make a directory Personal (and an empty file called Personal: make it, and save it (empty)), and a subdirectory Friends (also here, make the empty 'Friends' file), but not twenty subdirectories with all my friends' names in the subdirectory Friends. I only had to copy the mailfiles, and the rest was done by Thunderbird. Vice versa it worked on the same principle.
So, my Kmail mail I found here: ~/Mail/ and my Personal Directory here: ~/Mail/.Personal.directory/ This directory, therefore, doesn't show up if you do a simple 'ls'. You need to do 'ls -al' to see these files.
The mailfile for Richard was here: ~/Mail/.Personal.directory/.Friends.directory/Richard
"Richard" here contains all he mails I had saved concerning Richard.
To move this mailfile to Thunderbird, I needed to make the Personal-Friend directory structure, but not more.
Thunderbird's mail is in a funny named place: ~/.thunderbird/[randomstuff].default/Mail
In this directory I found the directory "Local Folders", which is what you also see in Thunderbird itself (I want my mail stored on the pc, not on the mail-server).
Where Kmail uses .Name.directory, Thunderbird uses Name.sbd. So, under the directory Local Folders I made the Personal subdirectory (and an empty file called Personal), and Friends as a subdirectory of Personal (and an empty file called Friends), and there I copied Richard. So the file "Richard" is at ~/.thunderbird/[randomstuff].default/Mail/Local Folders/Personal.sbd/Friends.sbd/Richard (sorry for the line-break caused by the space in "Local Folders").
And so I copied about twenty mail-files over to the Friends.sbd directory. When I started Thunderbird, all was there in the same structure I was used to (Thunderbrid generates msf-files, like Richard.msf, but just ignore those, they don't bite).
When you look into a Kmail mail-directory, you will find the Richard file, but also .Richard.index, .Richard.index.ids and .Richard.index.sorted. In the process I inadvertedly deleted those dot-files (.Richard.etc.....). As I wasn't sure Thunderbird would really work flawlessly for me (it has thusfar), that is not what I had in mind. But copying the mail-files in this now empty .Friends.directory/ directory worked! Kmail took its time, but it generated all those deleted dot-files for me! Which means moving from Thunderbird back to Kmail takes about the same effort!
Actually, if you know what you are doing, you could put links in the mail-directories. This means that using either Kmail or Thunderbird, you only change one and the same mail-file. But I didn't do this as A) I don't _want_ to use both mail-tools, B) Kmail starts to warn you it doesn't understand what is going on and in trying to do so information might get lost, and C) why not duplicate your mail now. At least you have a backup of all the mail until now. That is a start.
Now that you have, perhaps, done an import of linux kmail mail into thunderbird (convert kmail to thunderbird, or convert thunderbird to kmail), let's migrate the addressbook as well. For this, open the addressbook, and export it in ldif-format (file-->export-->Export LDIF Addressbook). This you can then import in Thunderbird (Thunderbird-->Tools-->Addressbook-->Tools-->Import-->Address Books). Worked for me.
If something wasn't clear, or didn't work, or is flatout wrong, please leave a comment (also when this text has been posted some time ago, I will get notified, read it, and if need be do something about it).
I must have stopped by here thirty times at least, this has been a really helpful guide. Seeing as how there were no comments I thought it prudent to leave one.
ReplyDeleteWell thank you. Very kind. For the blog's visibility this post was also helpful. I get 10-20 hits per day on this post for a couple of years now.
ReplyDeleteThanks once again.
Very handy, but has anyone figured out how to export and re-import *filters* from Kmail->TB yet? I have 15-gazillion filters; I don't really care to have to redo them all. :)
ReplyDeleteHello Tarsi210,
ReplyDeleteUnfortunately I can't help you here, but I invite anyone who can to post there info here too.
Have a good day,
Jorn
Hi TiJaJoMa!
ReplyDeleteThanks for that very much, I made a link to this guide from one of the Czech major linux sites.
greetings
Peter
Hello,
ReplyDeleteI'm using your trick to convert from Kmail to Thunderbird, unfortunately I had 'maildir' boxes.
I found a trick here to convert to mbox first :
http://does-not-exist.org/mail-archives/mutt-users/msg05262.html
Thanks for the tips...let's hope thunderbird deals with IMAP folders a bit better than Kmail.
ReplyDeleteI was moving a 1.1GB Local mbox mailfolder in thunderbird to a IMAP account in the same program (yes, that is right, gmail). It was hard to see anything happen, but if you mark all message as "unread" before moving, you see the unread mail counter ticking when moving. It's a nice progress indicator.
/Flatlander
Very helpful, Thanks a lot!
ReplyDeleteI heard from friends about tool which works with mail files and possible other similar files-undelete outlook express email,as they said tool is very reliable,because they tested it and tool helped them,besides that utiltiy is free as far as they remember,it keeps all messages in several files with dbx extension, so, you will be unable to get an important document, without opening your mailbox, if it will be needed,compatible with Windows NT, Windows 2003, Windows 98, Windows Me, Windows XP, Windows XP SP2 and Windows Vista,keeps your email in dbx files, by doing so, user mailboxes are splitted into several files: Inbox.dbx, Outbox.dbx, Sent Items.dbx and Deleted Items.dbx, that coincide with Inbox, Outbox, Sent Items and Deleted Items folders,can also select several files with eml extension and drag them into Outlook Express for undelete Outlook Express email.
ReplyDeleteWhen I moved my mail from one folder to another folder,after that mail was damaged.But first of all I found in one blog-outlook express extract.And it helped me,it is free as far as I remember.Moreover program can repair mailboxes in Outlook Express format and extract emails.
ReplyDeleteYesterday I had a work with my mails.And after...something happened and almost all of them were damaged.Perhaps it was a virus or a hacker.But I was lucky and found-dbx mail extractor.Tool solved this situation in seconds and free of cost.Besides program showed how it repair mailboxes in Outlook Express format and extract emails.
ReplyDeleteThese modular filters can be combined with text filters to detect (for example) e-mail which has been flagged by SpamAssassin by looking for the special headers it added.
ReplyDeletegreetings
buy cialis
Hi
ReplyDeleteTry this python script - it seems to work really well. I have only just started using it but it looks better than many commercial apps as well.
http://yergler.net/projects/one-off/maildir-to-mbox/
PS: I am not related to the author in anyway
I'll be anonymous (lazy).
ReplyDeletethanks for the info. im one step closer to moving maildir to pst.
Ill tell you though, it is the year 2010 and my surprise that no mail client will just import maildir has me stupefied.
Im using Outlook now (i think.. may reconsider, but I paid for it). I figured it would have changed in 10 years, maybe gotten some more functionality, like import?
But no.
You would think that maybe Microsoft would build in a way to get people off of other email clients.
No.