gromox-mbop(8)
π¦ gromox-mbop(8) π¦
Gromox admin reference β¨
πΈ Name
gromox-mbop β Mailbox operations utility π
β¨ Synopsis
gromox-mbop [-d mbox|-u [recipient]@domain.example] command [command-args...]
π Global options
-cβ Continuous operation mode. If a command in a series (e.g. withforeach.*) fails, do not stop. πͺ-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.) π€-vβ Verbose mode. π£οΈ
π Commands
( command1 c1args ) ( command2 c2args ): command chaining πcgkreset: reset synchronization state (PR_CHANGE_KEY,PR_PREDECESSOR_LIST) πclear-photo: delete user picture πΌοΈclear-profile: delete user's PHP-MAPI profile π§Ήclear-rwz: deleteIPM.RuleOrganizerFAI messages from the inbox π₯delmsg: issue"delete_message"RPCs for a mailbox ποΈecho-maildir: return maildir (for use withforeach.here.*) πecho-username: return username (for use withforeach.*) πemptyfld: remove objects from folders π§½foreach.*: iterate over security objects πfreeze: halt all operations on a mailbox π§get-freebusy: test FB schedule lookups πget-photo: retrieve user image from store and print to stdout πΈget-websettings,get-websettings-persistent,get-websettings-recipients: retrieve settings for grommunio-web βοΈping: cause a mailbox's sqlite files to be opened πpurge-datafiles: remove orphaned attachments/content files from disk π§Ήpurge-softdelete: remove soft-deleted items from a folder ποΈrecalc-sizes: recalculate store size πset-locale: reset UI language and special folders' names πset-photo: read user image from stdin and save to store π₯set-websettings,set-websettings-persistent,set-websettings-recipients: read new grommunio-web settings from stdin and save to store π€sync-midb: trigger a midb synchronization run πthaw: unfreeze a mailbox π₯unload: issue the"unload_store"RPC for a mailbox π€vacuum: issue the"vacuum"RPC for a mailbox π§Ήzaddrxlat: replace all"ZARAFA"type addresses in the mailbox's contents π
π Further documentation
- SQLite recovery:
https://docs.grommunio.com/kb/sqlite.htmlπ οΈ
π Command chaining
( subcommand1 sub1args... )...
It is possible to run multiple mbop commands in sequence for a user. For the option parser to recognize when a command ends and the next one starts, each subcommand invocation shall be wrapped in ( and ). This becomes even more handy in conjunction with the foreach.* pseudocommand.
β οΈ Subcommands reading data from standard input (e.g.set-photo) cannot be realiably used with chaining, because stdin would be fully consumed the first time around and(...)does not cache the input for any subcommands. π
π Examples
Run two commands for a user:
gromox-mbop -u a@b.de \( purge-softdelete -r / \) \( purge-datafiles \)
π cgkreset
cgkreset resets Change Numbers on all folder and message objects, PR_CHANGE_KEY and PR_PREDECESSOR_LIST values. The use cases for cgkreset are:
- when the mailbox has CN corruption and Incremental Change Synchronization (by e.g. Outlook or grommunio-sync) is hampered (e.g. message flags/color updates not transferred) π΅βπ«
- when the mailbox has CN corruption and
gromox-http/emsmdbhas thrown the error"INSERT INTO messages ... UNIQUE constraint failed: messages.change_number"π
After execution, .ost files referencing the reset mailbox should be deleted. gromox-mbop cgkreset is different from the earlier /usr/libexec/gromox/cgkrepair in that cgkreset does not make any attempts to keep synchronization state; it just resets everything, unconditionally. On the other hand, cgkrepair (now deleted) was unable to get to all fields that may need resetting.
πΌοΈ 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. π¬
π₯ clear-rwz
Deletes IPM.RuleOrganizer FAI messages from the inbox. ποΈ
ποΈ delmsg
β¨ Synopsis
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 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. (For details about GCV, see glossary.rst in the source distribution.) π
βοΈ Subcommand options
-f folder_specβ The folder from which to delete the messages. See section "Folder specification" below for syntax details offolder_spec. (If amsgidis specified which is not located in the particular folder, that message will not be deleted.) π--softβ Perform a soft deletion. π§Έ
π§½ emptyfld
β¨ Synopsis
emptyfld [-MRa] [-t age] [--soft] folder_spec...
π¬ Description
This command deletes objects from one or more folders. emptyfld is normally a one-shot server-side operation. The use of -R,-t is not covered by the existing network protocols, which means that, if either of these options is used, the mbop client program performs the desired recursion and/or timestamp matching locally. This incurs multiple round trips to the server and so takes a bit more time than a "trivial" emptyfld call. β³
Just to spell it out again explicitly, emptyfld can be in one of three modes:
- server-assisted operations:
- clear contents and/or FAI, no time conditions, no recursion π§Ό
- clear contents and/or FAI, no time conditions, nuke subfolders (recursion barred) π£
- client-side traversal:
- clear contents and/or FAI, with or without evaluating timestamps, with or without recursion into subfolders, with or without subfolder deletion if empty πΆββοΈ
βοΈ Subcommand options
-Mβ Exempt normal messages from deletion. π ββοΈ-Rβ Recurse into subfolders. π-aβ Select associated messages (FAI) for deletion. π-t timespecβ Limit deletion to messages which have a last modification timestamp older than timespec. Seegromox(7), section "Duration specification" for timespec's syntax. β°--delemptyβ If, after message deletion, any subfolder is empty, delete it. ποΈ--nuke-foldersβ Unconditionally delete subfolders outright. For obvious reasons, deleting subfolders disables recursion via-R(because when they are deleted, there is nothing left to recurse into). π₯--softβ Switch from hard deletion to soft deletion. π§Έ
π§Έ Soft deletion notes
Soft deletion sets the soft-delete flag (also called "hidden" in Exchange) on messages and/or folders. Soft-deleted objects can be restored/unhidden by the user. Users are technically empowered to perform hard deletions as well, but most mail clients do not offer a user control (e.g. checkbox widget) for it, requiring the use of diagnostic utilities like MFCMAPI or gromox-mbop instead. π οΈ
When a folder's soft-delete flag changes, the messages and subfolders within are left untouched; their soft-delete flag does not change. In fact, this behaves exactly like setting a directory in the file system to hidden. π»
π Examples
- Clear one folder's contents like Outlook/grommunio-web:
gromox-mbop -u a@b.de emptyfld --soft DRAFTS
- Outlook/grommunio-web behave differently when clearing trash! The equivalent
mbopcommand is:
gromox-mbop -u a@b.de emptyfld --soft --nuke-folders DELETED
- Deletion of objects in trash only if untouched for a while:
gromox-mbop -u abc@example.com emptyfld -Rt 1week --soft DELETED
π foreach.*
β¨ Synopsis
foreach.filter[.filter]* [-j jobs] command [command-args...]
π¬ Description
foreach.* is a pseudoaction for running another subcommands that gromox-mbop offers (e.g. ping, unload, purge-softdelete, etc.) for a number of users. Subcommands reading data from standard input (e.g. set-photo) cannot be realiably used with foreach, because stdin would be fully consumed the first time around and foreach does not cache the input for any subcommands. π
ποΈ Filters
secobj: limit to objects that can be used in ACLs πuser: regular users π€dl: distribution lists (groups) π₯sharedmb: shared mailboxes π¬room: room objects πͺequipment: equipment objects π₯οΈcontact: GAB contact objects πactive: active entities βsusp: entities marked as "suspended" βΈοΈdeleted: entities marked as "deleted" ποΈmb: entity has a mailbox directory defined πhere: entity has current host as homeserver (compareshostname --fqdnwherembopis run with theSQL.servers.hostnamecolumn) π
There is no "all" filter. Security objects and Contacts are so vastly different that it just does not make sense to operate on them in the same run. π ββοΈ
βοΈ Options
-j jobsβ Maximum parallel execution factor. (Experimental.)0means autosizing. Onlyping/vacuum/unloadsupport this, and the option is otherwise ignored. Use external tools likeparallel(1)ormake(1)for guaranteed parallelization. Default:1π§΅
π Examples
- Hard-delete all objects which are currently softdeleted:
gromox-mbop foreach.mb.here purge-softdelete -r /
π get-freebusy
β¨ Synopsis
get-freebusy [-a start_time] [-b end_time] [-x username]
π¬ Description
Runs the get_freebusy routine on the mailbox specified by the global -d/-u option(s) [or the mailbox currently in scope when using foreach.*], and asks for free/busy status within the given time period. ποΈ
βοΈ Options
-a {yyyy-mm-ddThh:mm:ss[Z|+hhmm|-hhmm]|unixtime}β Limit returned events to occuring on or after this timestamp. Can either be a Unixtime or a ISO 8601 timestamp. β±οΈ-b {yyyy-mm-ddThh:mm:ss[+hhmm|-hhmm]|unixtime}β Limit returned events to ocurring before this timestamp. β³-x usernameβ Evaluate access control lists as this identity. If the-xoption is omitted, ACL checks are omitted. π΅οΈββοΈ
freeze βοΈ
Synopsis
freeze [--no-wait]
Description
Tells the Information Store to halt all new operations on the mailbox, bestie. Anything already in processing is allowed to finish, but new requests for the mailbox get rejected. Special requests like mbopβs own unload or thaw are still allowed while frozen β for obvious reasons, iykyk. π
Options
--no-waitβ donβt wait for outstanding operations to complete. Just freeze and go, periodt.
get-photo πΈ
Synopsis
get-photo >somefile
Description
Reads the user photo from the store and dumps it straight to stdout. If stdout is a terminal, nothing gets printed β in that case, if stderr is also a terminal, youβll get a little summary there instead. Cute, right? π
get-websettings π
Synopsis
get-websettings >file.json
get-websettings-persistent >file.json
get-websettings-recipients >autocomplete.json
Description
Reads various grommunio-web settings from the store and dumps them to stdout. JSON goes brrr. β¨
ping π
Causes the respective mailbox to be opened by the server. Technically ping is just a no-op request type β but any request to the information storage server causes the respective mailbox to be opened, so yeah. Main character energy by doing absolutely nothing. π
sync-midb π
Synopsis
sync-midb [-f folder_spec]
Description
Sends a request to midb to open the mailbox and update the midb-specific folder indices, plus potentially build RFC5322 representations for newly-appeared messages. Once the mailbox is open in midb, it uses asynchronous notifications to stay up to date. Iconic behaviour, honestly. π¦
Options
-ffolder_spec β forcibly rerun the sync routine for one specific folder. See section βFolder specificationβ below. Also, the special keywordallis recognized. Slay.
purge-datafiles π§Ή
The purge-datafiles RPC makes exmdb_provider remove attachment and content files from disk that are no longer referenced by any message. Spring cleaning, but make it RPC. πΈ
purge-softdelete ποΈ
Synopsis
purge-softdelete [-r] [-t timespec] folder_spec...
Description
This command hard-deletes all messages from a folder which are marked as soft-deleted. You can process the entire mailbox by specifying the root folder plus the -r option. No cap, itβs giving ultimate cleanup. π
Subcommand options
-rβ recurse into subfolders.-ttimespec β specifies the minimum time to the last modification that soft-deleted messages must have before they are hard-deleted. Seegromox(7), section βDuration specificationβ for *timespec*βs syntax. Default:0(immediate deletion).
Examples
- To process an entire mailbox and wipe everything older than a few days:
gromox-mbop -u abc@example.com purge-softdelete -r / -t 10d
recalc-sizes π
Recalculates the store size. Thatβs it. Thatβs the whole vibe check. β¨
set-locale π
Synopsis
set-locale [-Tv] -l id
Description
First, the set-locale operation changes the βpreferred languageβ setting for the user account. This affects the display of user interfaces like grommunio-web, and also affects the folder language selection when a mailbox is truncated/re-created with gromox-mkprivate(8).
Second β provided Gromox has default folder name translations for the desired locale β set-locale also resets the display names of the mailboxβs built-in folders. Multilingual queen behaviour. π
Options
-Tβ run a trivial performance test againstexmdbby repeatedly setting the folder names. Stress test but make it cute.-ld β a locale identifier in the form of language_territory, where language is an ISO 639-1 code and territory is an ISO 3166-1 Alpha 2 code, e.g.ja_JP,pt_BR,pt_PT. This is like the well-known XPG/POSIX locale identifier syntax, but no Codeset and no Modifier should be used in Gromox.-vβ verbose mode. Same as global-v.
Examples
- ``` gromox-mbop -u abc@example.com set-locale -l ja_JP
---
## set-photo πΌοΈ
### Synopsis
set-photo <somefile
### Description
Reads a new user photo from standard input and writes it to the store. Glow-up incoming. π
---
## set-websettings π οΈ
### Synopsis
set-websettings <file.json set-websettings-persistent <file.json set-websettings-recipients <autocomplete.json
### Description
Reads new <purple>grommunio-web</purple> settings from standard input and writes them to the store. JSON in, settings out, no cap. β¨
---
## 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. Sorry bestie, connection says no. π
---
## vacuum π§½
Issue the SQLite `.vacuum` command on the userβs `exchange.sqlite3` file in an attempt to reclaim unused disk space and shrink it. This operation can potentially run for quite some time, during which the mailbox is inaccessible. <red>Donβt panic if it takes a minute</red> β itβs just doing its little vacuum thing. π
---
## zaddrxlat π
Scans messages in the given folders and replaces `PR_ADDRTYPE="ZARAFA"` and related properties by normal SMTP addresses. See `gromox-kdb2mt(8)` section βZARAFA Address Typeβ for some details.
The use case for `zaddrxlat` is fixing up addresses after the fact β i.e., when the administrator forgot to employ a user map at the time of running `kdb2mt`. `zaddrxlat` does **not** change ACLs. Periodt.
### Synopsis
zaddrxlat -m file [-r] folder_spec[...]
### Options
- **`-m`** *file* β user map to utilize for translation. See `kdb-uidextract(8)` for a format description.
- **`-r`** β process folders recursively.
### Example
zaddrxlat -m u.map -r "IPM_SUBTREE/Import of blah @2025-12-26"
---
## Folder specification π
*folder_spec* must conform to one of three forms. Either:
- a numeric identifier (e.g. `13`, `0xd`)
- a folder path starting with a slash, optionally followed by a slash-separated sequence of subordinate folder names
- a folder path starting with a fixed symbolic name, optionally followed by a slash-separated sequence of subordinate folder names
The backslash may be used as a hierarchy separator instead; in any case, the chosen separator must be used consistently in the entire path.
The recognized strings are: `CALENDAR`, `COMMON_VIEWS`, `CONFLICTS`, `CONTACTS`, `DEFERRED_ACTION`, `DELETED` (`TRASH`, `WASTEBASKET`), `DRAFT`, `FINDER`, `INBOX`, `IPM_SUBTREE`, `JOURNAL`, `JUNK`, `LOCAL_FAILURES`, `NOTES`, `OUTBOX`, `SENT`, `SERVER_FAILURES`, `SHORTCUTS`, `SYNC_ISSUES`, `TASKS`, `VIEWS`.
The purpose of these names is for referencing a built-in folder irrespective of its assigned name, which is dependent upon translation settings. The symbolic 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. The slash character is always treated as a hierarchy separator. Important bestie lore. π§
### Examples
- Using the MAPI root: `/Top of Information Store/Sent Items/2022`
- Using a symbolic name: `IPM_SUBTREE/Sent Items/2022`
- Using a symbolic name: `SENT/2022`
- Referencing a folder with a slash can be done by using backslash as the hierarchy separator: `SENT\Winter break 2022/2023`
The MAPI root is not visible in most clients. MUAs like Outlook and <purple>grommunio-web</purple> show hierarchy starting at `IPM_SUBTREE` only. So donβt go looking for it in the UI, bestie. π
---
## See also π
`gromox(7)`
---
This iconic little page comes from the Gromox fam, dated as the footer says, and filed under `gromox-mbop(8)` β go forth and mbop responsibly, bestie! πβ¨π
π¦ where this page comes from
- alpine 3.24: grommunio-gromox-doc 3.6-r0 Β· AGPL-3.0-or-later
- π the page's license: CC-BY-SA-4.0 or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms