Convert Outlook for Mac (.olm) archive files to individual .eml files for AI analysis
- Extracts emails from OLM (Outlook for Mac) archive files
- Converts each email to standard EML format
- Handles both XML and binary message formats
- Preserves email headers (From, To, Subject, Date)
- Extracts email body content
- Python 3.6+
- No external dependencies (uses only standard library)
python olm_to_eml_converter.py path/to/your/file.olm output_directorypython olm_to_eml_converter.py ~/Documents/MyEmails.olm ./converted_emailsfrom olm_to_eml_converter import OLMToEMLConverter
converter = OLMToEMLConverter("path/to/file.olm", "output_directory")
converter.convert()The script creates individual .eml files with names like:
message_00001.emlmessage_00002.eml- etc.
Each .eml file contains:
- Standard email headers (From, To, Subject, Date)
- Email body content
- Compatible with email clients and AI tools
- Extraction: OLM files are ZIP archives containing email data
- Processing: Looks for message files (
.olk15Messageor.olk14Message) - Conversion: Extracts email content from XML or binary format
- Output: Creates standard EML files for each email
- OLM files are specific to Outlook for Mac
- The script handles various message formats within OLM files
- Some complex formatting may be simplified during conversion
- Large OLM files may take time to process
- "Invalid OLM file": Ensure the file is a valid OLM archive
- "No Local directory found": The OLM structure may be different
- Encoding issues: Some special characters may not display correctly
After conversion, you can:
- Upload the .eml files to Notion AI or similar tools
- Use the provided CSV conversion script to create a spreadsheet
- Process emails programmatically for analysis