Skip to main content

Mailing Lists

The Mailing List Management tool provides command-line functionality for managing mailing lists within Stalwart Mail Server. This tool allows for the creation, updating, and viewing of mailing lists, as well as managing list memberships.

General Usage:

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

Create a Mailing List

Command:

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

Options:

  • -d, --description <DESCRIPTION>: Description of the mailing list.
  • -m, --members <MEMBERS>: Initial members of the mailing list.

Example:

stalwart-cli list create -d "Project Updates" -m "[email protected], [email protected]" project.updates [email protected]

Update a Mailing List

Command:

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

Options:

  • -d, --description <DESCRIPTION>: Update the description of the mailing list.
  • -m, --members <MEMBERS>: Update the members of the mailing list.

Example:

stalwart-cli list update -d "Updated Project News" project.updates new.project.updates [email protected]

Add Members to a Mailing List

Command:

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

Example:

stalwart-cli list add-members project.updates [email protected] [email protected]

Remove Members from a Mailing List

Command:

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

Example:

stalwart-cli list remove-members project.updates [email protected]

Display a Mailing List

Command:

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

Example:

stalwart-cli list display project.updates

List Mailing Lists

Command:

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

Example:

stalwart-cli list list 0 10