gromox-mbop(8gx)

Name
gromox-mbop — Mailbox operations utility

Synopsis
gromox-mbop {-d mbox|-u [user]@d.de} command [command-args...]

Global options

-d /var/lib/gromox/user/1/2
    Lookup the mailbox parameters from the associated filesystem location.

-u [user]@example.com
    Lookup the mailbox parameters by the associated username. (To access a public store of a domain, leave out the local part, i.e. use @example.com.)

Commands

•   clear-photo: delete user picture

•   clear-profile: delete user's PHP-MAPI profile

•   delmsg: issue "delete_message" RPCs for a mailbox

•   purge-datafiles: remove orphaned attachments/content files from disk

•   purge-softdelete: remove soft-deleted items from a folder

•   unload: issue the "unload_store" RPC for a mailbox

•   vacuum: issue the "vacuum" RPC for a mailbox

clear-photo
The clear-photo command will delete the user picture. Note that, when there is no mailbox-level profile picture set, Gromox server processes may serve an image from another source, e.g. LDAP.

clear-profile
Similar to MSMAPI, PHP-MAPI keeps a MAPI profile which contains a store list and also the settings for grommunio-web. The clear-profile command will delete the copy of this data stored in exmdb. Note that zcore(8) may still hold a copy of the MAPI profile in memory and could write that back to exmdb, nullifying the effect of the clear-profile command. Also, if the store list is absent, a new one will implicitly be created when PHP-MAPI/zcore is used.

delmsg

  Synopsis
gromox-mbop -u a@b.de delmsg -f folder_spec [msgid...]

  Description
This command hard-deletes messages from a store, including issuing proper PR_CHANGE_KEY metadata updates for the sake of Cached Mode clients.

The folder and message IDs taken as arguments on the command-line should be of the GC-value form, i.e. as they appear in the the SQLite database.

  Subcommand options

-f folder_spec
    The folder from which to delete the messages. See below for details. (If a msgid is specified which is not located in the particular folder, that message will not be deleted.)

--soft
    Perform a soft deletion.

emptyfld

  Synopsis
gromox-mbop -u a@b.de emptyfld [-R] [--soft] folder_spec...

  Description
This command deletes messages from a folder.

  Subcommand options

-R  Besides messages, also delete subfolders.

--soft
    Perform a soft deletion. (This feature is experimental.) Default is hard.

purge-datafiles
The "purge-datafiles" RPC makes exmdb_provider remove attachment and content files from disk that are no longer referenced by any message.

purge-softdelete

  Synopsis
gromox-mbop -u a@b.de purge-softdelete [-r] [-t timespec] folder_spec...

  Description
This command removes all messages from a folder which are marked as softdeleted. (The entire mailbox can be processed by specifying the root folder plus the -r option.)

  Subcommand options

-r  Recurse into subfolders.

-t timespec
    Specifies the minimum age that soft-deleted messages must have before they are hard-deleted. timespec can be something like 1d12h. A number of units are recognized (short and long forms): s/sec/second(s), min/minute(s), h/hour(s), d/day(s), week(s), month(s), y/year(s).
    Default: 0

unload
Normally, exmdb_provider(4gx) keeps stores open for up to exmdb_provider.cfg:cache_interval. The "unload_store" RPC to exmdb_provider(4gx) causes the sqlite database (in /var/lib/gromox/.../exmdb/exchange.sqlite3) to be closed. Any subsequent RPC may reopen it, though. The unload RPC is useful after a mailbox was deleted and/or reinitialized with grommunio-admin-api or tools like gromox-mkprivate(8)/gromox-mkpublic(8). [zcore also has store state in memory. This would also need to be purged — but there is no RPC for such action at this time.] unload will fail to succeed if there is still a client connected to the mailbox via a notification channel.

vacuum
The "vacuum" RPC makes exmdb_provider issue the SQLite "vacuum" command on exchange.sqlite3, which rebuilds and compacts the database file.

Folder specification
folder_spec can either be a numeric identifier, or a path-like specification into the folder hierarchy. If the name starts with the slash character '/', it is interpreted as starting from the root; otherwise, the first component must be a special name (CALENDAR, COMMON_VIEWS, CONFLICTS, CONTACTS, DEFERRED_ACTION, DELETED, DRAFT, FINDER, INBOX, IPM_SUBTREE, JOURNAL, JUNK, LOCAL_FAILURES, NOTES, OUTBOX, SENT, SERVER_FAILURES, SHORTCUTS, SYNC_ISSUES, TASKS, VIEWS). These special names can be used with private stores only; there are no names defined for public folder contents at this time. There is also no parsing support for slashes in folder names currently in mbop; the slash character is always treated as a hierarchy separator. Examples:

•   /Top of Information Store/Sent Items/2022

•   IPM_SUBTREE/Sent Items/2022

•   SENT/2022

See also
gromox(7)