Showing posts with label Linux. Show all posts
Showing posts with label Linux. Show all posts

Tuesday, September 05, 2006

Converting kmail messages to Mac Mail.app messages

I wasn't able to find an easy way to convert Kmail messages to mac os Mail.app - without having to export to mbox format. For me, that wasn't an option.

I did, however, find a workaround.

  1. Create a new mailbox in mail.app (ie "Import"

  2. move your mail messages from kdemail/cur into ~/Library/Mail/Mailboxes/Import.mbox/Messages

  3. run the following: let num=9999; for i in `ls`; do cat $i | wc -c | sed -e 's/\t//g' | sed -e 's/ //g' > $num.emlx; cat $i >> $num.emlx; let num=$num+1; rm $i; done in a terminal window within the new "Messages" directory you have

  4. in Mail, choose to Rebuild the mailbox (Mailbox | Rebuild)

This seems to work because mail just stores its information in a modified maildir format (I'm guessing this only works for Tiger).