Zum Inhalt springen
Deutsch

Allgemeine Verwaltungsaufgaben

Ein praktisches Handbuch für die Aufgaben, die Administratoren am häufigsten ausführen. Jeder Befehl wird auf dem grommunio-Server als root (oder mit sudo) ausgeführt. Identifizieren Sie einen Benutzer anhand seiner E-Mail-Adresse ([email protected]); fügen Sie --help an einen beliebigen grommunio-admin-Befehl an, um alle dessen Optionen anzuzeigen.

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

Die Domäne (example.com) muss bereits vorhanden sein – siehe Domäne erstellen weiter unten.

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 listet alle Felder auf, einschließlich der benutzerspezifischen Funktionsschalter (--privChat, --privVideo, --privFiles, --privDav, --privEas, …), Aliase und gespeicherte Eigenschaften.

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

Verbinden Sie grommunio mit einem externen Verzeichnis, importieren Sie anschließend die Benutzer und halten Sie sie synchron.

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

Benutzer importieren (ein „Down-Sync“ aus dem Verzeichnis in grommunio):

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

Fetchmail – E-Mails aus einem Remote-Postfach abrufen

Abschnitt betitelt „Fetchmail – E-Mails aus einem Remote-Postfach abrufen“

Nützlich bei Migrationen, um E-Mails vom alten Provider eines Benutzers abzurufen:

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

Diese Aufgaben verwenden gromox-mbop („Postfach- Operationen“), die immer auf ein Postfach mit der Nummer -u abzielen. Ordner können durch symbolischen Namen (INBOX, SENT, DRAFT, JUNK, DELETED, …) oder über den Pfad (/Top of Information Store/…) angegeben werden.

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

Weichgelöschte („wiederherstellbare“) Elemente belegen weiterhin Speicherplatz, bis sie endgültig gelöscht werden. Eine typische Bereinigung, gefolgt von einer Komprimierung, schafft den meisten Speicherplatz frei:

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

Der Pseudo-Befehl foreach.* wendet eine Aktion gleichzeitig auf mehrere Postfächer an — ideal für flottenweite Wartungsarbeiten:

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 erstellen regelmäßig platzsparende Snapshots des Postfachspeichers (auf einem Copy-on-Write-Dateisystem wie Btrfs):

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

Planen Sie dies über einen systemd-Timer, um regelmäßige, ressourcenschonende Zeitpunkt-Backups durchzuführen. Einzelheiten zur Aufbewahrungsdauer finden Sie unter gromox-snapshot].

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