From Generic E-mail Systems Based on Compatible AD or OpenLDAP#

This procedure is quite similar to From Generic E-mail Systems. The only difference is that Step 1 in Phase 1 is carried out with the help of Accounts Auto provisioning. All the other phases and steps are carried out manually.

Since this is quite a long procedure, please read carefully the reminder of this section before attempting the migration, to understand which data, files and their format are needed.

Requirements and Limitations#

On the Destination, before starting the migration, the following conditions must be satisfied:

  • The domains that must be migrated must already exist and configured with Auto provisioning (see Phase 1 below for details)

  • The Default CoS must be configured with suitable values, as all imported users will inherit it

Additionally, the CSV and ICS files needed for the manual import must have a precise format: they will be then processed using the scripts that we provide to import Calendars and Contacts in the Destination. Make sure that the format of the files reflect the examples, to prevent any possible error while processing the files.

Phase 1, Provisioning#

Step 1-1, Domains and Accounts#

This step is automatically carried out by means of Auto provisioning: please refer to that section to set it up, then skip to Phase 2.

Note

The linked Auto provisioning article describes the use of AD for provisioning, but also any generic LDAP is supported: The procedure is analogous to the AD, with appropriate changes to the search filters, bind domains, and the port.

Step 1-2, Distribution Lists#

To import DLs, you need to export them in a CSV file, called dl_provisioning.csv, that has this format:

distibution_list1@example.io,Description1,Name1,email_1@example.io,email_2@example.io,
distibution_list2@example.io,Description2,Name2,email_2@example.io,email_4@example.io,email_5@example.io
distibution_list3@example.io,Description3,Name3,email_3@example.io,email_6@example.io,email_7@example.io,email_8@example.io

The first three fields are parsed as the Distribution List’s address, Description, and Name, respectively, and they are reflected in the Carbonio Admin Panel. All remaining fields, whose number may vary, are the e-mail addresses that are member of the Distribution List.

As the zextras user, execute the following script, which will create a command file that will be fed to carbonio later:

DLs Migration Script

/scripts/dl.sh

echo '' > dl_provisioning.cmd
for p in $(cat dl_provisioning.csv) ;
do 
    IFS=', ' read -r -a array <<< "$p"
    echo 'prov cdl' ${array[0]} 'description' ${array[1]} 'displayName' ${array[2]} >> dl_provisioning.cmd
    len=${#array[@]}
    for ((i=3; i<$len; i++))
    do
    	echo 'prov adlm' ${array[0]} ${array[$i]} >> dl_provisioning.cmd
    done
done

Once the script has been successfully executed, it will output file dl_provisioning.cmd, which can be given to carbonio as input.

zextras$ carbonio prov -f dl_provisioning.cmd

Alternatively, you can create manually each Distribution List as follows. Taking the first list from the dl_provisioning.csv file above as example, as the zextras user, enter the Carbonio shell with command carbonio, then issue the following commands.

carbonio> prov cdl distibution_list1@example.io displayName Name1 \
description Description1
carbonio> prov adlm email_1@example.io
carbonio> prov adlm email_2@example.io

Phase 2, Data#

This Phase is divided into three steps, which require an external tool to migrate all e-mails and exported files for Calendars and Contacts.

Step 2-1, Emails#

The most functional and standard way to read from the Source and write into the Destination is to use the IMAP protocol. For this reason, we suggest imapsync as the tool to perform IMAP migration.

Hint

We suggest not to use the Global Administrator account to perform this task, but to create temporary Administrator accounts in the Source and in the Destination to be used for the purpose of import process only, so you can safely remove them once the synchronisation has been completed, to keep the Administrators’ action history clear. These will be denoted as SOURCE_ADMIN_ACCOUNT and CARBONIO_IMPORT_ACCOUNT in the command below.

We assume that you have already obtained credentials of an account that can access all the accounts on the Source, and you have already created a Global Administrator to be used for the import only.

In the following command, that must be executed on the Node hosting Carbonio Mails and Calendar, replace all values written in ALL_CAPS with corresponding values, suitable for your infrastructure.

See also

The command uses the official imapsync’s docker image; to download it or to learn on alternative approaches (e.g., if you want to install and use imasync) and documentation, please refer to imapsyncs’s official documentation.

zextras$ for account in $(carbonio prov -l gaa SOURCE_DOMAIN); do \
docker run --rm gilleslamiral/imapsync imapsync \
--host1 SOURCE_ENDPOINT_ADDRESS --ssl1 --user1 ACCOUNT --authuser1 SOURCE_ADMIN_ACCOUNT --password1 SOURCE_ADMIN_PASSWORD \
--host2 CARBONIO_PROXY_NODE_IP --ssl2 --user2 ACCOUNT --authuser2 CARBONIO_IMPORT_ACCOUNT --password2 CARBONIO_IMPORT_ACCOUNT_PASSWORD; \
done

Step 2-2, Calendars#

We assume that the Calendar files of all users has been exported and placed into Carbonio Mails & Calendar Node’s /tmp/backup/ directory, in ICS Format, e.g., /tmp/backup/user1@example.com.ics, /tmp/backup/user1@acme.corp.ics, and so on.

They can be imported into Carbonio using the following command:

zextras$ for account in $(carbonio prov -l gaa SOURCE_DOMAIN); do \
echo "prov sa $account postRestURL '/Calendar?fmt=ics' /tmp/backup/${account}.ics"; \
done | carbonio

Step 2-3, Contacts#

We assume that the Contacts files of all users has been exported and placed into Carbonio Mails & Calendar Node’s /tmp/backup/ directory, in CSV Format, e.g., /tmp/backup/user1@example.com.csv, /tmp/backup/user1@acme.corp.csv, and so on.

They can be imported into Carbonio using the following command:

zextras$ for account in $(carbonio prov -l gaa SOURCE_DOMAIN); do \
echo "prov sa $account postRestURL '/Contacts?fmt=csv&csvfmt=thunderbird-csv' /tmp/backup/${account}.csv"; \
done | carbonio

Phase 3, Shares#

Shares migration is not supported when the Source is no Zextras-compatible platform.

Phase 4, Files#

Migration of Carbonio Files items is not supported when the Source is no Zextras-compatible platform.