Import messages in EML format as administrator with bm-cli
This page shows you how to import .eml messages from an export, a direct save or a BlueMind v4 backup into a BlueMind 5.3 or higher mailbox.
Procedure
The bm-cli import-emls command is used to import a batch of emails in EML format into a mailbox (user or shared mailbox):
# bm-cli mail import-emls
Usage: bm-cli mail import-emls [--resolve-cyrus-path] --email=<email> <path>
Import eml files
<path> Root backup folder
--email=<email> Email address of the mailbox to restore from
Try to detect root from a cyrus mail server
hierarchy
The import creates a folder in the mailbox of the form restored_<import date> in which messages are placed.
💡 The import is recursive, importing sub-folders and their contents, recreating the entire tree structure in the target folder.
The mandatory parameters are as follows:
-
path: path of the folder containing the .eml files to be imported -
email: default e-mail address of the user or of the shared mailbox containing the messages to be imported in the case of an import from a backup
Example: we want to import e-mail messages into John Doe's mailbox.
We place the downloaded files in a /home/admin/emls-john folder on the server, then :
bm-cli mail import-emls --email=jdoe@bluemind.loc /home/admin/emls-john
The order proposes an optional additional parameter :
--resolve-cyrus-path: when enabled, bm-cli will attempt to detect the parent directory of the mailbox concerned in the tree structure passed with thepathparameter and import all messages contained in the mailbox.
This option is only available with Cyrus architecture. So for BlueMind it will only be possible to use it with a BlueMind v4 or lower backup.
Example: we wish to restore John Doe's messages from the backup contained in the /var/backups/bluemind directory:
# bm-cli mail import-emls --resolve-cyrus-path --email=jdoe@bluemind.loc /var/backups/bluemind