My activities New request

contact atmail support

PH: +61 (7) 5357-6605

support@atmail.com

Follow

Using IMAPSYNC with Atmail

Stewart -

PROBLEM
I want to migrate from my IMAP server to my own Atmail using IMAPSYNC

ENVIRONMENT

  • On-Premises Server Installations: Version 7.0 > Current Version

CAUSE
Migration requirement.

RESOLUTION

IMAPSYNC (http://imapsync.lamiral.info/) is an IMAP migration utility by Gilles Lamiral which is capable of transporting your IMAP messages from one server to another. This document details how to transport your IMAP messages from another server to an Atmail Email Server.

First, install IMAPSYNC. You can either purchase the full source, or grab earlier versions from Ubuntu/Debian repositories. Once done, generate a list of your users in this format:

[source-username],[password],[destination-username],[password]

Where [source-username] is the source IMAP username, and [destination-username] is the username for your destination IMAP server. Separate new entries with newlines, like so: 

demo_zwi4@atmail.com,password,john@domain.com,password
demo_zwl0@atmail.com,password,jane@domain.com,password
demo_zzq6@atmail.com,password,june@domain.com,password 

Save the file as migrate-users.csv. Then, in the same directory, execute this command: 

{ while IFS=',' read u1 p1 u2 p2; do
imapsync --host1 [source-hostname] --authmech1 PLAIN --user1 "$u1" --password1 "$p1" --prefix1 INBOX/ --sep1 / \
--host2 [destination-hostname] --authmech2 PLAIN --user2 "$u2" --password2 "$p2" --prefix2 INBOX. --sep2 . ...
done ; } < migrate-users.csv

Replace [source-hostname] with the hostname/IP of the source server. Replace [destination-hostname] with the hostname/IP of the destination server.

Executing the above command will then import all emails to the destination accounts.

Please note, this article presumes that the namespace separator of host1 is "/" and host2 is ".". 

--prefix1 INBOX/ --sep1 /
--prefix2 INBOX. --sep2 .

These are optional, but may be necessary as atmail strictly uses "." throughout its front end infrastructure.

 

Note: When migrating, the order of messages in the inbox will be arranged/displayed by the date the message was last modified (Not necessarily the date the email was received).

 

Have more questions? Submit a request

Comments