Difference between revisions of "Administration API - Function Reference"

[unchecked revision][checked revision]
(→‎RecoverStore: missing encryption key parameter explained)
(45 intermediate revisions by 5 users not shown)
Line 1: Line 1:
<!-- DO NOT EDIT THIS ARTICLE-->
 
<!-- The content is generated from get-metadata2mediawiki.py -->
 
 
__NOTOC__
 
__NOTOC__
  
Line 174: Line 172:
 
| <tt>timeZoneId</tt>
 
| <tt>timeZoneId</tt>
 
| string (optional)
 
| string (optional)
| The time zone the date should be converted to, e.g. ''$Local'', which represents the time zone of the operating system.
+
| The id of the time zone the date should be converted to, e.g. ''$Local'', which represents the time zone of the operating system.
 
|-
 
|-
 
| <tt>date</tt>
 
| <tt>date</tt>
Line 196: Line 194:
 
| Day of month to run job. Parameter "time" also required. dayOfWeek can optionally be used to define further.
 
| Day of month to run job. Parameter "time" also required. dayOfWeek can optionally be used to define further.
 
|}
 
|}
 +
 +
Use the API command [[Administration_API_-_Function_Reference#GetTimeZones|GetTimeZones]] to retrieve a list of all available time zones and their ids.
  
 
=== Argument Values ===
 
=== Argument Values ===
Line 386: Line 386:
  
 
== CreateUser ==
 
== CreateUser ==
Create new MailStore user.
+
Create new MailStore user. Use [[Administration_API_-_Function_Reference#SetUserPrivilegesOnFolder|SetUserPrivilegesOnFolder]] to grant that user privileges on the user's own archive.
  
 
=== Arguments ===
 
=== Arguments ===
Line 467: Line 467:
 
| <tt>reason</tt>
 
| <tt>reason</tt>
 
| string
 
| string
| The reason why that message has to be deleted.
+
| The reason why that message has to be deleted which will be written into the audit log.
 
|}
 
|}
  
Line 500: Line 500:
  
 
== DetachStore ==
 
== DetachStore ==
Detaches an archive store.
+
Detach an archive store.
  
 
=== Arguments ===
 
=== Arguments ===
Line 528: Line 528:
 
| <tt>folder</tt>
 
| <tt>folder</tt>
 
| string (optional)
 
| string (optional)
| Parent folder which child folders should be returned. If omitted, all archives and folder will be returned.
+
| Parent folder whose child folders should be returned. If omitted, all archives and folder will be returned.
 
|-
 
|-
 
| <tt>maxLevels</tt>
 
| <tt>maxLevels</tt>
Line 563: Line 563:
 
| <tt>timeZoneId</tt>
 
| <tt>timeZoneId</tt>
 
| string  
 
| string  
| Time zone in which timestamp should be returned.
+
| The id of the time zone the date should be converted to, e.g. $Local, which represents the time zone of the operating system.
 
|-
 
|-
 
| <tt>jobId</tt>
 
| <tt>jobId</tt>
Line 572: Line 572:
 
Interactive Management Shell Example: ''GetJobResults --fromIncluding="2016-12-01T00:00:00" --toExcluding="2016-12-31T23:59:59" --timeZoneId="$Local" --jobId=1''
 
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.
+
Use the API command [[Administration_API_-_Function_Reference#GetTimeZones|GetTimeZones]] to retrieve a list of all available time zones and their ids.
  
 
== GetJobs ==
 
== GetJobs ==
Retrieve list of jobs
+
Retrieve list of jobs.
 +
 
 +
== GetLicenseInformation ==
 +
Retrieve license information.
 +
 
 +
Example license information object:
 +
 
 +
{
 +
  "productKey": "YOUR-MAIL-STORE-PRODUCT-KEY",
 +
  "productVersion": "13.1.0.12345",
 +
  "maxNamedUsers": 100,
 +
  "namedUsers": 95,
 +
  "unusedNamedUsers": 5,
 +
  "supportExpiryDate": "2023-12-31",
 +
  "supportLevel": "Premium Service",
 +
  "validFrom": null,
 +
  "validTo": null,
 +
  "licensedTo": "MailStore Software GmbH",
 +
  "machineName": "MAILSTORE"
 +
}
 +
 
 +
The properties ''validFrom'' and ''validTo'' are only set when Trial or NFR product keys are used.
  
 
== GetMessages ==
 
== GetMessages ==
Line 607: Line 628:
 
== GetRetentionPolicies ==
 
== GetRetentionPolicies ==
 
Get the retention policies.
 
Get the retention policies.
 +
 +
Example retention policies object:
 +
 +
[
 +
  {
 +
    "name": "Keep All Mails for 10 Years",
 +
    "order": 1,
 +
    "enabled": true,
 +
    "searchCriteria": null,
 +
    "period": 10,
 +
    "periodInterval": "year",
 +
    "delete": false
 +
  }
 +
]
  
 
== GetServerInfo ==
 
== GetServerInfo ==
Line 616: Line 651:
 
== GetSmtpSettings ==
 
== GetSmtpSettings ==
 
Get current SMTP configuration.
 
Get current SMTP configuration.
 +
 +
== GetStoreAutoCreateConfiguration ==
 +
Get automatic archive store creation settings.
  
 
== GetStoreIndexes ==
 
== GetStoreIndexes ==
Line 646: Line 684:
  
 
== GetTimeZones ==
 
== GetTimeZones ==
Get list of available time zones.
+
Get a list of available time zones.
 +
 
 +
The ''id'' of the output can be used as ''timeZoneId'' in [[Administration_API_-_Function_Reference#CreateJob|CreateJob]], [[Administration_API_-_Function_Reference#GetJobResults|GetJobResults]], [[Administration_API_-_Function_Reference#SetJobSchedule|SetJobSchedule]] and [[Administration_API_-_Function_Reference#SendStatusReport|SendStatusReport]] and as ''timeZoneID'' (with a capital ''ID'') in [[Administration_API_-_Function_Reference#GetWorkerResults|GetWorkerResults]].
  
 
== GetUserInfo ==
 
== GetUserInfo ==
Line 684: Line 724:
 
| <tt>timeZoneID</tt>
 
| <tt>timeZoneID</tt>
 
| string  
 
| string  
| Time zone in which timestamp should be returned.
+
| The id of the time zone the date should be converted to, e.g. $Local, which represents the time zone of the operating system.
 
|-
 
|-
 
| <tt>profileID</tt>
 
| <tt>profileID</tt>
Line 696: Line 736:
  
 
Interactive Management Shell Example: ''GetWorkerResults --fromIncluding="2016-01-01T00:00:00" --toExcluding="2016-12-31T23:59:59" --timeZoneID="$Local" --profileID=1 --userName="admin"''
 
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 [[Administration_API_-_Function_Reference#GetTimeZones|GetTimeZones]] to retrieve a list of all available time zones and their ids.
 +
 +
Be aware that ''timeZoneID'' has to be written with a capital ''ID'' where all other commands with a ''timeZoneId'' are expecting ''Id''.
  
 
== MaintainFileSystemDatabases ==
 
== MaintainFileSystemDatabases ==
Line 775: Line 819:
 
| <tt>encryptionKey</tt>
 
| <tt>encryptionKey</tt>
 
| string (optional)
 
| string (optional)
| Encryption key of the archive store.
+
| Encryption key of the archive store. Must be given, when the encryption key cannot be read from the key file of the archive store.
 +
|-
 +
| <tt>recoverDeletedMessages</tt>
 +
| bool (optional)
 +
| Defines whether to recover deleted messages.
 
|}
 
|}
 +
 +
When the ''recoverDeletedMessages'' parameter is set to ''true'', only deleted messages that still have leftovers in the recovery records can be recovered. When an archive store has been compacted with [[#CompactStore|CompactStore]] or recovery record files have grown to their auto-compacting size of 32 MiB these leftovers could already be removed and deleted messages cannot be recovered.
  
 
== RecreateRecoveryRecords ==
 
== RecreateRecoveryRecords ==
Line 851: Line 901:
 
== RenewMasterKey ==
 
== RenewMasterKey ==
 
Renews the master key which is used to encrypt the encryption keys.
 
Renews the master key which is used to encrypt the encryption keys.
 +
 +
== RepairStoreDatabase ==
 +
Tries to resolve certain issues with archive store databases (e.g. missing database indexes).
 +
 +
=== Arguments ===
 +
{| class="wikitable"
 +
! width=150px | Name
 +
! width=120px | Type
 +
! Description
 +
|-
 +
| <tt>id</tt>
 +
| number
 +
| Unique ID of archive store.
 +
|}
  
 
== RetryOpenStores ==
 
== RetryOpenStores ==
Line 870: Line 934:
  
 
== RunProfile ==
 
== RunProfile ==
Run an existing archiving or exporting profile.
+
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 MailStore Client. Client side profiles can be started by using the [[MailStore_Server_Management_Shell|MailStoreCmd]] and the commands ''import-execute'' and ''export-execute''.
  
 
=== Arguments ===
 
=== Arguments ===
Line 884: Line 948:
  
 
== RunTemporaryProfile ==
 
== RunTemporaryProfile ==
Run a temporary/non-existent profile.
+
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 MailStore Client.
  
 
=== Arguments ===
 
=== Arguments ===
Line 909: Line 973:
 
Select all full-text indexes for rebuild.
 
Select all full-text indexes for rebuild.
  
== SetComplianceConfiguration ==
+
== SendStatusReport ==
Set compliance configuration settings.
+
Send a status report to the given recipients.
  
 
=== Arguments ===
 
=== Arguments ===
Line 918: Line 982:
 
! Description
 
! Description
 
|-
 
|-
| <tt>config</tt>
+
| <tt>timespan</tt>
| json
+
| string
| Compliance configuration.
+
| Timespan that is covered by the status report.
 +
|-
 +
| <tt>timeZoneId</tt>
 +
| string
 +
| The id of the time zone the date should be converted to, e.g. $Local, which represents the time zone of the operating system.
 +
|-
 +
| <tt>recipients</tt>
 +
| string
 +
| Comma separated list of recipients that will receive the status report.
 
|}
 
|}
  
 +
Use the API command [[Administration_API_-_Function_Reference#GetTimeZones|GetTimeZones]] to retrieve a list of all available time zones and their ids.
 
=== Argument Values ===
 
=== Argument Values ===
  
==== config ====
+
==== Timespan ====
Use GetComplianceConfiguration to receive supported value.
+
{| class="wikitable"
 +
! width=270px | Name
 +
! Description
 +
|-
 +
| <tt>today</tt>
 +
| The day when the status report is sent.
 +
|-
 +
| <tt>yesterday</tt>
 +
| The day before the status report is sent.
 +
|-
 +
| <tt>thisweek</tt>
 +
| The week when the status report is sent.
 +
|-
 +
| <tt>lastweek</tt>
 +
| The week before the status report is sent.
 +
|-
 +
| <tt>thismonth</tt>
 +
| The month when the status report is sent.
 +
|-
 +
| <tt>lastmonth</tt>
 +
| The month before the status report is sent.
 +
|}
  
Example settings object:
+
== SetComplianceConfiguration ==
<source lang="js" smart-tabs="true" toolbar="false" gutter="false">
+
Set compliance configuration settings.
 +
 
 +
=== Arguments ===
 +
{| class="wikitable"
 +
! width=150px | Name
 +
! width=120px | Type
 +
! Description
 +
|-
 +
| <tt>config</tt>
 +
| json
 +
| Compliance configuration.
 +
|}
 +
 
 +
=== Argument Values ===
 +
 
 +
==== config ====
 +
Use [[Administration_API_-_Function_Reference#GetComplianceConfiguration|GetComplianceConfiguration]] to receive supported values.
 +
 
 +
Example settings object:
 +
<source lang="js" smart-tabs="true" toolbar="false" gutter="false">
 
{
 
{
 
   "adminEmailPreviewEnabled": true,
 
   "adminEmailPreviewEnabled": true,
 
   "legalHoldEnabled": false,
 
   "legalHoldEnabled": false,
 +
  "passwordPolicyEnabled": true,
 
   "logSuccessfulUserActivities": [
 
   "logSuccessfulUserActivities": [
 
     "AdminRestored",
 
     "AdminRestored",
Line 1,005: Line 1,119:
 
| <tt>timeZoneId</tt>
 
| <tt>timeZoneId</tt>
 
| string  
 
| string  
| The time zone the date should be converted to, e.g. ''$Local'', which represents the time zone of the operating system.
+
| The id of the time zone the date should be converted to, e.g. $Local, which represents the time zone of the operating system.
 
|-
 
|-
 
| <tt>date</tt>
 
| <tt>date</tt>
Line 1,028: Line 1,142:
 
|}
 
|}
  
 +
Use the API command [[Administration_API_-_Function_Reference#GetTimeZones|GetTimeZones]] to retrieve a list of all available time zones and their ids.
 
=== Argument Values ===
 
=== Argument Values ===
  
Line 1,108: Line 1,223:
 
|}
 
|}
  
== SetSmtpSettings ==
+
== SetProfileServerSideExecution ==
Set SMTP configuration.
+
Disables or enables the automatic server-sided execution with its parameters.
  
 
=== Arguments ===
 
=== Arguments ===
Line 1,117: Line 1,232:
 
! Description
 
! Description
 
|-
 
|-
| <tt>settings</tt>
+
| <tt>id</tt>
| json
+
| number
| SMTP configuration.
+
| The unique profile ID of the profile to be modified.
 +
|-
 +
| <tt>automatic</tt>
 +
| bool
 +
| Enables (true) or disables (false) the profile's server-side automation.
 +
|-
 +
| <tt>automaticPauseBetweenExecutions</tt>
 +
| number (optional)
 +
| Integer value (0 - 2147483647) of seconds to pause between re-executing an automatic profile.
 +
|-
 +
| <tt>automaticMaintenanceWindows</tt>
 +
| string (optional)
 +
| TimeSpan string (hh:mm-hh:mm, e.g. 22:00-04:00) for the time window where the execution should not be executed, e.g. to schedule maintenance tasks.
 
|}
 
|}
  
=== Argument Values ===
+
Use the API command [[Administration_API_-_Function_Reference#GetProfiles|GetProfiles]] to retrieve a list of all profiles and their current "serverSideExecution" section details.
  
==== settings====
+
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. Setting an already automated profile to automatic again, will restart the profile.
Example settings object:
 
<source lang="js" smart-tabs="true" toolbar="false" gutter="false">
 
{
 
  "hostname": "mail.example.com",
 
  "port": 587,
 
  "protocol": "SMTP-TLS",
 
  "ignoreSslPolicyErrors": false,
 
  "authenticationRequired": true,
 
  "username": "[email protected]",
 
  "password": "userpassword",
 
  "fromDisplayName": "Sending User",
 
  "fromEmailAddress": "sending.user@example.com",
 
  "recipientEmailAddress": "administrator@example.com"
 
}
 
</source>
 
  
== SetStoreProperties ==
+
== SetRetentionPolicies ==
Set properties of archive store.
+
Set retention policies.
  
 
=== Arguments ===
 
=== Arguments ===
Line 1,150: Line 1,262:
 
! Description
 
! Description
 
|-
 
|-
| <tt>id</tt>
+
| <tt>config</tt>
| number  
+
| json
| Set properties of archive store.
+
| Retention policy configuration.
 +
|}
 +
 
 +
To get example policies use the client to create retention policies manually. Then use the API command [[Administration_API_-_Function_Reference#GetRetentionPolicies|GetRetentionPolicies]] to retrieve the json values.
 +
 
 +
== SetSmtpSettings ==
 +
Set SMTP configuration.
 +
 
 +
=== Arguments ===
 +
{| class="wikitable"
 +
! width=150px | Name
 +
! width=120px | Type
 +
! Description
 +
|-
 +
| <tt>settings</tt>
 +
| json
 +
| SMTP configuration.
 +
|}
 +
 
 +
=== Argument Values ===
 +
 
 +
==== settings====
 +
Example settings object:
 +
<source lang="js" smart-tabs="true" toolbar="false" gutter="false">
 +
{
 +
  "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]"]
 +
}
 +
</source>
 +
 
 +
== SetStoreAutoCreateConfiguration ==
 +
Set configuration for automatic archive store creation.
 +
 
 +
=== Arguments ===
 +
{| class="wikitable"
 +
! width=150px | Name
 +
! width=120px | Type
 +
! Description
 +
|-
 +
| <tt>config</tt>
 +
| json
 +
| Archive store automatic creation configuration.
 +
|}
 +
 
 +
=== Argument Values ===
 +
 
 +
==== config ====
 +
<source lang="js" smart-tabs="true" toolbar="false" gutter="false">
 +
{
 +
  "sizeThreshold" : int or null,
 +
  "databaseBaseDirectory" : string,
 +
  "contentBaseDirectory" : string,
 +
  "indexBaseDirectory" : string
 +
}
 +
</source>
 +
 
 +
== SetStoreProperties ==
 +
Set properties of archive store.
 +
 
 +
=== Arguments ===
 +
{| class="wikitable"
 +
! width=150px | Name
 +
! width=120px | Type
 +
! Description
 +
|-
 +
| <tt>id</tt>
 +
| number  
 +
| Set properties of archive store.
 +
|-
 +
| <tt>type</tt>
 +
| string (optional)
 +
|
 +
|-
 +
| <tt>databaseName</tt>
 +
| string (optional)
 +
| Name of database on Microsoft SQL Server or PostgreSQL server.
 +
|-
 +
| <tt>databasePath</tt>
 +
| string (optional)
 +
| Path to directory in which database folder information and email meta data are stored.
 +
|-
 +
| <tt>contentPath</tt>
 +
| string (optional)
 +
| Path to directory in which email headers and contents are stored.
 +
|-
 +
| <tt>indexPath</tt>
 +
| string (optional)
 +
| Path to directory in which full text search indexes are stored.
 +
|-
 +
| <tt>serverName</tt>
 +
| string (optional)
 +
| Name of Microsoft SQL Server or PostgreSQL server.
 +
|-
 +
| <tt>userName</tt>
 +
| string (optional)
 +
| User name for accessing Microsoft SQL Server or PostgreSQL server.
 +
|-
 +
| <tt>password</tt>
 +
| string (optional)
 +
| Password for accessing Microsoft SQL Server or PostgreSQL server.
 +
|}
 +
 
 +
=== Argument Values ===
 +
 
 +
==== type ====
 +
{| class="wikitable"
 +
! width=270px | Name
 +
! Description
 +
|-
 +
| <tt>FileSystemInternal</tt>
 +
| Advanced file system-based archive store.
 +
|-
 +
| <tt>SQLServer</tt>
 +
| Microsoft SQL Server-based archive store.
 +
|-
 +
| <tt>PostgreSQL</tt>
 +
| PostgreSQL server-based archive store.
 +
|}
 +
 
 +
== SetStoreRequestedState ==
 +
Set state of archive store.
 +
 
 +
=== Arguments ===
 +
{| class="wikitable"
 +
! width=150px | Name
 +
! width=120px | Type
 +
! Description
 
|-
 
|-
| <tt>type</tt>
+
| <tt>id</tt>
| string (optional)
+
| number
|  
+
| Unique ID of archive store.
 
|-
 
|-
| <tt>databaseName</tt>
+
| <tt>requestedState</tt>
 
| string (optional)
 
| string (optional)
| Name of database on Microsoft SQL Server or PostgreSQL server.
+
| State of archive store after attaching.
|-
+
|}
| <tt>databasePath</tt>
+
 
| string (optional)
 
| Path to directory in which database folder information and email meta data are stored.
 
|-
 
| <tt>contentPath</tt>
 
| string (optional)
 
| Path to directory in which email headers and contents are stored.
 
|-
 
| <tt>indexPath</tt>
 
| string (optional)
 
| Path to directory in which full text search indexes are stored.
 
|-
 
| <tt>serverName</tt>
 
| string (optional)
 
| Name of Microsoft SQL Server or PostgreSQL server.
 
|-
 
| <tt>userName</tt>
 
| string (optional)
 
| User name for accessing Microsoft SQL Server or PostgreSQL server.
 
|-
 
| <tt>password</tt>
 
| string (optional)
 
| Password for accessing Microsoft SQL Server or PostgreSQL server.
 
|}
 
 
 
 
=== Argument Values ===
 
=== Argument Values ===
  
==== type ====
+
==== requestedState ====
 
{| class="wikitable"
 
{| class="wikitable"
 
! width=270px | Name
 
! width=270px | Name
 
! Description
 
! Description
 
|-
 
|-
| <tt>FileSystemInternal</tt>
+
| <tt>current</tt>
| Advanced file system-based archive store.
+
| Same as Normal but new messages will be archived in the archive store that is set to Current.
 +
|-
 +
| <tt>normal</tt>
 +
| The content of archives store is available to users and can be modified if the user has the appropriate permission.
 
|-
 
|-
| <tt>SQLServer</tt>
+
| <tt>writeProtected</tt>
| Microsoft SQL Server-based archive store.
+
| 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)
 
|-
 
|-
| <tt>PostgreSQL</tt>
+
| <tt>disabled</tt>
| PostgreSQL server-based archive store.
+
| Disabled archive stores are not in use but the instance still knows about their existence. Therefore the content is not available to users.
 
|}
 
|}
  
== SetStoreRequestedState ==
+
== SetUserAuthentication ==
Set state of archive store.
+
Set authentication settings of a MailStore user.
  
 
=== Arguments ===
 
=== Arguments ===
Line 1,213: Line 1,438:
 
! Description
 
! Description
 
|-
 
|-
| <tt>id</tt>
+
| <tt>userName</tt>
| number
+
| string
| Unique ID of archive store.
+
| User name of MailStore user.
 
|-
 
|-
| <tt>requestedState</tt>
+
| <tt>authentication</tt>
| string (optional)
+
| string  
| State of archive store after attaching.
+
| Authentication method. Either 'integrated' or 'directoryServices'.
 
|}
 
|}
  
=== Argument Values ===
+
== SetUserDistinguishedName ==
 +
Set the LDAP distinguished name of a MailStore user.
  
==== requestedState ====
+
=== Arguments ===
 
{| class="wikitable"
 
{| class="wikitable"
! width=270px | Name
+
! width=150px | Name
 +
! width=120px | Type
 
! Description
 
! Description
 
|-
 
|-
| <tt>current</tt>
+
| <tt>userName</tt>
| Same as Normal but new messages will be archived in the archive store that is set to Current.
+
| string
 +
| User name of MailStore user.
 
|-
 
|-
| <tt>normal</tt>
+
| <tt>distinguishedName</tt>
| The content of archives store is available to users and can be modified if the user has the appropriate permission.
+
| string (optional)
|-
+
| LDAP DN string.
| <tt>writeProtected</tt>
+
|}
| 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)
 
|-
 
| <tt>disabled</tt>
 
| Disabled archive stores are not in use but the instance still knows about their existence. Therefore the content is not available to users.
 
|}
 
  
== SetUserAuthentication ==
+
== SetUserEmailAddresses ==
Set authentication settings of a MailStore user.
+
Set email addresses of MailStore user.
  
 
=== Arguments ===
 
=== Arguments ===
Line 1,255: Line 1,478:
 
| User name of MailStore user.
 
| User name of MailStore user.
 
|-
 
|-
| <tt>authentication</tt>
+
| <tt>emailAddresses</tt>
| string  
+
| string (optional)
| Authentication method. Either 'integrated' or 'directoryServices'.
+
| List of email addresses.
 
|}
 
|}
  
== SetUserDistinguishedName ==
+
== SetUserFullName ==
Set the LDAP distinguished name of a MailStore user.
+
Set full name of MailStore user.
  
 
=== Arguments ===
 
=== Arguments ===
Line 1,273: Line 1,496:
 
| User name of MailStore user.
 
| User name of MailStore user.
 
|-
 
|-
| <tt>distinguishedName</tt>
+
| <tt>fullName</tt>
 
| string (optional)
 
| string (optional)
| LDAP DN string.
+
| Full name of MailStore user.
 
|}
 
|}
  
== SetUserEmailAddresses ==
+
== SetUserPassword ==
Set email addresses of MailStore user.
+
Set password of MailStore user.
  
 
=== Arguments ===
 
=== Arguments ===
Line 1,291: Line 1,514:
 
| User name of MailStore user.
 
| User name of MailStore user.
 
|-
 
|-
| <tt>emailAddresses</tt>
+
| <tt>password</tt>
| string (optional)
+
| string  
| List of email addresses.
+
| Password of MailStore user.
 
|}
 
|}
  
== SetUserFullName ==
+
== SetUserPop3UserNames ==
Set full name of MailStore user.
+
Set POP3 user name of MailStore user.
  
 
=== Arguments ===
 
=== Arguments ===
Line 1,309: Line 1,532:
 
| User name of MailStore user.
 
| User name of MailStore user.
 
|-
 
|-
| <tt>fullName</tt>
+
| <tt>pop3UserNames</tt>
 
| string (optional)
 
| string (optional)
| Full name of MailStore user.
+
| Comma separated list of POP3 user names.
 
|}
 
|}
  
== SetUserPassword ==
+
== SetUserPrivileges ==
Set password of MailStore user.
+
Set privileges of MailStore user.
  
 
=== Arguments ===
 
=== Arguments ===
Line 1,327: Line 1,550:
 
| User name of MailStore user.
 
| User name of MailStore user.
 
|-
 
|-
| <tt>password</tt>
+
| <tt>privileges</tt>
 
| string  
 
| string  
| Password of MailStore user.
+
| Comma separated list of privileges.
 
|}
 
|}
  
== SetUserPop3UserNames ==
+
=== Argument Values ===
Set POP3 user name of MailStore user.
+
 
 +
==== privileges ====
 +
{{Administration_API_User_Privileges}}
 +
 
 +
== SetUserPrivilegesOnFolder ==
 +
Set privileges on folder for MailStore user.
  
 
=== Arguments ===
 
=== Arguments ===
Line 1,345: Line 1,573:
 
| User name of MailStore user.
 
| User name of MailStore user.
 
|-
 
|-
| <tt>pop3UserNames</tt>
+
| <tt>folder</tt>
| string (optional)
 
| Comma separated list of POP3 user names.
 
|}
 
 
 
== SetUserPrivileges ==
 
Set privileges of MailStore user.
 
 
 
=== Arguments ===
 
{| class="wikitable"
 
! width=150px | Name
 
! width=120px | Type
 
! Description
 
|-
 
| <tt>userName</tt>
 
 
| string  
 
| string  
| User name of MailStore user.
+
| Folder name.
 
|-
 
|-
 
| <tt>privileges</tt>
 
| <tt>privileges</tt>
 
| string  
 
| string  
| Comma separated list of privileges.
+
| Comma separated list of folder privileges.
 
|}
 
|}
  
Line 1,371: Line 1,585:
  
 
==== privileges ====
 
==== privileges ====
{{Administration_API_User_Privileges}}
+
{| class="wikitable"
 +
! width=270px | Name
 +
! Description
 +
|-
 +
| <tt>none</tt>
 +
| 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.
 +
|-
 +
| <tt>read</tt>
 +
| The user is granted read access to the specified folder.
 +
|-
 +
| <tt>write</tt>
 +
| The user is granted write access to the specified folder. Messages can be moved within an archive.
 +
|-
 +
| <tt>delete</tt>
 +
| The user is granted delete access to the specified folder.
 +
|}
  
== SetUserPrivilegesOnFolder ==
+
== SyncUsersWithDirectoryServices ==
Set privileges on folder for MailStore user.
+
Sync users of MailStore instance with directory services.
  
 
=== Arguments ===
 
=== Arguments ===
Line 1,382: Line 1,611:
 
! Description
 
! Description
 
|-
 
|-
| <tt>userName</tt>
+
| <tt>dryRun</tt>
| string
+
| bool (optional)
| User name of MailStore user.
+
| Simulate sync only.
|-
 
| <tt>folder</tt>
 
| string
 
| Folder name.
 
|-
 
| <tt>privileges</tt>
 
| string
 
| Comma separated list of folder privileges.
 
 
|}
 
|}
  
=== Argument Values ===
+
== TestSmtpSettings ==
 +
Test current SMTP configuration.
 +
 
 +
== UnlockStore ==
 +
Unlock a foreign archive store. In case an archive store from a foreign MailStore installation is attached, this method can be used to unlock that archive store.
  
==== privileges ====
+
=== Arguments ===
 
{| class="wikitable"
 
{| class="wikitable"
! width=270px | Name
+
! width=150px | Name
 +
! width=120px | Type
 
! Description
 
! Description
 
|-
 
|-
| <tt>none</tt>
+
| <tt>id</tt>
| 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.
+
| number
 +
| Unique ID of archive store to unlock.
 
|-
 
|-
| <tt>read</tt>
+
| <tt>passphrase</tt>
| The user is granted read access to the specified folder.
+
| string
 +
| Product key or recovery key of the foreign MailStore installation.
 +
|}
 +
 
 +
== UpgradeStore ==
 +
Upgrade archive store from MailStore Server 5 or older to current format.
 +
 
 +
=== Arguments ===
 +
{| class="wikitable"
 +
! width=150px | Name
 +
! width=120px | Type
 +
! Description
 
|-
 
|-
| <tt>write</tt>
+
| <tt>id</tt>
| The user is granted write access to the specified folder. Messages can be moved within an archive.
+
| number
|-
+
| Unique ID of archive store.
| <tt>delete</tt>
 
| The user is granted delete access to the specified folder.
 
 
|}
 
|}
  
== SyncUsersWithDirectoryServices ==
+
== VerifyStore ==
Sync users of MailStore instance with directory services.
+
Verify archive stores consistency.
  
 
=== Arguments ===
 
=== Arguments ===
Line 1,424: Line 1,660:
 
! Description
 
! Description
 
|-
 
|-
| <tt>dryRun</tt>
+
| <tt>id</tt>
| bool (optional)
+
| number
| Simulate sync only.
+
| The unique identifier of the archive store to be verified.
|}
+
|-
 
+
| <tt>includeIndexes</tt>
== TestSmtpSettings ==
+
| bool
Test current SMTP configuration.
+
| Defines whether to verify the search indexes as well.
 
+
|}
== UpgradeStore ==
+
 
Upgrade archive store from MailStore Server 5 or older to current format.
+
== VerifyStores ==
 
+
Verify consistency of all archive stores.
=== Arguments ===
 
{| class="wikitable"
 
! width=150px | Name
 
! width=120px | Type
 
! Description
 
|-
 
| <tt>id</tt>
 
| number
 
| Unique ID of archive store.
 
|}
 
 
 
== VerifyStore ==
 
Verify archive stores consistency.
 
  
 
=== Arguments ===
 
=== Arguments ===
Line 1,455: Line 1,678:
 
! Description
 
! Description
 
|-
 
|-
| <tt>id</tt>
+
| <tt>includeIndexes</tt>
| number
+
| bool
| The unique identifier of the archive store to be verified.
+
| Defines whether to verify the search indexes as well.
 
|}
 
|}
  
== VerifyStores ==
+
[[de:Administration API - Function Reference]]
Verify consistency of all archive stores.
+
[[en:Administration API - Function Reference]]

Revision as of 07:45, 19 September 2022


AttachStore

Attach existing archive store.

Arguments

Name Type Description
name string Meaningful name of archive store.
type string Type of archive store.
databaseName string (optional) Name of database on Microsoft SQL Server or PostgreSQL server.
databasePath string (optional) Path to directory in which database folder information and email meta data are stored.
contentPath string (optional) Path to directory in which email headers and contents are stored.
indexPath string (optional) Path to directory in which full text search indexes are stored.
serverName string (optional) Name of Microsoft SQL Server or PostgreSQL server.
userName string (optional) User name for accessing Microsoft SQL Server or PostgreSQL server.
password string (optional) Password for accessing Microsoft SQL Server or PostgreSQL server.
requestedState string (optional) State of archive store after attaching.

Argument Values

type

Name Description
FileSystemInternal Advanced file system-based archive store.
SQLServer Microsoft SQL Server-based archive store.
PostgreSQL PostgreSQL server-based archive store.

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.

CancelJobAsync

Cancel a running job asynchronously.

Arguments

Name Type Description
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
userName string User name of MailStore user.

CompactMasterDatabase

Compact master database.

CompactStore

Compact archive store.

Arguments

Name Type Description
id number Unique ID of archive store

CreateBackup

Create a backup of the entire archive.

Arguments

Name Type Description
path string Path to directory into which the backup should be written.
excludeSearchIndexes bool (optional) Indicates whether the search index files should be excluded from the backup.

CreateJob

Create a new job to execute Management API commands.

Arguments

Name Type Description
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 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 and their ids.

Argument Values

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.

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.

CreateProfile

Create a new archiving or exporting profile.

Arguments

Name Type Description
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 then use the GetProfiles method to receive supported values. The properties id and version must be omitted, the password field must be filled properly.

CreateStore

Create and attach a new archive store.

Arguments

Name Type Description
name string Meaningful name of archive store.
type string (optional) Type of archive store.
databaseName string (optional) Name of database on Microsoft SQL Server or PostgreSQL server.
databasePath string (optional) Path to directory in which database folder information and email meta data are stored.
contentPath string (optional) Path to directory in which email headers and contents are stored.
indexPath string (optional) Path to directory in which full text search indexes are stored.
serverName string (optional) Name of Microsoft SQL Server or PostgreSQL server.
userName string (optional) User name for accessing Microsoft SQL Server or PostgreSQL server.
password string (optional) Password for accessing Microsoft SQL Server or PostgreSQL server.
requestedState string (optional) State of archive store after attaching.

Argument Values

type

Name Description
FileSystemInternal Standard archive store.
SQLServer Microsoft SQL Server-based archive store.
PostgreSQL PostgreSQL server-based archive store.

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.

CreateUser

Create new MailStore user. Use SetUserPrivilegesOnFolder to grant that user privileges on the user's own archive.

Arguments

Name Type Description
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
folder string (optional) Entry point in folder tree.

DeleteJob

Deletes a job.

Arguments

Name Type Description
id string The unique identifier of the job to be deleted.

DeleteMessage

Delete a single message

Arguments

Name Type Description
id string Unique ID of message. Format: <store_id>:<message_num>
reason string The reason why that message has to be deleted which will be written into the audit log.

DeleteProfile

Delete an archiving or exporting profile.

Arguments

Name Type Description
id number Unique ID of profile.

DeleteUser

Delete a MailStore user. Neither the user's archive nor the user's archive emails are deleted when deleting a user.

Arguments

Name Type Description
userName string User name of MailStore user.

DetachStore

Detach an archive store.

Arguments

Name Type Description
id number Unique ID of archive store.

GetActiveSessions

Get list of current user sessions.

GetChildFolders

Get child folders. Depending on compliance settings this method may return only the first folder hierarchy level.

Arguments

Name Type Description
folder string (optional) Parent folder whose child folders should be returned. If omitted, all archives and folder will be returned.
maxLevels number (optional) Depth of child folders.

GetComplianceConfiguration

Get current compliance configuration settings.

GetDirectoryServicesConfiguration

Get current Directory Services configuration settings.

GetFolderStatistics

Get folder statistics.

GetJobResults

Retrieves list of finished job executions.

Arguments

Name Type Description
fromIncluding string Beginning of time range to fetch.
toExcluding string End of time range to fetch.
timeZoneId string The 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 and their ids.

GetJobs

Retrieve list of jobs.

GetLicenseInformation

Retrieve license information.

Example license information object:

{
 "productKey": "YOUR-MAIL-STORE-PRODUCT-KEY",
 "productVersion": "13.1.0.12345",
 "maxNamedUsers": 100,
 "namedUsers": 95,
 "unusedNamedUsers": 5,
 "supportExpiryDate": "2023-12-31",
 "supportLevel": "Premium Service",
 "validFrom": null,
 "validTo": null,
 "licensedTo": "MailStore Software GmbH",
 "machineName": "MAILSTORE"
}

The properties validFrom and validTo are only set when Trial or NFR product keys are used.

GetMessages

Get list of messages from a folder.

Arguments

Name Type Description
folder string (optional) Folder whose content to list.

GetProfiles

Get list of archiving and exporting profiles.

Arguments

Name Type Description
raw bool Currently only 'true' is supported.

GetRetentionPolicies

Get the retention policies.

Example retention policies object:

[
  {
    "name": "Keep All Mails for 10 Years",
    "order": 1,
    "enabled": true,
    "searchCriteria": null,
    "period": 10,
    "periodInterval": "year",
    "delete": false
  }
]

GetServerInfo

Get MailStore Server version and machine name.

GetServiceConfiguration

Get MailStore Server service configuration. This includes the path to the Master Database, the location of the audit log, whether the different debug logs are enabled and the endpoint configuration.

GetSmtpSettings

Get current SMTP configuration.

GetStoreAutoCreateConfiguration

Get automatic archive store creation settings.

GetStoreIndexes

Get list of full text indexes.

Arguments

Name Type Description
id number (optional) Unique ID of archive store.

GetStores

Get list of archive stores.

Arguments

Name Type Description
includeSize bool (optional) Includes size of archive store. Default: true. May be slow when running on slow hardware.

GetTimeZones

Get a list of available time zones.

The id of the output can be used as timeZoneId in CreateJob, GetJobResults, SetJobSchedule and SendStatusReport and as timeZoneID (with a capital ID) in GetWorkerResults.

GetUserInfo

Get detailed information about user.

Arguments

Name Type Description
userName string User name of MailStore user

GetUsers

Get list of users.

GetWorkerResults

Get results of profile executions.

Arguments

Name Type Description
fromIncluding string Beginning of time range to fetch.
toExcluding string End of time range to fetch.
timeZoneID string The 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 and their ids.

Be aware that timeZoneID has to be written with a capital ID where all other commands with a timeZoneId are expecting Id.

MaintainFileSystemDatabases

Run database maintenance on all databases of file system based archive stores.

MergeStore

Merge two archive stores.

Arguments

Name Type Description
id number Unique ID of destination archive store.
sourceId number Unique ID of source archive store.

MoveFolder

Move folder.

Arguments

Name Type Description
fromFolder string Old folder name.
toFolder string New folder name.

ProcessRetentionPolicies

Processes the configured retention policies.

RebuildSelectedStoreIndexes

Rebuild all full-text indexes selected for rebuild.

RebuildStoreIndex

Rebuild search index for given archive folder.

Arguments

Name Type Description
id number Unique ID of archive store.
folder string Name of folder name.

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
id number Unique ID of archive store.
encryptionKey string (optional) Encryption key of the archive store. Must be given, when the encryption key cannot be read from the key file of the archive store.
recoverDeletedMessages bool (optional) Defines whether to recover deleted messages.

When the recoverDeletedMessages parameter is set to true, only deleted messages that still have leftovers in the recovery records can be recovered. When an archive store has been compacted with CompactStore or recovery record files have grown to their auto-compacting size of 32 MiB these leftovers could already be removed and deleted messages cannot be recovered.

RecreateRecoveryRecords

Recreates broken Recovery Records of an archive store. Use VerifyStore to verify the state of the Recovery Records. Cannot be used for external archive stores that store their content in the database.

Arguments

Name Type Description
id number Unique ID of archive store.

RefreshAllStoreStatistics

Refresh statistics of all archive stores.

RenameJob

Rename job.

Arguments

Name Type Description
id number (optional) The unique identifier of the job to be renamed.
name string (optional) The new job name.

RenameStore

Rename archive store

Arguments

Name Type Description
id number Unique ID of archive store.
name string New name of archive store.

RenameUser

Rename a MailStore user.

Arguments

Name Type Description
oldUserName string Old user name.
newUserName string New user name.

RenewMasterKey

Renews the master key which is used to encrypt the encryption keys.

RepairStoreDatabase

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

Arguments

Name Type Description
id number Unique ID of archive store.

RetryOpenStores

Retry opening stores that failed previously.

RunJobAsync

Run an existing job.

Arguments

Name Type Description
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 MailStore Client. Client side profiles can be started by using the MailStoreCmd and the commands import-execute and export-execute.

Arguments

Name Type Description
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 MailStore Client.

Arguments

Name Type Description
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.

SelectAllStoreIndexesForRebuild

Select all full-text indexes for rebuild.

SendStatusReport

Send a status report to the given recipients.

Arguments

Name Type Description
timespan string Timespan that is covered by the status report.
timeZoneId string The id of the time zone the date should be converted to, e.g. $Local, which represents the time zone of the operating system.
recipients string Comma separated list of recipients that will receive the status report.

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

Argument Values

Timespan

Name Description
today The day when the status report is sent.
yesterday The day before the status report is sent.
thisweek The week when the status report is sent.
lastweek The week before the status report is sent.
thismonth The month when the status report is sent.
lastmonth The month before the status report is sent.

SetComplianceConfiguration

Set compliance configuration settings.

Arguments

Name Type Description
config json Compliance configuration.

Argument Values

config

Use GetComplianceConfiguration to receive supported values.

Example settings object:

{
  "adminEmailPreviewEnabled": true,
  "legalHoldEnabled": false,
  "passwordPolicyEnabled": true,
  "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
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
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 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 and their ids.

Argument Values

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.

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.

SetProfileServerSideExecution

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

Arguments

Name Type Description
id number The unique profile ID of the profile to be modified.
automatic bool Enables (true) or disables (false) the profile's server-side automation.
automaticPauseBetweenExecutions number (optional) Integer value (0 - 2147483647) of seconds to pause between re-executing an automatic profile.
automaticMaintenanceWindows string (optional) TimeSpan string (hh:mm-hh:mm, e.g. 22:00-04:00) for the time window where the execution should not be executed, e.g. to schedule maintenance tasks.

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. Setting an already automated profile to automatic again, will restart the profile.

SetRetentionPolicies

Set retention policies.

Arguments

Name Type Description
config json Retention policy configuration.

To get example policies use the client to create retention policies manually. Then use the API command GetRetentionPolicies to retrieve the json values.

SetSmtpSettings

Set SMTP configuration.

Arguments

Name Type Description
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]"]
}

SetStoreAutoCreateConfiguration

Set configuration for automatic archive store creation.

Arguments

Name Type Description
config json Archive store automatic creation configuration.

Argument Values

config

{
  "sizeThreshold" : int or null,
  "databaseBaseDirectory" : string,
  "contentBaseDirectory" : string,
  "indexBaseDirectory" : string
}

SetStoreProperties

Set properties of archive store.

Arguments

Name Type Description
id number Set properties of archive store.
type string (optional)
databaseName string (optional) Name of database on Microsoft SQL Server or PostgreSQL server.
databasePath string (optional) Path to directory in which database folder information and email meta data are stored.
contentPath string (optional) Path to directory in which email headers and contents are stored.
indexPath string (optional) Path to directory in which full text search indexes are stored.
serverName string (optional) Name of Microsoft SQL Server or PostgreSQL server.
userName string (optional) User name for accessing Microsoft SQL Server or PostgreSQL server.
password string (optional) Password for accessing Microsoft SQL Server or PostgreSQL server.

Argument Values

type

Name Description
FileSystemInternal Advanced file system-based archive store.
SQLServer Microsoft SQL Server-based archive store.
PostgreSQL PostgreSQL server-based archive store.

SetStoreRequestedState

Set state of archive store.

Arguments

Name Type Description
id number Unique ID of archive store.
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.

SetUserAuthentication

Set authentication settings of a MailStore user.

Arguments

Name Type Description
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
userName string User name of MailStore user.
distinguishedName string (optional) LDAP DN string.

SetUserEmailAddresses

Set email addresses of MailStore user.

Arguments

Name Type Description
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
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
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
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
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
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
dryRun bool (optional) Simulate sync only.

TestSmtpSettings

Test current SMTP configuration.

UnlockStore

Unlock a foreign archive store. In case an archive store from a foreign MailStore installation is attached, this method can be used to unlock that archive store.

Arguments

Name Type Description
id number Unique ID of archive store to unlock.
passphrase string Product key or recovery key of the foreign MailStore installation.

UpgradeStore

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

Arguments

Name Type Description
id number Unique ID of archive store.

VerifyStore

Verify archive stores consistency.

Arguments

Name Type Description
id number The unique identifier of the archive store to be verified.
includeIndexes bool Defines whether to verify the search indexes as well.

VerifyStores

Verify consistency of all archive stores.

Arguments

Name Type Description
includeIndexes bool Defines whether to verify the search indexes as well.