Welcome to the imapsync web site!
What is imapsync?
The purpose of imapsync is to migrate IMAP accounts or to backup IMAP accounts.
IMAP is one of the three current standard protocols to access mailboxes,
the two other are POP3 and HTTP with webmails (often tied to an IMAP server).
imapsync software is a command line tool that allows incremental and
recursive IMAP transfers from one mailbox to another, both anywhere on the internet
or in your local network.
"Incremental" means you can stop the transfer at any time
and restart it later efficiently.
"Recursive" means the complete folders hierarchy can be copied.
"Command line" means it's not a graphical tool, on Windows you have to run imapsync
from a batch file.
imapsync can't migrate Contacts and Calendars.
Most email systems don't set or get Contacts or Calendars via the IMAP protocol.
No way via IMAP, no way via imapsync
(but it can be done with other tools or via export/import of csv or ics files).
imapsync is not suitable for maintaining a synchronization between two active imap accounts while the user
is working on both sides.
Use offlineimap (written by John Goerzen)
or mbsync (written by Michael R. Elkins)
for bidirectionnal (2 ways) synchronizations.
Alternatives to imapsync are listed in the Similar softwares section.
Facts and figures for 2011-2014
- 4000 to 5000 users per month (48000 users a year).
- 6 to 39 millions mailboxes transfers per month.
- 158 millions transfers for 2013, that is five whole mailboxes synced per second.
- Operating systems run by imapsync users (in 2013):
- Linux: 70%
- Win32: 14%
- Darwin: 6%
- FreeBSD: 10%
- Solaris: 0.15%
- OpenBSD: 0.02%
- Other: 0.46%
- Highest use rate: about 56 millions of IMAP mailbox transfers by just one user
Where all those numbers come from?
To know wether a newer imapsync exists or not imapsync does a http GET to the file VERSION.
Via the User-agent parameter it also sends:
- imapsync release
- Perl version
- Mail::IMAPClient version
- Operating System
You can remove this behavior by adding option --noreleasecheck on the command line
(or by setting $releasecheck = 0 in the source code).
Check CVE-2013-4279.
Latest release is imapsync
imapsync was written on
See ChangeLog to know what's new in details since 2001.
New features or bugfixes since previous releases:
- 1.592 Logging by default! (internal feature)
- Caveat to upgrade: New IO::Tee Perl module dependency, for logging. See the INSTALL file.
- Windows upgrade: Win32 binary is now distributed in a zip file with two batches scripts ready to use it.
- Enhancement: Added logging by default in subdirectory LOG_imapsync/
- Enhancement: Added option --log turned on by default. Use --nolog to disable logging.
- Enhancement: Added option --logfile. Default is like LOG_imapsync/YYYY_MM_DD_HH_MM_SS_user2.txt
where YYYY_MM_DD_HH_MM_SS is the launching date and time like 2014_05_20_23_45_10
- Enhancement: Added option --disarmreadreceipts to fix resending read receipts on host2. A must with Exchange as host2.
- Enhancement: Added FTGate support (no EXAMINE imap command used anymore).
- Usability: Updated the code to easily switch on --noreleasecheck by default but allowing --releasecheck (some users want this feature).
- Usability: Warn syncing messges will not be simulated when --dry mode is on and folder on host2 does not exist yet.
- Bug fix: Make TLS works with last IO::Socket::SSL default value (Added SSL_verify_mode => 'SSL_VERIFY_NONE') in --tls mode.
- Bug fix: Fixed bug when creating folders on host2 with --sep2=\\ (Lotus Notes).
- Bug fix: Try to get folder size when a folder on host2 has the same name but with a different case
like OLD_MAIL -> old_mail. Avoid "does not exist" output.
- 1.584
- Enhancement: Added --minmaxlinelength to select messages with long lines only.
It helps to diagnostic Echange error on messages with lines longer than 9000 characters
- Enhancement: Added --debugmaxlinelength
- Bug fix: --ssl1 --tls2 was buggy because of default SSL_VERIFY_PEER.
"Can not go to tls encryption on [localhost]:Unable to start TLS: Cannot determine peer hostname for verification..."
- Bug fix: Check if going to tls is ok, exit otherwise with explicit error message.
Thanks to Dennis Schridde for reporting this ugly bug that deserves this CVE-2014-2014.
- Debug: Print separator given by NAMESPACE even when --sep1 oe --sep2 is used.
- Debug: Prints prefix given by NAMESPACE even when --prefix1 or --prefix2 is used.
It is a preparation for advising not to use --prefix unless suggested.
Good changes made before, listed because they can help:
- Enhancement: Added --skipcrossduplicates to avoid copying messages that are already copied in another folder, good from Gmail to X.
- Enhancement: Added --debugcrossduplicates to print which messages (UIDs) are skipped with --skipcrossduplicates (and in what other folders they are).
- Enhancement: Added --folderfirst string: sync this folder first. --folderfirst "Work" --folderfirst "Friends"
- Enhancement: Added --folderlast string: sync this folder last. --folderlast "[Gmail]/All Mail" etc.
- Enhancement: Added --maxmessagespersecond to limit messages tranfer rate and fix Office365 throttle limitation (use --maxmessagespersecond 4).
- Enhancement: Added --maxbytespersecond to limit byte transfer rate.
- Enhancement: Added --debugmemory option that prints memory consumption after each message is copied.
- Enhancement: Added --authmech EXTERNAL.
- Enhancement: Adapted behavior for allowing --maxdate --mindate with --noabletosearch.
Use internat date instead of Date: header.
- Enhancement: QQMail IMAP4Server success (with --noabletosearch option)
- Usability: Apply same treatment to --delete2duplicates as --delete2.
If --uidexpunge2 can be done, do it, else do --expunge2 (unless --nouidexpunge2 or --noexpunge2).
- Usability: Added --timeout in the --help output. Default timeout is 120 seconds now
(was nothing by imapsync, 600 with underlying modules).
- Enhancement/Bug fix: Added --ssl1_SSL_version and --ssl2_SSL_version to force the SSL_version
in case the default auto-negociation does not work. Example: --ssl1 --ssl1_SSL_version SSLv3
- Enhancement: Added option --messageidnodomain to fix Mailenable bug changing the domain part of Message-Id header, and avoid duplicates
- Enhancement: Added option --syncflagsaftercopy to fix Mailenable bug not getting the flags with the APPEND
- Enhancement: Added option --maxlinelength to skip messages whose max line length is over a number of bytes.
Exchange 2013 and Office365 need --maxlinelength 1000 (which is a RFC2822 must) to avoid disconnections.
- Usability: Added --fixInboxINBOX, turned on by default, to map automatically Inbox INBOX folder names.
- Usability: IMAP server removing consecutive spaces on the header part doesn't generate duplicates (MailEnable does that)
- Usability: SSL_verify_mode 0 to avoid warning about Man-In-The-Middle.
- Enhancement: Added XOAUTH authentication. Thanks to Eduardo Bortoluzzi Junior.
- Enhancement: Added --search1 and --search2 to allow different searches on each host.
- Usability: Added --delete1 as an alias for --delete
- Speed: Option --nocheckmessageexists is activated by default since --checkmessageexists often slow down transfers too much.
- Usability: Option --foldersizesatend is on if --foldersizes is on. Off if --nofoldersizesatend
- Usability: Added host2 minus host1 statistic: number of messages and bytes.
One difference at the start and one at the end.
Useful to detect quickly a difference between host2 and host1.
Need both --foldersizes and --foldersizesatend options (which are on by default).
- Usability: Added --foldersizesatend.
It gets the folders sizes at the end of the whole transfer.
Turned on by default (use --nofoldersizesatend to turn it off).
- Enhancement: Added option --delete2duplicates;
it deletes messages in host2 that are duplicates.
--delete2duplicates is on when --delete2 is set unless --nodelete2duplicates is set too.
- Enhancement: Added option --pidfilelocking;
it aborts imapsync, when just launched,
in case another imapsync may be running.
Turned off by default
- Usability: Added option --showpasswords.
it shows passwords on output instead of "MASKED".
Turned off by default.
Useful to restart a run by reading the log
or to see what happen with special characters.
- Bug fix: Added option --fixslash2
to avoid the 'Invalid mailbox name' error.
It acts when --sep1 is character / and --sep2 is not character /
and host1 folder name contains --sep2 characters.
Turned on by default (--nofixslash2 to unable it).
- Enhancement: Added option --noabletosearch
to allow the listing of messages without the imap "SEARCH ALL" command.
It's useful for playing with poor imap servers like Softalk 7.6.4
(8.6 is fine with SEARCH ALL).
- Enhancement: Added --noexpungeaftereach
to speedup --delete --expunge from Gmail.
- Enhancement: Added option --nocheckmessageexists to speed up with Tobit imap server as host1.
- Enhancement: Added option --exitwhenover option to avoid locking
when transfers exceed maximum limit.
See for example this Gmail constraint
- imapsync ... --exitwhenover 2500000000 # 2.5GB if host1 is Gmail
- imapsync ... --exitwhenover 500000000 # 500MB if host2 is Gmail
- Usability: Default headers used to identify a message are now "Message-Id" and "Received"
(Exchange compatibility bu default).
- Enhancement: Added option --addheader to fix the issue
"ignored (no header so we ignore this message)" (on Sent folder usually).
Thanks to Ameir Abdeldayem
- Enhancement: Added --nofilterflags to check any STORE flags
by ignoring PERMANENTFLAGS (Exchange tests)
Simple transfer on Windows
Batch file example imapsync_example.bat
that you can easily adapt with your parameters.
Simple transfer on Linux
Bourne shell script example imapsync_example.sh
that you can easily adapt with your parameters.
Massive transfers (many mailboxes)
In order to migrate many mailboxes, you should use a loop over a csv
file containing only the data credentials.
An example of this file is file.txt,
it can be used with the two following command scripts.
On Windows, see sync_loop_windows.bat
batch example.
On Unix, see sync_loop_unix.sh
example.
Who is the author?
Gilles LAMIRAL
Email: gilles.lamiral@laposte.net
Good feedback is always welcome, bad feedback is often welcome.
Where to talk about imapsync?
A nice place to talk about imapsync is the public
imapsync mailing-list (see below section Mailing-List).
Buy imapsync
Buy complete and latest imapsync for 50 EUR.
There is no trial version but I offer 30-day money back guarantee.
For 50 EUR you will get:
- Standalone imapsync.exe for win32, easy installation done by a zip extraction anywhere.
See README_Windows.txt for details.
- Imapsync Perl source code for any operating system, Unix, Windows, Macintosh.
- Lifetime of imapsync updates without extra payment.
- 30-day money back guarantee! No question asked nor condition to get a refund, really.
- No limit to do anything with imapsync and its license.
For 100 EUR more you can get imapsync full professional support,
provided by the imapsync designer and developper, Gilles LAMIRAL the name.
The support is done in English, mostly by email or eventually phone/skype
(office hours from 12:00 to 22:00 UTC).
My English level has always been efficient to solve any technical issue,
I like watching American movies with the original soundtrack.
I've been supporting imap migrations since 2001.
The support features helping you to get your imap migration job done, quickly if possible.
Support includes things like how to deal with special imap server softwares,
choosing and explaining options, explaining error messages,
solving authentication issues,
dealing with speed, quotas,
running in parallel, etc.
You will be redirected to a download link just after the payment.
You will also receive an email from gilles.lamiral@laposte.net a few minutes later
(can fall in Spam folder sometimes).
Please make sure the delivery postal address you enter for the invoice is your accounting department's,
since revised editing is not easy and prohibited by law.
The gpg signed invoice will be sent within a few days by email.
For those of you who buy support contact me (Gilles LAMIRAL) by email or phone:
- Email address: gilles.lamiral@laposte.net.
- Professional phone number: +33 951 84 42 42 (France) I can call you back toll-free in many countries.
- Mobile phone number: +33 620 79 76 06 (France).
Documentation
Read the INSTALL file
to know how to install imapsync on your system.
Windows users should read directly README_Windows.txt.
The README file has many tips
to understand imapsync and succeed in your migration or backup.
The FAQ file presents Frequently Asked Questions
(and not so frequently asked ones).
The ChangeLog
to read what changed in details since 2001.
The TODO file
lists what may be coded or done in the future.
All the people I thank are in the
CREDITS file.
What you're allowed to do with imapsync is listed in the LICENSE file (well worth it).
The imapsync mailing list
The public mailing-list may be the best way to get free and gratis support (not as quick as the professional support).
You can write to the mailing-list even if you're not subscribed to it.
In that case you will receive a confirmation message each time you post (to avoid spam).
To write on the mailing-list, the address is:
imapsync@linux-france.org
To subscribe, send a message to:
imapsync-subscribe@listes.linux-france.org
To unsubscribe, send a message to:
imapsync-unsubscribe@listes.linux-france.org
To contact the person in charge for the list:
imapsync-request@listes.linux-france.org
The list archives are available at
http://linux-france.org/prj/imapsync_list/
So consider that the list is public, anyone can see your post.
Use a pseudonym or do not post to
this list if you want to stay private.
Thank you for your participation to the imapsync mailing-list!
Lists of imap server software failures and success stories
Let's start with reported failure stories over the past.
Maybe new imapsync releases can run successfully with them.
Don't hesitate to have a try, It's been a long time since last failure occured,
I will help you and make efforts to switch them to the success list,
that's my job.
- DBMail 0.9, 2.0.7 (GPL). But most other DBMail releases are supported (see below).
- Hotmail since hotmail.com does not provide IMAP access.
- Imail 7.04 (maybe).
- MailEnable 1.54 (Proprietary) but MailEnable 4.23 is supported.
- (2011) MDaemon 12.0.3 as host2
but MDaemon is supported as host1.
MDaemon is simply buggy with the APPEND IMAP command with any IMAP email client.
Now the long reported success stories list:
62 different imap server softwares supported!
[host1] means "source server" and [host2] means "destination server":
- 1und1 H mimap1 84498 [host1], H mibap4 95231 [host1](http://www.1und1.de/)
- a1.net imap.a1.net IMAP4 Ready [host1]
- Apple Server 10.6 Snow Leopard [host1]
- Archiveopteryx 2.03, 2.04, 2.09, 2.10 [host2], 3.0.0 [host2]
(OSL 3.0) (http://www.archiveopteryx.org/)
- Atmail 6.x [host1] http://atmail.com/
- Axigen Mail Server Version 8.0.0 (http://www.axigen.com/)
- BincImap 1.2.3 (GPL) (http://www.bincimap.org/)
- CommuniGatePro server (Redhat 8.0) (Solaris), CommuniGate Pro 5.2.17[host2] (CentOS 5.4)
(http://www.communigate.com/)
- Courier IMAP 1.5.1, 2.2.0, 2.1.1, 2.2.1, 3.0.8, 3.0.3, 4.1.1 (GPL)
(http://www.courier-mta.org/imap/)
- Critical Path (7.0.020)
- Cyrus IMAP 1.5, 1.6,
2.1, 2.1.15, 2.1.16, 2.1.18
2.2.1, 2.2.2-BETA, 2.2.3, 2.2.6, 2.2.10, 2.2.12, 2.2.13,
2.3-alpha (OSI Approved), 2.3.1, 2.3.7, 2.3.16
(http://cyrusimap.web.cmu.edu/)
- David Tobit V8. (http://www.tobit.com/)
- DBMail 1.2.1, 2.0.4, 2.0.9, 2.2rc1 (GPL).
2.0.7 seems buggy. (http://www.dbmail.org/)
- DBOX 2.41 System [host1] (http://www.dbox.handshake.de/).
- Deerfield VisNetic MailServer 5.8.6 [host1]
(http://www.deerfield.net/products/visnetic-mailserver/)
- dkimap4 [host1]
- Domino (Notes) 4.61[host1], 6.5, 5.0.6, 5.0.7, 7.0.2, 6.0.2CF1, 7.0.1[host1], 8.0.1[host1]
(http://www-01.ibm.com/software/lotus/products/notes/)
- Dovecot 0.99.10.4, 0.99.14, 0.99.14-8.fc4, 1.0-0.beta2.7,
1.0.0 [dest/source] (LGPL) (http://www.dovecot.org/) (http://www.dovecot.org/)
- Eudora WorldMail v2 (http://www.eudora.com/worldmail/)
- FirtClass 12 [host1] hard so read the FAQ! (http://www.firstclass.com/)
- FTGate [host1][host2] (http://www.ftgate.com/)
- Fusemail imap.fusemail.net:143 (https://www.fusemail.com/).
- Gimap (Gmail imap) [host1] [host2] (http://mail.google.com/)
- GMX IMAP4 StreamProxy. (http://www.gmx.com/)
- Godaddy IMAP (since Godaddy runs Courier) (http://www.godaddy.com/)
- Groupwise IMAP (Novell) 6.x and 7.0. Buggy so see the FAQ.
(http://www.novell.com/products/groupwise/)
- hMailServer 5.40-B1950 [host12], 5.3.3 [host2], 4.4.1 [host1], HMAILSERVER 5.3.2-B1769 on windows 2003 [hsot2]
(http://www.hmailserver.com/)
- IceWarp Server 10.4.5 [host1] (http://www.icewarp.com/)
- iPlanet Messaging server 4.15, 5.1, 5.2
(http://en.wikipedia.org/wiki/Oracle_Communications_Messaging_Server)
- IMail 7.15 (Ipswitch/Win2003), 8.12, 11.03 [host1] (http://www.imailserver.com/)
- Kerio 7.2.0P1 [host1] (http://www.kerio.com/)
- Mail2World IMAP4 Server 2.5 [host1] (http://www.mail2world.com/)
- MailEnable 4.23 [host1][host2], 4.26 [host1][host2], 5 [host1]
(http://www.mailenable.com/)
- MDaemon 7.0.1, 8.0.2, 8.1, 9.5.4 (Windows server 2003 R2 platform), 9.6.5 [host1],
12 [host2], 12.0.3 [host1], 12.5.5 [host1]
(http://www.altn.com/)
- Mercury 4.1 (Windows server 2000 platform) (http://www.pmail.com/)
- Microsoft Exchange Server 5.5, 6.0.6249.0[host1], 6.0.6487.0[host1],
6.5.7638.1 [host2], 6.5 [host1], Exchange 2007 SP1 (with Update Rollup 2),
Exchange2007-EP-SP2,
Exchange 2010 RTM (Release to Manufacturing) [host2],
Exchange 2010 SP1 RU2 [host2]
(http://www.microsoft.com/exchange/)
- Mirapoint server 4.1.9-GA [host1] (http://www.mirapoint.com/)
- Netscape Mail Server 3.6 (Wintel)
- Netscape Messaging Server 4.15 Patch 7
- Office 365 [host1] [host2] (http://office365.com)
- OpenMail IMAP server B.07.00.k0
- OpenWave (http://www.openwave.com/)
- Oracle Beehive [host1]
(http://www.oracle.com/technetwork/middleware/beehive/)
- Parallels Plesk Panel 9.x [host2] 11.x [host2] (http://www.parallels.com/)
- Qualcomm Worldmail (NT) (http://www.eudora.com/worldmail/)
- Rockliffe Mailsite 5.3.11, 4.5.6 (http://www.mailsite.com/)
- RackSpace hoster secure.emailsrvr.com:993 http://www.rackspace.com/)
- QQMail IMAP4Server [host1] [host2] (See FAQ) https://en.mail.qq.com/
- Samsung Contact IMAP server 8.5.0
- Scalix v10.1, 10.0.1.3, 11.0.0.431, 11.4.6 (http://www.scalix.com/)
- Sendmail Mail Store IMAP4rev1 (5.5.6/mstore-5-5-build-1874 [host1].
- SmarterMail, Smarter Mail 5.0 Enterprise, Smarter Mail 5.5 [host1], SmarterMail Professional 10.2 [host1],
Smarter Mail 11.7 [host1][host2].
(http://www.smartertools.com/)
- Softalk Workgroup Mail 7.6.4 [host1] (http://www.softalkltd.com/products/download_wm_v7.asp).
- SunONE Messaging server 5.2, 6.0 (SUN JES - Java Enterprise System) (http://www.oracle.com/)
- Sun Java(tm) System Messaging Server 6.2-2.05, 6.2-7.05, 6.3 (http://www.oracle.com/)
- Surgemail 3.6f5-5, 6.3d-72 [host2] (http://netwinsite.com/surgemail/)
- UW-imap servers (imap-2000b) rijkkramer IMAP4rev1 2000.287
(RedHat uses UW like 2003.338rh), v12.264 Solaris 5.7 (OSI Approved)
(http://www.washington.edu/imap/)
- VMS, Imap part of TCP/IP suite of VMS 7.3.2 (http://h71000.www7.hp.com/openvms/)
- Yahoo [host1] (http://www.yahoo.com/)
- Zarafa 6,40,0,20653 [host1] (http://www.zarafa.com/)
- Zarafa ZCP 7.1.4 IMAP Gateway [host2]
- Zimbra-IMAP 3.0.1 GA 160, 3.1.0 Build 279, 4.0.5, 4.5.2, 4.5.6,
Zimbra 5.0.24_GA_3356.RHEL4 [host1], 5.5, 6.x
(http://www.zimbra.com/)
Similar softwares
Online IMAP migration services
I have no share in these free or paid services.
I don't think they use imapsync.
Prices are given par mailbox and may be outdated (december 2011).
This document last modified on
($Id: index.shtml,v 1.206 2014/05/29 23:41:08 gilles Exp gilles $)