Archive for October 8th, 2007

Python imapcopy script

Monday, October 8th, 2007

I needed to be able to move from Zimbra to Exchange 2007. After trying to use IMAPCopy and IMAPSync I became frustrated. IMAPCopy kept on crashing, IMAPSync was trying to look at changes back and forth, but I just want a fast straightforward copy to happen. The frustration of this process prompted me to write pyMAPCopy.

There is one issue with this code, it bails out on messages larger than about 5 MB. Other than that it works. I tested this on windows with ActivePython 2.5.

 To use this, get the file that is linked here and rename the extension from .txt to .py (remove the .txt part). Make sure you have installed activepython which is downloadable from the ActiveState website: http://www.activestate.com/Products/activepython/index.plex

Once this is installed, open a dosbox and browse to the folder that holds the script. Then type in pymapcopy.py and hit enter. You will be asked to type in the server names user names and passwords. Optionally this can be specified on the command line as well, type imapcopy.py -h for more info.

Download pyMapCopy