ACE Peripherals | Support Ticket System

Frequently Asked Question

General: How to migrate emails from other mail servers to Synology MailPlus Server?
Last Updated 6 years ago

Overview

Synology MailPlus Server provides a cost-effective mail server solution for small and medium business requiring high level of security and stability. This article will guide you through the migration of your emails from your previous mail server to the new MailPlus Server package by using the OfflineIMAP tool.


1. Before you start

  • Make sure the Synology NAS on which you want to use MailPlus Server is running DSM 6.0 or later.
  • Make sure your Synology NAS supports MailPlus Server. (See the applied models here.)
  • 16-series: RS2416RP+, RS2416+, RS18016xs+, DS716+
    15-series: RC18015xs+, DS3615xs, DS2415+, DS1815+, DS1515+, RS815RP+, RS815+, DS415+
    14-series: RS3614xs+, RS3614xs, RS3614RPxs, RS2414RP+, RS2414+, RS814RP+, RS814+
    13-series: DS2413+, RS3413xs+, RS10613xs+, DS1813+, DS1513+
    12-series: DS3612xs, RS3412xs, RS3412RPxs, RS2212RP+, RS2212+, DS1812+, DS1512+, RS812RP+, RS812+
    11-series: DS3611xs, DS2411+, RS3411xs, RS3411RPxs, RS2211RP+, RS2211+, DS1511+
  • Enable IMAP protocol on the source mail server.
  • Set up MailPlus Server on your Synology NAS to be the destination mail server.
  • Collect the usernames and passwords of the accounts on both the source and destination mail servers.

2. Migrate your emails using OfflineIMAP

  1. Log into the Synology NAS with MailPlus Server installed, and go to Control Panel > Terminal & SNMP to enable SSH service.
  2. Go to Control Panel > User, and make sure the status of the admin account is Normal. If the admin account is disabled, please click the Edit button and untick Disable this account. In the meantime, if you forgot or have never set the admin password, please change or reset the password here as well.
  3. Launch MailPlus Server, and make sure IMAP protocol is enabled.
  4. Go to File Station and create a new shared folder named mail_migration. Set the location to Volume 1, and use default settings for all the other options during the creation process
  5. Download the OfflineIMAP tool here, and then upload the .zip file offlineimap-master.zip to the mail_migration shared folder that you have just created.
  6. Right-click on offlineimap-master.zip to extract the .zip file.
  7. Download Synology MailPlus Migration Pack from Synology's Download Center. You will see the following three files after extracting the downloaded file:
    • run.py: The execution file for the migration.
    • general.conf: The configurations required for the migration, such as the IP addresses of the source and destination servers.
    • user_list: The account information of both the source and destination mail servers that you previously collected.
  8. Open the general.conf file with any text editor. (Notepad++ is recommended and can be downloaded here.)
    • OFFLINEIMAP_PATH: The absolute path of the offlineimap.py file. In Step 6, you can find the offlineimap.py file after extracting the .zip file. Right-click on this file, select Properties, copy its complete file path and paste it here
    • [SRC] and [DEST] sections: The IMAP settings of the source and destination mail servers respectively. Both sections contain the following configurations:
      • IMAP_SERVER: The FQDN of the IMAP server.
      • IMAP_PORT: The port used by IMAP on the server.
      • USE_SSL: Whether the IMAP server supports SSL connection. Input yes or no in this column. Please note that this migration pack does not support STARTTLS connection. Therefore, if the source mail server does not support SSL connection, the migration will proceed via unencrypted connections.
      • MAX_CONNECTION: The concurrent connections allowed. The larger the number is set, the faster the migration will be, yet the more resources such as network bandwidth and RAM will be consumed.
  9. [MISC]
    OFFLINEIMAP_PATH = /volume1/mail_migration/offlineimap-master/offlineimap.py

    [SRC]
    IMAP_SERVER = imap.old.server.com
    IMAP_PORT = 993
    USE_SSL = yes
    MAX_CONNECTION = 10

    [DEST]
    IMAP_SERVER = imap.new.server.com
    IMAP_PORT = 993
    USE_SSL = yes
    MAX_CONNECTION = 10

  10. Open the user_list file and input the user account information in the format below. Each line refers to the migration of one set of accounts, which contains four values separated by blanks in the following order: the username of the source mail server, the password of the source mail server, the username of the destination server, and the password of the destination server.
  11. src_user_1_login src_user_1_password dest_user_1_login dest_user_1_password
    src_user_2_login src_user_2_password dest_user_2_login dest_user_2_password
    src_user_3_login src_user_3_password dest_user_3_login dest_user_3_password
    src_user_4_login src_user_4_password dest_user_4_login dest_user_4_password
    .......
    ...
    .

  12. After you have finished editing the above two files, upload all three files including run.py, general.conf and user_list.conf onto the mail_migration shared folder.
  13. Log into the Synology NAS with MailPlus Server installed as admin via SSH connection. For Windows users, it is recommended you use Putty for the connection (the putty.exe file can be downloaded here). For Mac users, please go to Launchpad > Terminal. In the following example, we will use Putty on Windows for demonstration.
  14. When prompted by Putty's security alert, click Yes to trust this host and continue.
  15. Enter the command below to switch the execution role to root, and then enter your password again:

  16. sudo -i

  17. Enter the command below to go to the mail_migration shared folder:

  18. cd /volume1/mail_migration

  19. Enter the command below to start the migration. During the process, related information will be shown. Once the execution finishes, the migration is complete.

  20. python run.py
For more information, please visit the website of OfflineIMAP. 
http://docs.offlineimap.org/en/latest/FAQ.html


ZGTLv160424

Please Wait!

Please wait... it will take a second!