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.
Example DL file
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
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.
The files to be imported must have the standard ICS format, for example
Example ICS file
BEGIN:VCALENDAR
X-WR-CALNAME:Calendar
X-WR-CALID:0621afc2-6801-4577-8444-bc67a85b1fbf:10
PRODID:Carbonio-Calendar-Provider
VERSION:2.0
METHOD:PUBLISH
BEGIN:VTIMEZONE
TZID:Europe/Rome
BEGIN:STANDARD
DTSTART:16010101T030000
TZOFFSETTO:+0100
TZOFFSETFROM:+0200
RRULE:FREQ=YEARLY;WKST=MO;INTERVAL=1;BYMONTH=10;BYDAY=-1SU
TZNAME:CET
END:STANDARD
BEGIN:DAYLIGHT
DTSTART:16010101T020000
TZOFFSETTO:+0200
TZOFFSETFROM:+0100
RRULE:FREQ=YEARLY;WKST=MO;INTERVAL=1;BYMONTH=3;BYDAY=-1SU
TZNAME:CEST
END:DAYLIGHT
END:VTIMEZONE
BEGIN:VEVENT
UID:8c9eb99d-5197-40ef-9a3f-0cd4845e808d
SUMMARY:Meeting with CEO
DESCRIPTION:-:::_::_:_:_:_:_:_:_:_:_:_:_:_:_:_:_:_:_:_:_:_:_:_:_:_:_:_:_:_:_
:_:_:_:_:_:_:_::_:_::-\n have invited you to a new meeting!\n\nSubject: Meet
ing with CEO \nOrganizer: "undefined \n\nTime: Wednesday\, 16 October\, 2024
09:00 - 12:00\n \nInvitees: john.doe@example.com \n\n\n-:::_::_:_:_:_:_
:_:_:_:_:_:_:_:_:_:_:_:_:_:_:_:_:_:_:_:_:_:_:_:_:_:_:_:_:_:_:_::_:_::-\n"
X-ALT-DESC;FMTTYPE=text/html:<html><body id='htmlmode'>-:::_::_:_:_:_:_:_:_:
_:_:_:_:_:_:_:_:_:_:_:_:_:_:_:_:_:_:_:_:_:_:_:_:_:_:_:_:_::_:_::-<h3>undefin
ed have invited you to a new meeting!</h3><p>Subject: Meeting with CEO</p><p
>Organizer: undefined</p><p>Location: </p><p>Time: Wednesday\, 16 October\,
2024 09:00 - 12:00</p><p>Invitees: john.doe@example.com</p><br/>-:::_::_
:_:_:_:_:_:_:_:_:_:_:_:_:_:_:_:_:_:_:_:_:_:_:_:_:_:_:_:_:_:_:_:_:_:_:_::_:_:
:-</body></html>
ATTENDEE;CN=john.doe@example.com;ROLE=REQ-PARTICIPANT;PARTSTAT=NEEDS-ACT
ION;RSVP=TRUE:mailto:john.doe@example.com
ORGANIZER:mailto:stefano@example.com
DTSTART;TZID="Europe/Rome":20241016T090000
DTEND;TZID="Europe/Rome":20241016T120000
STATUS:CONFIRMED
CLASS:PUBLIC
X-MICROSOFT-CDO-INTENDEDSTATUS:BUSY
TRANSP:OPAQUE
LAST-MODIFIED:20240930T105154Z
DTSTAMP:20240930T105154Z
SEQUENCE:0
BEGIN:VALARM
ACTION:DISPLAY
TRIGGER;RELATED=START:-PT5M
DESCRIPTION:Reminder
END:VALARM
END:VEVENT
BEGIN:VEVENT
UID:af6362e5-8806-4427-952b-6d33aedb93b9
SUMMARY:Meeting with CEO
DESCRIPTION:-:::_::_:_:_:_:_:_:_:_:_:_:_:_:_:_:_:_:_:_:_:_:_:_:_:_:_:_:_:_:_
:_:_:_:_:_:_:_::_:_::-\n have invited you to a new meeting!\n\nSubject: Meet
ing with CEO \nOrganizer: "undefined \n\nTime: Wednesday\, 16 October\, 2024
09:00 - 12:00\n \nInvitees: j.doe@example.com \n\n\n-:::_::_:_:_:_:_
:_:_:_:_:_:_:_:_:_:_:_:_:_:_:_:_:_:_:_:_:_:_:_:_:_:_:_:_:_:_:_::_:_::-\n"
X-ALT-DESC;FMTTYPE=text/html:<html><body id='htmlmode'>-:::_::_:_:_:_:_:_:_:
_:_:_:_:_:_:_:_:_:_:_:_:_:_:_:_:_:_:_:_:_:_:_:_:_:_:_:_:_::_:_::-<h3>undefin
ed have invited you to a new meeting!</h3><p>Subject: Meeting with CEO</p><p
>Organizer: undefined</p><p>Location: </p><p>Time: Wednesday\, 16 October\,
2024 09:00 - 12:00</p><p>Invitees: j.doe@example.com</p><br/>-:::_::_
:_:_:_:_:_:_:_:_:_:_:_:_:_:_:_:_:_:_:_:_:_:_:_:_:_:_:_:_:_:_:_:_:_:_:_::_:_:
:-</body></html>
ATTENDEE;CN=john.doe@example.com;ROLE=REQ-PARTICIPANT;PARTSTAT=NEEDS-ACT
ION;RSVP=TRUE:mailto:j.doe@example.com
ORGANIZER:mailto:m.jane@example.com
DTSTART;TZID="Europe/Rome":20241016T090000
DTEND;TZID="Europe/Rome":20241016T120000
STATUS:CONFIRMED
CLASS:PUBLIC
X-MICROSOFT-CDO-INTENDEDSTATUS:BUSY
TRANSP:OPAQUE
LAST-MODIFIED:20240930T105159Z
DTSTAMP:20240930T105159Z
SEQUENCE:0
BEGIN:VALARM
ACTION:DISPLAY
TRIGGER;RELATED=START:-PT5M
DESCRIPTION:Reminder
END:VALARM
END:VEVENT
END:VCALENDAR
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
ICS files can be also be imported manually by each user according to the direction presented in the Working with Calendars section of the User Guides.
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.
The files to be imported must have the following format.
Example CSV file
"company","email","firstName","jobTitle","lastName","middleName","mobilePhone","namePrefix","nickname","workCity","workCountry","workPostalCode","workState","workStreet","workURL"
"ACME","j.doe@example.com","john","CEO","doe","","","","Boss",“Vicenza”,“IT”,“36100”,"","","www.example.com"
"ACME","m.jane@example.com","mary","CFO","jane","","+39 000000000","","MJ",“Vicenza”,“IT”,“36100”,"","","www.example.com"
"ACME","p.sullivan@example.com","Peter","Head of HR","Sullivan","Raymond","","mr","Ray",“Vicenza”,“IT”,“36100”,"","","www.example.com"
"ACME","d.smith@example.com","Donald","CTO","Smith",“”,"","","Don",“Vicenza”,“IT”,“36100”,“”,“”,"www.example.com"
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
CSV files can be also be imported manually by each user according to the direction presented in the Working with Contacts section of the User Guides.
Phase 4, Files#
Migration of Carbonio Files items is not supported when the Source is no Zextras-compatible platform.