Arama Yap Mesaj Gönder
Biz Sizi Arayalım
+90
X
X
X
X

Knowledge Base

Homepage Knowledge Base General Easy Email Migration Guide with Ima...

Bize Ulaşın

Konum Halkalı merkez mahallesi fatih cd ozgur apt no 46 , Küçükçekmece , İstanbul , 34303 , TR

Easy Email Migration Guide with Imapsync V3

In email server changes, transferring user accounts and their contents from the old server to the new server is a critical process. imapsync is one of the most reliable open-source tools for this task. Especially with version v3, it offers a more stable, faster, and compatible structure. In this article, we explain in detail how to perform email migration between two different IMAP servers using Imapsync v3.


1. What is Imapsync?

Imapsync is a command-line tool used to securely copy or move email content between two email servers using the IMAP protocol. It can perform migration without deleting, and can synchronize only new emails.


2. Requirements

  • Debian/Ubuntu system

  • Perl 5.30+ and related modules

  • Root or sudo access


3. Imapsync v3 Installation

apt update && apt upgrade -y
apt install git make cpanminus libauthen-ntlm-perl libterm-readkey-perl -y
cd /usr/local/src
wget https://github.com/imapsync/imapsync/archive/refs/tags/rel3.1.6.tar.gz
 tar xzf rel3.1.6.tar.gz
cd imapsync-rel3.1.6
make install

Alternatively, for quick installation:

apt install imapsync -y  # Also available in Debian/Ubuntu repositories (may be outdated in some versions)

4. Usage Format

imapsync \
--host1 mail.oldserver.com --user1 [email protected] --password1 'old_password' \
--host2 mail.newserver.com --user2 [email protected] --password2 'new_password' \
--ssl1 --ssl2 --syncinternaldates --authmech1 LOGIN --authmech2 LOGIN

Explanation:

  • --ssl1 and --ssl2: SSL is enforced on both servers

  • --syncinternaldates: Preserves the original dates of the emails

  • --authmech: Login method (LOGIN, PLAIN, etc.)


5. Migration with a List for Automation

Example user list:

[email protected];[email protected];password1;password2
[email protected];[email protected];password3;password4

Bulk migration with script:

#!/bin/bash
while IFS=';' read -r u1 u2 p1 p2; do
  imapsync --host1 mail.old.com --user1 "$u1" --password1 "$p1" \
           --host2 mail.new.com --user2 "$u2" --password2 "$p2" \
           --ssl1 --ssl2 --syncinternaldates
  echo "$u1 → $u2 completed"
done < users.txt

6. Frequently Used Additional Parameters

Parameter Description
--delete2 Deletes emails not present in the source (CAREFUL)
--exclude "Trash" Does not move the Trash folder
--addheader Adds the migration date to the migrated email
--fast Faster matching algorithm

7. Recommended Usage Strategy

  1. Run on small accounts for pre-testing.

  2. Test with --dry before the actual migration.

  3. Increase speed with --nofoldersizes on large accounts.

  4. After the process is complete, request verification from the user on the target server.


Imapsync v3 is a powerful solution for fast and reliable email migration operations. The entire process can be managed directly via SSH without using a control panel. It is a preferred tool for both corporate and individual migrations, and when used with the correct parameters, it can successfully perform mail migration without data loss.

 

Can't find the information you are looking for?

Create a Support Ticket
Did you find it useful?
(3590 times viewed / 22 people found it helpful)

Call now to get more detailed information about our products and services.

Top