Skip to content
English

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.

Terminal window
# Create the mailbox (a maildir/store is provisioned automatically)
grommunio-admin user create [email protected]
# Set an initial password (you'll be prompted), or generate a strong one:
grommunio-admin passwd [email protected]
grommunio-admin passwd -a -l 16 [email protected] # auto-generate, 16 chars

The domain (example.com) must already exist — see Create a domain below.

Terminal window
grommunio-admin user show [email protected] # full detail for one user
grommunio-admin user list # all users
grommunio-admin user list -f status=0 jdoe@* # filter + wildcard
Terminal window
# Add an alias address
grommunio-admin user modify [email protected] --alias [email protected]
# Change the interface language
grommunio-admin user modify [email protected] --lang en_US
# Toggle a feature (e.g. disable ActiveSync for this user)
grommunio-admin user modify [email protected] --privEas 0

grommunio-admin user modify --help lists every field, including the per-user feature switches (--privChat, --privVideo, --privFiles, --privDav, --privEas, …), aliases and stored properties.

Terminal window
grommunio-admin user devices [email protected] list # paired EAS devices
grommunio-admin user devices [email protected] resync DEVICE # force a resync
grommunio-admin user devices [email protected] wipe DEVICE # remote wipe
Terminal window
grommunio-admin user delegate [email protected] add [email protected]
grommunio-admin user sendas [email protected] add [email protected]
grommunio-admin user delegate [email protected] list
Terminal window
grommunio-admin user delete -y [email protected] # -y skips the confirmation
Terminal window
# -u sets the maximum number of users for the domain
grommunio-admin domain create -u 100 example.com
Terminal window
grommunio-admin domain list
grommunio-admin domain modify example.com # see --help for fields
grommunio-admin domain delete example.com # soft-delete (recoverable)
grommunio-admin domain purge --files example.com # permanent + remove files

Connect grommunio to an external directory, then import and keep users in sync.

Terminal window
grommunio-admin ldap configure # interactive: server, bind, search base
grommunio-admin ldap check # verify connectivity and the configuration
grommunio-admin ldap search jdoe # find matching directory objects
grommunio-admin ldap dump [email protected] # show the raw LDAP object

Import users (a "down-sync" from the directory into grommunio):

Terminal window
grommunio-admin ldap downsync [email protected] # one user
grommunio-admin ldap downsync -c # complete sync of all mapped users

Fetchmail — 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:

Terminal window
grommunio-admin fetchmail create \
--srcServer mail.old-provider.example \
--srcUser old-account \
--srcPassword 'secret' \
grommunio-admin fetchmail list [email protected]

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/…).

Terminal window
# Empty the Junk folder (soft-delete, like a client would)
gromox-mbop -u [email protected] emptyfld --soft JUNK
# Empty Deleted Items recursively, including subfolders (-R), hard delete
gromox-mbop -u [email protected] emptyfld -R DELETED
Terminal window
gromox-mbop -u [email protected] delmsg -f INBOX 0x1234 0x1235

Soft-deleted ("recoverable") items still occupy space until purged. A typical clean-up, then a compaction, frees the most:

Terminal window
# Hard-delete items soft-deleted more than 30 days ago, across the whole store
gromox-mbop -u [email protected] purge-softdelete -r -t 30d /
# Drop attachment/content files no longer referenced by any message
gromox-mbop -u [email protected] purge-datafiles
# Compact the SQLite store
gromox-mbop -u [email protected] vacuum
Terminal window
gromox-mbop -u [email protected] recalc-sizes

The foreach.* pseudo-command applies an action to many mailboxes at once — ideal for fleet-wide maintenance:

Terminal window
# Purge old soft-deleted items in every mailbox hosted on this server
gromox-mbop foreach.mb.here purge-softdelete -r -t 30d /

grommunio appliances take periodic, space-efficient snapshots of the mailbox storage (on a copy-on-write filesystem such as Btrfs):

Terminal window
/usr/libexec/gromox/gromox-snapshot # create a snapshot now

Schedule it from a systemd timer for regular, low-overhead point-in-time backups. See gromox-snapshot for retention details.

Terminal window
# Open (touch) a mailbox to confirm the store responds
gromox-mbop -u [email protected] ping
# Check a mailbox for inconsistencies (and repair with care)
gromox-mbck [email protected]
# Report a mailbox's size breakdown
gromox-mbsize [email protected]
# Inspect the local delivery queue
gromox-mailq
# Drop into an interactive admin shell (REST API context)
grommunio-admin shell