Common administration tasks
A practical cookbook for the jobs administrators run most often. Every command
is run on the grommunio server as root (or with sudo). Identify a user by
e-mail address ([email protected]); append --help to any grommunio-admin
command to see all its options.
Users & passwords
Section titled “Users & passwords”Create a user and set a password
Section titled “Create a user and set a password”# Create the mailbox (a maildir/store is provisioned automatically)
# Set an initial password (you'll be prompted), or generate a strong one:The domain (example.com) must already exist — see
Create a domain below.
Inspect, list and search users
Section titled “Inspect, list and search users”grommunio-admin user list # all usersgrommunio-admin user list -f status=0 jdoe@* # filter + wildcardModify a user
Section titled “Modify a user”# Add an alias address
# Change the interface language
# Toggle a feature (e.g. disable ActiveSync for this user)grommunio-admin user modify --help lists every field, including the per-user
feature switches (--privChat, --privVideo, --privFiles, --privDav,
--privEas, …), aliases and stored properties.
Manage mobile devices
Section titled “Manage mobile devices”Delegation and send-as
Section titled “Delegation and send-as”Delete a user
Section titled “Delete a user”Domains & organizations
Section titled “Domains & organizations”Create a domain
Section titled “Create a domain”# -u sets the maximum number of users for the domaingrommunio-admin domain create -u 100 example.comList, modify and remove domains
Section titled “List, modify and remove domains”grommunio-admin domain listgrommunio-admin domain modify example.com # see --help for fieldsgrommunio-admin domain delete example.com # soft-delete (recoverable)grommunio-admin domain purge --files example.com # permanent + remove filesLDAP / Active Directory
Section titled “LDAP / Active Directory”Connect grommunio to an external directory, then import and keep users in sync.
grommunio-admin ldap configure # interactive: server, bind, search basegrommunio-admin ldap check # verify connectivity and the configurationgrommunio-admin ldap search jdoe # find matching directory objectsImport users (a "down-sync" from the directory into grommunio):
grommunio-admin ldap downsync -c # complete sync of all mapped usersFetchmail — pull mail from a remote mailbox
Section titled “Fetchmail — pull mail from a remote mailbox”Useful during migrations to collect mail from a user's old provider:
grommunio-admin fetchmail create \ --srcServer mail.old-provider.example \ --srcUser old-account \ --srcPassword 'secret' \
Mailbox maintenance
Section titled “Mailbox maintenance”These tasks use gromox-mbop ("mailbox
operations"), which always targets a mailbox with -u. Folders can be given by
symbolic name (INBOX, SENT, DRAFT, JUNK, DELETED, …) or by path
(/Top of Information Store/…).
Empty a folder
Section titled “Empty a folder”# Empty the Junk folder (soft-delete, like a client would)
# Empty Deleted Items recursively, including subfolders (-R), hard deleteDelete specific messages
Section titled “Delete specific messages”Reclaim disk space
Section titled “Reclaim disk space”Soft-deleted ("recoverable") items still occupy space until purged. A typical clean-up, then a compaction, frees the most:
# Hard-delete items soft-deleted more than 30 days ago, across the whole store
# Drop attachment/content files no longer referenced by any message
# Compact the SQLite storeRecompute the reported store size
Section titled “Recompute the reported store size”Run an action across every mailbox
Section titled “Run an action across every mailbox”The foreach.* pseudo-command applies an action to many mailboxes at once —
ideal for fleet-wide maintenance:
# Purge old soft-deleted items in every mailbox hosted on this servergromox-mbop foreach.mb.here purge-softdelete -r -t 30d /Backups & snapshots
Section titled “Backups & snapshots”grommunio appliances take periodic, space-efficient snapshots of the mailbox storage (on a copy-on-write filesystem such as Btrfs):
/usr/libexec/gromox/gromox-snapshot # create a snapshot nowSchedule it from a systemd timer for regular, low-overhead point-in-time
backups. See gromox-snapshot for retention details.
Diagnostics & troubleshooting
Section titled “Diagnostics & troubleshooting”# Open (touch) a mailbox to confirm the store responds
# Check a mailbox for inconsistencies (and repair with care)
# Report a mailbox's size breakdown
# Inspect the local delivery queuegromox-mailq
# Drop into an interactive admin shell (REST API context)grommunio-admin shell