Proceed at your own risk. Back up. Don't blame anyone but yourself if you lose all your email or send your personal information to a nefarious third party.
Source: http://hynek.me/articles/fleeing-from-gmail/
-
On a VPS to increase speed (I used a Digital Ocean VPS):
wget http://imaputils.googlecode.com/svn-history/r5/trunk/imapcopy.pl
-
Create a text file called
map
with the following contents:[Gmail]/Sent Mail:Sent Items [Gmail]/All Mail:Archive
-
Using
screen
, open up some stunnels. In two separate windows (so both continue to run):stunnel -c -f -d 1143 -r imap.gmail.com:993 -P '' stunnel -c -f -d 1144 -r fastmail.fm:993 -P ''
Note that you may need to replace fastmail.fm
with mail.messagingengine.com
.
-
In yet another
screen
window run the following, replacing the user-specific stuff as necessary (including an app-specific password if you're using 2-factor authentication for Google):perl imapcopy.pl \ -S localhost:1143/[email protected]/google.password \ -D localhost:1144/[email protected]/new.password \ -M map -m "[Gmail]/All Mail,[Gmail]/Sent Mail"
-
Wait. This may take several hours (I left it running all night for 55,000+ messages). When you're done, change your Google and FastMail passwords for security purposes (or delete your app-specific Google password).
I had to use
stunnel3
on Debian unstable (thestunnel4
package contains both and defaults to 4, which couldn't parse the options) to get it to work, and use the[Google Mail]
prefix, too (German account).