Introduction
A PST file, short for Personal Storage Table, holds a whole mailbox for
Microsoft Outlook: folders,
emails, calendar items, contacts and tasks. People use it to archive old mail, to move a
mailbox to another computer, and with POP email accounts, where Outlook keeps all mail in
a PST file. An OST file (.ost) is the same format used as an offline copy of
an Exchange or Microsoft 365 mailbox.
Older ANSI files, from before Outlook 2003, are limited to 2 GB. Unicode files, the default since Outlook 2003, use 64-bit offsets and can be far larger. Microsoft published the format as [MS-PST] in 2010.
Structure
The file starts with the magic !BDN, then a client signature,
SM for a PST or SO for an OST, and a version number: 14 or 15
for ANSI files, 23 for Unicode. The format has three layers:
- Node database: the file is cut into pages and blocks, found through two B-trees, one for nodes and one for blocks. Data blocks are usually lightly obfuscated with a simple byte substitution.
- Lists, tables and properties: inside the nodes, a small heap format stores property contexts, each a set of properties of one item, and table contexts, each a table such as the contents of a folder.
- Messaging: on top, folders, messages, recipients and attachments, each a node with its properties, using the same property IDs as an MSG file.
Links
Software
- Microsoft Outlook (Windows)
Developers
- libpff, C library with Python bindings for reading PST and OST files
- java-libpst, Java library for reading PST files
Reference
- [MS-PST]: Outlook Personal Folders (.pst) File Format, Microsoft Open Specifications