MailStore APi can be used to automate tasks that would be laborious to do manually. One such task is importing a large number of PST files for multiple users. A good example of this is when you want to archive pre-existing Office 365 Archives. Unfortunatly these cannot be collected using the mailbox collection method but instead, need to be first exported to PST files for each user.
The following steps will guide you through using the example bulkimport.py python script can be used to import a large number of PST files into MailStore Server.
4. At the end of the install choose the option to support long paths
python -c “from distutils.sysconfig import get_python_lib; print(get_python_lib())”
you should see a simular path lik ethe following returned
3. Navigate to this directory and create a new subdirectory called ‘mailstore’
Unzip the Python API Wrapper Library you downloaded above into this ‘mailstore’ directory
# SERVER CMD on x64 OSMAILSTORECMD = r”C:\Program Files (x86)\MailStore\MailStore Server\MailStoreCmdSilent.exe”
(Note this path in the script is incorrect for MailStore v13 and points to an incorrect deepinvent folder )
# SERVER HOSTHOST = “your server address”
# USER and PASS of an administratorUSER = “admin”PASS = “yourpassword”
# location of the folders containing the user’s pst/emlmsg/mbox files# has to be the same as in createUserFolders.py# please note the ‘r’ in the beginning, this indicates a raw-string, \ will not be interpreted# so, just leave the ‘r’ in front
rootpath = r”C:\MailStore Scripts\rootpath”
C:\MailStore Scripts\rootpath\email@example.com\C:\MailStore Scripts\rootpath\firstname.lastname@example.org\C:\MailStore Scripts\rootpath\email@example.com\
Each folder should contain any PST files to be imported for that user ( these can have any name)
Python c:\mailstore scripts\bulkimport.py
This should run through each user and find the PST files and import them
Python 3.9.1 (tags/v3.9.1:1e5d33e, Dec 7 2020, 17:08:21) [MSC v.1927 64 bit (AMD64)] on win32
Type “help”, “copyright”, “credits” or “license” for more information.