API Reference - IceWarp

Transcription

IceWarp Unified CommunicationsAPI ReferenceVersion 10.4Printed on 5 April, 2012

ContentsIceWarp Server API1Introduction . 2API COM Object. 3Introduction . 3IceWarpServer.APIObject . 4Init . 7Done . 7UpdateConfiguration . 7ReloadServices . 8BackupConfig and RestoreConfig . 8SpamIndexNow . 8Save . 8Example:. 8GetDomainCount. 9GetDomainList . 9DeleteDomain . 9RenameDomain . 9GetDomain . 9OpenDomain, NewDomain. 9Example:. 10GetDomainIndex . 10LastErr . 10GetSchedule . 10SetSchedule . 10

iiContentsGetUserStatistics, GetUserStatisticsDays . 10CreateTables, DropTables, CheckDBConnection . 10Challenge Response functions . 11IceWarpServer.DomainObject . 11Name . 12Open, New . 12Delete . 12GetProperty, SetProperty, IPAddress, Save . 13Example:. 13GetAccountCount . 13GetAccountList . 13DeleteAccount, DeleteAccountID . 13GetAccount. 14OpenAccount, NewAccount . 14Example:. 14GetAccountIndexByAlias . 14LastErr . 14IceWarpServer.AccountObject . 14Domain . 15EmailAddress . 16New, Open. 16Delete . 16SetProperty, GetProperty, Save . 16Example . 16AuthenticateUser, AuthenticateUserHash, ValidateUser . 17FindInit, FindNext, FindDone, FindInitQuery . 17MailboxConvertMessages . 18

IceWarp Server APILastErr . 18IceWarpServer.RemoteAccountObject . 18LastErr . 19Count . 19New . 19Open . 19Delete, DeleteIndex . 20GetSchedule . 20SetSchedule . 20Example . 20IceWarpServer.ScheduleObject . 21LastErr . 21Count . 21Add . 21Delete . 22Select . 22SetProperty, GetProperty . 22Example . 22IceWarpServer.StatisticsObject . 23IsRunning . 24Reset. 24Poll. 24GetProperty . 24Start, Stop . 24Example . 24IceWarpServer.TokenObject . 25iii

ivContentsExample . 26IceWarpCOM.Mailer . 26IceWarpCOM.IMMessage . 27IceWarpCOM.IDP . 28IceWarpCOM.IceWarpLicense . 29IceWarpCOM.Groupware . 29IceWarpCOM.ChallengeResponse . 30Examples . 30Creating New Domain . 30Creating New User . 31Deleting User . 31COM Usage under PHP . 32Creating Object. 32Working with Object . 32Working with Domain . 33Working with Accounts . 33Creating Domain. 34Creating Account . 34List all Accounts in all Domains . 34RPC . 36Tool.exe . 38Usage . 38Commands . 38Options . 39Parameters . 40Examples . 40Create New Domain . 40

IceWarp Server APICreate Accounts Using Name, Pass and Comment . 40Display Comments of All doe.com Accounts . 40Export All Accounts of doe.com Where Comment Contains Word "first" to File doe com.csv Using -filter Option . 41Export All Accounts of doe.com to csv File (base64 Encoded) . 41Display Comments of All doe.com Accounts . 41Delete All Domain Accounts . 41Import Accounts from File . 41Modify Comment of All Accounts @doe.com . 41Delete All Accounts of doe.com Domain and Delete doe.com Domain . 41Show some System Variables . 41Change System Variable . 41Display some Information . 42Create Remote Account . 42Upgrade Database from Version 8.0.3 to Current . 42Display All Domains on Remote Server and its Description . 42Display Variables of Object . 42Accessing a Remote Server . 42Using Filters . 43Example . 43Command Line Tool. 44Sendmail.exe . 46Config.exe. 47API Variables . 48Function Result Codes . 48Configuration . 49Version & License . 49v

viContentsDomains . 50Domain . 50Limits . 50Options . 51Accounts . 52Accounts, Shared . 52User Account . 52Read-only Variables . 52User . 53Mailbox . 53Limits . 54Options . 55Responder . 55B&W List. 56Group Account . 56Group . 56Members . 57Options . 57Rules . 57Mailing List Account . 57Mailing List . 57Message . 58Security . 59Options . 59Rules . 60List Server Account . 60List Server . 60

IceWarp Server APILists . 61Options . 61Rules . 61Executable Account . 61Executable . 61Rules . 62Remote Account . 62Remote Account. 62Options . 63DomainPop. 63Static Route Account . 64Static Route . 64Notification Account. 64Notification . 64Options . 65Rules . 66Catalog Account . 66Catalog . 66Options . 66Rules . 66Global Settings . 67Accounts . 67Domains . 67Advanced . 67Policies . 68Login Policy . 68vii

viiiContentsPassword Policy . 68System . 69System Services . 69SMTP Service . 69POP3 Service . 69IMAP Service . 70Web / Control Service . 70FTP Service . 71GroupWare Service . 71Instant Messaging Service . 72LDAP Service . 72System Logging . 73General. 73Services . 73System Tools. 75System Backup Tool .

The IceWarp Server API is an application programming interface for developers who wish to maintain basic tasks with the IceWarp Email Server objects. These tasks can maintain domains, accounts and other global server settings. The API can be used in several different ways, including the COM object, RPC or the direct API library linking.