Command-line administration
Almost everything you can do in the grommunio Admin UI — and a good deal more — can be driven from the shell on the grommunio server. The command line is the fastest way to perform bulk changes, script recurring jobs, and reach low-level mailbox operations that have no UI equivalent.
There are two families of tools, and it helps to know which layer you are working at.
grommunio-adminThe high-level management CLI. Create and modify users, domains, organizations and mailing lists; configure LDAP/AD and fetchmail; manage passwords, services and configuration. Operates on the same data as the Admin UI / REST API.
Gromox CLI utilitiesThe low-level tools that act directly on stores and mailboxes — gromox-mbop (mailbox operations), store creation, check/repair, sizing, snapshots and import/export. Use these for maintenance and data-level tasks.
Which tool do I reach for?
Section titled “Which tool do I reach for?”| You want to … | Use |
|---|---|
| Create / modify / delete a user or domain | grommunio-admin user, grommunio-admin domain |
| Set or reset a password | grommunio-admin passwd |
| Connect / synchronize an LDAP or Active Directory | grommunio-admin ldap |
| Pull mail from a remote mailbox | grommunio-admin fetchmail |
| Empty a folder, delete messages, purge soft-deleted items | gromox-mbop |
| Reclaim disk space in a store | gromox-mbop (vacuum, purge-datafiles) |
| Check or repair a mailbox | gromox-mbck |
| Report a mailbox's size | gromox-mbsize |
| Run a one-off action across all mailboxes | gromox-mbop foreach.* |
Conventions
Section titled “Conventions”Run these commands on the grommunio server, as root (or with sudo). A few
conventions recur throughout the reference:
USERSPEC/MBSPEC— a user is identified by e-mail address ([email protected]); some commands also accept a numeric ID.grommunio-admin <area> <action>— the management CLI is organized into areas (user,domain,ldap, …), each with its own actions (create,modify,list,delete, …). Append--helpat any level.gromox-mbop -u <mailbox> <action>— the mailbox-operations tool always takes the target mailbox with-u, followed by one or more actions.- Destructive commands are flagged with a caution admonition — read those before running them in production.
Offline reading
Section titled “Offline reading”This section is also available to download for offline use: