Go to main content
<Back
You are here:
Print

It may happen that you have to migrate out of necessity, mailboxes or even entire mail servers that maybe use different email storage formats such as Mailbox and maildir, incompatible or extremely difficult candidates for a raw migration by only moving files from one folder to another working at the filesystem level, or simply the desire to migrate the contents of a mailbox (perhaps one of the free ones like gmail, to our new domain).

The best, most professional and performing solution is to use the tool IMAPSYNC extension that working on the command line allows you to perform an incremental migration from box A to box B in a completely painless way.

This tool recoverable on http://freshmeat.net/projects/imapsync/ and available for windows and Linux systems, it can be installed very easily via apt for debian and derived systems and yum for derived Redhat systems.

Prerequisites

In addition to downloading and installing the tool correctly, you need to have IMAP access to both mailboxes is among the fundamental prerequisites, both the source and the destination.

If you do not have IMAP support available even on one of the two, try to talk to the supplier to enable the IMAP protocol which responds on the default port 143. In some rare cases the IMAP protocol could be an additional value-added service, in most cases, a feature enabled in all hosting providers and mail service providers.

Obviously you will also need to know the IMAP parameters of the source server, the destination server and the credentials of the respective source and destination boxes, i.e. username and password.

To be clear in short, you must have all the data (the same identical) that you would use if you were configuring your e-mail account on one of the mail clients such as outlook, mail for MacOS or any other you want.

Its use is decidedly elementary: in practice it is necessary to pass the data to connect to the server from which to copy and then those of the server where the e-mails are to be copied.

Syntax and operation.

The command line syntax is concerned with essentially specifying the host name and credentials for both the source and destination servers.

An example is the following:

imapsync --host1 SERVER_ADDRESS1 --user1 USER_1 --host2 SERVER_ADDRESS2 --user2 USER_2 --authmech1 PLAIN --authmech2 PLAIN --noauthmd5 --ssl2

Obviously you will have to replace some parts above:

SERVER_ADDRESS1 is the IP address or hostname of server number 1
SERVER_ADDRESS2 is the IP address or hostname of server number 2
USER_1 is the user on server number 1
USER_2 is the user on server number 2

The script will ask you for the passwords of the two users, after which the synchronization will begin.

The –ssl2 parameter is necessary as PLAIN authentication is usually only allowed on the ssl encrypted channel.

imapsync has the advantage of synchronizing servers incrementally, the files already synchronized are no longer moved allowing a shorter time in case of subsequent synchronizations.

Among the available options we can indicate whether to use an ssl connection, exclude messages that are too big or too old and / or exclude entire directories.

Be careful to always match the source and destination e-mails, and to correctly enter the e-mail credentials on the source and destination account (which could generally be different: normally the passwords are first set all the same, both originally than in destination, to do first).

If you have difficulty using this tool, you can opt for an outsourcing consultancy and contact us directly at our address https://managedserver.it/supporto

 

Table of Contents

Do you have doubts? Don't know where to start? Contact us!

We have all the answers to your questions to help you make the right choice.

Chat with us

Chat directly with our presales support.

0256569681

Contact us by phone during office hours 9:30 - 19:30

Contact us online

Open a request directly in the contact area.

DISCLAIMER, Legal Notes and Copyright. RedHat, Inc. holds the rights to Red Hat®, RHEL®, RedHat Linux®, and CentOS®; AlmaLinux™ is a trademark of the AlmaLinux OS Foundation; Rocky Linux® is a registered trademark of the Rocky Linux Foundation; SUSE® is a registered trademark of SUSE LLC; Canonical Ltd. holds the rights to Ubuntu®; Software in the Public Interest, Inc. holds the rights to Debian®; Linus Torvalds holds the rights to Linux®; FreeBSD® is a registered trademark of The FreeBSD Foundation; NetBSD® is a registered trademark of The NetBSD Foundation; OpenBSD® is a registered trademark of Theo de Raadt; Oracle Corporation holds the rights to Oracle®, MySQL®, MyRocks®, VirtualBox®, and ZFS®; Percona® is a registered trademark of Percona LLC; MariaDB® is a registered trademark of MariaDB Corporation Ab; PostgreSQL® is a registered trademark of PostgreSQL Global Development Group; SQLite® is a registered trademark of Hipp, Wyrick & Company, Inc.; KeyDB® is a registered trademark of EQ Alpha Technology Ltd.; Typesense® is a registered trademark of Typesense Inc.; REDIS® is a registered trademark of Redis Labs Ltd; F5 Networks, Inc. owns the rights to NGINX® and NGINX Plus®; Varnish® is a registered trademark of Varnish Software AB; HAProxy® is a registered trademark of HAProxy Technologies LLC; Traefik® is a registered trademark of Traefik Labs; Envoy® is a registered trademark of CNCF; Adobe Inc. owns the rights to Magento®; PrestaShop® is a registered trademark of PrestaShop SA; OpenCart® is a registered trademark of OpenCart Limited; Automattic Inc. holds the rights to WordPress®, WooCommerce®, and JetPack®; Open Source Matters, Inc. owns the rights to Joomla®; Dries Buytaert owns the rights to Drupal®; Shopify® is a registered trademark of Shopify Inc.; BigCommerce® is a registered trademark of BigCommerce Pty. Ltd.; TYPO3® is a registered trademark of the TYPO3 Association; Ghost® is a registered trademark of the Ghost Foundation; Amazon Web Services, Inc. owns the rights to AWS® and Amazon SES®; Google LLC owns the rights to Google Cloud™, Chrome™, and Google Kubernetes Engine™; Alibaba Cloud® is a registered trademark of Alibaba Group Holding Limited; DigitalOcean® is a registered trademark of DigitalOcean, LLC; Linode® is a registered trademark of Linode, LLC; Vultr® is a registered trademark of The Constant Company, LLC; Akamai® is a registered trademark of Akamai Technologies, Inc.; Fastly® is a registered trademark of Fastly, Inc.; Let's Encrypt® is a registered trademark of the Internet Security Research Group; Microsoft Corporation owns the rights to Microsoft®, Azure®, Windows®, Office®, and Internet Explorer®; Mozilla Foundation owns the rights to Firefox®; Apache® is a registered trademark of The Apache Software Foundation; Apache Tomcat® is a registered trademark of The Apache Software Foundation; PHP® is a registered trademark of the PHP Group; Docker® is a registered trademark of Docker, Inc.; Kubernetes® is a registered trademark of The Linux Foundation; OpenShift® is a registered trademark of Red Hat, Inc.; Podman® is a registered trademark of Red Hat, Inc.; Proxmox® is a registered trademark of Proxmox Server Solutions GmbH; VMware® is a registered trademark of Broadcom Inc.; CloudFlare® is a registered trademark of Cloudflare, Inc.; NETSCOUT® is a registered trademark of NETSCOUT Systems Inc.; ElasticSearch®, LogStash®, and Kibana® are registered trademarks of Elastic NV; Grafana® is a registered trademark of Grafana Labs; Prometheus® is a registered trademark of The Linux Foundation; Zabbix® is a registered trademark of Zabbix LLC; Datadog® is a registered trademark of Datadog, Inc.; Ceph® is a registered trademark of Red Hat, Inc.; MinIO® is a registered trademark of MinIO, Inc.; Mailgun® is a registered trademark of Mailgun Technologies, Inc.; SendGrid® is a registered trademark of Twilio Inc.; Postmark® is a registered trademark of ActiveCampaign, LLC; cPanel®, LLC owns the rights to cPanel®; Plesk® is a registered trademark of Plesk International GmbH; Hetzner® is a registered trademark of Hetzner Online GmbH; OVHcloud® is a registered trademark of OVH Groupe SAS; Terraform® is a registered trademark of HashiCorp, Inc.; Ansible® is a registered trademark of Red Hat, Inc.; cURL® is a registered trademark of Daniel Stenberg; Facebook®, Inc. owns the rights to Facebook®, Messenger® and Instagram®. This site is not affiliated with, sponsored by, or otherwise associated with any of the above-mentioned entities and does not represent any of these entities in any way. All rights to the brands and product names mentioned are the property of their respective copyright holders. All other trademarks mentioned are the property of their respective registrants. MANAGED SERVER® is a European registered trademark of MANAGED SERVER SRL, with registered office in Via Flavio Gioia, 6, 62012 Civitanova Marche (MC), Italy and operational headquarters in Via Enzo Ferrari, 9, 62012 Civitanova Marche (MC), Italy.

JUST A MOMENT !

Have you ever wondered if your hosting sucks?

Find out now if your hosting provider is hurting you with a slow website worthy of 1990! Instant results.

Close the CTA
Back to top