libpst
Library and tools for reading and extracting data from Microsoft Outlook PST files. Supports exporting emails to mbox, MH, KMail formats and contacts to LDIF or DII formats.
Description
libpst provides a library and associated tools for accessing and processing Microsoft Outlook Personal Storage Table (PST) files. The core library (libpst4t64) enables applications to read PST data, while development files (libpst-dev) include headers and documentation for building custom tools. The pst-utils package contains command-line utilities for common extraction tasks.
Primary use cases include digital forensics investigations requiring Outlook email and contact recovery, data migration from PST to standard email formats, and preparation of contact data for LDAP import. Tools like readpst export emails to mbox, MH, or KMail-compatible formats, while specialized utilities handle contacts (pst2ldif) and legal document formats (pst2dii).
The suite supports various output formats and includes options for handling deleted items, attachments, and character encoding issues common in PST files. Debug logging is available across tools for troubleshooting corrupted or complex PST structures.
How It Works
libpst implements Little Endian parsing of PST file structures to extract email messages, attachments, contacts, and metadata. It processes the proprietary PST container format, decoding email headers, bodies (including RTF), CC/BCC fields, and timestamps. Output modules convert native PST data to standard formats like mbox (RFC822), MH, LDIF (LDAP), VCard, or DII load files for legal discovery. The library handles character set detection and supports debug logging of binary PST parsing operations.
Installation
sudo apt install pst-utilsFlags
Examples
lspst -hlspst -l -f "%F %T" example.pstpst2dii -hpst2dii -f font.ttf -O output.dii -o /tmp/output example.pstpst2ldif -hpst2ldif -b "ou=contacts,dc=example,dc=com" example.pstreadpst -hreadpst -M -D example.pst