Difference between revisions of "Management API - Function Reference"

[checked revision][unchecked revision]
(Added SetProfileServerSideExecution command)
Line 2,275: Line 2,275:
 
| Last day of month.
 
| Last day of month.
 
|}
 
|}
 +
 +
== SetProfileServerSideExecution ==
 +
Disables or enables the automatic server-sided execution with its parameters.
 +
 +
=== Arguments ===
 +
{| class="wikitable"
 +
! width=150px | Name
 +
! width=120px | Type
 +
! Description
 +
|-
 +
| <tt>instanceID/tt>
 +
| string
 +
| Unique ID of MailStore instance in which this command is invoked.
 +
|-
 +
| <tt>id</tt>
 +
| number
 +
| The unique profile ID of the profile to be modified.
 +
|-
 +
| <tt>automatic</tt>
 +
| boolean true/false
 +
| enables (true) or disables (false) the named profile's server-side automation
 +
|-
 +
| <tt>automaticPauseBetweenExecutions</tt>
 +
| number (optional)
 +
| Integer value of seconds to pause between re-executing an automatic profile
 +
|-
 +
| <tt>automaticMaintenanceWindows</tt>
 +
| string (optional)
 +
| TimeSpan string (hh:mm-hh:mm) for the time window where the execution should not be executed to e.g. schedule maintenance tasks instead.
 +
|}
 +
 +
Use the API command [[Administration_API_-_Function_Reference#GetProfiles|GetProfiles]] to retrieve a list of all profiles and their current "serverSideExecution" section details.
 +
 +
The command can be executed with either the argument automatic=false and no additional parameters to disable the automation, or with automatic=true and at least the automaticPauseBetweenExecutions value given. The automaticMaintenanceWindows parameter is optional to define a maintenance window. If not given, there will be no such window.
 +
=== Argument Values ===
 +
 +
==== automatic ====
 +
{| class="wikitable"
 +
! width=270px | Name
 +
! Description
 +
|-
 +
| <tt>true</tt>
 +
| Enables the automation for the given profile.
 +
|-
 +
| <tt>false</tt>
 +
| Disables the automation for the given profile.
 +
|}
 +
 +
==== automaticPauseBetweenExecutions ====
 +
{| class="wikitable"
 +
! width=270px | Name
 +
! Description
 +
|-
 +
| <tt>0 - 2147483647</tt>
 +
| seconds to pause before re-executing the profile automatically, argument is not allowed when setting automatic to false, required when setting automatic to true.
 +
|}
 +
 +
==== automaticMaintenanceWindows ====
 +
{| class="wikitable"
 +
! width=270px | Name
 +
! Description
 +
|-
 +
| <tt>(parameter not given)</tt>
 +
| There will be no maintenance windows, so the automated profile will continue its run/pause cycle over the complete 24 hrs of the day.
 +
|-
 +
| <tt>00:00-23:99</tt>
 +
| There will be a maintenance window from/to the given time in hh:mm, where the profile automation will be paused.
 +
|}
 +
  
 
== SetSmtpSettings ==
 
== SetSmtpSettings ==

Revision as of 13:12, 22 August 2022


AttachStore

Attach existing archive store.

Arguments

Name Type Description
instanceID string Unique ID of MailStore instance in which this command is invoked.
name string Meaningful name of archive store.
databasePath string Path of the directory containing the archive store database. When it is the only given path argument, the values for contentPath and indexPath are determined automatically.
contentPath string (optional) Path of directory containing archive store content.
indexPath string (optional) Path of directory containing archive store index files.
requestedState string (optional) State of archive store after attaching.

Argument Values

requestedState

Name Description
current Same as Normal, but new messages will be archived in the archive store that is set to Current.
normal The content of archives store is available to users and can be modified if the user has the appropriate permission.
writeProtected The content of write protected archive stores is available to users, but cannot be modified (e.g. delete or move messages, rename or move folders)
disabled Disabled archive stores are not in use, but the instance still knows about their existence. Therefore, the content is not available to users.

CompactStore

Compact archive store.

Arguments

Name Type Description
instanceID string Unique ID of MailStore instance in which this command is invoked.
id number Unique ID of archive store

CreateClientAccessServer

Register new client access server.

Arguments

Name Type Description
config json Configuration of new Client Access Server.

Argument Values

config

{
  "serverName" : string,
  "port" : number,
  "serverCertificate" : {
    "thumbprint" : string
  }
}

CreateClientOneTimeUrlForArchiveAdmin

Create URL including OTP for $archiveadmin access.

Arguments

Name Type Description
instanceID string Unique ID of MailStore instance in which this command is invoked.
instanceUrl string (optional) Base URL for accessing instance.

CreateDirectoryOnInstanceHost

Create a directory on an Instance Host

Arguments

Name Type Description
serverName string Name of Instance Host.
path string Path of directory to create.

CreateInstance

Create new MailStore instance.

Arguments

Name Type Description
config json Configuration of new instance.

Argument Values

config

{
  "instanceID" : string,
  "alias" : string,
  "displayName" : string,
  "instanceHost" : string,
  "startMode" : string,
  "baseDirectory" : string,
  "debugLogEnabled" : bool,
  "imapServerConnectionLogEnabled" : bool,
  "vssWriterEnabled" : bool,
  "vssWriterExcludeIndexes" : bool,
}

Config Arguments

Name Type Description
instanceID string Possible characters are a-z, 0-9 and a dash (-). Only lower-case letters are allowed. The first character has to be a letter. The minimum length is 3 characters, the maximum length is 32 characters.
startMode string Possible values are automatic, manual, and disabled. Automatic instances are started automatically with the Instance Host. Manual instances must be started manually. Disabled instances cannot be started at all.

CreateInstanceHost

Create a new Instance Host.

Arguments

Name Type Description
config json Configuration of new Instance Host.

Argument Values

config

{
  "serverName" : string,
  "port" : number,
  "serverCertificate" : {
    "thumbprint" : string
  }
}

CreateLicenseRequest

Create and return data of a license request.

CreateStore

Create and attach a new archive store.

Arguments

Name Type Description
instanceID string Unique ID of MailStore instance in which this command is invoked.
name string Meaningful name of archive store.
databasePath string Path of the directory containing the archive store database. When it is the only given path argument, the values for contentPath and indexPath are determined automatically.
contentPath string (optional) Path of directory containing archive store content.
indexPath string (optional) Path of directory containing archive store index files.
requestedState string (optional) State of archive store after attaching.

Argument Values

requestedState

Name Description
current Same as Normal but new messages will be archived in the archive store that is set to Current.
normal The content of archives store is available to users and can be modified if the user has the appropriate permission.
writeProtected The content of write protected archive stores is available to users, but cannot be modified (e.g. delete or move messages, rename or move folders)
disabled Disabled archive stores are not in use but the instance still knows about their existence. Therefore the content is not available to users.

CreateSystemAdministrator

Create a new SPE system administrator.

Arguments

Name Type Description
config json Configuration of new SPE system administrator.
password string Password of new SPE system administrator.

Argument Values

config

{
  "userName" : string,
  "fullName" : string,
  "emailAddress" : string
}

DeleteClientAccessServer

Delete Client Access Server from management database.

Arguments

Name Type Description
serverName string Name of Client Access Server.

DeleteInstanceHost

Delete Instance Host from management database.

Arguments

Name Type Description
serverName string Name of Instance Host.

DeleteInstances

Delete one or multiple MailStore Instances

Arguments

Name Type Description
instanceFilter string Instance filter string.

Argument Values

instanceFilter

Name Description
* All instances
instance01 instance02 instance03 instance01, instance02 and instance03
*instancehost01 *instancehost02 All instances on instancehost1 and instancehost2
* .running All running instances
* .stopped All stopped instances

DeleteSystemAdministrator

Delete SPE system administrator.

Arguments

Name Type Description
userName string User name of SPE system administrator.

DetachStore

Detach archive store

Arguments

Name Type Description
instanceID string Unique ID of MailStore instance in which this command is invoked.
id number Unique ID of archive store.

FreezeInstances

Freeze a MailStore Instance

Arguments

Name Type Description
instanceFilter string Instance filter string.

Argument Values

instanceFilter

Name Description
* All instances
instance01 instance02 instance03 instance01, instance02 and instance03
*instancehost01 *instancehost02 All instances on instancehost1 and instancehost2
* .running All running instances
* .stopped All stopped instances

GetArchiveAdminEnabled

Get current state of archive admin access.

Arguments

Name Type Description
instanceID string Unique ID of MailStore instance in which this command is invoked.

GetClientAccessServers

Get list of Client Access Servers.

Arguments

Name Type Description
serverNameFilter string (optional) Server name filter string.
withServiceStatus bool Include service status or not.

Argument Values

serverNameFilter

Name Description
null All servers
serverName Only the given serverName. Must match exactly.

GetDirectoriesOnInstanceHost

Get file system directory structure from Instance Host.

Arguments

Name Type Description
serverName string Name of Instance Host.
path string (optional) Path of directory to obtain subdirectories from.

GetEnvironmentInfo

Return general information about SPE environment.

GetIndexConfiguration

Get list of attachment file types to index.

Arguments

Name Type Description
instanceID string Unique ID of MailStore instance in which this command is invoked.

GetInstanceConfiguration

Get configuration of MailStore Instance.

Arguments

Name Type Description
instanceID string Unique ID of MailStore instance in which this command is invoked.

GetInstanceHosts

Get list of Instance Hosts.

Arguments

Name Type Description
serverNameFilter string (optional) Server name filter string.

Argument Values

serverNameFilter

Name Description
null All servers
serverName Only the given serverName. Must match exactly.

GetInstanceProcessLiveStatistics

Get live statistics from instance process.

Arguments

Name Type Description
instanceID string Unique ID of MailStore instance in which this command is invoked.

GetInstances

Get list of instances.

Arguments

Name Type Description
instanceFilter string Instance filter string.

Argument Values

instanceFilter

Name Description
* All instances
instance01 instance02 instance03 instance01, instance02 and instance03
*instancehost01 *instancehost02 All instances on instancehost1 and instancehost2
* .running All running instances
* .stopped All stopped instances

GetInstanceStatistics

Get archive statistics from instance.

Arguments

Name Type Description
instanceID string Unique ID of MailStore instance in which this command is invoked.

GetServiceStatus

Get current status of all SPE services.

GetStoreAutoCreateConfiguration

Get automatic archive store creation settings.

Arguments

Name Type Description
instanceID string Unique ID of MailStore instance in which this command is invoked.

GetSystemSmtpConfiguration

Get current system wide SMTP configuration.

GetStores

Get list of archive stores.

Arguments

Name Type Description
instanceID string Unique ID of MailStore instance in which this command is invoked.
includeSize bool (optional) Includes size of archive store. Default: true. May be slow when running on slow hardware.

GetSystemAdministrators

Get list of system administrators.

MaintainFileSystemDatabases

Execute maintenance task on archive store databases.

Arguments

Name Type Description
instanceID string Unique ID of MailStore instance in which this command is invoked.

MergeStore

Merge two archive stores.

Arguments

Name Type Description
instanceID string Unique ID of MailStore instance in which this command is invoked.
id number Unique ID of destination archive store.
sourceId number Unique ID of source archive store.

PairWithManagementServer

Pair server role with Management Server.

Arguments

Name Type Description
serverType string Type of server role.
serverName string Name of server that hosts 'serverType' role.
port number TCP port on which 'serverType' role on 'serverName' accepts connections.
thumbprint string Thumbprint of SSL certificate used by serverType' role on 'serverName'

Argument Values

serverType

Name Description
instanceHost Pairing an Instance Host.
clientAccessServer Pairing a Client Access Server.

Ping

Send a keep alive packet.

RebuildSelectedStoreIndexes

Rebuild search indexes of selected archive stores.

Arguments

Name Type Description
instanceID string Unique ID of MailStore instance in which this command is invoked.

RecoverStore

Recreates a broken Firebird database from recovery records. The archive store must have been upgraded to the latest version and the recovery records must not be corrupt. The archive store must be in the Disabled or Error state.

Arguments

Name Type Description
instanceID string Unique ID of MailStore instance in which this command is invoked.
id number Unique ID of archive store.
encryptionKey string (optional) Encryption key of the archive store.

RecreateRecoveryRecords

Recreates broken Recovery Records of an archive store. Use VerifyStore to verify the state of the Recovery Records.

Arguments

Name Type Description
instanceID string Unique ID of MailStore instance in which this command is invoked.
id number Unique ID of archive store.

RefreshAllStoreStatistics

Refresh archive store statistics.

Arguments

Name Type Description
instanceID string Unique ID of MailStore instance in which this command is invoked.

ReloadBranding

Reloads the SPE branding information from the filesystem. Newly connected clients are getting the updated branding.

RenameStore

Rename archive store

Arguments

Name Type Description
instanceID string Unique ID of MailStore instance in which this command is invoked.
id number Unique ID of archive store.
name string New name of archive store.

RestartInstances

Restart one or multiple instances.

Arguments

Name Type Description
instanceFilter string Instance filter string.

Argument Values

instanceFilter

Name Description
* All instances
instance01 instance02 instance03 instance01, instance02 and instance03
*instancehost01 *instancehost02 All instances on instancehost1 and instancehost2
* .running All running instances
* .stopped All stopped instances

RepairStoreDatabase

Tries to resolve certain issues with archive store databases (e.g. missing database indexes).

Arguments

Name Type Description
instanceID string Unique ID of MailStore instance in which this command is invoked.
id number Unique ID of archive store.

RetryOpenStores

Retry opening stores that failed previously

Arguments

Name Type Description
instanceID string Unique ID of MailStore instance in which this command is invoked.

SelectAllStoreIndexesForRebuild

Select all archive store for rebuild.

Arguments

Name Type Description
instanceID string Unique ID of MailStore instance in which this command is invoked.

SetArchiveAdminEnabled

Enable or disable archive admin access.

Arguments

Name Type Description
instanceID string Unique ID of MailStore instance in which this command is invoked.
enabled bool Enable or disable flag.

SetClientAccessServerConfiguration

Set the configuration of a Client Access Server.

Arguments

Name Type Description
config json Client Access Server configuration.

Argument Values

config

{
  "serverName" : string,
  "port" : number,
  "serverCertificate" : {
    "thumbprint" : string
  }
}

SetIndexConfiguration

Set full text search index configuration.

Arguments

Name Type Description
instanceID string Unique ID of MailStore instance in which this command is invoked.
config json Full text search index configuration.

Argument Values

config

Use GetIndexConfiguration to receive supported value.

SetInstanceConfiguration

Set configuration of MailStore Instance.

Arguments

Name Type Description
config json Instance configuration.

Argument Values

config

{
  "instanceID" : string,
  "alias" : string,
  "displayName" : string,
  "instanceHost" : string,
  "startMode" : string,
  "baseDirectory" : string,
  "debugLogEnabled" : bool,
  "vssWriterEnabled" : bool
}

SetInstanceHostConfiguration

Set configuration of Instance Host.

Arguments

Name Type Description
config json Instance Host configuration.

Argument Values

config

{
  "serverName" : string,
  "port" : number,
  "serverCertificate" : {
    "thumbprint" : string
  },
  "baseDirectory" : string
}

SetStoreAutoCreateConfiguration

Set configuration for automatic archive store creation.

Arguments

Name Type Description
instanceID string Unique ID of MailStore instance in which this command is invoked.
config json Archive store automatic creation configuration.

Argument Values

config

{
  "sizeThreshold" : string or null,
  "baseDirectory" : string,
  "contentBaseDirectory" : string,
  "indexBaseDirectory" : string
}

SetStorePath

Set the path to archive store data.

Arguments

Name Type Description
instanceID string Unique ID of MailStore instance in which this command is invoked.
id number Unique ID of archive store.
databasePath string Path of the directory containing the archive store database. When it is the only given path argument, the values for contentPath and indexPath are determined automatically.
contentPath string (optional) Path of directory containing archive store content.
indexPath string (optional) Path of directory containing archive store index files.

SetStoreRequestedState

Set state of archive store.

Arguments

Name Type Description
instanceID string Unique ID of MailStore instance in which this command is invoked.
id number Unique ID of archive store.
requestedState string State of archive store.

Argument Values

requestedState

Name Description
current Same as Normal but new messages will be archived in the archive store that is set to Current.
normal The content of archives store is available to users and can be modified if the user has the appropriate permission.
writeProtected The content of write protected archive stores is available to users, but cannot be modified (e.g. delete or move messages, rename or move folders)
disabled Disabled archive stores are not in use but the instance still knows about their existence. Therefore the content is not available to users.

SetSystemAdministratorConfiguration

Set SPE system administrator configuration.

Arguments

Name Type Description
config json SPE system administrator configuration.

Argument Values

config

{
  "userName" : string,
  "fullName" : string,
  "emailAddress" : string
}

SetSystemAdministratorPassword

Set password for SPE system administrator.

Arguments

Name Type Description
userName string User name of SPE system administrator.
password string New password for SPE system administrator.

SetSystemSmtpConfiguration

Set system wide SMTP configuration.

Arguments

Name Type Description
config json SMTP configuration.

Argument Values

config

Example config object:

{
  "hostname": "mail.example.com",
  "port": 587,
  "protocol": "SMTP-TLS",
  "ignoreSslPolicyErrors": false,
  "authenticationRequired": true,
  "username": "[email protected]",
  "password": "userpassword",
  "fromDisplayName": "Sending User",
  "fromEmailAddress": "[email protected]",
  "recipientSystemAdministrator": ["admin", "johndoe"]
}

StartInstances

Start one or multiple MailStore Instances.

Arguments

Name Type Description
instanceFilter string Instance filter string.
safeMode bool (optional) Start instances in Safe Mode to perform maintenance.

Argument Values

instanceFilter

Name Description
* All instances
instance01 instance02 instance03 instance01, instance02 and instance03
*instancehost01 *instancehost02 All instances on instancehost1 and instancehost2
* .running All running instances
* .stopped All stopped instances

StopInstances

Stop one or multiple MailStore Instances.

Arguments

Name Type Description
instanceFilter string Instance filter string.

Argument Values

instanceFilter

Name Description
* All instances
instance01 instance02 instance03 instance01, instance02 and instance03
*instancehost01 *instancehost02 All instances on instancehost1 and instancehost2
* .running All running instances
* .stopped All stopped instances

TestSystemSmtpConfiguration

Test current system wide SMTP configuration.

ThawInstances

Thaw one or multiple MailStore Instances.

Arguments

Name Type Description
instanceFilter string Instance filter string.

Argument Values

instanceFilter

Name Description
* All instances
instance01 instance02 instance03 instance01, instance02 and instance03
*instancehost01 *instancehost02 All instances on instancehost1 and instancehost2
* .running All running instances
* .stopped All stopped instances

UpgradeStore

Upgrade archive store from MailStore Server 5 or older to current format.

Arguments

Name Type Description
instanceID string Unique ID of MailStore instance in which this command is invoked.
id number Unique ID of archive store.

VerifyStore

Verify archive stores consistency.

Arguments

Name Type Description
instanceID string Unique ID of MailStore instance in which this command is invoked.
id number Unique ID of archive store.
includeIndexes bool Defines whether to verify the search indexes as well.

VerifyStores

Verify consistency of all archive stores.

Arguments

Name Type Description
instanceID string Unique ID of MailStore instance in which this command is invoked.
includeIndexes bool Defines whether to verify the search indexes as well.

CancelJobAsync

Cancel a running job asynchronously.

Arguments

Name Type Description
instanceID string Unique ID of MailStore instance in which this command is invoked.
id number The unique identifier of the job to be canceled.

ClearUserPrivilegesOnFolders

Removes all privileges of a user on all archive folders.

Arguments

Name Type Description
instanceID string Unique ID of MailStore instance in which this command is invoked.
userName string User name of MailStore user.

CreateJob

Create a new job to execute Management API commands.

Arguments

Name Type Description
instanceID string Unique ID of MailStore instance in which this command is invoked.
name string (optional) A meaningful name for the job. Example: Daily Backup.
action string (optional) Management API command to execute.
owner string (optional) Username of the job owner; must be an administrator.
timeZoneId string (optional) The time zone id of the time zone the date should be converted to, e.g. $Local, which represents the time zone of the operating system.
date string (optional) Datetime string (YYYY-MM-DDThh:mm:ss) for running the job once.
interval number (optional) Interval for running job.
time string (optional) Time for running job. Without additional parameter, this means daily execution.
dayOfWeek string (optional) Day of week to run job. Parameter "time" also required.
dayOfMonth string (optional) Day of month to run job. Parameter "time" also required. dayOfWeek can optionally be used to define further.

Use the API command GetTimeZones to retrieve a list of all available time zones.

Argument Values

interval

Name Description
5 Every 5 minutes.
10 Every 10 minutes.
15 Every 15 minutes.
20 Every 20 minutes.
30 Every 30 minutes.
60 Every hour.
120 Every 2 hours.
180 Every 3 hours.
240 Every 4 hours.
360 Every 6 hours.
720 Every 12 hours.

dayOfWeek

Name Description
Sunday Sunday
Monday Monday
Tuesday Tuesday
Wednesday Wednesday
Thursday Thursday
Friday Friday
Saturday Saturday

dayOfMonth

Name Description
1 to 31 Numeric representation of day of month.
Last Last day of month.

CreateProfile

Create a new archiving or exporting profile.

Arguments

Name Type Description
instanceID string Unique ID of MailStore instance in which this command is invoked.
properties json Profile properties.
raw bool Currently only 'true' is supported.

Argument Values

properties

To receive available profile properties create a profile of the desired type via the Email Archive client and then use the GetProfiles method to receive supported values. The properties id and version must be omitted, the password field must be filled properly.

CreateUser

Create new MailStore user. Use SetPrivilegesOnFolder to grant that user privileges on the own archive.

Arguments

Name Type Description
instanceID string Unique ID of MailStore instance in which this command is invoked.
userName string User name of new MailStore user.
privileges string Comma separated list of privileges.
fullName string (optional) Full name of user.
distinguishedName string (optional) LDAP DN string.
authentication string (optional) Authentication setting for user: 'integrated' or 'directoryServices'.
password string (optional) Password of new user.

Argument Values

privileges

Name Description
none The user is granted no global privileges. If specified, this value has to be the only value in the list.
admin The user is granted administrator privileges. If specified, this value has to be the only value in the list.
login The user can log on to MailStore Server.
changePassword The user can change his own MailStore Server password. This only makes sense if the authentication is set to integrated.
archive The user can run archiving profiles.
modifyArchiveProfiles The user can create, modify and delete archiving profiles.
export The user can run export profiles.
modifyExportProfiles The user can create, modify and delete export profiles.
delete The user can delete messages. Please note that a non-admin user can only delete messages in folders where he has been granted delete access. In addition, compliance settings may be in effect, keeping administrators and users from deleting messages even if they have been granted the privilege to do so.

DeleteEmptyFolders

Remove folders from folder tree that do not contain emails.

Arguments

Name Type Description
instanceID string Unique ID of MailStore instance in which this command is invoked.
folder string (optional) Entry point in folder tree.

DeleteJob

Deletes a job.

Arguments

Name Type Description
instanceID string Unique ID of MailStore instance in which this command is invoked.
id string (optional) The unique identifier of the job to be deleted.

DeleteProfile

Delete an archiving or exporting profile.

Arguments

Name Type Description
instanceID string Unique ID of MailStore instance in which this command is invoked.
id number Unique ID of profile.

DeleteUser

Delete a MailStore user.

Arguments

Name Type Description
instanceID string Unique ID of MailStore instance in which this command is invoked.
userName string User name of MailStore user.

GetChildFolders

Get child folders.

Arguments

Name Type Description
instanceID string Unique ID of MailStore instance in which this command is invoked.
folder string (optional) Parent folder.
maxLevels number (optional) Depth of child folders.

GetComplianceConfiguration

Get current compliance configuration settings.

Arguments

Name Type Description
instanceID string Unique ID of MailStore instance in which this command is invoked.

GetDirectoryServicesConfiguration

Get current Directory Services configuration settings.

Arguments

Name Type Description
instanceID string Unique ID of MailStore instance in which this command is invoked.

GetFolderStatistics

Get folder statistics.

Arguments

Name Type Description
instanceID string Unique ID of MailStore instance in which this command is invoked.

GetJobResults

Retrieves list of finished job executions.

Arguments

Name Type Description
instanceID string Unique ID of MailStore instance in which this command is invoked.
fromIncluding string Beginning of time range to fetch.
toExcluding string End of time range to fetch.
timeZoneId string The time zone id of the time zone the date should be converted to, e.g. $Local, which represents the time zone of the operating system.
jobId number (optional) The job id for which to retrieve results.

Interactive Management Shell Example: GetJobResults --fromIncluding="2016-12-01T00:00:00" --toExcluding="2016-12-31T23:59:59" --timeZoneId="$Local" --jobId=1

Use the API command GetTimeZones to retrieve a list of all available time zones.

GetJobs

Retrieve list of jobs

Arguments

Name Type Description
instanceID string Unique ID of MailStore instance in which this command is invoked.

GetProfiles

Get list of archiving and exporting profiles.

Arguments

Name Type Description
instanceID string Unique ID of MailStore instance in which this command is invoked.
raw bool Currently only 'true' is supported.

GetSmtpSettings

Get current SMTP configuration.

Arguments

Name Type Description
instanceID string Unique ID of MailStore instance in which this command is invoked.

GetTimeZones

Get list of available time zones.

Arguments

Name Type Description
instanceID string Unique ID of MailStore instance in which this command is invoked.

GetUserInfo

Get detailed information about user.

Arguments

Name Type Description
instanceID string Unique ID of MailStore instance in which this command is invoked.
userName string User name of MailStore user

GetUsers

Get list of users.

Arguments

Name Type Description
instanceID string Unique ID of MailStore instance in which this command is invoked.

GetWorkerResults

Get results of profile executions.

Arguments

Name Type Description
instanceID string Unique ID of MailStore instance in which this command is invoked.
fromIncluding string Beginning of time range to fetch.
toExcluding string End of time range to fetch.
timeZoneID string The time zone id of the time zone the date should be converted to, e.g. $Local, which represents the time zone of the operating system.
profileID number (optional) Filter results by given profile ID.
userName string (optional) Filter results by given user name.

Interactive Management Shell Example: GetWorkerResults --fromIncluding="2016-01-01T00:00:00" --toExcluding="2016-12-31T23:59:59" --timeZoneID="$Local" --profileID=1 --userName="admin"

Use the API command GetTimeZones to retrieve a list of all available time zones.

MoveFolder

Move folder.

Arguments

Name Type Description
instanceID string Unique ID of MailStore instance in which this command is invoked.
fromFolder string Old folder name.
toFolder string New folder name.

RenameJob

Rename job.

Arguments

Name Type Description
instanceID string Unique ID of MailStore instance in which this command is invoked.
id number (optional) The unique identifier of the job to be renamed.
name string (optional) The new job name.

RenameUser

Rename a MailStore user.

Arguments

Name Type Description
instanceID string Unique ID of MailStore instance in which this command is invoked.
oldUserName string Old user name.
newUserName string New user name.

RunJobAsync

Run an existing job.

Arguments

Name Type Description
instanceID string Unique ID of MailStore instance in which this command is invoked.
id number The identifier of the job to be run.

RunProfile

Run an existing archiving or exporting profile. Only profiles that are executed on server side can be started by this command. That are all profiles which are listed under E-Mail Servers in the E-Mail-Archive Client. Client side profiles can be started by using the MailStoreCmd and the commands import-execute and export-execute.

Arguments

Name Type Description
instanceID string Unique ID of MailStore instance in which this command is invoked.
id number Unique profile ID.

RunTemporaryProfile

Run a temporary/non-existent profile. Only profiles that are executed on server side can be started by this command. That are all profiles which are listed under E-Mail Servers in the E-Mail-Archive Client.

Arguments

Name Type Description
instanceID string Unique ID of MailStore instance in which this command is invoked.
properties json Profile properties.
raw bool Currently only 'true' is supported.

Argument Values

properties

To receive available profile properties create a profile of the desired type via MailStore Client and use the GetProfiles method to receive supported value. Id and Version attributes must not be set.

SetComplianceConfiguration

Set compliance configuration settings.

Arguments

Name Type Description
instanceID string Unique ID of MailStore instance in which this command is invoked.
config json Compliance configuration.

Argument Values

config

Use GetComplianceConfiguration to receive supported value.

Example settings object:

{
  "adminEmailPreviewEnabled": true,
  "legalHoldEnabled": false,
  "logSuccessfulUserActivities": [
    "AdminRestored",
    "ComplianceChangeSettings",
    "FileGroupAttach",
    "FileGroupCreate",
    "FileGroupDetach",
    "FileGroupRename",
    "FileGroupSetProperties",
    "FileGroupSetRequestedState",
    "ProfileChangeUserName",
    "UserAdd",
    "UserDelete",
    "UserRename",
    "UserSetFolderAccess",
    "UserSetMappings",
    "UserUpdate"
  ]
}

SetDirectoryServicesConfiguration

Set directory services configuration settings.

Arguments

Name Type Description
instanceID string Unique ID of MailStore instance in which this command is invoked.
config json Directory services configuration.

Argument Values

config

Use GetDirectoryServicesConfiguration to receive supported value.

SetJobEnabled

Set enabled status of a job.

Arguments

Name Type Description
instanceID string Unique ID of MailStore instance in which this command is invoked.
id number (optional) The unique identifier of the job to be modified.
enabled bool (optional) Boolean value of enabled attribute.

SetJobSchedule

Modify the schedule of a job.

Arguments

Name Type Description
id number The unique identifier of the job to be modified.
timeZoneId string The time zone id of the time zone the date should be converted to, e.g. $Local, which represents the time zone of the operating system.
date string (optional) Datetime string (YYYY-MM-DDThh:mm:ss) for running the job once.
interval number (optional) Interval for running job.
time string (optional) Time for running job. Without additional parameter, this means daily execution.
dayOfWeek string (optional) Day of week to run job. Parameter "time" also required.
dayOfMonth string (optional) Day of month to run job. Parameter "time" also required. dayOfWeek can optionally be used to define further.

Use the API command GetTimeZones to retrieve a list of all available time zones.

Argument Values

interval

Name Description
5 Every 5 minutes.
10 Every 10 minutes.
15 Every 15 minutes.
20 Every 20 minutes.
30 Every 30 minutes.
60 Every hour.
120 Every 2 hours.
180 Every 3 hours.
260 Every 4 hours.
360 Every 6 hours.
720 Every 12 hours.

dayOfWeek

Name Description
Sunday Sunday
Monday Monday
Tuesday Tuesday
Wednesday Wednesday
Thursday Thursday
Friday Friday
Saturday Saturday

dayOfMonth

Name Description
1 to 31 Numeric representation of day of month.
Last Last day of month.

SetProfileServerSideExecution

Disables or enables the automatic server-sided execution with its parameters.

Arguments

Name Type Description
instanceID/tt> string Unique ID of MailStore instance in which this command is invoked.
id number The unique profile ID of the profile to be modified.
automatic boolean true/false enables (true) or disables (false) the named profile's server-side automation
automaticPauseBetweenExecutions number (optional) Integer value of seconds to pause between re-executing an automatic profile
automaticMaintenanceWindows string (optional) TimeSpan string (hh:mm-hh:mm) for the time window where the execution should not be executed to e.g. schedule maintenance tasks instead.

Use the API command GetProfiles to retrieve a list of all profiles and their current "serverSideExecution" section details.

The command can be executed with either the argument automatic=false and no additional parameters to disable the automation, or with automatic=true and at least the automaticPauseBetweenExecutions value given. The automaticMaintenanceWindows parameter is optional to define a maintenance window. If not given, there will be no such window.

Argument Values

automatic

Name Description
true Enables the automation for the given profile.
false Disables the automation for the given profile.

automaticPauseBetweenExecutions

Name Description
0 - 2147483647 seconds to pause before re-executing the profile automatically, argument is not allowed when setting automatic to false, required when setting automatic to true.

automaticMaintenanceWindows

Name Description
(parameter not given) There will be no maintenance windows, so the automated profile will continue its run/pause cycle over the complete 24 hrs of the day.
00:00-23:99 There will be a maintenance window from/to the given time in hh:mm, where the profile automation will be paused.


SetSmtpSettings

Set SMTP configuration.

Arguments

Name Type Description
instanceID string Unique ID of MailStore instance in which this command is invoked.
settings json SMTP configuration.

Argument Values

settings

Example settings object:

{
  "hostname": "mail.example.com",
  "port": 587,
  "protocol": "SMTP-TLS",
  "ignoreSslPolicyErrors": false,
  "authenticationRequired": true,
  "username": "[email protected]",
  "password": "userpassword",
  "fromDisplayName": "Sending User",
  "fromEmailAddress": "[email protected]",
  "recipientEmailAddresses": ["[email protected]", "[email protected]"]
}

SetUserAuthentication

Set authentication settings of a MailStore user.

Arguments

Name Type Description
instanceID string Unique ID of MailStore instance in which this command is invoked.
userName string User name of MailStore user.
authentication string Authentication method. Either 'integrated' or 'directoryServices'.

SetUserDistinguishedName

Set the LDAP distinguished name of a MailStore user.

Arguments

Name Type Description
instanceID string Unique ID of MailStore instance in which this command is invoked.
userName string User name of MailStore user.
distinguishedName string (optional) LDAP DN string.

SetUserEmailAddresses

Set email addresses of MailStore user.

Arguments

Name Type Description
instanceID string Unique ID of MailStore instance in which this command is invoked.
userName string User name of MailStore user.
emailAddresses string (optional) List of email addresses.

SetUserFullName

Set full name of MailStore user.

Arguments

Name Type Description
instanceID string Unique ID of MailStore instance in which this command is invoked.
userName string User name of MailStore user.
fullName string (optional) Full name of MailStore user.

SetUserPassword

Set password of MailStore user.

Arguments

Name Type Description
instanceID string Unique ID of MailStore instance in which this command is invoked.
userName string User name of MailStore user.
password string Password of MailStore user.

SetUserPop3UserNames

Set POP3 user name of MailStore user.

Arguments

Name Type Description
instanceID string Unique ID of MailStore instance in which this command is invoked.
userName string User name of MailStore user.
pop3UserNames string (optional) Comma separated list of POP3 user names.

SetUserPrivileges

Set privileges of MailStore user.

Arguments

Name Type Description
instanceID string Unique ID of MailStore instance in which this command is invoked.
userName string User name of MailStore user.
privileges string Comma separated list of privileges.

Argument Values

privileges

Name Description
none The user is granted no global privileges. If specified, this value has to be the only value in the list.
admin The user is granted administrator privileges. If specified, this value has to be the only value in the list.
login The user can log on to MailStore Server.
changePassword The user can change his own MailStore Server password. This only makes sense if the authentication is set to integrated.
archive The user can run archiving profiles.
modifyArchiveProfiles The user can create, modify and delete archiving profiles.
export The user can run export profiles.
modifyExportProfiles The user can create, modify and delete export profiles.
delete The user can delete messages. Please note that a non-admin user can only delete messages in folders where he has been granted delete access. In addition, compliance settings may be in effect, keeping administrators and users from deleting messages even if they have been granted the privilege to do so.

SetUserPrivilegesOnFolder

Set privileges on folder for MailStore user.

Arguments

Name Type Description
instanceID string Unique ID of MailStore instance in which this command is invoked.
userName string User name of MailStore user.
folder string Folder name.
privileges string Comma separated list of folder privileges.

Argument Values

privileges

Name Description
none The user is denied access to the specified folder. If specified, this value has to be the only value in the list. This effectively removes all privileges on the specified folder.
read The user is granted read access to the specified folder.
write The user is granted write access to the specified folder. Messages can be moved within an archive.
delete The user is granted delete access to the specified folder.

SyncUsersWithDirectoryServices

Sync users of MailStore instance with directory services.

Arguments

Name Type Description
instanceID string Unique ID of MailStore instance in which this command is invoked.
dryRun bool (optional) Simulate sync only.

TestSmtpSettings

Test current SMTP configuration.

Arguments

Name Type Description
instanceID string Unique ID of MailStore instance in which this command is invoked.