Table of Contents

11. Configuring AXIGEN using CLI

11.1. Connecting to CLI

11.2. Troubleshoot the CLI Connection

11.3. Common commands

11.4. Context Specific Commands (I)

11.5. Context Specific Commands (II)

11.6. Special Contexts

11.6. Special Contexts

The action of each command may differ in specific contexts that represent exceptions to the general behavior. As said before, some contexts have additional commands that have an exceptional character. Thus a detailed overview of each context is presented below.


Login Context

prompt: <login>
parent: none


The login context is used only for authentication and has the following commands: HELP, USER, EXIT/QUIT, SET. The USER command usage is USER <username>.

This context is associated with the maxAuthErrors config parameter: when this parameter is exceeded, the connection is closed; the maxAuthCommands parameter also applies to this context: if the number of commands issued is greater (with or without error), the connection is closed.

In this context, global options can be set. The CONSOLE-CODES option allows console codes used for colors to be turned on/off. The QUIET option, if set to on, will display in all contexts and with all commands only the minimum amount of text needed to present the information, thus making the output script friendly.

WARNING: If the CONSOLE_CODES option is set to off, the password will also be visible in the command line (not applicable if connecting through a script).


Initial Context

prompt: <#>
parent: none


The initial context is the starting point of configuring the server. Here, several actions can be started: domain configuration (including accounts
and lists), server configuration and also reports can be viewed. Also, the Commands context is accessible from here where some commands can be issued to the server.

This context does not have COMMIT/DONE or CANCEL commands because it is the first context. It neither has SHOW without parameters because it is not related to any config object.

From the Initial context, we can access the REPORTING, MIGRATION and COMMANDS contexts which are detailed below. The LIST DOMAINDATA command is here because a domain database location must be provided when adding a domain.

The ADD DOMAIN command, takes 2 parameter-value pairs, one for setting the domain name and one for specifying in which domain database location the domain should be created.

Reporting Context

prompt: <reporting#>
parent: Initial


This context is for viewing various reports for the server. It has the BACK command for switching back to the Initial context but does not have COMMIT/DONE because it is a read-only context.

The commands available are: VIEW CONTORS with a parameter of all, others and domain. If domain is the parameter, a value must be specified, that is, a list of domains separated by '+'. The list must be in double quoted format. Another command is VIEW QUEUE which displays a snapshot of the mail queue and information on the emails in processing stage.

The VIEW CONTORS domain command, makes a sum of all counter of the domains given as parameters. If a domain does not exist, it will not be counted in the sum. This means, to an extent, that if the list is made of one or more domains that do not exist, the list will show for all counters, a value of 0.

Server Context

prompt: <server#>
parent: Initial

The server context is where the server configuration is started. It has commands for entering the configuration context of every service for configuring filters and domain database locations, etc.

It has the common commands CANCEL, COMMIT, HELP, QUIT/EXIT, and SHOW. The SHOW command will show the value parameters of the server like services, primaryDomain, etc. In the case of the services param, it will show the services started but it is updated only when the server context is entered or left with commit or cancel. So if a service was stopped while in the server context, it will not show up stopped.

The SET command, will set the one or more param-value pairs that are given as parameters. In the case of the services value parameter, it will stop or start the services only when COMMIT is issued. If CLI is removed from the list of services, it will be stopped at COMMIT but it will show up as started when SHOW is issued.

The ADD FILTER command, takes 3 parameter-value pairs because the respective values are required.

The commands for configuring the services are CONFIG <SERVICE_NAME> and the context will switch to the one corresponding to that specific service.

From this context domains database locations can be managed. Thus there are functions to LIST, ADD, REMOVE, CREATE and DESTROY a domain database location. Before a location can be added, it must be created, otherwise the commit command will fail and no location will be added. The CREATE command, aside from the path, takes an additional parameter: an unique id that has to be from 0 to 255. It is impossible to add two locations with the same id on the server's list.

Commands Context

prompt: <commands#>
parent: Initial


The Commands context is a special context that allows the remote administrator to issue commands to the server. It has two sub-contexts, the Server and Storage contexts that will be described below.

Directly from the Commands context, the password for the CLI and WebAdmin sessions can be changed and the two sub-contexts can be entered.

As in the case of MIGRATION and REPORTING contexts, the COMMANDS context has the BACK command for switching back to the Initial context and does not have COMMIT/DONE commands.

Commands-Server Context

prompt: <commands-server#>
parent: Commands


The Server sub-context, is used to issue server-related commands to AXIGEN.

There is a command for trying to force all mail in the queue to be processed and/or sent, regardless of their rescheduled time. This command is FORCE QUEUE.

The command SAVE CONFIG, saves the configuration. If no parameter is given, it will be saved in the default location. If a path parameter is given, it will be saved in that location but for security reasons, a suffix will be added to the file. The SHOW CONFIG command, will dump the configuration as it is written in the config file. This command is also available from the Initial and Initial-Server contexts.

The START/STOP service command will start/stop a service immediately without the need for COMMIT command as in the case where services are modified from the Initial-Server context.

Commands-Storage Context

prompt: <commands-storage#>
parent: Commands

This context allows several operations with the AXIGEN Storage System. The storage system, is composed of Message Containers, where messages for a certain domain are kept.

The operations available are LIST containers, CHECK container, COMPACT container, LOCK container and UNLOCK container.

The LIST container command takes as parameter the domain name and lists all message containers available for that domain.

The LOCK and UNLOCK container commands, as their names suggest, lock and unlock the container given as parameter, meaning respectively that messages can or cannot be stored. These commands are useful when a snapshot of the container needs to be saved.

The CHECK container command, starts a check on the structure of a certain container. After a check is started, the status can be seen by issuing the LIST containers command.

The COMPACT container command, will start a defragmentation of the specified container and, similarly to CHECK, issuing the LIST command will show the status of the container.

The optional parameter priority, if set to high, will increase the speed of that operation but the container will be unavailable to any service, even for reading. The default value is low.

Migration Context

prompt: <migration#>
parent: Initial

The Migration context, allows messages to be migrated from other servers to AXIGEN. The common commands are the same as in the case of REPORTING and COMMANDS and it has one command with many parameters for migration.

The MIGRATE command will migrate all emails from an account on a remote server using the IMAP protocol. The migration is completed when the entire directory structure is migrated.

The mandatory domain and account parameters, will identify an account into which the messages will be migrated. The remoteHost, remotePort, remoteUser and remotePass parameters are self explanatory.

All the optional parameters have the default value of no. A complete list of commands available in each AXIGEN context is available in the CLI Context Specific Commands page.