<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Edwin Huertas &#187; gmail</title>
	<atom:link href="http://www.edwin-huertas.com/tag/gmail/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.edwin-huertas.com</link>
	<description>web entrepreneur - software engineer - linux sys admin</description>
	<lastBuildDate>Sun, 27 Mar 2011 18:03:58 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.1</generator>
		<item>
		<title>Backup your Gmail account with getmail in ubuntu 8.04 LTS</title>
		<link>http://www.edwin-huertas.com/backup-gmail-getmail-ubuntu/</link>
		<comments>http://www.edwin-huertas.com/backup-gmail-getmail-ubuntu/#comments</comments>
		<pubDate>Sat, 13 Feb 2010 21:08:38 +0000</pubDate>
		<dc:creator>Edwin</dc:creator>
				<category><![CDATA[General]]></category>
		<category><![CDATA[Ubuntu]]></category>
		<category><![CDATA[backup]]></category>
		<category><![CDATA[getmail]]></category>
		<category><![CDATA[gmail]]></category>
		<category><![CDATA[imap]]></category>
		<category><![CDATA[pop]]></category>

		<guid isPermaLink="false">http://www.edwin-huertas.com/?p=65</guid>
		<description><![CDATA[Recently we needed to have backups for old email accounts in our Google apps account. We needed to free up some space and [...]]]></description>
			<content:encoded><![CDATA[<p>Recently we needed to have backups for old email accounts in our Google apps account. We needed to free up some space and a way to reference back to the emails in these accounts.</p>
<p>I&#8217;ve found various options with Thunderbird and Mac Mail. But all require to play with the off-line or sync features. Also I needed something that I could run from the backup server without moving 25GB of email from one computer to another. After couple queries in google, I found a good solution which was using getmail to retrieve emails from POP Gmail accounts.</p>
<p>So, here it is. Please remember to activate POP or IMAP feature in your Gmail account settings before start.</p>
<h2><span id="more-65"></span>1. Install <a href="http://pyropus.ca/software/getmail/" target="_self">getmail</a></h2>
<div class="codesnip-container" >
<div class="text codesnip" style="font-family:monospace;">
<ol>
<li class="li1">
<div class="de1">$ sudo apt-get install getmail4</div>
</li>
</ol>
</div>
</div>
<h2>2. Create a folder and file to store the emails</h2>
<div class="codesnip-container" >
<div class="text codesnip" style="font-family:monospace;">
<ol>
<li class="li1">
<div class="de1">$ mkdir backup-emails</div>
</li>
<li class="li1">
<div class="de1">$ cd backup-emails</div>
</li>
<li class="li1">
<div class="de1">$ touch someuser-backup.mbox</div>
</li>
</ol>
</div>
</div>
<h2>3. Create getmail folder and config file and add settings</h2>
<div class="codesnip-container" >
<div class="text codesnip" style="font-family:monospace;">
<ol>
<li class="li1">
<div class="de1">$ mkdir .getmail</div>
</li>
<li class="li1">
<div class="de1">&nbsp;</div>
</li>
<li class="li1">
<div class="de1">$ cd .getmail</div>
</li>
<li class="li1">
<div class="de1">&nbsp;</div>
</li>
<li class="li1">
<div class="de1">$ vi .getmail-gmail</div>
</li>
<li class="li1">
<div class="de1">&nbsp;</div>
</li>
<li class="li1">
<div class="de1">[retriever]</div>
</li>
<li class="li1">
<div class="de1">type = SimpleIMAPSSLRetriever  // Using IMAP here, if you want POP use: SimplePOP3SSLRetriever</div>
</li>
<li class="li1">
<div class="de1">server = imap.gmail.com //for POP use: pop.gmail.com</div>
</li>
<li class="li1">
<div class="de1">username = someuser@yourdomain.com // or someuser@gmail.com</div>
</li>
<li class="li1">
<div class="de1">password = yourpassword</div>
</li>
<li class="li1">
<div class="de1">[destination]</div>
</li>
<li class="li1">
<div class="de1">type = Mboxrd  // (**)</div>
</li>
<li class="li1">
<div class="de1">path = backup-emails/someuser-backup.mbox // (**)</div>
</li>
</ol>
</div>
</div>
<p><span style="color: #333399;">** Please check references links below for more info about other options.</span></p>
<h2>4. start backup, sit back and relax</h2>
<div class="codesnip-container" >
<div class="text codesnip" style="font-family:monospace;">
<ol>
<li class="li1">
<div class="de1">$ cd</div>
</li>
<li class="li1">
<div class="de1">$ getmail -d -r .getmail/getmail.gmail</div>
</li>
</ol>
</div>
</div>
<p>I&#8217;m using -d here because I don&#8217;t need to keep those email account anymore. So you will need to remove it if you&#8217;re planning to continue using the account.</p>
<p>That&#8217;s all, add the command to a cronjob and you are all set.</p>
<p>References:<br />
<a href="http://pyropus.ca/software/getmail/">http://pyropus.ca/software/getmail/<br />
</a><br />
<em><a href="http://blog.pengdeng.com/2008/03/backup-gmail-via-imap-using-getmail_16.html">http://blog.pengdeng.com/2008/03/backup-gmail-via-imap-using-getmail_16.html</a><br />
<a href="http://www.mattcutts.com/blog/backup-gmail-in-linux-with-getmail/"> http://www.mattcutts.com/blog/backup-gmail-in-linux-with-getmail/</a></em></p>
]]></content:encoded>
			<wfw:commentRss>http://www.edwin-huertas.com/backup-gmail-getmail-ubuntu/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

