imapsync is a tool for facilitating incremental recursive IMAP transfers from one mailbox to another. It is useful for mailbox migration, and reduces the amount of data transferred by only copying messages that are not present on both servers. Read, unread, and deleted flags are preserved, and the process can be stopped and resumed. The original messages can optionally be deleted after a successful transfer.
| Tags | Communications Email Post-Office IMAP Archiving Mirroring Utilities |
|---|---|
| Licenses | GPL |
| Operating Systems | Windows Windows Windows OS Independent Unix |
| Implementation | Perl |
Recent releases


Changes: Some IMAP servers return a message size that is not equal to the real message size. Now imapsync accepts this silly behavior and leaves the message as is.


No changes have been submitted for this release.


No changes have been submitted for this release.


Changes: The --syncinternaldates option is turned on by default. Timezone is set to TZ=GMT if no timezone is set. A message is ignored when it has no header. A message ID is added in output warning when no header found. The program can run with IMAPClient_3.x.x without redefining any functions (but 3.x.x is still buggy and to be avoided). Unit tests were started.


Changes: The program has begun to be IMAPClient 3.0.0 compliant.
- All comments
Recent commentsFailure story...
From software : * OK [CAPABILITY IMAP4rev1 UIDPLUS CHILDREN NAMESPACE THREAD=ORDEREDSUBJECT THREAD=REFERENCES SORT QUOTA IDLE STARTTLS] fuse45 MailAnyone IMAP v2.2.0 ready. http://www.mailanyone.net Copyright 2003-2007 All rights reserved.
From capability : IMAP4rev1 UIDPLUS CHILDREN NAMESPACE THREAD=ORDEREDSUBJECT THREAD=REFERENCES SORT QUOTA IDLE STARTTLS
Error message:
Host imap.fusemail.net says it has CAPABILITY for AUTHENTICATE STARTTLS
Error login : [imap.fusemail.net] with user [shamael] auth [STARTTLS]: Socket closed while reading data from server.
Provider is fusemail.com
Thanks!
The program doesn't detect an servers (target) BYE message. If there are more than 10 folders after another which are still not present at the target imap host (Read: xx NO unknown folder), the target imap host sends this:
"Read: * BYE too many errors."
The program goes on, but isn't able to synchronize anything, because connection is aborted. Even the final summary doesn't give an error:
++++ Statistics ++++
Time : 36 sec
Messages transferred : 0
Messages skipped : 0
Total bytes transferred: 0
Total bytes skipped : 0
Total bytes error : 0
Detected 0 errors
IMAPSYNC 1.267 - ported to win32 platform
With this version that is in the attachment section of this page
you don't need perl just windows tested on Windows XP
download at http://www.srecko.uni-bk.ac.rs
under projects
I've been using imapsync for a while so far.
I've used it to move from an an old imapd to dovecot and from dovecto to dovecot (new server) with no problems.
I used it 10 minutes ago for the last time moving from dovecot to dbmail, using the following options:
--sep1 "/" --skipheader "^(X-|Received|MIME-|Content-|Disposition-|From|Cc|Reply-|Subject|To|DomainKey|Date).*" --skipsize --syncinternaldates
and it worked perfectly.
Re: Keeps crashing at line 1675
> I've sync'd probably 200 or so addresses
> without issue. However, a few of them
> reliable crash with the following
> message:
>
> Can't use string ("0") as a
> HASH ref while "strict refs"
> in use at /usr/bin/imapsync line 1675.
>
> This happens when there is a long string
> of:
>
> Warning : no header used or found for
> message xxxxxxxxxx
> no header so we ignore this message
>
> I'm using imapsync 1.249 on CentOS 5.
>
> Is there any command line options or
> anything I can add that will handle this
> error?
I'm having the same issue. I have about 30 folders and a few subfolders. Once imapsync hit my Inbox (5000+ messages), it fails with:
++++ Looping on each folder ++++
From Folder [INBOX]
To Folder [INBOX]
++++ From [INBOX] Parse 1 ++++
Can't use string ("0") as a HASH ref while "strict refs" in use at /usr/bin/imapsync line 1813.
I turned debug and debugimap on. It doesn't show anything useful.
-Brian