Mail Migration
You can migrate emails from external sources (e.g., Gmail or on-premises email servers) to Synology MailPlus Server for centralized management.
Task Setup
Go to Server Management > Mail Migration and click Create to launch the migration window. See the following sections for detailed instructions.
To define general task settings:
Go to General to specify basic information:
- Task: Enter a task name.
- Select the server type: Select from external email providers like Gmail, or email servers like Microsoft Exchange.
- Google Workspace: Migrate via Gmail API.
- Refer to this article to create a service key.
- Click the folder icon to upload the .JSON key.
- Other server types: Migrate via IMAP.
- Server address: Specify the source server IP address or domain name.
- Port: Specify the source server port.
- Enable secure connection (SSL): Tick the checkbox to migrate emails over SSL connection.
- IMAP path prefix: Depending on the source server type, specify the IMAP path prefix (a prefix applied to all folders, usually used as the IMAP namespace for the folder names):
- On-premises IMAP servers and Microsoft Exchange: Check the server settings to find out the information.
- Third-party email services: Gmail and Yahoo Mail have a blank IMAP path prefix; for other services, enter
INBOX
(commonly used) or consult the relevant documentation for details.
- Migrate mail with the delegate account (for Microsoft Exchange): Tick the checkbox to specify a delegate account that has full access permissions to all source accounts. With the delegate account, you can migrate emails without asking for each account's credentials.
- Accounts to migrate per time period: Define how many source accounts will be migrated per work session.
- Schedule email migration: Set a schedule for the task to avoid heavy traffic time.
Note:
- The task name cannot be specified as ".." or ".".
- The task name cannot contain any of the following characters: / \ : "
- You must tick Enable SMTP at Service > Protocol > SMTP to receive success or failure notification.
- If you provide an IP address as the Server address, success or failure notification may not be sent.
- When the source server is Gmail/Google Workspace or Yahoo!, check the additional requirements below:
- Gmail/Google Workspace: All accounts to migrate should turn on Less secure app access (see here) or have an app password (see here).
- Yahoo!: All accounts to migrate should have an app password (see here).
To set up email and mailbox filters:
Go to Filter and specify which messages and mailboxes to migrate.
- Discard mail received before the date and Discard mail received after the date: Discard emails received before or after the specified date during migration. Emails received on the specified date will not be discarded.
- Skip trash mail and Skip spam mail: Skip mailboxes that carry the "\Trash" or "\Junk" attribute as defined in RFC6154.
- Maximum size per email (KB): Tick the checkbox to specify the maximum size of an email to migrate.
- Enable mailbox filter: Tick the checkbox to decide which mailbox to skip or migrate by keyword:
- Skip mailboxes by keyword and Migrate mailboxes by keyword: Select a filter policy.
- Set Keywords: Click to add keywords:
- Keyword: Mailboxes matching the keywords here will be processed according to the filter policy.
- Exceptions: Mailboxes matching the keywords here will not be processed according to the filter policy.
Note:
- You can set a regular expression as a filter. You should add a slash (/) before and after the regular expression (e.g., /^RegExp$/).
To receive migration notification:
Go to Notification to set up notification preferences.
- Send success notification: Tick the checkbox to receive notifications when each account's email migration completes. You can further decide where the notification should be sent.
- Send failure notification: Tick the checkbox to receive notifications when an account's email migration fails. You can further decide where the notification should be sent.
To import the user list:
Go to User List to import user data.
- Prepare a user list following the requirements below:
- The user list should be a .CSV file. It can be generated with Microsoft Excel or Google spreadsheets.
- List one user account in one row.
- List each user's following information from left to right: the source account, the source account password, and the corresponding MailPlus account.
- Separate each information with a comma (,).
- When the source server is set to Microsoft Exchange and Migrate mail with the delegate account is enabled, you can omit source account passwords (e.g., source_account_X,,MailPlus_account_X).
- For example, if a user's source account name is "John" and his MailPlus account name is "John_on_MailPlus", you should type "John", the password for his source account, and "John_on_MailPlus" into grids one by one from left to right.
A valid user list should look like the one below:
John,John's source account password,John_on_MailPlus |
Ann,Ann's source account password,Ann_on_MailPlus |
Andrew,Andrew's source account password,Andrew_on_MailPlus |
... |
source_account_N,source_account_N_password,MailPlus_account_N |
- Go to User List to import the list:
- Import: Click to import a user list.
- Delete: Click to delete an unwanted user's data.
- Check: Click to check if all the imported source accounts are correct and if all the corresponding MailPlus accounts are activated.
Note:
- Google Workspace accounts should be specified using FQDA (i.e., username@domain name).
- Source accounts and MailPlus accounts cannot contain the ":" character.
Task Management
Once a migration task is fully set up, you can manage it and view its status.
To view task status:
- Go to Server Management > Mail Migration.
- Click Information (the document icon) to check the task summary and logs.
To run a task:
- Go to Server Management > Mail Migration.
- Select a task and click Start.
Note:
- To avoid migration errors, do not do either of the following during email migration:
- Changing the IMAP/POP3 settings on Synology MailPlus Server
- Moving or deleting emails on the source email server