<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>Nothing To See Here comments on Making offlineimap not die</title>
    <link>http://www.innocuous.org/</link>
    <language>en-us</language>
    <ttl>40</ttl>
    <description>Nothing To See Here comments</description>
    <item>
      <title>"Making offlineimap not die" by tibbetts</title>
      <description>&lt;p&gt;I love &lt;a href="http://gopher.quux.org:70/devel/offlineimap/"&gt;offlineimap&lt;/a&gt;. I even love the quirky way it is hosted on a gopher site. The functionality is awesome. For those of you who don't know, offlineimap syncronizes a remote IMAP mailbox heirarchy with a local Maildir folder heirarchy. This means you get disconnected IMAP operation with all your favorite Maildir clients (like &lt;a href="http://mutt.org"&gt;mutt&lt;/a&gt;), while still retaining the ability to access your mail using other IMAP clients.&lt;/p&gt;&lt;p&gt;
However, offlineimap crashes too often. Every couple of days I will fail to get any new mail for an hour or two, and realize that offlineimap has crashed. And due to Murphy's law this generally correlates with a time when I was recieving some important mail.&lt;/p&gt;&lt;p&gt;
The solution is very simple. I am using &lt;a href="http://directory.fsf.org/zenity.html"&gt;zenity&lt;/a&gt;, a command line tool for displaying dialog boxes, and running offline imap in a loop. Every time it dies, I get a pop-up dialog, and can say OK to restart it, or Cancel to end the loop. The little shell script to do this is as follows:&lt;/p&gt;&lt;p&gt;
#!/bin/sh&lt;/p&gt;&lt;p&gt;
/usr/bin/offlineimap -u TTY.TTYUI;&lt;/p&gt;&lt;p&gt;
while zenity --question --text "Offlineimap died. Restart?"; do&lt;/p&gt;&lt;p&gt;
    /usr/bin/offlineimap -u TTY.TTYUI;&lt;/p&gt;&lt;p&gt;
done&lt;/p&gt;&lt;p&gt;
&lt;/p&gt;

</description>
      <pubDate>Fri, 20 Jan 2006 12:29:48 EST</pubDate>
      <guid>&lt;a href="/articles/2006/01/20/making-offlineimap-not-die"&gt;Making offlineimap not die&lt;/a&gt;</guid>
      <link>&lt;a href="/articles/2006/01/20/making-offlineimap-not-die"&gt;Making offlineimap not die&lt;/a&gt;</link>
    </item>
  </channel>
</rss>
