ImapSync to Gmail Script

Yes sounds easy but I spent sometime looking for the perfect way to import imap mail for any mail server to imap gmail. This is particularly useful if you are transferring your existing mail accounts to google hosted application. This handles transferring all existing imap folders and even putting your sent mail, spam, drafts, trash [...]