-
Notifications
You must be signed in to change notification settings - Fork 23
rmb CLI
The plugin provides a command line tool which will be installed to %dovecot_home%/bin/rmb. The tool gives you access to the ceph mail storage.
rmb -N <username> ls mb [-o <rbox_cfg>]
rmb -N t ls mb
rmb [-p <mail_storage>] -N <username> ls - sort uid|recv_date|save_date|phy_size [-o <rbox_cfg>]
rmb -N t ls - sort uid
rmb [-p <mail_storage>] -N <username> ls Metadata >|<|= value [-o <rbox_cfg>]
rmb -N t ls R>"2017-11-22 13:40"
It is possible to download user e-mails to disk, by replacing ls with get:
rmb [-p <mail_storage>] -N <username> get - -O <dir> [-o <rbox_cfg>]
rmb -N t get U=1
rmb [-p <mail_storage>] -N <username> set <oid> <Metadata> <value> [-o <rbox_cfg>]
rmb -N t set G 00109203d4d61f5a0c7600009c60bf7 U 1
rmb cfg create [-o <rbox_cfg>]
rmb cfg create
rmb cfg update <key>=<value> [-o <rbox_cfg>] --yes-i-really-really-mean-it
rmb cfg update generated_namespaces=true --yes-i-really-really-mean-it
|
Changing values in the dovecot-ceph configuration should be done before storing e-mails in ceph. Otherwise there will be problems accessing old mails. |
rmb -N <username> delete <oid> --yes-i-really-really-mean-it
rmb -N t delete 00109203d4d61f5a0c7600009c60bf7 --yes-i-really-really-mean-it
|
Deleting an e-mail object will not notify dovecot about the deletion, so if you delete an object make sure that dovecot does not have a reference to it. Otherwise you have a corrupt mailbox. |
Renaming a user is only available if the config option generated-namespace is set to true.
rmb -N <username> rename <username> --yes-i-really-really-mean-it
Example: Rename the user t to t2. Effectively it renames the namespace configuration object from user t to t2. rmb -N t rename t2 --yes-i-really-really-mean-it
The save_log
will be recorded by the rbox storage if request by configuration. It contains information RADOS object creation and manipulation. The save_log
has three command types: save, copy and move.
During save_log
replay the recorded operations will be reverted as much as possible:
- save
-
Objects will be deleted
- copy
-
Objects will be deleted
- move
-
The rbox plugin does not change the mail object when it is moved between the user’s mailboxes. It only creates a new index entry and removes the old. The doveadm save_log command will restore the original index entry for the moved mail.
rmb -r /path/to/save_log --yes-i-really-really-mean-it
doveadm rmb revert /path/to/save_log