With the MailStore Server Management Shell as well as the MailStore Server Administration API MailStore Server offers multiple methods of automating tasks by using scripts. In this scripting area we have put together scripts that provide solutions for use-cases we have often been asked for.
This article describes needed steps of preparation as well as how to execute the scripts.
Using Windows Batch Scripts
Before you are able to execute Windows Batch Scripts on the command line cmd.exe, you need to open the script file in a text editor such as Notepad Adjust the configuration variables above the DON'T CHANGE ANYTHING BEYOND THIS LINE line to your local environment. Please take care not to change any single or double quotes.
Using Python Scripts
In order to execute Python scripts from our script package your need to install the Python runtime. The Windows Installer of the Python runtime can be downloaded from http://www.python.org. For Linux operating systems please follow the instructions of your distributor's package manager to install the Python runtime.
Our script package includes a version of the MailStore Server Administration API Python wrapper. Therefore after downloading the package you just need to extract the content into a directory on your local hard disk.
Executing Python Scripts
In order to execute Python Scripts you have to open the script file you want to execute with IDLE (shipped with Python's Windows installer) and adjust the configuration section above the line saying DON'T CHANGE ANYTHING BEYOND THIS LINE. Please take care not to change any double or single quotes.
To execute the script, click on Run > Run Module or press the F5-key in IDLE. A new window pops up where you can follow the standard output of the script and see possible execution errors.