GithubHelp home page GithubHelp logo

juanirm / pst-converter Goto Github PK

View Code? Open in Web Editor NEW
15.0 1.0 4.0 8 KB

A docker container with libpst will convert all pst files from an input folder to mbox format on an output folder

Dockerfile 23.32% Shell 76.68%

pst-converter's Introduction

PST Converter

This small project aims to provide a free and open source way to convert .pst files (personal storage table) to MBOX files, structured in a way that Mozilla Thunderbird can import.

How it works

A docker container is run with the libpst library inside. The container invokes the converter.sh Bash script. The Bash script executes the readpst utility which converts all .pst files inside the in directory, and outputs them to the out directory. find commands are then run to restructure the directories so Thunderbird can import them.

Usage

  1. Put the .pst files to be converted into the in folder
  2. Build the docker image: docker-compose build
  3. Start conversion: docker-compose up
  4. The script will produce a single directory with an .sbd suffix (short for sub-directory). Example: 5db2f19c41144330b8c75bc1cb37d3cc.sbd

How to import into Thunderbird

You need to move the contents of the .sbd directory to a Thunderbird profile directory. To find this, go to Account Settings in Thunderbird, click Local Folders in the sidebar (or your actual email account if you want to import the messages to that). Under the Message Storage heading there will be a path - move the contents of the .sbd directory to that. Restart Thunderbird.

How to customize it

Conversion options can be set in the convert.sh file Input and output directories can be changed in docker-compose.yml. Keep in mind that the convert.sh script does some magic based on the output directory being out. Some later versions of this might make better usage of environment variables to 'fix' this 🙂

Credits

Resources

pst-converter's People

Contributors

juanirm avatar guitarbilly avatar

Stargazers

Luis Cacho avatar Thiago Lamosa avatar Mikołaj Gałązka avatar  avatar  avatar Rhys Williams avatar Bram Perry avatar Andrew avatar santiago motta avatar Russ Brenner avatar  avatar 大関 金城 秀喜 カシオ avatar Tai avatar  avatar  avatar

Watchers

 avatar

pst-converter's Issues

benefit of readpst -u versus -r conversion

hello,
after playing more with this converter i find that the readpst -u option creates extra .size and .type files which are ignored by my Thunderbird (linux, v115.6.0).

Furtermore the .size and .type files make that the last step in the conversion always fails, child folders are never empty due to the generated .size and .type files. This gives more cluttered output.

Is there a reason to use -u versus the regular -r which is used on most examples on internet?

To compare results I have run the same .pst file with both -u and -r options and the mbox content is identical apart from
* - - - -boundary-LibPST-iamunique- [number] *
lines. But upon further investigation each run generates new numbers for these meta items.

Thunderbird does not seem to support .size and .type files:
http://kb.mozillazine.org/Profile_folder_-_Thunderbird#Files
I searched my profile folder with a handful of mail accounts and dozens of folders but no such files exist.

My proposal would be to switch to readpst with -r option.

How do I get converted files into Thunderbird?

The conversion was successful however I can't import the output files into Thunderbird. How do I do this? The files are HTML not MBOX like the README says.

Also, what are the .sbd directories? There is no mention of these in the README.

Example of the file types I get as output:

$ file out/5db2f19c41144330b8c75bc1cb37d3cc.sbd/Inbox
Inbox: HTML document, Non-ISO extended-ASCII text, with very long lines (961)

converting more than one pst

hello,
when I put more than one pst file in the in/ folder only the first gets processed.
Looking at the manpage of readpst https://www.five-ten-sg.com/libpst/rn01re01.html it seems it accepts one file as input.

So I simply updated convert.sh to loop all pst files in the in/ folder like this:

#!/bin/bash
for INDIRfile in $INDIR/*.pst
do
  readpst -u -o $OUTDIR $INDIRfile 
done
...

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.