PHP CLI API

The Axigen Solution: Overview & Architecture

CLIClient is an API that allows easy configuration of Axigen. CLI is an Axigen service that allows configuration of the Axigen mail server. To access CLI, one must enable it and telnet on the port the service binds to, usually 7000. CLI uses contexts in order to group together similar operations, like server configuration (the "server#" context), POP3 service configuration (the "server-pop3#" context) or domain configuration (the "domain#" context). These contexts are positioned in a tree-like structure, so if one wants to configure something, one must go to the necessary context, make the changes through the use of commands and then commit the changes.

The CLIClient assigns objects to the various CLI contexts. These objects embed all the properties specific to a CLI context - for example the "domain" object has the 'name' property representing the domain name, like "mydomain.com". Also, the CLIClient has various methods for getting and setting the object properties. Once changes on the object are finalized, the object configuration can be saved back to Axigen, thus committing the changes. Also, the CLIClient has methods that return other objects, for example from the "account" object one can obtain the "quotas" object, representing the restrictions for that specific account. Naturally, Axigen's CLI service must be enabled for the CLIClient library to configure that server.

Examples:

  • Create a new domain
  • List all the domains