Skip to main content

Groups

The Group Management tool offers a range of commands to manage groups within the Mail Server. This tool facilitates the creation, updating, and maintenance of groups, along with adding or removing members.

General Usage:

stalwart-cli --url <URL> group <COMMAND>
  • --url <URL>: The URL of Stalwart Mail Server.
  • <COMMAND>: The specific group management command to execute.

Create a Group

Command:

stalwart-cli group create [OPTIONS] <NAME> [EMAIL]
  • <NAME>: The name of the group.
  • [EMAIL]: Optional group email address.

Options:

  • -d, --description <DESCRIPTION>: Group description.
  • -m, --members <MEMBERS>: Initial group members.

Example:

stalwart-cli group create -d "Engineering Team" -m [email protected] -m [email protected] engineering [email protected]

Update a Group

Command:

stalwart-cli group update [OPTIONS] <NAME> [NEW_NAME] [EMAIL]
  • <NAME>: The name of the group to update.
  • [NEW_NAME]: Optional new name for the group.
  • [EMAIL]: Optional new email address for the group.

Options:

  • -d, --description <DESCRIPTION>: Update group description.
  • -m, --members <MEMBERS>: Update group members.

Example:

stalwart-cli group update -d "Updated Engineering Team Description" engineering new.engineering [email protected]

Add Members to a Group

Command:

stalwart-cli group add-members <NAME> <MEMBERS>...
  • <NAME>: The name of the group.
  • <MEMBERS>: The members to add to the group.

Example:

stalwart-cli group add-members engineering alice bob

Remove Members from a Group

Command:

stalwart-cli group remove-members <NAME> <MEMBERS>...
  • <NAME>: The name of the group.
  • <MEMBERS>: The members to remove from the group.

Example:

stalwart-cli group remove-members engineering alice

Display a Group

Command:

stalwart-cli group display <NAME>
  • <NAME>: The name of the group to display.

Example:

stalwart-cli group display engineering

List Groups

Command:

stalwart-cli group list [FROM] [LIMIT]
  • [FROM]: The starting point for listing groups.
  • [LIMIT]: The maximum number of groups to list.

Example:

stalwart-cli group list 0 10