Is there a good way to export a Mac email folder so that each email message goes into a separate file? The only way I can think of is to export the folder using the "Export Mailbox" menu item, and then write a script (shell script for example) which will parse the email file and split it when it finds a new mail header. It seems a new message starts with every line which starts with "From " (including the space). Is this the best way?

1 Answer 1


Procmail is a possibility, but a) it's no longer maintained, and b) it may or may not run under macos. There are some other programs listed on procmail's Wikipedia page that may be useful.

But, just as a guess, I think you might have to "roll your own". If you know Python, you can use the mailbox library.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .