Random Tip: Importing Emails from Outlook into a Mac

19 Comments
12 Feb

I used to be a Windows PC guy, and so used Microsoft Outlook for email. About 5 years ago, I saw the errors of my ways, repented, and switched to the one true computing platform. After making the switch, I proceeded to backup my important PC stuff, like emails and documents, to CD archives, and tucked them away in my closet to collect dust.

Recently however, I came across a need to extract and read some of those old emails I had backed up. Unfortunately, there’s no easy way to do this on a Mac, since the emails are stored in Outlook’s proprietary PST file format (boo), and I didn’t have access to a PC. Fortunately, someone wrote an open source utility to extract emails from such PST files, and this utility runs on any POSIX compliant Unix system (ie Linux, and more importantly, Mac OS X). So if you find yourself in a similar situation, fire up Terminal and get ready to do some command line hacking.

Here’s what I did:

  1. Download the source code for libpst.
  2. Open up Terminal, and extract the archive: tar -zxvf libpst-0.5.2.tar.gz
  3. Change to the directory: cd libpst-0.5.2
  4. Compile the source: make
  5. If all goes well, there should now be a file called “readpst“. Type ./readpost -V to see that it works.
  6. Copy this readpst file to where your Outlook PST file is stored
  7. Create an output directory: mkdir output
  8. Process the Outlook PST file with readpst: ./readpst -o output PSTFILENAME
  9. After this is finished, you should have a bunch of files in your output directory that correspond to Outlook mailbox folders.
  10. Open up Mail.app, and select File -> Import Mailboxes…
  11. Select Import From: Other, and select the directory containing the output files you just processed.
  12. Once Mail has finished importing, you’ll be able to read your Outlook emails in Mail.

So there it is, a 12 step process to get Outlook emails into Mac Mail. Hope this helps someone out there, I know I had to research for about an hour or two to figure this one out.

PS, Yes, I want to have my lights up as long as I can… or at least, as long as it still feels like winter.

Posted on Monday, Feb 12th 2007 at 1:37 am

19 comments

  1. # michelle Feb 14, 2007

    hi joe,

    how did you learn how to design web sites? did you go through a formal program or did you learn “on the side”? i’m learning how to use html and css to design simple web sites for a class in library school….any books you recommend? i bought html utopia, head first html, html and xhtml: the definitive guide, and web design in a nutshell. phew!

    michelle

  2. Pingback: Hawk Wings » Blog Archive » From Outlook to Mail.app with libpst
  3. Pingback: Outlook Mails in Mail.app importieren at fime
  4. # Joe Tan Feb 14, 2007

    hey michelle,

    I kinda learned how to do web stuff on my own, basically from tinkering with random stuff. I don’t really like to use books, but I have a bunch of online reference sites I like to use. A nice reference site for HTML and CSS I’ve used quite a bit in the past is this: http://blooberry.com/

    and if you’re interested in some slightly more advanced HTML techniques, try this site: http://alistapart.com/

    hope that helps :)

  5. # Keith Mar 06, 2007

    LibPST is helpful, but only if your PST files are from a version of Outlook before 2003. I tried using it when I made my jump to OS X, but it refused to work with my PSTs because they were from Outlook 2003. I ended up burning them off to a DVD (5+ years of archived email… :)) and taking them to a friend’s house to import them into Eudora, and then into Mail.app. A roundabout way to do it, but it beat having my data locked away in a format I couldn’t use.

  6. # Joe Tan Mar 06, 2007

    Cool, thanks for the tip!

  7. # Hector Mar 20, 2007

    Thanks for the tip. there is only one possibility for download at Forge and that is libpst-0.5.1.tar.gz
    I have done it and after extracting there are only readpst.1 also readpst.c and readpstlog.1
    None of them respond on the Terminal command
    ./readpost -V (step 5) any hints?
    Best hector

  8. # Joe Tan Apr 04, 2007

    0.5.2 should be available at this URL:

    http://alioth.debian.org/frs/?group_id=30390&release _id=941

    Try using that…

  9. # Joe Apr 04, 2007

    Unfortunately, as Keith said, it won’t work for Outlook 2003 .pst files. :(

    But it was easy enough to try, so thanks anyway!

  10. # Michael Voigt May 24, 2007

    How did you get it to compile, mine produces 1000 lines of errors…

    michael-voigts-powerbook59:~/Desktop/OOP/libpst-0.5.2 michaelvoigt$ make
    cc -g -O2 -Wall -DVERSION=\”0.5.2\” -c -o lspst.o lspst.c
    lspst.c:10:19: stdio.h: No such file or directory
    lspst.c:11:20: stdlib.h: No such file or directory
    lspst.c:12:18: time.h: No such file or directory
    lspst.c:13:20: string.h: No such file or directory
    lspst.c:14:19: ctype.h: No such file or directory
    lspst.c:15:19: errno.h: No such file or directory

  11. # Bill Compton Jun 04, 2007

    Hi Jim. Photos i received. Thanks

  12. Pingback: Moving all data from Pc to MAc - EmiratesMac
  13. # rinch Sep 21, 2007

    It\’s a very good site!

  14. # Oliver Oct 28, 2007

    Hi,

    sorry, but this from an unexperienced command-line user: when I type “make”, my Mac tells me that the command does not exist. Am I missing something? How do I get the machine to execute the Makefile?

    Many thanks - sorry for the stupid question.. Oliver

  15. # toxidator Jan 24, 2008

    I’m having the same problem as Oliver. I’m new to mac but not to unix, so what i would like to know is if there is not somthing liek apt-get in debian or emerge in gentoo for mac.
    It would be real nice to be able to install make that way.
    So plz help me and Oliver (and probably other people who will read this) and just tell us how to install make :P

    tnx,
    Toxidator

  16. # Hamster Mar 07, 2008

    You need to have XCode tools installed in order to compile libpst

    XCode tools are included on the DVD supplied with your Mac - just pop the DVD in your Mac and double click on the “optional installs” folder.

  17. # Mike Alberts Jun 07, 2008

    This worked well, thanks for providing info on how to do this.
    I am pretty new at using Macs, so I wanted to provide a little advice
    to anyone who needs to install the XCode tools which may seem obvious
    but wasn’t to me at first. Once you install the XCode tools, don’t bother
    opening the program to use it to compile the code. I got a little sidetracked
    doing this. Once XCode is installed, just continue in your terminal and
    type “make” and it works perfectly. Again, thanks for the free workaround!

  18. # Beano Jul 09, 2008

    The outlook (MS office 2006) message files saved in a desktop folder are .msg not a .pst archive. How to open these in anything e.g. mail, thunderbird or 2nd party software?

  19. # per Sep 10, 2008

    I dont have my apple cd! crap

    Do I really need to download 1 Gb! is that the size of xcode ?

Leave a comment