At revision 1.200, imapsync was changed to use append_file() instead of append_string(). This can be a good thing; otherwise, large messages need to be duplicated in RAM as perl strings, which can be expensive. See
http://www.mail-archive.com/info-cyr.../msg31356.html
But this broke the --syncinternaldates option because Mail::IMAPClient version 2.2.9 ignores the 4th argument. Correct replication of INTERNALDATE is *critical* for migrations to Zimbra.
The /tb flag suggested in this thread doesn't really do the right thing. If we considered Date: headers to be trustworthy, then Zimbra would just use Date: rather than INTERNALDATE. (Although I must say, there are times that I wish it did, or at least that I could choose when searching/sorting.)
The best fix would be to change the behavior of append_file() in Mail::IMAPClient, which doesn't seem to have been maintained since 2003, to accept and act on the same arguments as append_string(). Alternatively, undo the imapsync 1.199->1.200 change and use append_string(), and make sure you have lots of RAM on the imapsync host.