For those of you who are changing their IMAP email account to a different server, there is a very nice utility called imapsync.
The utility is actually written in PERL so it can run on any number of hosts that support PERL scripting, and while it has many config options, here is the actual command we used to transfer an email account from our server to Google Apps Mail account(GMail is the same) from a Linux box:
The command
imapsync \
--host1 thinkovi.com --user1 email@thinkovi.com --pa...