I created a special user called mailarchive and this user would hold all these messages. The problem was: how do you convert these folders of individual mail files into corresponding mbox files which can then be imported into Mail. Now, if you only have a few hundred, you can drag them back into Entourage from the Finder, and then export them as an mbox file. However, if you have many thousands, you can't really do that because the Finder will go quite comatose if you drag 7,000 files and try and drag them into an Entourage folder. Here is how I solved the problem. It probably helps if you know a little Unix.
Here's what I did:
- Here you may need to rename your individual mail files. These may contain weird and wonderful characters which are not conducive to Unix scripting (eg ?'" etc). Renaming the files means you lose nothing in terms of data in your converted mbox, and it means you can cleanly run some Unix scripts. I used a program called filenamer to do that. In the actions: First action was to get it to just use the index as the file name, and the second action I used was to add the .eml extension to each file. I am sure there are other programs that can batch rename in this way.
- Next I converted the linefeed regime in each file from Mac to Unix (my files were OS 9 historic). To do this I used flip. I downloaded flip.osx and I moved it to ~/bin/flip using the Terminal as in:
If you don't have a bin directory then you can do$ mv flip.osx ~/bin/flip $ chmod +x ~/bin/flip
If you want, you can of course also run flip from your Desktop directory in the Terminal. The next thing to do was run flip -u on each file. Because I had so many, I had to use xargs in the command line ... that is, I changed into the directory which contained all the .eml files. Assuming your eml files are in a directory on your Desktop called THEM you would do:$ mkdir ~/bin$ cd ~/Desktop/THEM $ ls * | xargs flip -u - Next I used the eml2mbox program. Download it and install it also to your bin directory. I removed the .rb extension because that
is RealBasic under OS X. Once you have moved it to your bin and renamed it eml2mbox, don't forget to chmod +x eml2mbox. First move into the parent directory which contained the directory containing the eml files (in the example above this is Desktop) and then I ran:
$ eml2mbox -s THEM ~/Desktop/WhateverYouWant.mbox - Open Mail.app and import the mail box as Other and you are done.

