This is an updated version of the IMAP Migration Tool since there are no updates in the paste 9 years and some parts of the code are stuck.
This is a updated version of that excelent script, with all the bugfixes that I found, feel free to suggest any improve!