Skip to content

PST to MBOX Conversion Script for BlueMail

This guide is intended for advanced technical users who are comfortable with installing dependencies and working from the command line.

This Python script converts a pst file into an mbox format, which can be used by BlueMail for importing email data. While the instructions below are tailored for Linux users, the script can also work on macOS, with the necessary dependencies installed.

Before running the script, ensure the following dependencies are installed on your system.

1. Python 3.x

Make sure you have Python 3.x installed.

2. pypff Library

pypff is required to read PST files. Below are the instructions for installing pypff on Linux and macOS.

Install on Linux

  1. Install Python pip and libpff development package:

    sudo apt-get install python3-pip
    sudo apt-get install libpff-dev
    
  2. Install the pypff Python package:

    pip3 install pypff
    

Install on macOS

On macOS, you may need to install pypff and its dependencies manually, using brew for libpff and pip for the Python bindings.

  1. Install libpff using Homebrew:

    brew install libpff
    
  2. Install the Python bindings for pypff:

    pip3 install pypff
    

Running the Script

Once the necessary dependencies are installed, you can run the script to convert PST files to MBOX format. Please note that running this script is at the discretion of the user, and the script is provided 'as-is' without any warranties.

  1. Download this Python script: convert_pst_to_mbox.py

  2. Run the script by passing the input PST file and the desired output MBOX file path as arguments.

Example command:

python3 convert_pst_to_mbox.py <path_to_pst_file> <output_mbox_file>