WebAdmin Specific Methods

Axigen Documentation

The following methods are only used for WebAdmin related operations:

Name

headers_getUserAgent

Syntax

STRING headers_getUserAgent()

Explanation

Returns User-Agent HTTP header value.


Name

getHostName

Syntax

STRING getHostName()

Explanation

Returns server's host name.


Name

server_getVersion

Syntax

STRING server_getVersion()

Explanation

Returns the server's version.


Name

server_getLK

Syntax

MAP server_getLK()

Explanation

Returns a map object that contains informations about the license key.


Name

config_save

Syntax

config_save()

Explanation

Makes all the changes permanent.


Name

config_discard

Syntax

config_discard()

Explanation

Discards all the uncommitted changes (cached on this session).


Name

licenseKey_load

Syntax

MAP licenseKey_load()

Explanation

Loads informations about an uploaded license key and returns them in a map object. Before calling this method you should upload the license key to the server. Webadmin server recognizes a license key upload try by a query "action=licenseKey".




Name

licenseKey_apply

Syntax

licenseKey_apply()

Explanation

Applies an uploaded license key.


Name

licenseKey_getAddons

Syntax

ARRAY licenseKey_getAddons()

Explanation

Returns the list of license addons.


Name

geoip_apply

Syntax

geoip_apply()

Explanation

ReApplies an uploaded GeoIP CSV database (in MAXMIND format). action=upload should be used to upload this file.


Name

geoip_loadCountries

Syntax

ARRAY geoip_loadCountries()

Explanation

Returns a list of maps, parsed from the GeoIP database:

− country: country name
− code: country code (2 letters)


Name

object_getInfo

Syntax

MAP object_getInfo(STRING objectName)

Explanation

Returns detailed info about <objectName> config object.

Connection Specific Methods

Name

connection_isSecure

Syntax

STRING connection_isSecure()

Explanation

Returns true if the current connection is secure (SSL) or false otherwise.


Name

connection_getUrlRedirect

Syntax

STRING connection_getUrlRedirect()

Explanation

Returns a url redirection string for the current connection which is used to redirect from a plain to a secure connection.

Service Specific Methods

Name

service_load

Syntax

MAP service_load(STRING service [, STRING attributesType])

Explanation

Loads attributes of <service> from config file. It returns a map object that contains all attributes for <service>. <service> can be: "server", "dnr", "reporting", "processing", "smtpIncoming", "smtpOutgoing", "pop3", "imap", "webmail", "webadmin", "log", "cli", "ftp", "rpop", "pop3Proxy", "imapProxy", "userDb". By default <attributesType> is considered "values". For some services <attributesType> can be:

− smtpIncoming
    Y mappingData
    Y accessControl
− pop3
    Y accessControl
− imap
    Y accessControl
− webMail
    Y accessControl
− webAdmin
    Y accessControl
− cli
    Y accessControl
− ftp
    Y accessControl
− pop3Proxy
    Y mappingData Y connectionData Y accessControl
− imapProxy
    Y mappingData
    Y connectiondData
    Y accessControl


Name

service_update

Syntax

MAP service_update(MAP values, STRING service [, STRING attributesType])

Explanation

Updates the service's <attributesType> specified by <service>. The updated properties are taken from <values> map object. If the map object returned by this method is not empty (update failure) then it contains all wrong properties from <values>.


Name

service_commit

Syntax

service_commit(STRING service)

Explanation

Commits changes made on <service>.


Name

service_commitFilters

Syntax

service_commitFilters(STRING service)

Explanation

Commits server's filters changes.


Name

service_reset

Syntax

service_reset(STRING service)

Explanation

Resets changes made on <service>.


Name

service_listLoad

Syntax

ARRAY service_listLoad(STRING objectName [, STRING service])

Explanation

Loads the list of <objectName> objects, contained in <service>. <objectName> and <service> can be:

− scriptFilters
   Y server
− socketFilters
   Y server
− activeFilters
   Y server
− logRules
   Y log
− nameServers
   Y dnr
− listeners
   Y smtpIncoming
   Y pop3
   Y imap
   Y webmail Y webadmin Y cli
   Y ftp
   Y log
   Y pop3Proxy
   Y imapProxy
− allowRules
   Y smtpIncoming
   Y pop3
   Y imap
   Y webmail Y webadmin Y cli
   Y ftp
   Y pop3Proxy
   Y imapProxy
− denyRules
   Y smtpIncoming
   Y pop3
   Y imap
   Y webmail Y webadmin Y cli
   Y ftp
   Y pop3Proxy
   Y imapProxy
− urlRedirects
   Y webmail
   Y webadmin
− hostNameResolvers
   Y webmail
− templates
   Y reporting
− databases
   Y reporting
− graphics
   Y reporting
− userMaps
   Y server
− ldapConnectors
   Y userDb

It returns an ARRAY of MAP values.


Name

service_listAdd

Syntax

MAP service_listAdd(MAP objectValues, STRING objectName [, STRING service])

Explanation

Adds an object specified by objectValues MAP to the list of <objectName> objects, contained in <service>.<objectName> can be:

− nameservers
− scriptFilters
− socketFilters
− activeFilters
− logRules
− urlRedirects
− hostNameResolvers
− templates
− databases
− graphics
− userMaps
− ldapConnectors
− allowRules
− denyRules

If the map object returned by this method is not empty (update failure) then it contains all wrong properties from<objectValues>.


Name

service_listRemove

Syntax

service_listRemove(STRING objectKey, STRING objectName [, STRING service])

Explanation

Removes the object with the key <objectKey> from the list of objects specified by <objectName>, contained in <service>.<service> and <objectName> can have the same values as for #service_listAdd method.


Name

service_listLoadElement

Syntax

MAP service_listLoadElement(STRING objectKey, STRING objectName [, STRING service])

Explanation

Loads the element with the key <objectKey> from the list of objects specified by <objectName>, contained in <service>.

<service> and <objectName> can have the same values as for #service_listAdd method.


Name

service_listUpdateElement

Syntax

MAP service_listUpdateElement(MAP objectValues, STRING objectKey, STRING objectName [, STRING service])

Explanation

Updates the object with the key <objectKey> from the list specified by <objectName>, contained in <service>. The updated properties are taken from <objectValues> map object. <service> and <objectName> can have the same values as for #service_listAdd method. If the map object returned by this method is not empty (update failure) then it contains all wrong properties from <objectValues>.

Search Specific Methods

Name

search_applyFilter

Syntax

search_applyFilter(STRING searchListName, MAP searchInfo)

Explanation

Applies a search filter on the <searchListName>. The search filter information is contained in a MAP object, <searchInfo>.<searchListName> can be one of the domain objects ("domains", "users", "mlists", "groups", "folderrcpts", "mlistusers"). The MAP containing the search info must have the following properties and values:

− STRING <type> - can be:
    Y "contains" Y "begins" Y "ends"
    Y "is"
− [STRING <negation>] - optional parameter, if not specified the default value is "true"; can be:
    Y "true"
    Y "false"
− STRING <pattern> - the pattern to search for.

For applying such a filter, the object list must the be cached first, using the corresponding caching method (e.g. #domain_listCache, #user_listCache, etc). After applying the search filter, the list should be loaded using the corresponding loading method.

Log Specific Methods

Name

log_loadFileList

Syntax

ARRAY log_loadFileList()

Explanation

Loads the log file list; it returns an array of map objects. The map objects have the following properties:

− "fileName"
− "size"


Name

log_showFile

Syntax

log_showFile(STRING fileName)

Explanation

Shows the content of the log file <fileName>.


Name

log_removeFile

Syntax

log_removeFile(STRING fileName)

Explanation

Removes the log file <fileName>.

Queue Specific Methods

Name

queue_force

Syntax

queue_force()

Explanation

Force queue to try to send all mails.


Name

queue_loadMails

Syntax

ARRAY queue_loadMails([NUMBER startIndex, NUMBER stopIndex])

Explanation

Before calling this method you must first call queue_applySearch() method, or else the list returned will be empty. This method loads all the mails between <startIndex> and <stopIndex>. If <startIndex> and <stopIndex> are missing then all mails in the queue are loaded. It returns an ARRAY of MAP values. Each MAP object has the following properties:

− NUMBER id
− STRING hid
− STRING sender
− NUMBER size
− STRING receiveDate
− NUMBER age
− STRING nextSchedule
− NUMBER retryCount
− STRING status
− NUMBER rcptCount - total count of recipients
− ARRAY rcptList (limited to 5) - each element has MAP type and contains the following properties:
     Y STRING failInfo Y STRING mbox Y STRING name Y STRING status


Name

queue_loadMail

Syntax

MAP queue_loadMail(NUMBER mailID)

Explanation

Loads the mail specified by <mailID> from the queue. It returns a MAP object with the following properties:

− NUMBER id
− STRING hid
− STRING sender
− NUMBER size
− STRING receiveDate
− NUMBER age
− STRING nextSchedule
− NUMBER retryCount
− STRING status
− NUMBER rcptCount
− ARRAY rcptList - each element has MAP type and contains the following properties:
     Y STRING failInfo
     Y STRING mbox
     Y STRING name
     Y STRING status


Name

queue_rescheduleMail

Syntax

queue_rescheduleMail(NUMBER mailId)

Explanation

Reschedules the mail <mailId> from queue.


Name

queue_removeMail

Syntax

queue_removeMail(NUMBER mailId)

Explanation

Deletes the mail <mailId> from queue.


Name

queue_sendNDR

Syntax

queue_sendNDR(NUMBER mailId)

Explanation

Sends a non delivery report to the originator and remove the mail <mailId> from the queue. Applies for all mail recipients.


Name

queue_getSize

Syntax

NUMBER queue_getSize()

Explanation

Returns the number of mails in the queue.


Name

queue_applySearch

Syntax

queue_applySearch(ARRAY filters)

Explanation

Caches the list of mails in the queue and applies search <filters>. <filters> is an ARRAY with MAP elements. Each element contains the following search criteria:

− name ("size", "age", "retries", "status", "sender", "recipient" or "nextSchedule")
− operator ("gt", "lt", "eq", "contains", "notContains")
− value: can be numeric (for "size", "age" and "retries"), string (for "status", "sender" and "recipient") or date (for "nextSchedule"); numeric and date values can be used only with "gt", "lt" and "eq" operators; string values can be used only with "contains" and "notContains" operators.


Name

queue_getSearchInfo

Syntax

ARRAY queue_getSearchInfo()

Explanation

Returns previously applied search <filters>.


Name

queue_applySort

Syntax

queue_applySort(STRING sortType, STRING sortOrder)

Explanation

Sorts the list of mails from the queue (cached before) according to <sortType>, in <sortOrder>. <sortType> can be:

− size
− age
− retries
− status
− sender
− nextSchedule

<sortOrder> can be:
− ascending
− descending


Name

queue_getSortInfo

Syntax

queue_getSortInfo(STRING sortType, STRING sortOrder)

Explanation

Returns <sortType> and <sortOrder> of queue mails currently cached.


Name

queue_refresh

Syntax

queue_refresh()

Explanation

Refreshes the list of mails from the queue, applying the existing search filters.

Listener Specific Methods

Name

listener_create

Syntax

listener_create(STRING service)

Explanation

Creates a new listener for <service>. This listener is the new current listener (cached for current session). It can be modified and commited. <service> can be: "smtpIncoming", "pop3", "imap", "webmail", "webadmin", "log", "cli", "ftpBackup".



Name

listener_load

Syntax

listener_load(STRING key, STRING service)

Explanation

Loads the listener identified by address <key>, from<service>. This is the new current listener.



Name

listener_update

Syntax

listener_update()

Explanation

Updates changes of current listener.


Name

listener_add

Syntax

listener_add()

Explanation

Adds the current listener to the service which was created for; in case of no failure, the listener is dicarded from cache.


Name

listener_commit

Syntax

listener_commit()

Explanation

Commits the changes of the current listener. If the listener was loaded, the command updates it. If the listener is newly created, then it adds it to the service which was created for.


Name

listener_get

Syntax

MAP listener_get(STRING valuesName)

Explanation

Loads the attributes <valuesName> from the current listener. <valuesName> can be "values" or "sslControl".



Name

listener_set

Syntax

MAP listener_set(MAP values, STRING valuesName)

Explanation

Sets <values> to <valuesName> object of current listener. If the map object returned by this method is not empty (set failure) then it contains all wrong properties from <values>.



Name

listener_listLoad

Syntax

ARRAY listener_listLoad(STRING objectName)

Explanation

Loads elements of the list <objectName>, from the current listener. <objectName> can be "allowRules" or "denyRules".



Name

listener_listAdd

Syntax

MAP listener_listAdd(MAP objectValues, STRING objectName)

Explanation

Adds <objectValues> to <objectName> list from current listener. If the map object returned by this method is not empty (add failure) then it contains all wrong properties from <objectValues>.


Name

listener_listRemove

Syntax

listener_listRemove(STRING objectKey, STRING objectName)

Explanation

Removes the element <objectKey> from the <objectName> list, from current listener.


Name

listener_listLoadElement

Syntax

MAP listener_listLoadElement(STRING objectKey, STRING objectName)

Explanation

Loads the element identified by <objectKey> from <objectName> list, from the current listener and returns the map object.



Name

listener_listUpdateElement

Syntax

MAP listener_listUpdateElement(MAP objectValues, STRING objectKey, STRING objectName)

Explanation

Updates the object identified by <objectKey> (from <objectName> list) with the attributes from <objectValues>. If the map object returned by this method is not empty (update failure) then it contains all wrong properties from <objectValues>.


Name

listener_getService

Syntax

STRING listener_getService()

Explanation

Returns the service for the current listener.


Name

listener_isNew

Syntax

listener_isNew()

Explanation

It returns "true" if the listener is new, or "false" otherwise.

Domain Specific Methods

Name

domain_create

Syntax

domain_create(STRING domainName, STRING password,STRING dSLocation[, STRING maclSupport, STRING dOSLocation, ARRAY mSLocations])

Explanation

Creates a new domain with name <domainName>, with the postmaster password <password>, into domain location specified by <dSLocation> (domainStorageLocation) and optionally <maclSupport> ("yes" or "no"), <dOSLocation> (domainObjectsStorageLocation) and <mSLocations> (messageStorageLocations). This domain is the new current domain.


Name

domain_load

Syntax

domain_load(STRING domainName)

Explanation

Loads the domain <domainName>. This is the new current domain.


Name

domain_getMacl

Syntax

STRING domain_getMacl())

Explanation

Returns "enable" if MACL is enabled for the current domain or "disable" otherwise.


Name

domain_setMacl

Syntax

domain_setMacl(STRING enable)

Explanation

If <enable> is "enable" then MACL is enabled for the current domain or disabled if <enable> is "disable".


Name

MAP domain_get

Syntax

MAP domain_get(STRING valuesName)

Explanation

Loads <valueName> object from the current domain.<valueName> can be:

− • "values"
− • "defaultQuota"
− • "defaultLimits"
− • "adminLimits"
− • "webmailData"
− • "migrationData"
− • "registryInfo"
− • "dsParams"
− • "storageInfo": returns a MAP:
    Y MAP domainStorage
• STRING location
• NUMBER maxFileSize
• NUMBER maxFileCount
• NUMBER allTotalSize
• NUMBER allUsedSize
• NUMBER allExpandableSize
• ARRAY files
            o STRING path
            o NUMBER totalSize
            o NUMBER usedSize
            o NUMBER expandableSize
    Y MAP objectStorage
• STRING location
• NUMBER maxFileSize
• NUMBER maxFileCount
• NUMBER allTotalSize
• NUMBER allUsedSize
• NUMBER allExpandableSize
• ARRAY files
            o STRING path
            o NUMBER totalSize
            o NUMBER usedSize
            o NUMBER expandableSize
    Y ARRAY messageStorages
• STRING location
• NUMBER maxFileSize
• NUMBER maxFileCount
• NUMBER allTotalSize
• NUMBER allUsedSize
• NUMBER allExpandableSize
• ARRAY files
            o STRING path
            o NUMBER totalSize
            o NUMBER usedSize
            o NUMBER expandableSize



Name

domain_set

Syntax

MAP domain_set(MAP values, STRING valueName)

Explanation

Sets <values> map object to <valueName> object of current domain. If the map object returned by this method is not empty (set failure) then it contains all wrong properties from <values>. <valueName> can be "values", "defaultQuota", "defaultLimits", "adminLimits", "webmailData" or "migrationData".


Name

domain_commit

Syntax

domain_commit()

Explanation

Commits changes of current domain.


Name

domain_commitFilters

Syntax

domain_commitFilters()

Explanation

Commits filters changes for the current domain.


Name

domain_register

Syntax

domain_register(STRING dSLocation[, STRING dOSLocation, STRING mSLocation])

Explanation

Registeres the domain found in the location specified by <dSLocation> and optionally by <dOSLocation> and <mSLocation>.


Name

domain_unregister

Syntax

domain_unregister(STRING domainName)

Explanation

Unregisteres the domain specified by <domainName>.


Name

domain_listLoad

Syntax

ARRAY domain_listLoad(STRING objectName [, NUMBER startIndex, NUMBER stopIndex])

Explanation

ULoads elements of the <objectName> list from the current domain. The list contains elements between <startIndex> and <stopIndex>. If <startIndex> and <stopIndex> are missing then all elements are loaded. <objectName> can be:

− "domains": returns an ARRAY of MAPs:
     Y STRING name
     Y STRING totalSize
     Y STRING usedSize
     Y STRING expandableSize
− "users"
− "mailLists"
− "groups"
− "folderRCPTs"
− "userClasses"
− "aliases"
− "scriptFilters"
− "socketFilters"
− "activeFilters"
− "defaultScriptFilters"
− "defaultSocketFilters"
− "defaultActiveFilters"



Name

domain_listAdd

Syntax

MAP domain_listAdd(MAP objectValues, STRING objectName)

Explanation

Adds <objectValues> into <objectName> list of the current domain. If the map object returned by this method is not empty (add failure) then it contains all wrong properties from <objectValues>. <objectName> can be: "aliases", "scriptFilters", "socketFilters", "activeFilters", "defaultScriptFilters", "defaultSocketFilters" or "defaultActiveFilters".


Name

domain_listRemove

Syntax

domain_listRemove(STRING objectKey, STRING objectName)

Explanation

Removes element <objectKey> from <objectName> list, from current domain. <objectName> can be: "users", "mailLists", "groups", "folderRcpts", "userClasses", "aliases", "scriptFilters", "socketFilters", "activeFilters", "defaultScriptFilters", "defaultSocketFilters" or "defaultActiveFilters".


Name

domain_listLoadElement

Syntax

MAP domain_listLoadElement(STRING objectKey, STRING objectName)

Explanation

Loads the element identified by <objectKey> from <objectName> list, from current domain. <objectName> can be: "scriptFilters", "socketFilters", "activeFilters", "defaultScriptFilters", "defaultSocketFilters" or "defaultActiveFilters".


Name

domain_listUpdateElement

Syntax

MAP domain_listUpdateElement(MAP objectValues, STRING objectKey, STRING objectName)

Explanation

Updates the object identified by <objectKey>, from <objectName> list, with attributes contained in<objectValues>. If the map object returned by this method is not empty (update failure) then it contains all wrong properties from <objectValues>. <objectName> can be: "scriptFilters", "socketFilters", "activeFilters", "defaultScriptFilters", "defaultSocketFilters" or "defaultActiveFilters".


Name

domain_listGetSize

Syntax

NUMBER domain_listGetSize(STRING objectName)

Explanation

Returns number of elements from <objectName> list.<objectName> can be "domains", "users", "mailLists", "groups", "folderRcpts" or "userClasses".


Name

domain_listCache

Syntax

domain_listCache(STRING objectName[, ARRAY permissions])

Explanation

It caches the list of <objectName> items. <objectName> can be "domains", "users", "mailLists", "groups", "folderRcpts" or "userClasses". In case of "domains" the list is filtered considering the list of <permissions>. If size of <permissions> list is greater than 0 no domain storage info will be available.

User Specific Methods

Name

user_create

Syntax

user_create(STRING userName, STRING domainName)

Explanation

Creates a new account,<userName>, for <domainName>. This account is the new current account.


Name

user_load

Syntax

user_load(STRING userName, STRING domainName)

Explanation

Loads account <userName> from <domainName>. This is the new current account.


Name

user_get

Syntax

MAP user_get(STRING valuesName)

Explanation

Loads <valuesName> object from the current account.<valuesName> can be "values", "webmailData", "contactInfo", "filterData", "limits", "inheritedLimits", "quota", "inheritedQuota" or "registryInfo".


Name

user_set

Syntax

MAP user_set(MAP values, STRING valuesName)

Explanation

Sets <values> map object to <valuesName> object of current account. If the map object returned by this method is not empty (set failure) then it contains all wrong properties from <attributes>. <valuesName> can be "values", "webmailData", "contactInfo", "filterData", "limits" or "quota".


Name

user_commit

Syntax

user_commit()

Explanation

Commits changes of current account.


Name

user_listLoad

Syntax

ARRAY user_listLoad(STRING objectName)

Explanation

Loads elements of the <objectName> list from the current account. <objectName> can be: "aliases", "scriptFilters", "socketFilters", "activeFilters".


Name

user_listAdd

Syntax

MAP user_listAdd(MAP objectValues, STRING objectName)

Explanation

LAdds <objectValues> into <objectName> list of the current account. If the map object returned by this method is not empty (add failure) then it contains all wrong properties from <objectValues>. <objectName> can be: "aliases", "scriptFilters", "socketFilters", "activeFilters".


Name

user_listRemove

Syntax

user_listRemove(STRING objectKey, STRING objectName)

Explanation

Removes element <objectKey> from <objectName> list, from current account. <objectName> can be: "aliases", "scriptFilters", "socketFilters", "activeFilters".


Name

user_listLoadElement

Syntax

MAP user_listLoadElement(STRING objectKey, STRING objectName)

Explanation

Loads the element identified by <objectKey> from <objectName> list, from current account. <objectName> can be: "scriptFilters", "socketFilters", "activeFilters".


Name

user_listUpdateElement

Syntax

MAP user_listUpdateElement(MAP objectValues, STRING objectKey, STRING objectName)

Explanation

Updates the object identified by <objectKey>, from <objectName> list, with attributes <objectValues>. If the map object returned by this method is not empty (update failure) then it contains all wrong properties from <objectValues>.<objectName> can be: "scriptFilters", "socketFilters", "activeFilters".

Maillist Specific Methods

Name

mlist_create

Syntax

mlist_create(STRING mlistName, STRING domainName)

Explanation

Creates a new mail list,<mlistName> for <domainName>. This mail list is the new current mail list. Setting the parameter <adminEmail> from "values" must be done until committing the mail list.


Name

mlist_isNew

Syntax

mlist_isNew()

Explanation

Returns true if the current list is newly created and falseotherwise.



Name

mlist_load

Syntax

mlist_load(STRING mlistName, STRING domainName)

Explanation

Loads mail list <mlistName> from <domainName>. This is the new current mail list.


Name

mlist_get

Syntax

MAP mlist_get(STRING valuesName)

Explanation

Loads <valuesName> object from the current mail list.<valuesName> can be "values", "webmailData", "limits", "mboxContainerQuota" or "registryInfo".


Name

mlist_set

Syntax

MAP mlist_set(MAP values, STRING valuesName)

Explanation

Sets <values> map object to <valuesName> object of current mail list. If the map object returned by this method is not empty (set failure) then it contains all wrong properties from <values>. <valuesName> can be "values", "webmailData", "limits" or "mboxContainerQuota".


Name

mlist_commit

Syntax

mlist_commit()

Explanation

Commits changes of current mail list. For a successfull commit, "adminEmil" from mlist's <values> is required.


Name

mlist_listLoad

Syntax

ARRAY mlist_listLoad(STRING objectName [, NUMBER startIndex, NUMBER stopIndex])

Explanation

Loads elements of the <objectName> list from the current mail list. <objectName> can be "removeHeaders", "scriptFilters", "socketFilters", "activeFilters" or "mailListUsers".


<startIndex> and <stopIndex> can be used only for "mailListUsers". These arguments are ignored for others <objectName> lists.


Name

mlist_listAdd

Syntax

MAP mlist_listAdd(MAP objectValues, STRING objectName)

Explanation

Adds <objectValues> into <objectName> list of the current mail list. If the map object returned by this method is not empty (add failure) then it contains all wrong properties from <objectValues>. <objectName> can be "removeHeaders", "scriptFilters", "socketFilters", "activeFilters" or "mailListUsers".


Name

mlist_listRemove

Syntax

mlist_listRemove(STRING objectKey, STRING objectName)

Explanation

Removes element <objectKey> from <objectName> list, from current mail list. <objectName> can be "removeHeaders", "scriptFilters", "socketFilters", "activeFilters" or "mailListUsers".


Name

mlist_listLoadElement

Syntax

MAP mlist_listLoadElement(STRING objectKey, STRING objectName)

Explanation

Loads the element identified by <objectKey> from <objectName> list, from current mail list. <objectName> can be "scriptFilters", "socketFilters", "activeFilters" or "mailListUsers".


Name

mlist_listUpdateElement

Syntax

MAP mlist_listUpdateElement(MAP objectValues, STRING objectKey, STRING objectName)

Explanation

Updates the object identified by <objectKey>, from <objectName> list, with attributes <objectValues>. If the map object returned by this method is not empty (update failure) then it contains all wrong properties from <objectValues>.<objectName> can be "scriptFilters", "socketFilters", "activeFilters" or "mailListUsers".


Name

mlist_listGetSize

Syntax

NUMBER mlist_listGetSize(STRING objectName)

Explanation

Returns the number of elements contained by the list specified by <objectName>. <objectName> can only be "mailListUsers".


Name

mlist_listCache

Syntax

mlist_listCache(STRING objectName)

Explanation

Caches the list of <objectName> elements. <objectName> can only be "mailListUsers".


Group Specific Methods

Name

group_create

Syntax

group_create(STRING groupName, STRING domainName)

Explanation

Creates a new group for <domainName>. This group is the new current group.


Name

group_load

Syntax

group_load(STRING groupName, STRING domainName)

Explanation

Loads group <groupName> from <domainName>. This is the new current group.


Name

group_get

Syntax

MAP group_get(STRING valuesName)

Explanation

Loads <valuesName> object from the current group.<valuesName> can be "values" or "registryInfo".


Name

group_set

Syntax

MAP group_set(MAP values, STRING valuesName)

Explanation

Sets <values> map object to <valuesName> object of current group. If the map object returned by this method is not empty (set failure) then it contains all wrong properties from <values>. <valuesName> can be only "values".


Name

group_commit

Syntax

group_commit()

Explanation

Commits changes of current group.


Name

group_listLoad

Syntax

ARRAY group_listLoad(STRING objectName)

Explanation

Loads elements of the <objectName> list from the current group. <objectName> can be "addresses", "scriptFilters", "socketFilters" or "activeFilters".


Name

group_listAdd

Syntax

MAP group_listAdd(MAP objectValues, STRING objectName)

Explanation

Adds <objectValues> into <objectName> list of the current group. If the map object returned by this method is not empty (add failure) then it contains all wrong properties from <objectValues>.<objectName> can be "addresses", "scriptFilters", "socketFilters" or "activeFilters".


Name

group_listRemove

Syntax

group_listRemove(STRING objectKey, STRING objectName)

Explanation

Removes element <objectKey> from <objectName> list, from current group. <objectName> can be "addresses", "scriptFilters", "socketFilters" or "activeFilters".


Name

group_listLoadElement

Syntax

MAP group_listLoadElement(STRING objectKey, STRING objectName)

Explanation

Loads the element identified by <objectKey> from <objectName> list, from current group. <objectName> can be "scriptFilters", "socketFilters" or "activeFilters".


Name

group_listUpdateElement

Syntax

MAP group_listUpdateElement(MAP objectValues, STRING objectKey, STRING objectName)

Explanation

Updates the object identified by <objectKey>, from <objectName> list, with attributes <objectValues>. If the map object returned by this method is not empty (update failure) then it contains all wrong properties from <objectValues>.<objectName> can be "scriptFilters", "socketFilters" or "activeFilters".


FolderRCPT Specific Methods

Name

folderRcpt_create

Syntax

folderRcpt_create(STRING fRcptName, STRING domainName)

Explanation

Creates a new folderRCPT for <domainName>. This folderRCPT is the new current folderRCPT.


Name

folderRcpt_load

Syntax

folderRcpt_load(STRING fRcptName, STRING domainName)

Explanation

Loads folderRCPT <fRcptName> from <domainName>. This is the new current fRcpt.


Name

folderRcpt_get

Syntax

MAP folderRcpt_get(STRING valuesName)

Explanation

Loads <valuesName> object from the current folderRCPT.<valuesName> can be "values" or "registryInfo".


Name

folderRcpt_set

Syntax

MAP folderRcpt_set(MAP values, STRING valuesName)

Explanation

Sets <values> map object to <valuesName> object of current folderRCPT. If the map object returned by this method is not empty (set failure) then it contains all wrong properties from <values>. <valuesName> can be only "values".


Name

folderRcpt_commit

Syntax

folderRcpt_commit()

Explanation

Commits changes of current folderRCPT.


Name

folderRcpt_listLoad

Syntax

ARRAY folderRcpt_listLoad(STRING objectName)

Explanation

Loads elements of the <objectName> list from the current folderRCPT. <objectName> can be "scriptFilters", "socketFilters" or "activeFilters".


Name

folderRcpt_listAdd

Syntax

MAP folderRcpt_listAdd(MAP objectValues, STRING objectName)

Explanation

Adds <objectValues> into <objectName> list of the current folderRCPT. If the map object returned by this method is not empty (add failure) then it contains all wrong properties from <objectValues>.


Name

folderRcpt_listRemove

Syntax

folderRcpt_listRemove(STRING objectKey, STRING objectName)

Explanation

Removes element <objectKey> from <objectName> list, from current folderRCPT.


Name

folderRcpt_listLoadElement

Syntax

MAP folderRcpt_listLoadElement(STRING objectKey, STRING objectName)

Explanation

Loads the element identified by <objectKey> from <objectName> list, from current folderRCPT.


Name

folderRcpt_listUpdateElement

Syntax

MAP folderRcpt_listUpdateElement(MAP objectValues, STRING objectKey, STRING objectName)

Explanation

Updates the object identified by <objectKey>, from <objectName> list, with attributes <objectValues>. If the map object returned by this method is not empty (update failure) then it contains all wrong properties from <objectValues>.

Public Folder Specific Methods

Name

publicFolder_load

Syntax

publicFolder_load(STRING domainName)

Explanation

Loads the public folder from <domainName>.


Name

publicFolder_get

Syntax

MAP publicFolder_get(STRING valuesName)

Explanation

Loads <valuesName> object from the current public folder.<valuesName> can be "values" or "mboxContainerQuota".


Name

publicFolder_set

Syntax

MAP publicFolder_set(MAP values, STRING valuesName)

Explanation

Sets <values> map object to <valuesName> object of current public folder. If the map object returned by this method is not empty (set failure) then it contains all wrong properties from <values>.


Name

publicFolder_commit

Syntax

publicFolder_commit()

Explanation

Commits changes of current public folder.


Name

publicFolder_listLoad

Syntax

ARRAY publicFolder_listLoad(STRING objectName)

Explanation

Loads elements of the <objectName> list from the current public folder. <objectName> can be only "mboxes".


Name

publicFolder_listAdd

Syntax

MAP publicFolder_listAdd(MAP objectValues, STRING objectName)

Explanation

Adds <objectValues> into <objectName> list of the current public folder. If the map object returned by this method is not empty (add failure) then it contains all wrong properties from <objectValues>.


Name

publicFolder_listRemove

Syntax

publicFolder_listRemove(STRING objectKey, STRING objectName)

Explanation

Removes element <objectKey> from <objectName> list, from current public folder.


Name

publicFolder_listLoadElement

Syntax

MAP publicFolder_listLoadElement(STRING objectKey, STRING objectName)

Explanation

Loads the element identified by <objectKey> from <objectName> list, from current public folder.


Name

publicFolder_listUpdateElement

Syntax

MAP publicFolder_listUpdateElement(MAP objectValues, STRING objectKey, STRING objectName)

Explanation

Updates the object identified by <objectKey>, from <objectName> list, with attributes <objectValues>. If the map object returned by this method is not empty (update failure) then it contains all wrong properties from <objectValues>.


Graphic Specific Methods

Name

graphic_show

Syntax

graphic_show(STRING graphicName)

Explanation

Sends the content of the graphic identified by <graphicName>. WARNING: this method MUST be called alone, without any other HTML or HSP code, because it sends binary data (image files) to the client and resets HTTP headers.


smtpFilter Specific Methods

Name

smtpFilter_isInited

Syntax

smtpFilter_isInited()

Explanation

Returns true if the smtp filters have been inited (parseFile has been succesfull or overwriteFile was called).


Name

smtpFilter_loadUsage

Syntax

MAP smtpFilter_loadUsage()

Explanation

Loads a vector of events where the smtp filters and conditions can be used.


Name

smtpFilter_loadKeywords

Syntax

MAP smtpFilter_loadKeywords()

Explanation

Retrieves the list of sfl keywords that cannot be used as filter names.


Name

smtpFilter_parseFile

Syntax

MAP smtpFilter_parseFile()

Explanation

Parses the contents of the SMTP filter script file, <workdir>/filters/smtpFilters.scripts. If the file is successfully parsed, the returned MAP contains the following property:

− STRING success

If the smtp filters script file cannot be successfully parsed, the method returns a MAP with two properties:
− STRING error
− NUMBER line - the number of the line where parsing failed


Name

smtpFilter_overwriteFile

Syntax

smtpFilter_overwriteFile()

Explanation

If the existing SMTP filter script file (<workdir>/filters/smtpFilters.scripts) content cannot be successfully parsed, this method can be used in order to overwrite the file with a new one edited by the user with the smtp filter wizard.


Name

smtpFilter_loadFile

Syntax

STRING smtpFilter_loadFile()

Explanation

It returns the content of the SMTP filter script file, <workdir>/filters/smtpFilters.scripts.


Name

smtpFilter_saveFile

Syntax

smtpFilter_saveFile(STRING content)

Explanation

Updates the SMTP filter script file with <content> as text.


Previous contents are overwritten.


Name

smtpFilter_loadList

Syntax

ARRAY smtpFilter_loadList()

Explanation

This method loads the list of SMTP filters into the returned ARRAY, which contains MAP values. Each MAP value has the following properties:

− ARRAY actions - each element has MAP type and has these properties:
    Y STRING type
    Y STRING value
− ARRAY conditions - each element has MAP type and has these properties:
    Y STRING type
    Y STRING value
− STRING enabled - can be "true" or "false"
− NUMBER id
− NUMBER group
− STRING match - can be "all" or "any"
− STRING name


Name

smtpFilter_load

Syntax

MAP smtpFilter_load(NUMBER filterId)

Explanation

This method loads the filter with the specified id in the returned MAP. The MAP element has the same properties as above (smtpFilter_loadList method).


Name

smtpFilter_enable

Syntax

smtpFilter_enable(NUMBER filterId)

Explanation

Enables the filter with the specified id.


Name

smtpFilter_disable

Syntax

smtpFilter_disable(NUMBER filterId)

Explanation

Disables the filter with the specified id.


Name

smtpFilter_add

Syntax

smtpFilter_add(MAP filter)

Explanation

Adds the specified filter to the list of SMTP filters. The MAP must contain the following properties:

− ARRAY actions - each element has MAP type and has these properties:
    Y STRING type
    Y STRING value
− ARRAY conditions - each element has MAP type and has these properties:
    Y STRING type
    Y STRING value
− STRING enabled - can be "true" or "false"
− STRING match - can be "all" or "any"
− STRING name


Name

smtpFilter_update

Syntax

smtpFilter_update(NUMBER filterId, MAP filter)

Explanation

Updates the filter with the specified id with the values from the MAP variable. The MAP variable must contain the same properties as above.


Name

smtpFilter_remove

Syntax

smtpFilter_remove(NUMBER filterId)

Explanation

Removes the filter with the specified id.


Name

smtpFilter_commit

Syntax

smtpFilter_commit()

Explanation

Commits the changes made to the SMTP filters.


Name

smtpFilter_reset

Syntax

smtpFilter_reset()

Explanation

Resets the changes made (but not commited) to the current SMTP filter.


Name

smtpFilter_setOrder

Syntax

smtpFilter_setOrder(STRING order)

Explanation

Sets the filters order. The <order> parameter must contain the id's of the filters in the desired order, comma separated.



Sieve Filters Specific Methods

Name

avFilter_listLoad

Syntax

ARRAY avFilter_listLoad()

Explanation

Returns a list of detected antivirus filters. If <reset> is "true" then the list of antivirus filters is detected again on server. Each object contains the following properties:

− STRING name: the name of the antivirus filter
− STRING status
− STRING path
− STRING address


Name

sieveFilter_init

Syntax

sieveFilter_init(STRING path)

Explanation

Inits the sieve filter wizard by setting the filename that contains the sieve scripts.


Name

sieveFilter_isInited

Syntax

sieveFilter_isInited()

Explanation

Returns true if the sieve filter wizard has been inited.


Name

sieveFilter_loadBlackList

Syntax

ARRAY sieveFilter_loadBlackList()

Explanation

Loads the list of email addresses that have been blacklisted. The ARRAY contains STRINGS.


Name

sieveFilter_addToBlackList

Syntax

sieveFilter_addToBlackList(STRING email)

Explanation

Adds an email address to the black list


Name

sieveFilter_removeFromBlackList

Syntax

sieveFilter_removeFromBlackList(NUMBER email_index)

Explanation

Removes the entry with the email_index position from the black list


Name

sieveFilter_loadList

Syntax

ARRAY sieveFilter_loadList()

Explanation

Loads the list of WebMail filters for the current account. Every element has MAP type and contain the following properties:

− STRING name: the name of the filter
− NUMBER id: the ID of the filter
− STRING enabled: can be "yes" or "no".


Name

sieveFilter_add

Syntax

sieveFilter_add(MAP filter)

Explanation

Adds the filter with the properties specified by <filter>. The MAP can contain the following properties:

− STRING name: name of the filter
− STRING match: can be "all" or "any"
− ARRAY expressions: expressions to be matched; each element has MAP type and can contain the following properties:
    Y STRING header: header to be matched; can be "no header", "subject", "to", "cc", "to or cc", "from", "size", "custom"
    Y STRING customHeader: custom header to be matched; exists only if <header> is "custom"
    Y STRING value: value to be matched on header
    Y STRING condition: can be "is greater than", "is lower than" if <header> is "size" or the <customHeader> is defined and is considered to have a numerical value, or it can be "contains", "is", "begins with", "ends with", "does not contain", "is not", "does not begin with", "does not end with" for any other <header> value
− ARRAY actions: a list of actions to be taken when matching occurs; each element has MAP type and can contain the following properties:
    Y STRING type: can be "no action", "move", "copy", "delete", "forward" or "vacation"

If <type> is "vacation" then the following properties must exist for an action element:
− STRING subject: subject of the message
− STRING text: body of the message
− STRING days: number of days after another message will be sent to the same address

If <type> is not "vacation", then the following property must be defined:
− STRING destination: if <type> is "forward", then <destination> property should contain the e-mail address where the mail will be forwarded; in case <type> is "move" or "copy", then it must contain the name of the folder where the message will be moved or copied.


    For more clarity, examples will follow for each type of filter that can be created. The example below adds a simple filter, which forwards any message that contains the string "[Jokes]" to "jokes@localdomain" email address.


The following example illustrates filtering on a custom header. It checks the custom header "X-Spam" and if it is "**" then it moves the message into "Spam" folder.

The last example illustrates the creation of a responder (<type> is "vacation").


Name

sieveFilter_load

Syntax

MAP sieveFilter_load(NUMBER filterId)

Explanation

Loads the filter with the ID <filterId>. This is the current active filter. The returned MAP element contains the same properties as for filter_add, with the same meanings, and two more properties:

− STRING enabled: it can be "true" or "false"
− NUMBER id: the ID of the filter.


Name

sieveFilter_enable

Syntax

sieveFilter_enable(NUMBER filterId)

Explanation

Enables the filter with the ID <filterId>.


Name

sieveFilter_disable

Syntax

sieveFilter_disable(NUMBER filterId)

Explanation

Disables the filter with the ID <filterId>.


Name

sieveFilter_update

Syntax

sieveFilter_update(NUMBER filterId, MAP filter)

Explanation

Updates the properties contained in <filter> for the filter specified by <filterId> (MAP element has the same properties as for #filter_load method).


Name

sieveFilter_remove

Syntax

sieveFilter_remove(NUMBER filterId)

Explanation

Removes the filter identified by <filterId> from the list of filters.


Name

sieveFilter_commit

Syntax

sieveFilter_commit()

Explanation

Commits the changes made on the current active filter.


Name

sieveFilter_reset

Syntax

sieveFilter_reset()

Explanation

Resets the changes made on the current active filter.


Name

sieveFilter_setOrder

Syntax

sieveFilter_setOrder(STRING order)

Explanation

Sets the filters order. The <order> parameter must contain the id's of the filters in the desired order, comma separated.


AACL Specific Methods

Name

auser_getLoginName

Syntax

STRING auser_getLoginName()

Explanation

Returns the current administrative user's name logged in.


Name

aacl_listLoad

Syntax

ARRAY aacl_listLoad(STRING listType)

Explanation

Loads the list of "agroups"(name and description), "ausers"(name and description), "resources"(name and type), "serverPermissions", "domainPermissions".


Name

principal_create

Syntax

principal_create(STRING prType, STRING prName[, STRING password])

Explanation

Creates a new principal withe name <prName>. His <prType> can be "auser", or "agroup". <password> is required for "auser".


Name

principal_remove

Syntax

principal_remove(STRING prType, STRING prName[, STRING forced])

Explanation

Removes a principal with the name <prName>. His <prType> can be "auser" or "agroup". The "forced" parameter is optionally used for "agroup"; an administrative group with children can be removed only if <forced> is "true"; <forced> is by default considered to be "false".


Name

principal_load

Syntax

MAP principal_load(STRING prType, STRING prName)

Explanation

Returns a map filled with principal's ("auser" or "agroup") properties:

− STRING name (principal's name)
− STRING descriptions (principal's description)
− ARRAY(STRING) parents (principal's parents)
− ARRAY(MAP) resources (principal's resources)
    Y STRING name (resource name)
    Y STRING type (resource type)
    Y ARRAY(STRING) grant (list of permissions granted on this resource)
    Y ARRAY(STRING) deny (list of permissions denied on this resource)


Name

principal_loadEffectivePermissions

Syntax

MAP principal_loadEffectivePermissions(STRING prType, STRING prName, STRING resType, STRING resName)

Explanation

Returns a map filled with principal's ("auser" or "agroup") <prName> effective permissions on the given resource("server" or "domain") <resName> :

− ARRAY(STRING) grant (list of granted permissions)
− ARRAY(STRING) deny (list of denied permissions)


Name

principal_update

Syntax

principal_update(STRING prType, STRING prName, MAP props)

Explanation

Updates principal's properties with <props> ("name", "description" and "password" for auser; "name" and "description" for a group).


Name

principal_addParent

Syntax

principal_addParent(STRING prType, STRING prName, STRING parent)

Explanation

Adds <parent> in <prName> principal's parents list.


Name

principal_removeParent

Syntax

principal_removeParent(STRING prType, STRING prName, STRING parent)

Explanation

Removes <parent> from <prName> principal's parents list.


Name

principal_listLoadAllParents

Syntax

ARRAY principal_listLoadAllParents(STRING prType, STRING prName)

Explanation

Loads all parnets (not only direct parents) of the <prName> principal. The result contains:

− STRING name
− NUMBER level


Name

agroup_listLoadMembers

Syntax

ARRAY agroup_listLoadMembers(STRING groupName)

Explanation

Loads the members of the <groupName> administrative group. The result contains:

− STRING name
− NUMBER level
− STRING type ("auser" or "agroup")


Name

principal_setPermissions

Syntax

principal_setPermissions(STRING prType, STRING prName, ARRAY permissions, STRING resType, STRING resName)

Explanation

Sets new <permissions> for principal <prName> on resource <resName>. <permissions> contains maps with properties:

− STRING name (permission name)
− STRING type (permission type: "grant", "deny", or "revoke")


Name

resource_listLoadPrincipals

Syntax

MAP resource_listLoadPrincipals(STRING resType)

Explanation

Returns the principals list for the resource with type <resType>.<resType> cand be "server" or "domain". If te resource is a domain, domain_load method must be called firstly. The result contains:

− STRING name (principal name)
− STRING type (principal type: "auser" or "agroup")
− ARRAY(STRING) grant (list of grant permissions)
− ARRAY(STRING) deny (list of deny permissions)


Name

resource_checkPermission

Syntax

resource_checkPermission(STRING permission, STRING resType)

Explanation

Returns true if the administrative user logged in has the <permission> on the current resource of type <resType>.<resType> can be "server" or "domain". In case of "domain", domain_load method must be called before.


User Classes / Account Classes Specific Methods

Name

userClass_create

Syntax

userClass_create(STRING userClassName, STRING domainName)

Explanation

Creates a new user class, <userClassName>, for <domainName>. This user class is the new current user class.


Name

userClass_load

Syntax

userClass_load(STRING userClassName, STRING domainName)

Explanation

Loads <userClassName> from <domainName>. This is the new current user class.


Name

userClass_get

Syntax

MAP userClass_get(STRING valuesName)

Explanation

Loads <valuesName> object from the current user class.<valuesName> can be "values", "limits", "inheritedLimits", "quota", "inheritedQuota" or "filterData".


Name

userClass_set

Syntax

MAP userClass_set(MAP values, STRING valuesName)

Explanation

Sets <values> map object to <valuesName> object of current user class. If the map object returned by this method is not empty (set failure) then it contains all wrong properties from <attributes>. <valuesName> can be "values", "limits", "quota" or "filterData".


Name

userClass_commit

Syntax

userClass_commit()

Explanation

Commits changes of current user class.


Name

userClass_listLoad

Syntax

ARRAY userClass_listLoad(STRING objectName)

Explanation

Loads elements of the <objectName> list from the current user class. <objectName> can be: "scriptFilters", "socketFilters", "activeFilters".


Name

userClass_listAdd

Syntax

MAP userClass_listAdd(MAP objectValues, STRING objectName)

Explanation

Adds <objectValues> into <objectName> list of the current user class. If the map object returned by this method is not empty (add failure) then it contains all wrong properties from <objectValues>. <objectName> can be: "scriptFilters", "socketFilters", "activeFilters".


Name

userClass_listRemove

Syntax

userClass_listRemove(STRING objectKey, STRING objectName)

Explanation

Removes element <objectKey> from <objectName> list, from current user class. <objectName> can be: "scriptFilters", "socketFilters", "activeFilters".


Name

userClass_listLoadElement

Syntax

MAP userClass_listLoadElement(STRING objectKey, STRING objectName)

Explanation

Loads the element identified by <objectKey> from <objectName> list, from current user class. <objectName> can be: "scriptFilters", "socketFilters", "activeFilters".



Name

userClass_listUpdateElement

Syntax

MAP userClass_listUpdateElement(MAP objectValues, STRING objectKey, STRING objectName)

Explanation

Updates the object identified by <objectKey>, from <objectName> list, with attributes <objectValues>. If the map object returned by this method is not empty (update failure) then it contains all wrong properties from <objectValues>.<objectName> can be: "scriptFilters", "socketFilters", "activeFilters".


Date Functions

Name

timezone_loadList

Syntax

ARRAY timezone_loadList()

Explanation

Returns a list of strings. Each string represents a timezone.