Exporting Emails from Apple Mail
Recently I was stuck having the problem that I wanted to export all my mails from Apple Mail to Evolution, and found out the hard way that there is no option of exporting all mails into a standard format from within Apple Mail. Although you can just mark all mails and use “Save As…” and save them as a raw file, this will produce a mbox file which does not have lines in emails starting with “From_” correctly escaped, which as a consequence will let several email programs barf while trying to import the file.
So I wrote pyelmx.py, a small and simple python script which goes over your emails in the Apple Mail folder and creates an mbox file for every mailbox it encounters. In case others might have the same problem, I have made the script available under the GPL.
You can download it here.
A short introduction can be found here.