Python Scripts

The follow Python scripts require an installed Python runtime. Details about the installation of the Python runtime as well as the usage of the scripts can be found in Using Scripts

bulkAttachStores.py

Attach all archives stores that are subdirectories of the given

Configuration Options

Additionally to the MailStore Server Administration API connection settings, the following options need to be configured in the script.

path

The file system path under which the archive stores are located. Every subdirectory under this path will be treated as a single archive store to attach.

state

The requested state to be set. For a list of possible values, please refer to the documentation of the CreateStore method at MailStore Server Administration API Commands.

bulkSetState.py

Sets the status of all attached archive stores to the given value.

Configuration Options

Additionally to the MailStore Server Administration API connection settings, the following options need to be configured in the script.

state

The requested state to be set. For a list of possible values, please refer to the documentation of the CreateStore method at MailStore Server Administration API Commands.

bulkUpdatePermissions.py

Sets the permission of all users to a given value. Please note: In the meanwhile this can also be done using the GUI.

Configuration Options

Additionally to the MailStore Administration API connection settings, the following options need to be configured in the script.

privileges

A comma-separated list of global privileges. For a list of possible values, please refer to the documentation of the CreateUser method at MailStore Server Administration API Commands

privilegesOnFolder

A comma-separated list of folder privileges. For a list of possible values, please refer to the documentation of the SetUserPrivilegesOnFolder method at MailStore Server Administration API Commands

findDuplicateEmailAddress.py

List email addresses and users that have the same email address assigned in MailStore.

Configuration Options

Only MailStore Server Administration API connection settings need to be adjusted.

mergeFolders.py

When mails from multiple sources (eg. many PST files) have been archived there can be many branches below one’s archive. This script merges them.

Configuration Options

Additionally to the MailStore Server Administration API connection settings, the following options need to be configured in the script.

operation

When set to Exchange all folders will be merged with the users Exchange folder. If set to any other value, folders will be merged or moved to that exact value.

regex

You can filter the folders that will be renamed with this variable. Any regular expression can be used.

file

If a file is given, then only folders of users of that file will be merged. One user per line.

renameInbox.py

In same cases MailStore creates a new "INBOX" folder in the archive. Old mails still are in "Inbox", new ones are in "INBOX". This script renames "Inbox" folders to "INBOX", thus both folders will be merged to "INBOX"

Configuration Options

Only MailStore Server Administration API connection settings need to be adjusted.

updateUserNames.py

When the active domain infrastructure or sAMAaccountNames of the users have changed, MailStore will recognize these users as new users when you sychronize from your directory service. To avoid the creation of unnecessary users, manual renaming of users, moving of folders and altering privileges this script can be used.

Configuration Options

file

The file containing the usernames.It has to be in the format

 oldusername=newusername

One user per line. Lines beginning with # or ; are comments.

operation

Can be either rename or prepare. When set to rename, the actual renaming is performed. When set to prepare, then the script only reads the current users from MailStore and generates a template file. Then you are able to insert the new usernames into that file.

 

See Also

Windows Batch Scripts

 

Attached Files
There are no attachments for this article.
Comments
There are no comments for this article. Be the first to post a comment.
Name
Email
Security Code Security Code
Related Articles RSS Feed
Scripting
Viewed 1457 times since Tue, Jan 7, 2014
Windows Batch Scripts
Viewed 1651 times since Tue, Jan 7, 2014
MENU