A comprehensive Python-based solution for converting orphaned OST (Outlook Offline Storage Table) files to PST (Personal Storage Table) format using open-source libraries and custom implementations.
- Multiple Conversion Methods: Uses specialized libraries when available, falls back to custom implementation
- Orphaned OST Support: Handles OST files that are no longer connected to Exchange servers
- Pure Open Source: No proprietary software required
- Custom AI Implementation: Fallback custom parser when libraries aren't available
- Cross-Platform: Works on Windows, Linux, and macOS
- Detailed Logging: Comprehensive logging and error reporting
- CLI Interface: Easy-to-use command-line interface
Run the installation script as Administrator:
Set-ExecutionPolicy -ExecutionPolicy RemoteSigned -Scope CurrentUser
.\install.ps1-
Install Python 3.8+
# Download from https://www.python.org/downloads/ -
Create virtual environment
python -m venv ost2pst_env # Windows ost2pst_env\Scripts\activate # Linux/macOS source ost2pst_env/bin/activate
-
Install dependencies
pip install -r requirements.txt
-
Install specialized libraries (optional)
# For better OST/PST handling (may require compilation) pip install pypff pyesedb
# Using basic converter
python ost2pst_converter.py input.ost output.pst
# Using enhanced converter (recommended)
python enhanced_ost2pst_converter.py input.ost output.pst# Force specific conversion method
python enhanced_ost2pst_converter.py input.ost output.pst --method pypff
# Analyze OST file only (no conversion)
python enhanced_ost2pst_converter.py input.ost output.pst --analyze-only
# Verbose logging
python enhanced_ost2pst_converter.py input.ost output.pst --verboseAfter installation, you can use the created batch files:
- run_converter.bat: Basic converter with GUI prompts
- run_enhanced_converter.bat: Enhanced converter
- activate_env.ps1: PowerShell environment activation
The tool uses multiple conversion approaches in order of preference:
- Best option when available
- Uses libpff (libpst) Python bindings
- Handles complex PST/OST structures properly
- Preserves folder hierarchy and metadata
# Requires successful compilation of pypff
pip install pypff- Good fallback for ESE database access
- Treats OST as an ESE (Extensible Storage Engine) database
- Can extract raw email data from database tables
# Usually easier to install than pypff
pip install pyesedb- Always available fallback method
- Pure Python implementation
- Scans file for email patterns and headers
- Creates basic PST structure
OST2PST/
├── ost2pst_converter.py # Basic custom converter
├── enhanced_ost2pst_converter.py # Enhanced multi-method converter
├── requirements.txt # Python dependencies
├── install.ps1 # Windows installation script
├── README.md # This file
├── run_converter.bat # Windows launcher (created by install.ps1)
├── run_enhanced_converter.bat # Enhanced launcher (created by install.ps1)
├── activate_env.ps1 # PowerShell environment (created by install.ps1)
└── ost2pst_conversion.log # Conversion log file (created at runtime)
- ✅ Email headers (From, To, Subject, Date)
- ✅ Email body content
- ✅ Basic attachments (with pypff method)
⚠️ Complex formatting (limited)⚠️ Calendar items (basic support)⚠️ Contacts (basic support)
- ✅ OST files (all versions)
- ✅ PST output format
- ✅ Large files (>2GB)
- ✅ Corrupted/orphaned OST files
-
Custom Method Limitations:
- May not preserve complex formatting
- Folder structure might be simplified
- Some metadata may be lost
-
Library Dependencies:
- pypff may require compilation on some systems
- Some libraries work better on specific OS versions
-
OST File Conditions:
- Severely corrupted files may not be fully recoverable
- Encrypted OST files require additional handling
1. "pypff not found" Error
# Try alternative installation methods
pip install --upgrade pip setuptools wheel
pip install pypff
# Or use conda
conda install -c conda-forge pypff2. "Access Denied" on OST File
# Ensure OST file is not in use
# Close Outlook completely
# Check file permissions3. Large Memory Usage
# For very large OST files, use streaming mode
python enhanced_ost2pst_converter.py --method custom input.ost output.pst4. Incomplete Conversion
# Check log file for details
cat ost2pst_conversion.log
# Try different method
python enhanced_ost2pst_converter.py --method pyesedb input.ost output.pstEnable detailed logging:
python enhanced_ost2pst_converter.py input.ost output.pst --verbose| File Size | Method | Typical Time | Memory Usage |
|---|---|---|---|
| <100MB | pypff | 1-5 min | 200-500MB |
| <100MB | custom | 2-10 min | 100-300MB |
| 1-5GB | pypff | 10-60 min | 500MB-2GB |
| 1-5GB | custom | 30-180 min | 200-800MB |
This project uses AI-generated code as a foundation. Contributions welcome:
- Fork the repository
- Create feature branch (
git checkout -b feature/AmazingFeature) - Commit changes (
git commit -m 'Add AmazingFeature') - Push to branch (
git push origin feature/AmazingFeature) - Open a Pull Request
This project is open source. The custom implementations are AI-generated and freely available for use and modification.
- Backup your data: Always keep backups of original OST files
- Test first: Try with a small OST file before processing large files
- No warranty: This tool is provided as-is without warranty
- Data integrity: Verify converted PST files before deleting original OST files
For issues and questions:
- Check the troubleshooting section
- Review log files (
ost2pst_conversion.log) - Try different conversion methods
- Open an issue with detailed error information
- v1.0 (2025-11-11): Initial release
- Custom OST parser implementation
- Multiple conversion method support
- Windows installation automation
- Comprehensive logging and error handling