{"id":380,"date":"2007-11-01T09:20:36","date_gmt":"2007-11-01T08:20:36","guid":{"rendered":"http:\/\/wp.devco.net\/?p=380"},"modified":"2007-11-01T09:20:36","modified_gmt":"2007-11-01T08:20:36","slug":"gmail_imap","status":"publish","type":"post","link":"https:\/\/www.devco.net\/archives\/2007\/11\/01\/gmail_imap.php","title":{"rendered":"GMail IMAP"},"content":{"rendered":"

Recently Google announced that all gmail users are getting IMAP<\/a>, this is fantastic news. I won’t actually use it with an IMAP client but I will use it to backup my mail and my meta data! It might even help me to slowly import years and years of old mail into GMail.
\nSo how to do a backup, first you need
imapsync<\/a> or something similar, I’ll use imapsync since that’s what I know.
\nSecond you need a local imap server to dump your gmail account into, I am using my current server that already has other mail in it so I made a sub-folder called GMail<\/i> to sync into.
\nOnce you have imapsync installed its pretty simple with the following command line:<\/p>\n

\n
\nimapsync --host1 imap.gmail.com --ssl1 --user1 you@gmail.com \\\n--password1 secret --host2 your.imap.com --user2 you --password2 secret \\\n--prefix2 INBOX.GMail. --authuser1 you@gmail.com --authmech1 LOGIN \\\n--authmech2 LOGIN --syncinternaldates\n<\/pre>\n<\/blockquote>\n

You’ll need to look at that command and set appropriate options for your user, password and imap account. Also if you’re going to run this on a shared machine where other user accounts exist, you should use the –passfile1<\/i> and –passfile2<\/i> options to not show your password in the output of ps<\/i>.
\nThe process is slow, and creates some duplicates for instance you’ll have a [Gmail]\/All Mail<\/i> folder that contains all your mail but you’ll also have folders for each tag that would have copies of messages that are already in your All Mail. This to me is a small price to pay for the peace of mind that solid off-site backups provide as the thought of my mail on a 3rd party system has been keeping me awake \ud83d\ude42<\/p>\n","protected":false},"excerpt":{"rendered":"

Recently Google announced that all gmail users are getting IMAP, this is fantastic news. I won’t actually use it with an IMAP client but I will use it to backup my mail and my meta data! It might even help me to slowly import years and years of old mail into GMail. So how to […]<\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_et_pb_use_builder":"","_et_pb_old_content":"","footnotes":""},"categories":[5],"tags":[],"_links":{"self":[{"href":"https:\/\/www.devco.net\/wp-json\/wp\/v2\/posts\/380"}],"collection":[{"href":"https:\/\/www.devco.net\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.devco.net\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.devco.net\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/www.devco.net\/wp-json\/wp\/v2\/comments?post=380"}],"version-history":[{"count":0,"href":"https:\/\/www.devco.net\/wp-json\/wp\/v2\/posts\/380\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.devco.net\/wp-json\/wp\/v2\/media?parent=380"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.devco.net\/wp-json\/wp\/v2\/categories?post=380"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.devco.net\/wp-json\/wp\/v2\/tags?post=380"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}