<?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>joe crobak&#039;s website &#187; Programming</title>
	<atom:link href="http://www.crobak.org/category/prog/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.crobak.org</link>
	<description>sharing what I find</description>
	<lastBuildDate>Sun, 04 Dec 2011 23:18:05 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.2</generator>
		<item>
		<title>Silently broken Gmail</title>
		<link>http://www.crobak.org/2011/04/silently-broken-gmail/</link>
		<comments>http://www.crobak.org/2011/04/silently-broken-gmail/#comments</comments>
		<pubDate>Sat, 02 Apr 2011 22:52:04 +0000</pubDate>
		<dc:creator>joecrow</dc:creator>
				<category><![CDATA[Apple]]></category>
		<category><![CDATA[Programming]]></category>

		<guid isPermaLink="false">http://www.crobak.org/?p=60</guid>
		<description><![CDATA[At work, we have google apps, which comes with several gigs of gmail storage. For email, though, we use outlook server with a low quota. Rather than deleting email, I &#8220;archive&#8221; to gmail via IMAP. One day, though, gmail IMAP &#8230; <a href="http://www.crobak.org/2011/04/silently-broken-gmail/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>At work, we have google apps, which comes with several gigs of gmail storage. For email, though, we use outlook server with a low quota.  Rather than deleting email, I &#8220;archive&#8221; to gmail via IMAP.</p>
<p>One day, though, gmail IMAP silently stopped syncing.  I could login, but no mail was being transfered.  I tried everything &#8212; synchronizing accounts, rebuilding the mailbox, but nothing worked.  I was hoping to enable some more verbose logging, when I came across an old article from eriklabs.com about <a href="http://erikslab.com/2007/07/16/os-x-mailapp-logging/" target="_blank">Mail.app Logging</a>.</p>
<p>After learning the magic incantation, I started up Mail.app to log all operations on port 993 (the SSL port that gmail IMAP uses).  A message in the logs immediately stood out:</p>
<blockquote><p>5.1 BAD [ALERT] Message too large. http://mail.google.com/support/bin/answer.py?answer=8770</p></blockquote>
<p>The prior message logged the timestamp of the offending email, which was over 25MB in size (the max size for Gmail).  Unfortunately, Mail.app had created a large number of copies of this email (over 1,000) and placed them in the &#8220;Recovered Items&#8221; folder.</p>
<p>Even after deleting all of these &#8220;recovered item&#8221; copies, Mail kept making new one.  I tracked down a copy of this file in the .OfflineBackups directory. After removing the file that gmail rejects (see <a href="http://automatica.com.au/2010/01/mail-app-and-its-offline-cache/">http://automatica.com.au/2010/01/mail-app-and-its-offline-cache/</a> &#8212; I chose the file with the large file size in that directory), I was finally able to resync with gmail!</p>
<p>Unfortunately, mail.app was not happy that I removed a file from .OfflineBackups, and it refused to process the rest of the files in that directory.  I wrote the following python script to convert the unprocessed files in .OfflineBackups into a single .mbox file suitable for import into Mail.app.</p>
<p><script src="https://gist.github.com/899970.js"> </script></p>
<p>Thankfully, in the end, everything is back to normal.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.crobak.org/2011/04/silently-broken-gmail/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
	</channel>
</rss>

