Command Line Interface (API)

Intro
Installation
SysAdmin
Network
Objects
Transfer
RealTime
Access
Services
Directory
Clusters
Applications 
Data 
CLI/API
CGPL 
Rules 
Helpers 
PBXApp 
WebApp 
WSSP 
AppCodes 
WebMail
PBX
Miscellaneous
Licensing

The CommuniGate Pro Server provides a Command Line Interface (CLI) for server administrating. This interface can be used as an alternative for the standard Web Administrator interface.

CLI can also be used as the Application Program Interface (API), so the server can be managed via scripts and other programs that issue the CLI commands to the server.

The CommuniGate Pro Server provides several methods to access its CLI.

The CommuniGate Pro Perl Interface document contains the set of the Perl language utilities that allow a Perl script to access the CommuniGate Pro CLI API. The document also contains links to several useful sample Perl scripts (automated account registration and removal, etc.).

The CommuniGate Pro Java Interface document contains the set of the Java language classes that allow a Java program to access the CommuniGate Pro CLI API. The document also contains links to several sample Java programs.

Administrating the Server via the PWD module

The CommuniGate Pro Server CLI is available as an extension to the PWD protocol.

As soon as a PWD user is authenticated, the CLI commands are accepted. For each CLI command the server checks the access rights of the authenticated user.

If a command produces some data, the data is sent after the protocol line with the positive response. The CR-LF combination is sent after the data.

Here is a sample PWD session with CLI commands:

C: telnet servername.com 106
S: 200 CommuniGate Pro at mail.stalker.com PWD Server 3.5 ready
C: USER postmaster
S: 300 please send the PASS
C: PASS postmasterpassword
S: 200 login OK
C: CreateAccount "user1"
S: 200 OK
C: CreateAccount "user1"
S: 501 Account with this name already exists
C: RenameAccount "user1" into "user2"
S: 200 OK
C: CreateDomain "client1.com"
S: 200 OK
C: CreateAccount "user1@client1.com" TextMailbox
S: 200 OK
C: QUIT
S: 200 CommuniGate Pro PWD connection closed


CLI Syntax

The CommuniGate Pro CLI uses the Dictionary Format to parse commands and to format the output results.

Note: These Dictionary format syntax rules allow you to specify a string without the quotation marks if the string contains alphanumerical symbols only. You should use the quotation marks if a string contains the dot (.), comma (,), and other non-alphanumerical symbols.

In spite of the fact that the Dictionary format is multi-line, all arrays and dictionaries you specify as CLI parameters should be stored on one command line.

If a CLI command produces some output in the array or dictionary format, the output data can be presented on several lines.


Account Administration

A user should have the Account Settings access right or the Domain Administration access right to use the Account Administration CLI commands.

ListAccounts [ domainName ]
Use this command to get the list of all accounts in the domain. The command produces output data - a dictionary with the keys listing all accounts in the specified (or default) domain.

domainName : string
This optional parameter specifies the domain name. If the domain name is not specified, the command applies to the administrator domain.

CreateAccount accountName [accountType] [ external ] [settings]
Use this command to create new accounts.

accountName : string
This parameter specifies the name for the new account.
The name can contain the @sign followed by the domain name, in this case the account is created in the specified domain. If the domain name is not specified, the command applies to the administrator domain.

accountType : MultiMailbox | TextMailbox | MailDirMailbox
This optional parameter specifies the type of the account to create. If no account type is specified a MultiMailbox-type account is created.

external
This optional flag tells the system to create an account with an external (visible for legacy mailers) INBOX.

settings : dictionary
This optional parameter specifies the initial account settings. Account is created using the settings specified in the Account Template for the target domain. If the settings parameter is specified, it is used to modify the Template settings.

This command can be used by a domain administrator only if the domain administrator has the CanCreateAccounts access right.
If this command is used by a domain administrator, it will use only those account settings that the domain administrator is allowed to modify.

RenameAccount oldAccountName into newAccountName
Use this command to rename accounts.

oldAccountName : string
This parameter specifies the name of an existing account. The name can include the domain name (see above).

newAccountName : string
This parameter specifies the new account name. The name can include the domain name (see above).

This command can be used by a domain administrator only if the domain administrator has the CanCreateAccounts access right.

DeleteAccount oldAccountName
Use this command to remove accounts.

oldAccountName : string
This parameter specifies the name of an existing account. The name can include the domain name (see above).

This command can be used by a domain administrator only if the domain administrator has the CanCreateAccounts access right.

GetAccountSettings accountName
Use this command to get the account settings. The command produces an output - a dictionary with the account settings. Only the explicitly set (not the default) account settings are included into the dictionary.

accountName : string
This parameter specifies the name of an existing account. The name can include the domain name (see above).
You can also specify the single asterisk sign (*) instead of an account name. This will indicate the current authenticated account.

Note: All users can send the GetAccount command for their own accounts.

UpdateAccountSettings accountName newSettings
Use this command to update the account settings.

accountName : string
This parameter specifies the name of an existing account. The name can include the domain name (see above).

newSettings : dictionary
This dictionary is used to update the account settings dictionary. It does not have to contain all settings data, the omitted settings will be left unmodified. If a new setting value is specified as the string default, the account setting value is removed, so the default account setting value will be used.

If this command is used by a domain administrator, it will update only those account settings that the domain administrator is allowed to modify.

GetAccountEffectiveSettings accountName
Use this command to get the effective account settings. The command produces an output - a dictionary with the account settings. Both the explicitly set and the default account settings are included into the dictionary.

accountName : string
This parameter specifies the name of an existing account. The name can include the domain name (see above).
You can also specify the single asterisk sign (*) instead of an account name. This will indicate the current authenticated account.

Note: All users can send the GetAccountEffectiveSettings command for their own accounts.

SetAccountPassword accountName To newPassword
Use this command to update the account password.

accountName : string
This parameter specifies the name of an existing account. The name can include the domain name (see above).

newPassword : string
This string is used to specify the new account password. The new password will be stored using the effective Password Encryption setting of the target account.

To use this command, the user should have the "Basic Settings" Domain Administration right for the target account domain.

VerifyAccountPassword accountName PASSWORD password
Use this command to verify the account password.

accountName : string
This parameter specifies the name of an existing account. The name can include the domain name (see above).

password : string
This string is used to specify the password to check (in the clear text format)

To use this command, the user should have any Domain Administration right for the target account domain.

GetAccountAliases accountName
Use this command to get the list of account aliases. The command produces an output - an array with the account alias names.

accountName : string
This parameter specifies the name of an existing account. The name can include the domain name (see above).

SetAccountAliases accountName newAliases
Use this command to set the account aliases.

accountName : string
This parameter specifies the name of an existing account. The name can include the domain name (see above).

newAliases : array
This array should contain the account alias name strings. All old account aliases are removed.

This command can be used by a domain administrator only if the domain administrator has the CanCreateAliases access right.

GetAccountRules accountName
Use this command to get the list of account Rules. The command produces an output - an array of the Rules specified for the account.

accountName : string
This parameter specifies the name of an existing account. The name can include the domain name (see above).

SetAccountRules accountName newRules
Use this command to set the account Rules.

accountName : string
This parameter specifies the name of an existing account. The name can include the domain name (see above).

newRules : array
This array should contain the account Rules. All old account Rules are removed.

This command can be used by a domain administrator only if the domain administrator has the RulesAllowed access right.

GetAccountRPOP accountName
Use this command to get the list of account RPOP records. The command produces an output - an array of the RPOP records specified for the account.

accountName : string
This parameter specifies the name of an existing account. The name can include the domain name (see above).

SetAccountRPOP accountName newRecords
Use this command to set the account RPOP records.

accountName : string
This parameter specifies the name of an existing account. The name can include the domain name (see above).

newRecords : array
This array should contain the account RPOP records. All old account RPOP records are removed.

This command can be used by a domain administrator only if the domain administrator has the CanModifyRPOP access right.

GetAccountRights accountName
Use this command to get the array of the Server or Domain access rights granted to the specified user. The command produces output data - an array listing all account Server Access rights.

accountName : string
This parameter specifies the name of an existing account. The name can include the domain name.

GetAccountInfo accountName [Key keyName | ( keyList) ]
Use this command to get an element of the account "info" dictionary. The command produces an output - see below.

accountName : string
This parameter specifies the name of an existing account. The name can include the domain name (see above). You can also specify the single asterisk sign (*) instead of an account name. This will indicate the current authenticated account.

keyList : array
This optional parameter specifies the names of the info keys to retrieve.
Note that when accounts "info" data are stored in .info dictionary files, the "info" elements have dictionary names starting with the hash sign. You should NOT include the hash sign into the keyName parameter of the GetAccountInfo command.
Sample:
GetAccountInfo "user1@domain1.com" (LastLogin LastLoginAddress)
Note: the "info" element names are case-sensitive.
The output is a dictionary will all all those "info" elements that exist and are specified in the keyList array.

keyName : string
This optional parameter specifies the name of the requested "info" element. It can be specified only if the keyList parameter is not specified.
Note that when accounts "info" data are stored in .info dictionary files, the "info" elements have dictionary names starting with the hash sign. You should NOT include the hash sign into the keyName parameter of the GetAccountInfo command.
Sample:
GetAccountInfo "user1@domain1.com" Key LastLogin
Note: the "info" element names are case-sensitive.
The output is the specified "info" element. If the element is not found, the output is an empty string - two quotation marks ("").

Note: All users can use the GetAccountInfo command to retrieve elements from their own account "info" data.

GetWebUser accountName
Use this command to get the Account WebUser Settings. The command produces an output - a dictionary with the Account WebUser Settings.

accountName : string
This parameter specifies the name of an existing Account. The name can include the domain name (see above).

Note: All users can use the GetWebUser command to retrieve their own WebUser settings.

SetWebUser accountName newSettings
Use this command to set the Account WebUser Settings.

accountName : string
This parameter specifies the name of an existing Account. The name can include the domain name (see above).

newSettings : dictionary
This dictionary should contain the new account WebUser Settings. All old Account WebUser Settings are removed.

This command can be used by a domain administrator only if the domain administrator has the WebUserSettings access right.

GetEffectiveWebUser accountName
Use this command to get the effective Account WebUser Settings. The command produces an output - a dictionary with Account WebUser Settings. Both the explicitly set and the default settings are included into that dictionary.

accountName : string
This parameter specifies the name of an existing Account. The name can include the domain name (see above).

Note: All users can use the GetEffectiveWebUser command to retrieve their own effective WebUser settings.


Group Administration

A user should have the Can Modify All Domains and Account Settings access right or the Domain Administration access right to use the Groups Administration CLI commands.

ListGroups [ domainName ]
Use this command to get the list of all Groups in the Domain. The command produces output data - an array with the names of all Groups in the specified (or default) domain.

domainName : string
This optional parameter specifies the domain name. If the domain name is not specified, the command applies to the administrator domain.

CreateGroup groupName [settings]
Use this command to create new groups.

groupName : string
This parameter specifies the name for the new group.
The name can contain the @sign followed by the domain name, in this case the group is created in the specified domain. If the domain name is not specified, the command applies to the administrator domain.

settings : dictionary
This optional parameter specifies the initial group settings and the members list.

This command can be used by a domain administrator only if the domain administrator has the CanCreateGroups access right.

RenameGroup oldGroupName into newGroupName
Use this command to rename groups.

oldGroupName : string
This parameter specifies the name of an existing group. The name can include the domain name (see above).

newGroupName : string
This parameter specifies the new group name. The name can include the domain name (see above).

This command can be used by a domain administrator only if the domain administrator has the CanCreateGroups access right.

DeleteGroup groupName
Use this command to remove groups.

groupName : string
This parameter specifies the name of an existing group. The name can include the domain name (see above).

This command can be used by a domain administrator only if the domain administrator has the CanCreateGroups access right.

GetGroup groupName
Use this command to get the group settings. The command produces an output - a dictionary with the group settings and members.

groupName : string
This parameter specifies the name of an existing group. The name can include the domain name (see above).

SetGroup groupName newSettings
Use this command to set the group settings.

groupName : string
This parameter specifies the name of an existing group. The name can include the domain name (see above).

newSettings : dictionary
This dictionary is used to replace the group settings dictionary.


Forwarder Administration

A user should have the Can Modify All Domains and Account Settings access right or the Domain Administration access right to use the Forwarders Administration CLI commands.

ListForwarders [ domainName ]
Use this command to get the list of all Forwarders in the Domain. The command produces output data - an array with the names of all Forwarders in the specified (or default) domain.

domainName : string
This optional parameter specifies the domain name. If the domain name is not specified, the command applies to the administrator domain.

CreateForwarder forwarderName TO address
Use this command to create new forwarders.

forwarderName : string
This parameter specifies the name for the new forwarder.
The name can contain the @sign followed by the domain name, in this case the forwarder is created in the specified domain. If the domain name is not specified, the command applies to the administrator domain.

address : string
This parameter specifies the E-mail address the forwarder should reroute mail to.

This command can be used by a domain administrator only if the domain administrator has the CanCreateForwarders access right.

DeleteForwarder forwarderName
Use this command to remove forwarders.

forwarderName : string
This parameter specifies the name of an existing forwarder. The name can include the domain name (see above).

This command can be used by a domain administrator only if the domain administrator has the CanCreateForwarders access right.

GetForwarder forwarderName
Use this command to get the forwarder address. The command produces an output - a string with the E-mail address this forwarder reroutes all mail to.

forwarderName : string
This parameter specifies the name of an existing forwarder. The name can include the domain name (see above).


Domain Administration

A user should have the Can Modify All Domains and Account Settings access right or the Domain Administration access right to use the Domain Administration CLI commands.

GetDomainSettings [ domainName ]
Use this command to get the domain settings. The command produces an output - a dictionary with the domainName settings. Only the explicitly set (not the default) settings are included into that dictionary.

domainName : string
This optional parameter specifies the name of an existing domain.

GetDomainEffectiveSettings [ domainName ]
Use this command to get the domain settings. The command produces an output - a dictionary with the domainName settings. Both the explicitly set and the default settings are included into that dictionary.

domainName : string
This optional parameter specifies the name of an existing domain.

UpdateDomainSettings [ domainName ] newSettings
Use this command to update the Domain settings.

domainName : string
This optional parameter specifies the name of an existing domain.

newSettings : dictionary
This dictionary is used to update the domain settings dictionary. It does not have to contain all settings data, the omitted settings will be left unmodified. If a new setting value is specified as the string default, the domain setting value is removed, so the default domain settings value will be used.

If this command is used by a domain administrator, it will update only those Domain Settings that this domain administrator is allowed to modify.

GetAccountDefaults [ domainName ]
Use this command to get the default account settings for the specified domain. The command produces an output - a dictionary with the default settings.

domainName : string
This optional parameter specifies the domain name. If the domain name is not specified, the command applies to the administrator domain.

UpdateAccountDefaults [ domainName ] newSettings
Use this command to modify the Default Account settings for the specified domain.

domainName : string
This optional parameter specifies the domain name. If the domain name is not specified, the command applies to the administrator domain.

newSettings : dictionary
This dictionary is used to modify the domain Default Account settings. The dictionary does not have to contain all settings data, the omitted settings will be left unmodified. If a new setting value is specified as the string default, the setting value is removed, so the global Server Default Account Settings will be used.

If this command is used by a domain administrator, it will update only those Default Account settings that the domain administrator is allowed to modify.

GetWebUserDefaults [ domainName ]
Use this command to get the default account WebUser Interface settings for the specified domain. The command produces an output - a dictionary with the default settings.

domainName : string
This optional parameter specifies the domain name. If the domain name is not specified, the command applies to the administrator domain.

SetWebUserDefaults [ domainName ] newSettings
Use this command to change the Default WebUser Interface settings for the specified domain.

domainName : string
This optional parameter specifies the domain name. If the domain name is not specified, the command applies to the authenticated user Domain.

newSettings : dictionary
This dictionary is used to replace the domain Default WebUser Interface settings. All old Default WebUser Interface settings are removed.

This command can be used by a domain administrator only if the domain administrator has the WebUserSettings access right.

GetAccountTemplate [ domainName ]
Use this command to get the Account Template settings. The command produces an output - a dictionary with the Template settings.

domainName : string
This optional parameter specifies the domain name. If the domain name is not specified, the command applies to the administrator domain.

UpdateAccountTemplate [ domainName ] newSettings
Use this command to modify the Account Template settings.

domainName : string
This optional parameter specifies the domain name. If the domain name is not specified, the command applies to the administrator domain.

newSettings : dictionary
This dictionary is used to modify the domain Account Template. All new accounts in the specified domain will be created with the Template settings. The dictionary does not have to contain all settings data, the omitted settings will be left unmodified. If a new setting value is specified as the string default, the Template setting value is removed.

If this command is used by a domain administrator, it will update only those Template settings that the domain administrator is allowed to modify.

GetDomainAliases domainName
Use this command to get the list of Domain Aliases. The command produces an output - an array with the domain alias names.

domainName : string
This parameter specifies the name of an existing domain.

GetDomainRules domainName
Use this command to get the list of Domain Rules. The command produces an output - an array of the Rules specified for the domain.

domainName : string
This parameter specifies the name of an existing domain.

SetDomainRules domainName newRules
Use this command to set the account Rules.

domainName : string
This parameter specifies the name of an existing domain.

newRules : array
This array should contain the Domain Rules. All old Domain Rules are removed.

This command can be used by a domain administrator only if the domain administrator has the RulesAllowed access right.

ListAdminDomains [ domainName ]
Use this command to get the list of Domains that can be administered by Domain Administrator accounts in the specified domainName domain. The command produces an output - an array with the domain names.

domainName : string
This optional parameter specifies the domain name. If the domain name is not specified, the command applies to the authenticated user Domain.

InsertDirectoryRecords domainName
Use this command to insert records for Domain objects (accounts, groupes, mailing lists, forwareders) into the Directory.

domainName : string
This optional parameter specifies the domain name. If the domain name is not specified, the command applies to the authenticated user Domain.

This command can be used by a domain administrator only if the domain administrator has the CentralDirectory access right.

DeleteDirectoryRecords domainName
Use this command to delete Domain object records from the Directory.

domainName : string
This optional parameter specifies the domain name. If the domain name is not specified, the command applies to the authenticated user Domain.

This command can be used by a domain administrator only if the domain administrator has the CentralDirectory access right.

The following commands are available for the System Administrators only:

ListDomains
Use this command to get the list of domains. The command produces output data - an array with the names of all server domains.

MainDomainName
Use this command to get the name of the Main Domain. The command produces output data - a string with the Main Domain name.

GetDomainDefaults
Use this command to get the server-wide default Domain Settings. The command produces an output - a dictionary with the default Domain Settings.

UpdateDomainDefaults newSettings
Use this command to change the server-wide default Domain settings.

newSettings : dictionary
This dictionary is used to update the default Domain settings dictionary. It does not have to contain all settings data, the omitted settings will be left unmodified.

SetDomainDefaults newSettings
Use this command to change the server-wide default Domain settings.

newSettings : dictionary
This dictionary is used to replace the server-wide default Domain settings dictionary.

GetClusterDomainDefaults
UpdateClusterDomainDefaults newSettings
SetClusterDomainDefaults newSettings
These commands are available in the Dynamic Cluster only.
Use these commands instead of the [Get|Update|Set]DomainDefaults commands to work with the cluster-wide default Domain Settings.

GetAllAccountsDefaults
Use this command to get the server-wide Default Account settings. The command produces an output - a dictionary with the global default account settings.

UpdateAllAccountsDefaults newSettings
Use this command to update the server-wide Default Account settings.

newSettings : dictionary
This dictionary is used to update the Default Account settings dictionary. It does not have to contain all settings data, the omitted settings will be left unmodified.

SetAllAccountsDefaults newSettings
Use this command to set the server-wide Default Account settings.

newSettings : dictionary
This dictionary is used to replace the server-wide Default Account settings dictionary.

GetClusterAccountDefaults
UpdateClusterAccountDefaults newSettings
SetClusterAccountDefaults newSettings
These commands are available in the Dynamic Cluster only.
Use these commands instead of the [Get|Update|Set]AllAccountsDefaults commands to work with the cluster-wide Default Account settings.

GetServerWebUserDefaults
Use this command to get the server-wide Default WebUser Interface settings. The command produces an output - a dictionary with the default settings.

SetServerWebUserDefaults newSettings
Use this command to change the server-wide Default WebUser Interface settings.

newSettings : dictionary
This dictionary is used to replace the server-wide Default WebUser Interface settings. All old server-wide Default WebUser Interface settings are removed.

GetClusterWebUserDefaults
SetClusterWebUserDefaults newSettings
These commands are available in the Dynamic Cluster only.
Use these commands instead of the [Get|Set]ServerWebUserDefaults commands to work with the cluster-wide Default WebUser Interface settings.

CreateDomain domainName [ settings ]
Use this command to create a new secondary domain.

domainName : string
This parameter specifies the domain name to create.

settings : dictionary
This optional parameter specifies the domain settings.

RenameDomain oldDomainName into newDomainName
Use this command to rename a domain.

domainName : string
This parameter specifies the name of an existing secondary domain.

newDomainName : string
This parameter specifies the new domain name.

DeleteDomain oldDomainName [ force ]
Use this command to remove a domain.

domainName : string
This parameter specifies the name of the domain to be removed.

force
This optional parameter specifies that the domain should be removed even if it is not empty. All domain accounts and mailing lists will be removed.

CreateSharedDomain domainName [ settings ]
Use this command to create a new shared secondary domain in a Dynamic Cluster.

domainName : string
This parameter specifies the domain name to create.

settings : dictionary
This optional parameter specifies the domain settings.

CreateDirectoryDomain domainName [ settings ]
Use this command to create a new directory-based domain.

domainName : string
This parameter specifies the domain name to create.

settings : dictionary
This optional parameter specifies the domain settings.
This operation is allowed only when the Directory-based Domains are enabled.

ReloadDirectoryDomains
Use this command to tell the server to scan the Domains Directory subtree so it can find all additional Directory-based Domains created directly in the Directory, bypassing the CommuniGatePro Server.
This operation is allowed only when the Directory-based Domains are enabled.

SetDomainAliases domainName newAliases
Use this command to set the domain aliases.

domainName : string
This parameter specifies the name of an existing domain.

newAliases : array
This array should contain the domain alias name strings. All old domain aliases are removed.

GetDirectoryIntegration
Use this command to get the server-wide Directory Integration settings. The command produces an output - a dictionary with the Directory Integration settings.

SetDirectoryIntegration newSettings
Use this command to set the server-wide Directory Integration settings.

newSettings : dictionary
This dictionary is used to replace the server-wide Directory Integration settings dictionary.

GetClusterDirectoryIntegration
SetClusterDirectoryIntegration newSettings
These commands are available in the Dynamic Cluster only.
Use these commands instead of the [Get|Set]DirectoryIntegration commands to work with the cluster-wide Directory Integration settings.

SetDomainSettings domainName newSettings
Use this command to change the Domain settings.

domainName : string
This parameter specifies the name of an existing domain.

newSettings : dictionary
This dictionary is used to replace the domain settings dictionary. All old domain settings are removed.

SetAccountSettings accountName newSettings
Use this command to change the account settings.

accountName : string
This parameter specifies the name of an existing account.

newSettings : dictionary
This dictionary is used to replace the account settings dictionary. All old account settings are removed.

SetAccountDefaults [ domainName ] newSettings
Use this command to change the Default Account settings for the specified Domain.

domainName : string
This parameter specifies the Domain name.

newSettings : dictionary
This dictionary is used to replace the domain Default Account settings. All old Account Default settings are removed.

SetAccountTemplate [ domainName ] newSettings
Use this command to change the Account Template settings.

domainName : string
This optional parameter specifies the Domain name. If the domain name is not specified, the command applies to the administrator Domain.

newSettings : dictionary
This dictionary is used to update the domain Account Template. All new accounts in the specified domain will be created with the Template settings. All old Account Template settings are removed.

GetDomainLocation [ domainName ]
Use this command to get the Domain file directory path (relative to the Server base directory). The command produces an output - a string with the Domain file path.

domainName : string
This optional parameter specifies the Domain name. If the Domain name is not specified, the command applies to the administrator Domain.

GetAccountLocation accountName
Use this command to get the account file directory path (for multi-mailbox accounts) or the account INBOX mailbox path (for single-mailbox accounts). The command produces an output - a string with the Account file path. The path is relative to the file directory of the Account Domain.

accountName : string
This parameter specifies the name of an existing account. The name can include the domain name (see above).


Mailbox Administration

A user should be the mailbox owner, or should have the Can Modify All Domains and Account Settings access right or the CanAccessMailboxes Domain Administration access right to use the Mailbox Administration CLI commands.

LISTMAILBOXES accountName [ FILTER filter] [ AUTH authAccountName]
Use this command to get the list of account mailboxes. The command produces an output - a dictionary.
each dictionary key specifies a mailbox name;
if the authAccountName user is not specified or if the specified user has the Select access right for this mailbox, the key value contains a dictionary with mailbox information;
if the specified authAccountName does not have the Select access right, the key value contains an empty array;
if there is a 'mailbox folder' with the dictionary key, but there is no 'regular' mailbox with that name, the key value is an empty array;
if there is a 'mailbox folder' with the dictionary key, and there is also a 'regular' mailbox with that name, the key value is an array with one element - the information for the 'regular' mailbox (either a dictionary or an empty array).

accountName : string
This parameter specifies the name of an existing account. The asterisk sign (*) can be used to specify the current authenticated account.

filter : string
This optional parameter specifies the filter string to apply to account mailboxes. The filter can use the same wildcard symbols "*" and "%" as the IMAP LIST command. If the filter is not specified, the filter string "*" is assumed, and all account mailboxes are returned.

authAccountName : string
This optional parameter specifies the name of an account on whose behalf the LIST operation should be executed. If this name is specified, the output includes only those mailboxes for which the specified account has the Lookup mailbox access right.

CREATEMAILBOX accountName MAILBOX mailboxName [ AUTH authAccountName]
Use this command to create a mailbox in the specified account.

accountName : string
This parameter specifies the name of an existing account. The asterisk sign (*) can be used to specify the current authenticated account.

mailboxName : string
This parameter specifies the name for the new mailbox.

authaccountname : string
This optional parameter specifies the name of an account on whose behalf the operation should be executed. If this name is specified, the mailbox is created only if the specified account has the Create access right for the 'outer' mailbox (this means that an account should have the Create access right for the Archive mailbox in order to create the Archive/March mailbox).

DELETEMAILBOX accountName MAILBOX mailboxName [ AUTH authAccountName]
DELETEMAILBOX accountName MAILBOXES mailboxName [ AUTH authAccountName]
Use this command to remove a mailbox from the specified account. If the keyword MAILBOXES is used, all nested mailboxes (submailboxes) are deleted, too.

accountName : string
This parameter specifies the name of an existing account. The asterisk sign (*) can be used to specify the current authenticated account.

mailboxName : string
This parameter specifies the name of the mailbox to be deleted.

authaccountname : string
This optional parameter specifies the name of an account on whose behalf the operation should be executed. If this name is specified, the mailbox is deleted only if the specified account has the Create access right for the 'outer' mailbox (this means that an account should have the Create access right for the Archive mailbox in order to delete the Archive/March mailbox), and the specified account should have the DELETE right for the specified mailbox.

RENAMEMAILBOX accountName MAILBOX mailboxName INTO newMailboxName [ AUTH authAccountName]
RENAMEMAILBOX accountName MAILBOXES mailboxName INTO newMailboxName [ AUTH authAccountName]
Use this command to rename a mailbox in the specified account. If the keyword MAILBOXES is used, all nested mailboxes (submailboxes) are renamed, too.

accountName : string
This parameter specifies the name of an existing account. The asterisk sign (*) can be used to specify the current authenticated account.

mailboxName : string
This parameter specifies the name of the mailbox to be renamed.

newMailboxName : string
This parameter specifies the new name for the mailbox.

authaccountname : string
This optional parameter specifies the name of an account on whose behalf the operation should be executed. If this name is specified, the mailbox is created only if the specified account has a right to perform the DELETEMAILBOX operation with the original mailbox name and the CREATEMAILBOX operation with the new mailbox name (see above).

GETMAILBOXINFO accountName MAILBOX mailboxName [ AUTH authAccountName]
Use this command to get the internal information about the account mailbox. The command produces an output - a dictionary with the mailbox internal information.

accountName : string
This parameter specifies the name of an existing account. The asterisk sign (*) can be used to specify the current authenticated account.

mailboxName : string
This parameter specifies the name of an existing mailbox in the specified account.

authaccountname : string
This optional parameter specifies the name of an account on whose behalf the operation should be executed. If this name is specified, the mailbox info is returned only if the specified account has the Select mailbox access right.

GETMAILBOXACL accountName MAILBOX mailboxName [ AUTH authAccountName]
Use this command to get the access control list for the account mailbox. The command produces an output - a dictionary with the mailbox access elements.

accountName : string
This parameter specifies the name of an existing account. The asterisk sign (*) can be used to specify the current authenticated account.

mailboxName : string
This parameter specifies the name of an existing mailbox in the specified account.

authaccountname : string
This optional parameter specifies the name of an account on whose behalf the operation should be executed. If this name is specified, the ACL info is returned only if the specified account has the Admin access right for the specified mailbox.

SETMAILBOXACL accountName MAILBOX mailboxName [ AUTH authAccountName] newACL
Use this command to modify the access control list for the account mailbox.

accountName : string
This parameter specifies the name of an existing account. The asterisk sign (*) can be used to specify the current authenticated account.

mailboxName : string
This parameter specifies the name of an existing mailbox in the specified account.

authaccountname : string
This optional parameter specifies the name of an account on whose behalf the operation should be executed. If this name is specified, the ACL info is updated only if the specified account has the Admin access right for the specified mailbox.

newACL : dictionary
This parameter specifies the access right elements to be modified. Each dictionary key specifies an identifier, and the key value should be a string with access right symbols.
If the key value string starts with the minus ("-") symbol, access rights specified in the string are removed from the access right element.
If the key value string starts with the plus ("+") symbol, access rights specified in the string are added to the access right element.
In other cases, access rights specified in the string replace the set of rights in the access right element.
If the access right element for the specified key did not exist, it is created.
If the new access right element has empty set of access rights, the element is removed.

GETMAILBOXRIGHTS accountName MAILBOX mailboxName AUTH authAccountName
This command produces an output - a string with the effective mailbox access rights for the given authAccountName.

accountName : string
This parameter specifies the name of an existing account. The asterisk sign (*) can be used to specify the current authenticated account.

mailboxName : string
This parameter specifies the name of an existing mailbox in the specified account.

authaccountname : string
This parameter specifies the name of an account whose effective access rights should be retrieved.

SETMAILBOXCLASS accountName MAILBOX mailboxName [ AUTH authAccountName ] CLASS newClass
Use this command to set the "class" of an account mailbox.

accountName : string
This parameter specifies the name of an existing account. The asterisk sign (*) can be used to specify the current authenticated account.

mailboxName : string
This parameter specifies the name of an existing mailbox in the specified account.

authaccountname : string
This optional parameter specifies the name of an account whose mailbox access rights should be used.

newClass : string
The mailbox class.

GETACCOUNTSUBSCRIPTION accountName
This command produces an output - an array with the list of Account "subscribed mailboxes".

accountName : string
This parameter specifies the name of an existing account. The asterisk sign (*) can be used to specify the current authenticated account.

SETACCOUNTSUBSCRIPTION accountName newSubscription
Use this command to set the Account "subscribed mailboxes" list.

accountName : string
This parameter specifies the name of an existing account. The asterisk sign (*) can be used to specify the current authenticated account.

newSubscription : array
The list of subscribed mailboxes. Each array element should be a string with a mailbox name.

GETMAILBOXALIASES accountName
This command produces an output - a dictionary. Each dictionary key is the name of an existing mailbox alias, and the key value is a string with the name of mailbox this alias points to.

accountName : string
This parameter specifies the name of an existing account. The asterisk sign (*) can be used to specify the current authenticated account.

SETMAILBOXALIASES accountName newAliases
Use this command to set the Account "subscribed mailboxes" list.

accountName : string
This parameter specifies the name of an existing account. The asterisk sign (*) can be used to specify the current authenticated account.

newAliases : dictionary
The set of new mailbox aliases.


Alert Administration

A user should have the Can Modify All Domains and Account Settings access right or the CanPostAlerts Domain Administration access right to use the Alert Administration CLI commands.

GetDomainAlerts [ domainName ]
Use this command to get the domain Alerts. The command produces an output - a dictionary with the domain alert strings and time stamps.

domainName : string
This optional parameter specifies the name of an existing domain.

SetDomainAlerts [ domainName ] newAlerts
Use this command to change the Domain alerts.

domainName : string
This optional parameter specifies the name of an existing domain.

newAlerts : dictionary
This dictionary is used to replace the domain alert dictionary. All old domain alerts are removed.

PostDomainAlert domainName ALERT newAlert
Use this command to post a Domain-wide alert message.

domainName : string
This parameter specifies the name of an existing Domain.

newAlert : string
This string specifies the Alert text.

RemoveDomainAlert domainName ALERT timeStamp
Use this command to remove a Domain-wide alert message.

domainName : string
This parameter specifies the name of an existing Domain.

timeStamp : string
This string specifies the time stamp of the Alert message to be removed.

GetAccountAlerts accountName
Use this command to get the Account Alerts. The command produces an output - a dictionary with the account alert strings and time stamps.

accountName : string
This parameter specifies the name of an existing Account. The asterisk sign (*) can be used to specify the current authenticated Account.

SetAccountAlerts accountName newAlerts
Use this command to change the Account alerts.

accountName : string
This parameter specifies the name of an existing Account. The asterisk sign (*) can be used to specify the current authenticated Account.

newAlerts : dictionary
This dictionary is used to replace the Account alert dictionary. All old Account alerts are removed.

PostAccountAlert accountName ALERT newAlert
Use this command to post an Account alert message.

accountName : string
This parameter specifies the name of an existing Account. The asterisk sign (*) can be used to specify the current authenticated Account.

newAlert : string
This string specifies the Alert text.

RemoveAccountAlert accountName ALERT timeStamp
Use this command to remove an Account alert message.

accountName : string
This parameter specifies the name of an existing Account. The asterisk sign (*) can be used to specify the current authenticated Account.

timeStamp : string
This string specifies the time stamp of the Alert message to be removed.

The following commands are available for the System Administrators only:

GetServerAlerts
Use this command to get the list of the server-wide Alerts. The command produces an output - a dictionary with the server alert strings and time stamps.

SetServerAlerts newAlerts
Use this command to change the server-wide Alerts.

newAlerts : dictionary
This dictionary is used to replace the server-wide Alert dictionary. All old server-wide alerts are removed.

PostServerAlert newAlert
Use this command to post a server-wide Alert message.

newAlert : string
This string specifies the Alert text.

RemoveServerAlert timeStamp
Use this command to remove a server-wide Alert message.

timeStamp : string
This string specifies the time stamp of the Alert message to be removed.

GetClusterAlerts
SetClusterAlerts newAlerts
PostClusterAlert newAlert
RemoveClusterAlert timeStamp
These commands are available in the Dynamic Cluster only.
Use these commands instead of the [Get|Set|Post|Remove]ServerAlert[s] commands to work with the cluster-wide Alerts.


Personal File Site Administration

The following commands allow an authenticated user to deal with files in the Account Personal File Site area. In order to retrieve files from the private directory and its subdirectories, the authenticated user should be the Account owner, or the authenticated user should have the Can Modify All Domains and Account Settings access right or the WebSite Domain Administration access right.

GETWEBFILE accountName FILE fileName [ OFFSET position ] [ SIZE sliceSize ]
Use this command to retrieve a file from the account Personal File Site. This command produces an output - a array of 3 strings. The first string contains the base64-encoded content of the specified file, the second string contains the file modification date (in the ACAP time format), and the third string contains the current file size.

accountName : string
This parameter specifies the name of an existing account. The asterisk sign (*) can be used to specify the current authenticated account.

fileName : string
This parameter specifies the name of the Personal File Site file to be retrieved.

position : number
If this parameter is specified the File Site file is read starting from the specified file position.

sliceSize : number
If this parameter is specified, no more than the specified number of file data bytes is returned.

The authenticated user should be the account owner, or should have the Can Modify All Domains and Account Settings access right or the WebSite Domain Administration access right to use the Personal File Site Administration CLI commands.

PUTWEBFILE accountName FILE fileName [ OFFSET position ] DATA encodedData
Use this command to store a file in the Account Personal File Site. If a Personal File Site file with the specified name already exists, the old file is removed.

accountName : string
This parameter specifies the name of an existing Account. The asterisk sign (*) can be used to specify the current authenticated Account.

fileName : string
This parameter specifies the name for the Personal File Site file.

position : number
If this parameter is specified and it is not zero, the File Site file is rewritten/extended starting from the specified file position. The file should already exist, and the specified position should not be larger than the current file size.

encodedData : string
This parameter contains the Base64-encoded content of the Personal File Site file.

RENAMEWEBFILE accountName FILE oldFileName INTO newFileName
Use this command to rename a file in the Account Personal File Site.

accountName : string
This parameter specifies the name of an existing Account. The asterisk sign (*) can be used to specify the current authenticated Account.

oldFileName : string
This parameter specifies the name of an existing Personal File Site file.

newFileName : string
This parameter specifies the new name for the Personal File Site file.

DELETEWEBFILE accountName FILE fileName
Use this command to remove a file from the account Personal File Site.

accountName : string
This parameter specifies the name of an existing Account. The asterisk sign (*) can be used to specify the current authenticated Account.

oldFileName : string
This parameter specifies the name of an existing Personal File Site file.

LISTWEBFILES accountName [ PATH filePath]
Use this command to list all files in the Personal File Site top directory or in one of its subdirectories. This command produces an output - a dictionary, where each key is a name of the File Site file, and the key value is a dictionary for regular file and and empty array for subdirectories.

accountName : string
This parameter specifies the name of an existing Account. The asterisk sign (*) can be used to specify the current authenticated Account.

filePath : string
This optional parameter specifies the name of the Personal File Site subdirectory. You can omit this parameter along with the PATH keyword, in this case the command returns the list of files in the top Personal File Site directory.

GETWEBFILESINFO accountName
Use this command to get the statistical information about all files in the Personal File Site area. This command produces an output - an array with 2 string elements. The first element contains the total size of all File Site files, the second element contains the number of files in the File Site area.

accountName : string
This parameter specifies the name of an existing Account. The asterisk sign (*) can be used to specify the current authenticated Account.


Mailing Lists Administration

A user should have the Accounts And Domains Server access right or the Domain Administration access right to use the Mailing List Administration CLI commands.

ListLists [ domainName ]
Use this command to get the list of all mailing lists in the domain. The command produces output data - an array of strings. Each string is the name of a mailing list in the specified (or default) domain.

domainName : string
This optional parameter specifies the domain name.

GetDomainLists [ domainName ]
Use this command to get the list of all mailing lists in the domain. The command produces output data - an dictionary. Each dictionary key is the name of a mailing list in the specified (or default) domain. The key value is a numeric string with the actual number of the list subscribers ("-1" if the current number of subscribers is not known).

domainName : string
This optional parameter specifies the domain name.

GetAccountLists accountName
Use this command to get the list of all mailing lists belonging to the specified account. The command produces output data - a dictionary. Each dictionary key is the name of a mailing list belonging to the specified (or default) domain. The key value is a numeric string with the actual number of the list subscribers ("-1" if the current number of subscribers is not known).

accountName : string
This parameter specifies the list's owner account name.

CreateList listName for accountName
Use this command to create a mailing list.

listName : string
This parameter specifies the name of an existing mailing list. It can include the domain name. If the domain name is not specified, the user domain is used by default.

accountName : string
This parameter specifies the name of the mailing list owner. It should be the name of an already existing account in the mailing list domain.

Domain Administrators can use this command if they have the CanCreateLists Domain access right.

RenameList listName into newName
Use this command to rename a mailing list.

listName : string
This parameter specifies the name of an existing mailing list. It can include the domain name. If the domain name is not specified, the user domain is used by default.

newName : string
This parameter specifies the new name for the mailing list (without the domain part).

Domain Administrators can use this command if they have the CanCreateLists Domain access right.

DeleteList listName
Use this command to remove a mailing list.

listName : string
This parameter specifies the name of an existing mailing list. It can include the domain name. If the domain name is not specified, the user domain is used by default.

Domain Administrators can use this command if they have the CanCreateLists Domain access right.

The following commands can be used by the mailing list owner, by a Domain Administrator with the CanAccessLists access right, or by a Server Administrator with Accounts and Domains access right.

GetList listName
Use this command to retrieve list settings. The command produces an output - a dictionary with the listName mailing list settings.

listName : string
This parameter specifies the name of an existing mailing list. It can include the domain name. If the domain name is not specified, the user domain is used by default.

UpdateList listName newSettings
Use this command to modify list settings.

listName : string
This parameter specifies the name of an existing mailing list. It can include the domain name. If the domain name is not specified, the user domain is used by default.

newSettings : dictionary
This dictionary is used to update the mailing list settings dictionary. It does not have to contain all settings data, the omitted settings will be left unmodified.

List listName operation [silently] [confirm] subscriber
Use this command to update the subscribers list.

listName : string
This parameter specifies the name of an existing mailing list. It can include the domain name. If the domain name is not specified, the user domain is used by default.

operation : subscribe | feed | digest | index | null | banned | unsubscribe
This parameter specifies the operation (see the LIST module section for the details).

silently
This optional parameter tells the server not to send the Welcome/Bye message to the subscriber.

confirm
This optional parameter tells the server to send a confirmation request to the subscriber.

subscriber : E-mail address
The subscriber address. It can include the comment part used as the subscriber's real name.

Sample:

LIST MyList@mydomain.com FEED confirm "Bill Jones" <BJones@company.com>

ListSubscribers listName [ FILTER filter [ limit ] ]
Use this command to retrieve list subscribers. The command produces an output - an array with subscribers' E-mail addresses.

listName : string
This parameter specifies the name of an existing mailing list. It can include the domain name. If the domain name is not specified, the user domain is used by default.

filter : string
If this optional parameter is specified, only the addresses containing the specified string are returned.

limit : number
This optional parameter limits the number of subscriber addresses returned.

ReadSubscribers listName [ FILTER filter [ limit ] ]
Use this command to retrieve list subscribers. The command produces an output - an array of subscriber descriptor dictionaries.

listName : string
This parameter specifies the name of an existing mailing list. It can include the domain name. If the domain name is not specified, the user domain is used by default.

filter : string
If this optional parameter is specified, only subscribers with addresses containing the specified string are returned.

limit : number
This optional parameter limits the number of subscriber dictionaries returned.

A dictionary describing a subscriber has the following elements:

Sub
E-mail address string
RealName
an optional string with Real name
mode
a string with subscription mode (index, digest, null, etc.)
subscribeTime
timestamp data specifying the moment when this user subscribed.
posts
number of postings on this list
lastBounceTime
optional timestamp data specifying the last time when messages sent to this user failed.
bounces
optional numeric data specifying the number of failed delivery reports received for this user.

GetSubscriberInfo listName NAME subscriberAddress
Use this command to retrieve information about a list subscriber. The command produces an output - a dictionary with subscriber information.

listName : string
This parameter specifies the name of an existing mailing list. It can include the domain name. If the domain name is not specified, the user domain is used by default.

subscriberAddress : string
This parameter specifies the E-mail address of the list subscriber.

If the subscriber does not exist, an empty dictionary is returned. Otherwise, the dictionary contains the following elements:

mode
This string element specified the subscription mode (digest, index, etc.). This element is equal to unsubcribe if the address has been unsubscribed, but has not been removed from the list. This element is equal to subcribe if a user has started subscription, but the subscription has not been confirmed.

confirmationID
This element contains the subscriber's Confirmation ID string.

timeSubscribed
This string element specifies when the address was subscribed (in the ACAP date/time format).

posts
This string element may contain the strings special, moderateAll, prohibited, or the string with the number of messages posted from this address. If the next postings from this address are to be moderated, the element contains an array with one string element that contains the number of postings to be moderated.

bounces
This optional string element contains the number of bounces received from this address.

lastBounced
This optional string element specifies the last time when messages to this address bounced were bounced. The data nd time are specified in the ACAP format.

RealName
This optional string element contains the real name of the subscriber.

SetPostingMode listName FOR subscriberAddress [ UNMODERATED | MODERATEALL | PROHIBITED | SPECIAL | numberOfModerated ]
Use this command to set the posting mode for the specfied subscriber.

listName : string
This parameter specifies the name of an existing mailing list. It can include the domain name. If the domain name is not specified, the user domain is used by default.

subscriberAddress : string
This parameter specifies the E-mail address of the list subscriber.

postingMode : number
This optional parameter limits the number of subscriber addresses returned.

The command sets the posting mode the specified subsriber. If numberOfModerated (a number) is specified, the posting mode set requires moderation of the first numberOfModerated messages from this subscriber.

ProcessBounce listName [FATAL] FOR subscriberAddress
Use this command to perform the same action the List Manager performs when it receives a bounce message for the subscriber address.

listName : string
This parameter specifies the name of an existing mailing list. It can include the domain name. If the domain name is not specified, the user domain is used by default.

subscriberAddress : string
This parameter specifies the E-mail address of the list subscriber.

Use the FATAL keyword to emulate a "fatal" bounce. Otherwise the command emulates a non-fatal bounce.


Web Skins Administration

The following commands can be used to manage CommuniGate Pro Skins used for the CommuniGate Pro WebUser Interface.

A user should have the Account Settings access right or the CanModifySkins Domain Administration access right to modify the Domain Skins.

ListDomainSkins [domainName]
Use this command to list custom Domain Skins. The command produces an output - an array with Skin names.

domainName : string
This optional parameter specifies the domain name. If the domain name is not specified, the command applies to the administrator domain.

CreateDomainSkin [domainName SKIN] skinName
Use this command to create a custom Domain Skin.

domainName : string
This optional parameter specifies the domain name. If the domain name is not specified, the command applies to the administrator domain. If it is specified, it should be followed with the SKIN keyword.
skinName : string
This parameter specifies the name of the new Skin.

RenameDomainSkin [domainName SKIN] skinName INTO newSkinName
Use this command to rename a custom Domain Skin.

domainName : string
This optional parameter specifies the domain name. If the domain name is not specified, the command applies to the administrator domain. If it is specified, it should be followed with the SKIN keyword.

skinName : string
This parameter specifies the name of an existing Skin.

newSkinName : string
This parameter specifies the new name for the Skin.

DeleteDomainSkin [domainName SKIN] skinName
Use this command to delete a custom Domain Skin.

domainName : string
This optional parameter specifies the domain name. If the domain name is not specified, the command applies to the administrator domain. If it is specified, it should be followed with the SKIN keyword.

skinName : string
This parameter specifies the name of the Skin to be deleted.

ListDomainSkinFiles [ domainName SKIN] skinName
Use this command to list files in a custom Domain Skin. The command produces an output - a dictionary with Skin file names as keys. The dictionary element values are dictionaries with file attributes.

domainName : string
This optional parameter specifies the domain name. If the domain name is not specified, the command applies to the administrator domain. If it is specified, it must be followed with the SKIN keyword.

skinName : string
This parameter specifies the name of an existing Domain Skin.

ReadDomainSkinFile [ domainName SKIN] skinName FILE fileName
Use this command to read a file from a custom Domain Skin. The command produces an output - an array. The first array element is a string with the BASE64-encoded Skin file content, the second array element is a string with the file modification date in the ACAP date format.

domainName : string
This optional parameter specifies the domain name. If the domain name is not specified, the command applies to the administrator domain. If it is specified, it must be followed with the SKIN keyword.

skinName : string
This parameter specifies the name of an existing Domain Skin.

fileName : string
This parameter specifies the name of an existing file in the specified Domain Skin.

StoreDomainSkinFile [ domainName SKIN] skinName FILE fileName DATA fileContent
StoreDomainSkinFile [ domainName SKIN] skinName FILE fileName DELETE
Use this command to store a file into a custom Domain Skin, or to delete a file from a custom Domain Skin.

domainName : string
This optional parameter specifies the domain name. If the domain name is not specified, the command applies to the administrator domain. If it is specified, it must be followed with the SKIN keyword.

skinName : string
This parameter specifies the name of an existing Domain Skin.

fileName : string
This parameter specifies the Skin file name.

fileContent : string
This string contains the BASE64-encoded file content. This parameter is specified only if the DATA keyword is used.

If the DATA keyword is specified and the Skin contains a file with the same name, the old file is deleted.

The file with the specified name is removed from the Skin Cache (in the Dynamic Cluster the file is removed from Skin caches on all cluster members).

The following commands are available for the System Administrators only:

ListServerSkins
Use this command to list custom Server Skins. The command produces an output - an array with Skin names.

CreateServerSkin skinName
Use this command to create a custom Server Skin.

skinName : string
This parameter specifies the name of the new Skin.

RenameServerSkin skinName INTO newSkinName
Use this command to rename a custom Server Skin.

skinName : string
This parameter specifies the name of an existing Skin.

newSkinName : string
This parameter specifies the new name for the Skin.

DeleteServerSkin skinName
Use this command to delete a custom Server Skin.

skinName : string
This parameter specifies the name of the Skin to be deleted.

ListServerSkinFiles skinName
Use this command to list files in a custom Domain Skin. The command produces an output - a dictionary with Skin file names as keys. The dictionary element values are dictionaries with file attributes.

skinName : string
This parameter specifies the name of an existing Server Skin.

ReadServerSkinFile skinName FILE fileName
Use this command to read a file from a custom Server Skin. The command produces an output - an array. The first array element is a string with the BASE64-encoded Skin file content, the second array element is a string with the file modification date in the ACAP date format.

skinName : string
This parameter specifies the name of an existing Server Skin.

fileName : string
This parameter specifies the name of an existing file in the specified Server Skin.

StoreServerSkinFile skinName FILE fileName DATA fileContent
StoreServerSkinFile skinName FILE fileName DELETE
Use this command to store a file into a custom Server Skin, or to delete a file from a custom Server Skin.

skinName : string
This parameter specifies the name of an existing Server Skin.

fileName : string
This parameter specifies the Skin file name.

fileContent : string
This string contains the BASE64-encoded file content. This parameter is specified only if the DATA keyword is used.

If the DATA keyword is specified and the Skin contains a file with the same name, the old file is deleted.

The file with the specified name is removed from the Skin Cache (in the Dynamic Cluster the file is removed from Skin caches on all cluster members).

ListClusterSkins
CreateClusterSkin skinName
RenameClusterSkin skinName INTO newSkinName
DeleteClusterSkin skinName
These commands are available in the Dynamic Cluster only.
Use these commands instead of the [List|Create|Rename|Delete]ServerSkin[s] commands to work with the cluster-wide Skins.

ListClusterSkinFiles skinName
ReadClusterSkinFile skinName FILE fileName
StoreClusterSkinFile skinName FILE fileName DATA fileContent
StoreClusterSkinFile skinName FILE fileName DELETE
These commands are available in the Dynamic Cluster only.
Use these commands instead of the [List|Read|Store]ServerSkinFile[s] commands to work with files in the cluster-wide Skins.


Web Interface Integration

The following commands can be used to integrate the CommuniGate Pro WebUser Interface with third-party applications.

CreateWebUserSession accountName ADDRESS ip-address [ WML | IMode ] [ SKIN skinName ]
Use this command to create a WebUser session for the specified account. The command produces an output - a string that contains the WebUser Session ID. This string can be used to compose a URL that will allow the client browser to "enter" the WebUser Session. That URL can have the following format:
http://cgateproserver:port/Session/rrrrrrrrrrrr/Mailboxes.wssp
where rrrrrrrrrrrr is the Session ID string returned.

account : string
This parameter specifies the Account name.

ip-address : string
This parameter specifies the IP address of the client browser. If the Account has the "Fixed IP" WebUser Preference setting enabled, connections to the session will be allowed from that IP address only.
skinName : string
This optional parameter specifies the Skin to use for the newly created session.

The optional WML or IMode keywords can be used to emulate login via a WML or I-Mode browser.

The authenticated user should have the Can Modify All Domains and Account Settings access right or the CanCreateWebUserSessions Domain Administration access right to create WebUser Sessions.

FindWebUserSession accountName [ ADDRESS ip-address ]
Use this command to find an existing WebUser session for the specified account. The command produces an output - a string that contains the WebUser Session ID.

account : string
This parameter specifies the Account name.

ip-address : string
This optional parameter specifies the IP address of the client browser. If it is specified, the command will find only those sessions that have the "Fixed IP" WebUser Preference setting disabled or have the same login IP address as the specified one.

The authenticated user should have the Can Modify All Domains and Account Settings access right or the CanCreateWebUserSessions Domain Administration access right to use this command.

GetWebUserSession sessionID [ DOMAIN domainName ]
Use this command to retrieve the WebUser Session data. The command produces an output - a dictionary with the session dataset (specified in the WSSP section of this manual).

sessionID : string
This parameter specifies the WebUser Session ID.
domainName : string
This optional parameter specifies the name of Domain the session Account belongs to.

The authenticated user should have the Can Modify All Domains and Account Settings access right to retrieve WebUser Session data if the domainName parameter is not specified. If the domainName is specified, the authenitcated user should have the CanCreateWebUserSessions Domain Administration access right for the specified Domain.

This operation resets the WebUser session inactivity timer.

KillWebUserSession sessionID [ DOMAIN domainName ]
Use this command to terminate a WebUser Session.

sessionID : string
This parameter specifies the WebUser Session ID.
domainName : string
This optional parameter specifies the name of Domain the session Account belongs to.

The authenticated user should have the Can Modify All Domains and Account Settings access right to terminate a WebUser Session if the domainName parameter is not specified. If the domainName is specified, the authenitcated user should have the CanCreateWebUserSessions Domain Administration access right for the specified Domain.


Real-Time Application Administration

The following commands can be used to manage CommuniGate Pro Real Time Application Environments.

A user should have the Account Settings access right or the CanModifyPBXApps Domain Administration access right to modify the Domain Real-Time Application Environment.

CreateDomainPBX domainName [ FILE language ]
Use this command to create the Domain Real-Time Application Environment or to create its national subset.

domainName : string
This optional parameter specifies the domain name. If the domain name is not specified, the command applies to the administrator domain.
language : language
This optional parameter specifies a national subset name.
ListDomainPBXFiles domainName [ FILE language ]
Use this command to list files in the Domain Real-Time Application Environment. The command produces an output - a dictionary with file names used as keys. The dictionary element values are dictionaries with file attributes.

domainName : string
This optional parameter specifies the domain name. If the domain name is not specified, the command applies to the administrator domain.
language : language
This optional parameter specifies a national subset name.

ReadDomainPBXFile domainName FILE fileName
Use this command to read a file from the Domain Real-Time Application Environment. The command produces an output - a datablock with the file contents.

domainName : string
This parameter specifies the domain name.
fileName : string
This parameter specifies the file name. To retrieve a file from a national subset, specify the name as language/fileName.

StoreDomainPBXFile domainName FILE fileName DATA fileContent
StoreServerSkinFile fileName DELETE
Use this command to store a file into the Server-wide Real-Time Application Environment, or to delete a file from the Server-wide Real-Time Application Environment.

domainName : string
This parameter specifies the domain name.
fileName : string
This parameter specifies the file name. To store a file into a national subset, specify the name as language/fileName.

fileContent : datablock
This parameter is specified only if the DATA keyword is used. It should contain the file contents.

If the DATA keyword is specified and the environment contains a file with the specified name, the old file is deleted.

The file with the specified name is removed from the Environment cache (in the Dynamic Cluster the file is removed from all cluster members caches).

The following commands are available for the System Administrators only:

CreateServerPBX [ language ]
Use this command to create the Server-wide Real-Time Application Environment or to create its national subset.

language : language
This optional parameter specifies a national subset name.

ListServerPBXFiles [ language ]
Use this command to list files in the Server-wide Real-Time Application Environment. The command produces an output - a dictionary with file names used as keys. The dictionary element values are dictionaries with file attributes.

language : string
This optional parameter specifies a national subset name.

ReadServerPBXFile fileName
Use this command to read a file from the Server-wide Real-Time Application Environment. The command produces an output - a datablock with the file contents.

fileName : string
This parameter specifies the file name. To retrieve a file from a national subset, specify the name as language/fileName.

StoreServerPBXFile fileName DATA fileContent
StoreServerPBXFile fileName DELETE
Use this command to store a file into the Server-wide Real-Time Application Environment, or to delete a file from the Server-wide Real-Time Application Environment.

fileName : string
This parameter specifies the file name. To store a file into a national subset, specify the name as language/fileName.

fileContent : datablock
This parameter is specified only if the DATA keyword is used. It should contain the file contents.

If the DATA keyword is specified and the environment contains a file with the specified name, the old file is deleted.

The file with the specified name is removed from the Environment cache (in the Dynamic Cluster the file is removed from all cluster members caches).

CreateClusterPBX [ language ]
ListClusterPBXFiles [ language ]
ReadClusterPBXFile fileName
StoreClusterPBXFile fileName DATA fileContent
StoreClusterPBXFile fileName DELETE
These commands are available in the Dynamic Cluster only.
Use these commands instead of the [List|Read|Store]ServerPBXFile[s] commands to work with files in the cluster-wide Real-Time Application Environment.


Server Settings

A user should have the Server Settings access right to use the Server Settings CLI commands.

GetModule moduleName
Use this command to get the module settings. The command produces an output - a dictionary with the module settings.

moduleName : string
This parameter specifies the name of a CommuniGate Pro Server module.

SetModule moduleName newSettings
Use this command to set the module settings.

moduleName : string
This parameter specifies the name of a CommuniGate Pro Server module.

newSettings : dictionary
This dictionary is used to set the module settings dictionary.

UpdateModule moduleName newSettings
Use this command to update the module settings.

moduleName : string
This parameter specifies the name of a CommuniGate Pro Server module.

newSettings : dictionary
This dictionary is used to update the module settings dictionary. It does not have to contain all settings data, the omitted settings will be left unmodified.

GetLANIPs
Use this command to retrieve the set of LAN IP Addresses. The command produces an output - a (multi-line) string with LAN IP addresses and address ranges.

GetBlacklistedIPs
Use this command to retrieve the set of Blacklisted IP Addresses. The command produces an output - a (multi-line) string with Blacklisted IP addresses and address ranges.

GetClientIPs
Use this command to retrieve the set of Client IP Addresses. The command produces an output - a (multi-line) string with Client IP addresses and address ranges.

GetWhiteHoleIPs
Use this command to retrieve the set of WhiteHole IP Addresses. The command produces an output - a (multi-line) string with White Hole IP addresses and address ranges.

GetProtection
Use this command to retrieve the Protection settings. The command produces an output - a dictionary with the server Protection settings.

GetBanned
Use this command to retrieve the Banned Message Lines settings. The command produces an output - a dictionary with the server Banned Message Lines settings.

SetLANIPs newAddresses
Use this command to update the set of LAN IP Addresses.

newAddresses : string
This (multi-line) string parameter contains the set of addresses and address ranges forming the new set of LAN IP Addresses.

SetBlacklistedIPs newAddresses
Use this command to update the set of Blacklisted IP Addresses.

newAddresses : string
This (multi-line) string parameter contains the set of addresses and address ranges forming the new set of Blacklisted IP Addresses.

SetClientIPs newAddresses
Use this command to update the set of Client IP Addresses.

newAddresses : string
This (multi-line) string parameter contains the set of addresses and address ranges forming the new set of Client IP Addresses.

SetWhiteHoleIPs newAddresses
Use this command to update the set of WhiteHole IP Addresses.

newAddresses : string
This (multi-line) string parameter contains the set of addresses and address ranges forming the new set of WhiteHole Addresses.

SetProtection newSettings
Use this command to set the server Protection Settings.

newSettings : dictionary
New server Protection settings.

SetBanned newSettings
Use this command to set the server Banned Message Line Settings.

newSettings : dictionary
New server Banned settings.

GetClusterLANIPs
GetClusterBlacklistedIPs
GetClusterClientIPs
GetClusterWhiteHoleIPs
GetClusterProtection
GetClusterBanned
SetClusterLANIPs newAddresses
SetClusterBlacklistedIPs newAddresses
SetClusterClientIPs newAddresses
SetClusterWhiteHoleIPs newAddresses
SetClusterProtection newSettings
Use these commands to retreieve and update the Cluster-wide IP Address lists and Protection settings.

GetServerRules
Use this command to read the Server-Wide Automated Mail Processing Rules. The command produces an output - an array of the Server Rules.

SetServerRules newRules
Use this command to set the Server-Wide Automated Mail Processing Rules.

newRules : array
An array of new Server Rules.

GetClusterRules
Use this command to read the Cluster-Wide Automated Mail Processing Rules. The command produces an output - an array of the Cluster Rules.

SetClusterRules newRules
Use this command to set the Cluster-Wide Automated Mail Processing Rules.

newRules : array
An array of new Cluster Rules.

GetRouterTable
Use this command to read the Router Table. The command produces an output - a (multi-line) string with the Router Table text.

SetRouterTable newTable
Use this command to set the Router Table.

newTable : string
A (multi-line) string containing the text of the new Router Table
Note: multiple lines should be separated with the \e symbols.

GetRouterSettings
Use this command to read the Router settings. The command produces an output - a dictionary with the Router settings.

SetRouterSettings newSettings
Use this command to set the Router settings.

newSettings : dictionary
A dictionary containing new Router settings.

GetClusterRouterTable
SetClusterRouterTable newTable
These commands are the same as the GetRouterTable and SetRouterTable commands, but they deal with the Cluster-Wide Router Table.

GetServerIntercept
Use this command to read the Lawful Intercept settings. The command produces an output - a dictionary with the Intercept settings.

SetServerIntercept newSettings
Use this command to set the Lawful Intercept settings.

newSettings : dictionary
A dictionary containing new Intercept settings.

GetClusterIntercept
SetClusterIntercept newSettings
These commands are the same as the GetServerIntercept and SetServerIntercept commands, but they deal with the Cluster-Wide Lawful Intercept settings.

RefreshOSData
Use this command to set make the Server re-read the IP data from the server OS: the set of the local IP addresses, and the set of the DNS addresses.

A user should have the Server Settings access right or the Account Settings access right to use the following CLI commands.

Route address [ mail | access | signal ]
Use this command to get the routing for the specified address.

address : string
This parameter specifies the E-mail address to be processed with the CommuniGate Pro Router.

mail or access or signal
This optional flag specifies the Routing type (see the Router section for more details). The default mode is access.

This command produces an output - an array of three strings:

module
the name of the CommuniGate Pro module the address is routed to, or SYSTEM if the address is routed to a built-in destination (like NULL).

host
the object/queue handled by the specified module: an Internet domain name for the SMTP module, a local account name for the Local Delivery module, etc.

address
the address inside the queue (E-mail address for SMTP, Real-To: address for Local Delivery, etc.)


Monitoring

A user should have the Monitoring access right to use the Server Monitoring CLI commands.

GetSNMPElement ObjectID
Use this command to retrieve the current value of a server state (SNMP) element.

ObjectID : string
The object ID of the server state element (see the SNMP section for more details).

This command produces an output - a string with the server state element value.

Shutdown
Use this command to stop the CommuniGatePro Server.


Access Rights Administration

A user should have the unlimited access right to use the Access Rights Administration CLI commands.

SetAccountRights accountName newRights
Use this command to set the account Server Access rights.

accountName : string
This parameter specifies the name of an existing account. The name can include the domain name.

newRights : array
This array should contain the Access Right codes. All old account access rights are removed.
To set access rights for an account in a secondary domain (i.e. Domain Administration Rights), the user may have only the All Account and Domains administration access right.


Statistics

The Account-Level Statistics data is collected if the Account Statistics option is enabled on the Obscure page in the Settings realm of the CommuniGate Pro WebAdmin Interface.

GetAccountStat accountName [ KEY keyName ]
Use this command to retrieve statistics data about the specified account.

accountName : string
This parameter specifies the name of an existing account. The asterisk sign (*) can be used to specify the current authenticated account.

keyName : string
This optional parameter specifies the name of the statistical entry to retrieve.

This command produces an output - a string with the specified statistical information, or (if the KEY keyword and the keyName parameter are not specified) a dictionary with all available statistical data.

If the statistical data for the specified key does not exist, an empty string is returned.

To use this command, the user should have the Domain Administration right for the target account domain. All users can retrieve the Account statistics data for their own accounts.

ResetAccountStat accountName [ KEY keyName ]
Use this command to reset statistics data about the specified account.

accountName : string
This parameter specifies the name of an existing account. The asterisk sign (*) can be used to specify the current authenticated account.

keyName : string
This optional parameter specifies the name of the statistical entry to reset.

If the KEY keyword and the keyName parameter are not specified, all Account statistical entries are reset.

To use this command, the user should have the "Basic Settings" Domain Administration right for the target account domain.

The following Account statistics data keys are implemented:
Key Name  Value
StatReset The date & time when the last parameterless RESETACCOUNTSTAT command was sent to this Account
MessagesReceived The total number of messages delivered to the Account
BytesReceived The total size of all messages delivered to the Account

GetDomainStat domainName [ KEY keyName ]
Use this command to retrieve statistics data about the specified domain.

domainName : string
This parameter specifies the name of an existing Domain. The asterisk sign (*) can be used to specify the domain of the current authenticated account.

keyName : string
This optional parameter specifies the name of the statistical entry to retrieve.

This command produces an output - a string with the specified statistical information, or (if the KEY keyword and the keyName parameter are not specified) a dictionary with all available statistical data.

To use this command, the user should have the Domain Administration right for the target Domain.

ResetDomainStat domainName [ KEY keyName ]
Use this command to reset statistics data about the specified domain.

domainName : string
This parameter specifies the name of an existing Domain. The asterisk sign (*) can be used to specify the domain of the current authenticated account.

keyName : string
This optional parameter specifies the name of the statistical entry to reset.

If the KEY keyword and the keyName parameter are not specified, all Domain statistical entries are reset.

To use this command, the user should have the "Basic Settings" Domain Administration right for the target Domain.

The following Domain statistics data keys are implemented:
Key Name  Value
StatReset The date & time when the last parameterless RESETDOMAINSTAT command was sent to this Domains
MessagesReceived The total number of messages delivered to the Domain
BytesReceived The total size of all messages delivered to the Domain


Miscellaneous Commands

WriteLog logLevel logRecord
Use this command to store a record into the Server Log.

logLevel : number
This parameter specifies the record log level.

logRecord : string
This parameter specifies the string to be placed into the Server Log.

Log records generated with this command have the SYSTEM prefix.

To use this command, the user should have the "Can Monitor" Server Administration right.

ReleaseSMTPQueue queueName
Use this command to release an SMTP queue.

queueName : string
This parameter specifies the queue (domain) name to release.

In a Dynamic Cluster environment, this command releases the specified SMTP queue on all servers.

To use this command, the user should have the "Can Monitor" Server Administration right.

RejectQueueMessage messageID [errorText]
Use this command to reject a message from the Server Queue.

messageID : number
This parameter specifies the message ID.

errorText : string
This optional parameter specifies the text to be included into the error report (bounce) sent to the message sender.

To use this command, the user should have the "Can Reject Queues" Server Administration right.

GetCurrentController
Use this command to get the IP address of the current Dynamic Cluster Controller.

This command produces an output - a string with the Cluster Controller IP Address.

To use this command, the user should have the "Can Monitor" Server Administration right.

GetTempClientIPs
Use this command to retrieve the set of temporary Client IP Addresses. The command produces an output - a string with Temporary Client IP addresses separated with the comma (,) symbols.

To use this command, the user should have the "Can Monitor" Server Administration right.

GetTempBlacklistedIPs
Use this command to retrieve the set of temporary Blacklisted IP Addresses. The command produces an output - a string with Temporary Blacklisted IP addresses separated with the comma (,) symbols.

To use this command, the user should have the "Can Monitor" Server Administration right.

RemoveAccountSubset accountName SUBSET subsetName
Use this command to remove an Account "dataset" (such as RepliedAddresses dataset).

accountName : string
This parameter specifies the name of an existing account. The asterisk sign (*) can be used to specify the current authenticated account.

subsetName : string
This parameter specifies the name of an existing data subset in the specified account.

To use this command on other user subsets, the user should have the Domain Administration right.


CommuniGate® Pro Guide. Copyright © 1998-2006, Stalker Software, Inc.