Original von seb
Let me offer a warning, dont try and export the mail to a file, you wont have much of a chance in reimporting it later... I exported, upgraded (hence new version of kmail) and bam i cant import my mail or my addressbook, I had to open my old mail in evolution and my new mail with kmail.
:x
It is perhaps not automated (and not user-friendly) but normally, you just need to create a new directory in KMail and then with Konqueror replace that new directory with what you saved (similar with a mbox file, you copy the file to replace the file created by KMail.)
Have a nice day!