Now, one of the things I always struggled with was, after I left a project is that I would be stuck with a DVD or memory with a big Microsoft Outlook PST file on it. It usually held some useful emails, how-to’s or documentation I produced during the project, so it could be useful after a while.
Now there are a few tools on the market, however they all assume you have full access on the PC at your workplace. As my main customers have a very ‘security aware’ desktop environment, none of these tools really appealed to me. Nonetheless, tools like Littlemachines’ O2M are very useful. They convert your Outlook Inbox (and other folders) to the Apple mbox format.
In my case, all I could do was export the mail to a file, in my case PST. Let me get to the point. In order to import these emails into Apple Mail, I found an open source project that releases regular updates on a utility called libpst. The libpst utility has some functionality to convert, list and diff mailbox formats. The thing I was after was obviously the converter.
Now what do you need to do to get this working?
1. Start the Terminal application (Terminal.app)
You can find it under Applications -> Utilities -> Terminal.
2. Check your C compiler.
In order to use libpst, we will need gcc (or any other c compiler that can do the job).
From the Terminal you just started at step 1, type the following command:
macbook $ which gcc
It should return /usr/bin/gcc or another path where gcc is installed. If so, proceed with step 3.
If there is no response, that means gcc needs to be installed. Insert the Snow Leopard CD.
Enter the “Optional Installs” folder. Run Xcode.mpkg. This should install gcc. Once the install is complete check again by running the command “which gcc” at the command prompt.
If you do not have the Snow Leopard CD at this point, you can download the Xcode suite from Apple’s website.
3. Get the software
Now that we are ready, you will need to download the source package from the 510 Software Group website. The packages can be downloaded from:
4. Some additional steps
Depending on how active you are on compiling software, you may be able to skip the following. If not, please proceed below.
In order to install libpst you also need to install “boost”. You can download boost from:
In the Terminal that was opened up under step 1, type the following.
macbook $ sudo su –
You will be prompted for a password. Provide the login password, that you enter when you access your Mac. You will need a root account setup. If you encounter problems at this stage, either contact me, or google for the steps to activate the root account. Now let’s continue:
root # cd /usr/local/
Unpack the boost package. The ‘<xxx>’ in the example below represents the version number for boost, in my case this was ‘1_41_0′.
root # tar –bzip2 -xf /your/download/directory/boost_<xxx>.tar.bz2
Once that is complete you will see a directory now under /usr/local/ called boost_<xxx>.
root # cd /usr/local/boost_<xxx>
Run the following command. This will take a few mins to run.
root # ./bootstrap.sh –prefix=/usr/local/
Once that is done at the command prompt type
root # ./bjam install
This will take a while to run – 15 to 30 mins. Get a cup of coffee.
5. Compile the software
First we need to go back to the directory to which we downloaded (and unzipped) our libpst.
root # cd /path/to/download/directory/libpst-0.6.45
Run the following commands (some of them will create some funky output, make sure everything run without any errors):
root # ./configure
root # make
root # make install
6. Great you did it! Start the conversion
You should find libpst, readpst and pst2ldif under the /usr/local/bin directory.
To use the utility, run the command at the command prompt in the directory you want the mbox file created (for example /Users/<yourname>/Mail):
root # cd /Users/<yourname>/Mail
root # readpst -r /path/to/the/pst/file/<your>.pst
7. Using the new mailbox file
From Apple Mail, you can use the Import Mailboxes function from the File Menu. When prompted for the file format to import from, choose “Files in mbox format” and click next.
You will then be able to user your mbox file created under step 6. This will result in a new folder in the left menu pane in Apple Mail, which usually is labeled IMPORT.
In case of any question, put a comment below or contact me directly! Credits to akaran at HOWTOGEEK, who posted most of this info there.