Saving old mails in Kmail

What would be the best way to restore my mails in Kmail ?

I saved my .kde4/share/apps/kmail dir from suse 11.1 and used it to start kmail in os 11.2, so that i have all my mails available as usual.

But i saw that received mails (old mails) are marked “unknown” for items such as : date, from, to and look empty .

How come ?

How can i fix this please ?

Thanks :wink:

kmail --version
Qt: 4.5.3
KDE: 4.3.1 (KDE 4.3.1) “release 6”
KMail: 1.12.2

Try going to “File” >> “Import Messages” and one of the options in the drop-down is “Import KMail Maildirs and Folder Structure”. I haven’t tried it myself, but it may be worth looking into.

I did it the way you tried and had success, but I also copied the relevant configuration files in ~/.kde4/share/config as well. Maybe that had something to do with it.

What you are seeing is just the index with none of the contents. As JumpingEarth says, you have to use Import which will add your old emails to a new set of folders to distinguish them from your current emails. It does work!

:wink:

so there is 2 ways :

1- Copying and pasting :

I guess you meant i need 3 files :
~/.kde4/share/config/kmail.eventsrc +
~/.kde4/share/config/kmailrc +
~/.kde4/share/config/kmailsnippetrc

Is there some other files that i need ? (Appart from ~/.kde/share/apps/kmail dir )

2- Import with Kmail menu :

which files ? same as above ?

Too bad but i only saved my kmail old dir , is there a way i have my mails back ?

Thanks :wink:

Your old KDE Kmail emails will have been in folders in ~/.kde/share/apps/kmail/mail (or ~/,kde4/etc if you have been using KDE4 already) labelled inbox, outbox, sent-mail etc.

If you have not saved these, the contents of your emails have gone.

Yes, that is what I meant. I don’t know if they are actually required, but I copied those 3 files (mostly because I didn’t want to re-enter account info), and it worked fine for me.

I had KDE 4.3 from factory installed on 11.1, though, so I was moving from (about) the same version of KMail on 11.1 to 11.2.

Hi :wink:

i copied and pasted ~/kde4/share/apps/kmail dir
it’s supposed to be enough for mails

And your contacts is in your /home/user/.kde4/share/apps/kabc