Webadmin command-line interface is an upcoming replacement for the outdated, security-vulnerable JMX command-line interface. It also aims at providing a more modern and intuitive interface.
General syntax to run the command line
$ ./james-cli [OPTION] ENTITY ACTION {ARGUMENT}
where
OPTION: optional parameter when running the command line, ENTITY: represents the entity to perform action on, ACTION: name of the action to perform, ARGUMENT: arguments needed for the action.
Example:
$ ./james-cli --url http://127.0.0.1:9999 domain list
The above command lists all domain names available on domain route at address http://127.0.0.1:9999. It does not require any argument to execute. Options --url are optional. Without it, the default value is http://127.0.0.1:8000. As for other commands, arguments might be required after the sub-command (ACTION such as list, add and remove).
Note: the command line before ENTITY will be documented as {cli}.
Add a domain to the domain list.
{cli} domain create <domainToBeCreated>
Resource name domainToBeCreated:
Remove a domain from the domain list.
{cli} domain delete <domainToBeDeleted>
Note: Deletion of an auto-detected domain, default domain or of an auto-detected ip is not supported. We encourage you instead to review your domain list configuration.
Check whether a domain exists on the domain list or not.
{cli} domain exist <domainToBeChecked>
Show all domains' name on the list.
{cli} domain list
Add a user to the user list.
{cli} user create <username> <password>
Resource name representing valid users, hence it should match the criteria at User Repositories documentation
Note: if the user exists already, its password will be updated.
Check whether a user exists on the user list or not.
{cli} user exist <username>
Resource name representing valid users, hence it should match the criteria at User Repositories documentation
Remove a user from the user list.
{cli} user delete <username>
Show all users' name on the list.
{cli} user list
Same as Create, but a user need to exist.
If the user do not exist, then it will be created.