Accounts
Overview
Account management is done using the CLI command account
which, if executed without parameters,
returns the available subcommands:
$ stalwart-cli -u https://jmap.example.org account
Manage user accounts
USAGE:
stalwart-cli --url <URL> account <SUBCOMMAND>
OPTIONS:
-h, --help Print help information
SUBCOMMANDS:
add-alias Add e-mail aliases to a user account
create Create a new user account
delete Delete an existing user account
display Display an existing user account
help Print this message or the help of the given subcommand(s)
list List all user accounts
remove-alias Add e-mail aliases to a user account
update Update an existing user account
Create
User account creation is done using the account create
subcommand. It accepts the following arguments:
Create a new user account
USAGE:
stalwart-cli account create [OPTIONS] <EMAIL> <PASSWORD> <NAME>
ARGS:
<EMAIL> Login email address
<PASSWORD> Password
<NAME> Account Name
OPTIONS:
-d, --description <DESCRIPTION> Account description
-e, --email-aliases <EMAIL_ALIASES> E-mail address aliases
-h, --help Print help information
-q, --quota <QUOTA> Quota in bytes
-t, --timezone <TIMEZONE> Timezone
For example, to create the user John Doe with e-mail address [email protected]
(which is also the login name) and password secret_pass
:
$ stalwart-cli -u https://jmap.example.org account create [email protected] secret_pass "John Doe"
Account '[email protected]' successfully created.
Display
User account details are obtained using the account display
subcommand. For example:
$ stalwart-cli -u https://jmap.example.org account display [email protected]
+-------------+------------------+
| E-mail | [email protected] |
+-------------+------------------+
| Name | John Doe |
+-------------+------------------+
| Description | |
+-------------+------------------+
| Quota | |
+-------------+------------------+
| Timezone | |
+-------------+------------------+
| Aliases | |
+-------------+------------------+
List
User accounts are listed using the account list
subcommand. It accepts an optional parameter
to filter the accounts list by a keyword. For example:
$ stalwart-cli -u https://jmap.example.org account list
+------------------+--------------------+-------------+-------+
| E-mail | Name | Description | Quota |
+------------------+--------------------+-------------+-------+
| admin | Administrator | | |
+------------------+--------------------+-------------+-------+
| [email protected] | Jane doe | | |
+------------------+--------------------+-------------+-------+
| [email protected] | John Doe | | |
+------------------+--------------------+-------------+-------+
3 records found.
Or using the filter:
$ stalwart-cli -u https://jmap.example.org account list john
+------------------+--------------------+-------------+-------+
| E-mail | Name | Description | Quota |
+------------------+--------------------+-------------+-------+
| [email protected] | John Doe | | |
+------------------+--------------------+-------------+-------+
1 record found.
Update
User account updates are done using the account update
subcommand. It accepts the following arguments:
Update an existing user account
USAGE:
stalwart-cli account update [OPTIONS] <EMAIL>
ARGS:
<EMAIL> Account email address
OPTIONS:
-d, --description <DESCRIPTION> Update account description
-h, --help Print help information
-n, --name <NAME> Update account name
-p, --password <PASSWORD> Update password
-q, --quota <QUOTA> Update quota in bytes
-t, --timezone <TIMEZONE> Update timezone
For example, to change an account password:
$ stalwart-cli -u https://jmap.example.org account update [email protected] -p new_pass
Account '[email protected]' successfully updated.
Aliases
E-mail aliases for an account are managed using the subcommands account add-alias
and
account remove-alias
. Both subcommands expect a list of e-mail addresses aliases to add or remove.
For example, to add multiple e-mail aliases to an account:
$ stalwart-cli -u https://jmap.example.org account add-alias [email protected] \
[email protected] [email protected]
Account '[email protected]' successfully updated.
And, to remove an e-mail alias:
$ stalwart-cli -u https://jmap.example.org account remove-alias [email protected] \
[email protected] [email protected]
Account '[email protected]' successfully updated.
Delete
User accounts are removed using the account delete
subcommand. For example:
$ stalwart-cli -u https://jmap.example.org account delete [email protected]
Account '[email protected]' successfully deleted.