Comments on Script for converting Outlook pst to Thunderbird/Evolution compatible format on Linux

Script for converting Outlook pst to Thunderbird/Evolution compatible format on Linux This tutorial will show how to convert Outlook PST into Thunderbird/Evolution compatible SBD format. For this  I have created a script for the conversion format.This will work in Debian/Ubuntu/CentOS too!

4 Comment(s)

Add comment

Please register in our forum first to comment.

Comments

By: Anonymous

Cannot load inline images after convertion

By: Steve Lloyd


Many thanks for your excellent script, I have made a few modifications to your script, basically removes the need to start script as a sudo/root user unless the required files are not loaded, it then asks for sudo password, also changed the path structure so files are outputted to the user directory, changed also the completion dialog box to use zenity.  See below..
 
 #!/bin/bash
###############################################################################################
###############################################################################################
###############################################################################################
######          This script will help to convert the Microsoft outlook PST file      ##########
######                    into Thunderbird/Evolution compatible format               ##########
######                         On Debian/Ubuntu based Distro's             ##########
######                                 ##########
######                    Original Script created by Srijan Kishore                  ##########
######                         Modified Script by Steve Lloyd                        ##########
######                                 ##########
###############################################################################################
###############################################################################################
###############################################################################################   

#OS check
cat /etc/debian_version > /dev/null
if [ $? != 0 ]; then

gdialog --title "OS check" --msgbox "You are not using Debian/Ubuntu, Install readpst package from http://www.five-ten-sg.com/libpst/rn01re01.html" 200 150

else

# Check to see if readpst is installed and install it if not.

readpst -V > /dev/null
          if [ $? != 0 ]; then

    sudo apt-get update
    sudo apt-get -y install readpst
    fi
fi

# Make a folder called outlook in user's home directory

mkdir    ~/outlook

#File selection

readpst  -o  ~/outlook  -r  `zenity --file-selection`

find ~/outlook -type d | tac | grep -v '^~/outlook$' | xargs -d '\n' -I{} mv {} {}.sbd

find ~/outlook.sbd -name mbox -type f | xargs -d '\n' -I{} echo '"{}" "{}"' | sed -e 's/\.sbd\/mbox"$/"/' | xargs -L 1 mv


#Script Completion

find ~/outlook.sbd -empty -type d | xargs -d '\n' rmdir

# Output a text box of completion 

zenity --info --width 800 --title "Outlook Mail Pst Conversion complete" --text "Your outlook Mail pst conversion is now complete, cut and paste the folder outlook.sbd from your home directory into the Local Folder in Thunderbird or Evolution and you can use the folders from there" 

 
 

 

 

 

By: Ken

8/10/2016. Using Ubunto 16.04 with TB 45.  I used the modified script from Steve Lloyd.  After copying and pasting the script to a new file, I had to open in "vi" to remove special characters at the end of each line.  Once that was complete, the script ran flawlessly.  I had to copy each individual newly created file/folder into my "Local Folders" of Thunderbird.  Then just a little reorganization and everything was where I wanted it.  All attachments came through as well. 

I really appreciate the efforts of #####Srijan Kishore and Steve Lloyd#####.

 

By: BOURDEAU Alain

Bonjour en complément après tests, je propose ces adaptations du script :

<quote>mkdir    /home/"user"/outlook#File selectionreadpst  -o  /home/"user"/outlook/  -r `zenity --file-selection` -cv -ufind /home/"user"/outlook/ -type d | tac | grep -v '^/home/"user"/outlook/$' | xargs -d '\n' -I{} mv {} {}.sbdfind /home/"user"/outlook/ -name mbox -type f | xargs -d '\n' -I{} echo '"{}" "{}"' | sed -e 's/\.sbd\/mbox"$/"/' | xargs -L 1 mv#Script Completion# vidage des fichiers cachés restant dans les dossiers vidés des mbox précédemment renommésfind /home/"user"/outlook/ -iname '*.*' -type f -delete# vidage des dossiers précédemment vidésfind /home/"user"/outlook/ -name *.sbd -empty -type d | xargs -d '\n' rmdirgdialog --title "Pst Conversion complete" --msgbox "Your pst conversion is complete,just paste the folder /home/"user"/outlook/*outlook.sbd in Local Folder in Thunderbird/Evolution and you can use the folders there" 200 150</quote>