These are instructions how to import messages held in KMail 2 into Thunderbird. Versions were KMail 4.10.5 and Thunderbird 17.0.8, but should not matter for this to work.
- Install ImportExportTools in Thunderbird.
- In Thunderbird, create a folder into which you want your e-mails imported. This can be in "Local Folders", which is recommended, but also in an IMAP account. In the latter case, importing and uploading are done at the same time, so there are two error sources and the second step can not easily be repeated when it fails, without repeating the import step as well.
- Right-click on the new folder and select "ImportExportTools -> Import Messages".
- In the file selection dialog, go to ~/.kde/share/apps/kmail/mail/<your folder to import>/cur/, select "All Files" in the file filter at the bottom, and select all these messages (simplest by pressing Ctrl+A).
- After the import, all messages are marked as unread. Right-click the folder again and select "Mark folder as read" to fix this.
This should import all messages nicely and without errors. You may compare message counts to those in KMail.
The above solution seems quite straightforward, but it really was the only working solution I found. Various other solutions are meant to work, but did not:
- Uploading local e-mails to an IMAP folder in KMail, then downloading again from there in Thunderbird. Should work usually, but in other cases errors in KMail can be triggered. For example, creating a new folder is not possible in KMail if the e-mail server is based on courier.
- Selecting a bunch of e-mails in KMail and right-clicking on them then selecting "Save as …" gives the option to save them all to one .mbox file. Which can then be imported with "ImportExportTools -> Import Mbox files …" in Thunderbird. However that import often fails, so that no e-mails are imported at all.