Can i add users via stalwart-cli to the mailserver?

Your question

can i add users via stalwart-cli to the mailserver?

I understand that topics in this category are triaged by a bot first but a human reply will follow up. If I’d prefer a human-only reply, I’ll add the no-ai tag to my topic.

on

Yes, you can add users via stalwart-cli. The command uses create Account/User with the required fields. Here is a minimal example:

stalwart-cli create Account/User \
  --field name=alice \
  --field 'domainId=<Domain id>' \
  --field 'credentials={}' \
  --field 'memberGroupIds={}' \
  --field 'roles={"@type":"User"}' \
  --field 'permissions={"@type":"Inherit"}' \
  --field 'quotas={}' \
  --field 'aliases={}' \
  --field 'encryptionAtRest={"@type":"Disabled"}'

You can also get, query, update, and delete accounts the same way. Note that this only applies when using the internal directory – if you are using an external directory (LDAP, SQL, OIDC), you need to manage users through that external system instead.

Full details, including all available fields, are in the Account object reference and the CLI reference.

This is an automated reply from the Stalwart Help Bot. Other community members may follow up if this answer is incomplete or wrong.

if the user name is e.g. vorname.nachnahme, do i need brackets?
and how is a valid quota defined?

Yes, you can add users using the CLI. Use the describe command to see the syntax to set an account quota.

the command worked, but there are so many options. how can i get a more detailed description?

I got it to work now.
thanks for the great software!