Saturday, August 29, 2009

Using Axigen Command Line Interface

After the use of the axigen-cfg-wizard to setup a domain
I noticed the following after installing the license key and restart of Axigen.

I could not access my mail using webmail or use the GUI
I found the answer in the knowledgebase of Axigen.
After installation of the license belonging to the free version you may only have one domain. I remembered that I had left the original also in the config so I had 2 domains which is not allowed. Therefore no domain was present.

And here comes the CLI to the rescue:

To start the CLI: telnet 127.0.0.1 7000
root@opensolaris:/var/opt/axigen/webadmin# telnet 127.0.0.1 7000
Trying 127.0.0.1...
Connected to 127.0.0.1.
Escape character is '^]'.
Welcome to AXIGEN's Command Line Interface
You must login first. For a list of available commands, type HELP
user admin
xxxxx
For a list of available commands, type HELP
+OK: Authentication successful
<#> help
-------------------------------------
The commands available for the Initial context are:
EXIT/QUIT - exits CLI and closes connection to AXIGEN
HELP - prints this help message

LIST Domains [wildcard (ex: domain*)] - lists the domains of this server
LIST domainActivationRequests - lists the requests made for domain registration

CLEAR domainActivationRequests - clear the list of requests not pending

SAVE CONFIG [] - saves the server's running configuration (a suffix will be added)

CONFIG SERVER - enters the Server context

SET admin-password - sets the admin password (max. 32 chars) (OBSOLETE - kept for backward compatibility)

CHANGE password oldPassword newPassword - changes your password (max. 32 chars)

ENTER QUEUE - enters the Queue context
ENTER AACL - enters the Administrative ACL context

CREATE Domain name domainLocation postmasterPassword - creates a domain (changes context)
CREATE Subdomain prefix parentDomain postmasterPassword - creates a subdomain (changes context)
REGISTER Domain domainLocation - registers a domain to the server (changes context)
UNREGISTER Domain name - unregisters a domain from the server

UPDATE Domain name - updates a domain from the server (changes context)
SHOW Domain name [ATTR ] - shows the given domain
-------------------------------------
<#> list domains
The list of domains for the server:
+OK: command successful
<#> create domain name solsan domainlocation /var/opt/axigen/domains/solsan postmasterpassword xxxxx
+OK: command successful
commit
committing changes and switching back to previous context.
This operation might take some time. Please wait....
+OK: command successful

<#> list domains
The list of domains for the server:

name Total Used
------------------------------------------------------------
solsan 20Kb 20Kb

+OK: command successful
<#> help
-------------------------------------
<#> exit
WARNING: all changes made and not committed are lost
connection to AXIGEN closing.
+OK: have a nice day
Connection to 127.0.0.1 closed by foreign host.
root@opensolaris:/var/opt/axigen/webadmin# /etc/init.d/axigen restart
Stopping AXIGEN Mail Server... DONE
Starting AXIGEN Mail Server... DONE
root@opensolaris:/var/opt/axigen/webadmin# /etc/init.d/axigen reload
Reloading AXIGEN configuration... DONE
root@opensolaris:/var/opt/axigen/webadmin# /etc/init.d/axigen restart
Stopping AXIGEN Mail Server... DONE
Starting AXIGEN Mail Server... DONE
root@opensolaris:/var/opt/axigen/webadmin#