Mark Pilgrim has been blogging about his success in converting from the Mac to Ubuntu Linux and occassionally some problems he has run into during the process.
In [
Mail.app's "Save as" is broken] Mark talks about how Apple's Mail.app doesn't save valid mbox format files because it does not quote lines starting with "From " (From followed by a space). I sent him this to try:
Make sure you have the "procmail" package installed (it contains the program "formail"):
sudo apt-get install procmail
Use the "formail" command to split up the mbox into individual email messages and have it invoke itself where it's default behavior is to escape "From " lines:
formail -s formail < bad.mbox > good.mbox
This might not escape "From " lines that are inside messages that have a Content-Length: header, but your mail reader should be able to handle those messages correctly anyway.