<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet href="/stylesheets/rss.css" type="text/css"?>
<rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:trackback="http://madskills.com/public/xml/rss/module/trackback/">
  <channel>
    <title>@Lathi.net: How I Quit Fighting The Man</title>
    <link>http://blog.lathi.net/articles/2007/01/13/how-i-quit-fighting-the-man</link>
    <language>en-us</language>
    <ttl>40</ttl>
    <description>On Life, Fatherhood, Christianity, and Computers</description>
    <item>
      <title>How I Quit Fighting The Man</title>
      <description>&lt;p&gt;One of the sucky things that&amp;#8217;s happened at work is a corporate migration to MS Exchange.  This is the story about how I&amp;#8217;ve survived the migration.&lt;/p&gt;


	&lt;p&gt;Our IT department has decided to only support two mail clients: MS Outlook and MS Entourage.  So I&amp;#8217;ve been using Entourage.  I resisted at first simply because it was MS and it looked a lot more ugly than Apple&amp;#8217;s Mail.app.  After several months I can truely say I hate it.  The user experience is really awful.  Search is slow and cumbersme.  I&amp;#8217;ve got dialogs popping up all over the place.  Configuration is a hasstle.  The supposed benefit of Entourage is integraton with the rest of the company.  Unfortunately, MS treats Entourage like a red-headed step-child (no offense to all you red-headed step-children out there).  The integration with Exchange is clunky at best.&lt;/p&gt;


	&lt;p&gt;The good news is our IT department also supports the Outlook Web Access (OWA).  This is really a WebDAV interface with pretty good functionality.  I finally found &lt;a href="http://personal.inet.fi/atk/fetchexc/"&gt;fetchExc&lt;/a&gt;.  It&amp;#8217;s like fetchmail, but downloads from Exchange via &lt;span class="caps"&gt;OWA&lt;/span&gt; and dumps it into a local &lt;code&gt;mbox&lt;/code&gt; file.  The bad news is fetchExc is a java app.  That means it was kind of a hassle to setup.  What you&amp;#8217;ll see below is me trying to explain how to get this java app able to run.  Please forgive the Java ignorances.  This is why I took Java off my resume.&lt;/p&gt;


	&lt;p&gt;The first big step is getting the &lt;span class="caps"&gt;SSL&lt;/span&gt; certificate of your &lt;span class="caps"&gt;OWA&lt;/span&gt; host available to Java.&lt;/p&gt;


	&lt;ul&gt;
	&lt;li&gt;&lt;code&gt;openssl s_client -connect your.outlook.web.access.host:https&lt;/code&gt;&lt;/li&gt;
	&lt;/ul&gt;


	&lt;p&gt;This will dump a bunch of text to the screen.  The important bits are between and including &lt;code&gt;-----BEGIN CERTIFICATE-----&lt;/code&gt; and &lt;code&gt;-----END CERTIFICATE-----&lt;/code&gt;.  I copy/pasted this text into an outlook.pem file.&lt;/p&gt;


	&lt;ul&gt;
	&lt;li&gt;&lt;code&gt;sudo keytool -import -alias your.outlook.web.access.host -keystore keystore -file outlook.pem&lt;/code&gt;&lt;/li&gt;
	&lt;/ul&gt;


	&lt;p&gt;This creates a &lt;code&gt;keystore&lt;/code&gt; file that java uses for validating certificates it receives.  I&amp;#8217;m not sure how it&amp;#8217;s different than a &lt;code&gt;.pem&lt;/code&gt; file, but whatever.&lt;/p&gt;


	&lt;p&gt;Now I edit the &lt;code&gt;fetchExc.properties&lt;/code&gt; file appropriately.  I think the important bit is setting &lt;code&gt;MboxFile=/var/mail/dalcorn&lt;/code&gt; (where &lt;code&gt;dalcorn&lt;/code&gt; is my Mac short-name or unix login).  I&amp;#8217;ve also set &lt;code&gt;Delete=false&lt;/code&gt; and &lt;code&gt;All=false&lt;/code&gt;.  This means the mail will be left in Exchange and marked as read.  Only unread messages will be downloaded.&lt;/p&gt;


	&lt;ul&gt;
	&lt;li&gt;&lt;code&gt;java -Djavax.net.ssl.trustStore=/Users/dalcorn/devel/fetchExc/keystore -jar /Users/dalcorn/devel/fetchExc/fetchExc.jar -p /Users/dalcorn/devel/fetchExc/fetchExc.properties &amp;gt; /tmp/fetchExc.log 2&amp;gt;&amp;#38;1&lt;/code&gt;&lt;/li&gt;
	&lt;/ul&gt;


	&lt;p&gt;This is the full command line I use to run the actual fetching of mail.  I&amp;#8217;m not smart enough to add the &lt;code&gt;.pem&lt;/code&gt; file to the global keystore, so I have to specify it explicitly on the command line.  Also, I&amp;#8217;m explicitly calling out the property file as well.  I&amp;#8217;ve got this command running in a cron job every 5 minutes.&lt;/p&gt;


	&lt;p&gt;The next tricky part is getting Apple&amp;#8217;s Mail.app to read this mbox file.  In the olden days, Mail had an account type of &amp;#8220;Unix&amp;#8221; that would read from the default system wide mbox file.  That&amp;#8217;s gone now.  My only other option was to use &lt;span class="caps"&gt;POP&lt;/span&gt;.&lt;/p&gt;


	&lt;ul&gt;
	&lt;li&gt;&lt;code&gt;sudo port install qpopper&lt;/code&gt;&lt;/li&gt;
	&lt;/ul&gt;


	&lt;p&gt;This installs a simple &lt;span class="caps"&gt;POP3&lt;/span&gt; server on my mac.  I did zero configuration.  Whatever the Portfile said for it to do was fine.  I did have to manually start the daemon though.&lt;/p&gt;


	&lt;ul&gt;
	&lt;li&gt;&lt;code&gt;sudo launchctl load -w /opt/local/Library/LaunchDaemons/org.macports.mail.qpopper.plist-dist&lt;/code&gt;&lt;/li&gt;
	&lt;/ul&gt;


	&lt;p&gt;That file in the LaunchDaemons directory will make sure qpopper is started at reboot.&lt;/p&gt;


	&lt;p&gt;After that, I just created a new account in Mail.app of type &lt;span class="caps"&gt;POP&lt;/span&gt; with mail host set to localhost.  Easy, peasy, pumkin weasy.&lt;/p&gt;


	&lt;p&gt;I can&amp;#8217;t tell you how much happier I am not having to spend time in Entourage all day.  It&amp;#8217;s the little things that count.  Big thanks to Juhani Rautiainen who wrote fetchExc!&lt;/p&gt;</description>
      <pubDate>Sat, 13 Jan 2007 23:28:00 -0600</pubDate>
      <guid isPermaLink="false">urn:uuid:00ee3cf7-5d76-4922-bf1d-4b657fe54e17</guid>
      <author>Doug</author>
      <link>http://blog.lathi.net/articles/2007/01/13/how-i-quit-fighting-the-man</link>
      <category>System Administration</category>
      <category>Software</category>
      <category>Mac OS X</category>
      <category>email</category>
      <category>entourage</category>
      <category>fetchexc</category>
      <category>java</category>
      <category>ssl</category>
      <category>howto</category>
    </item>
    <item>
      <title>"How I Quit Fighting The Man" by Doug</title>
      <description>&lt;p&gt;So.  I tried RExchange for quite a while and just couldn&amp;#8217;t get it to connect to my server and do anything.  It always reported I had no mailboxes.  I worked with the author a bit, but didn&amp;#8217;t get anywhere.&lt;/p&gt;


	&lt;p&gt;Yes, Apple&amp;#8217;s Mail &amp;#8220;supports&amp;#8221; MS-Exchange servers&amp;#8230; as long as they have IMAP enabled.  And by &amp;#8220;support&amp;#8221; they mean &amp;#8220;we know to ignore the calendar folders in the IMAP home dir&amp;#8221;.&lt;/p&gt;


	&lt;p&gt;My situation is that my IT dept. refuses to turn on IMAP.  Thus, no built-in Apple Mail &amp;#8220;support&amp;#8221;.&lt;/p&gt;</description>
      <pubDate>Sat, 03 Feb 2007 15:52:26 -0600</pubDate>
      <guid isPermaLink="false">urn:uuid:e695af1d-298f-4272-9d26-ac6219b5447c</guid>
      <link>http://blog.lathi.net/articles/2007/01/13/how-i-quit-fighting-the-man#comment-290</link>
    </item>
    <item>
      <title>"How I Quit Fighting The Man" by Luc Boudreau</title>
      <description>&lt;p&gt;Wasn&amp;#8217;t Mail supposed to support MsExchange servers ??&lt;/p&gt;</description>
      <pubDate>Mon, 15 Jan 2007 10:54:00 -0600</pubDate>
      <guid isPermaLink="false">urn:uuid:84387322-c014-4c95-b93d-bbcfbc1c3598</guid>
      <link>http://blog.lathi.net/articles/2007/01/13/how-i-quit-fighting-the-man#comment-289</link>
    </item>
    <item>
      <title>"How I Quit Fighting The Man" by Scott</title>
      <description>&lt;p&gt;If you&amp;#8217;re feeling adventerous, you might try using the RExchange gem to create an mbox file yourself from a Ruby script.  It&amp;#8217;d be more satisfying than the Java solution you&amp;#8217;ve got now, but probably far more time-consuming ;).  As an added bonus, you&amp;#8217;d also be able to do something with your contacts and appointments, if you need that stuff.&lt;/p&gt;</description>
      <pubDate>Sun, 14 Jan 2007 12:41:10 -0600</pubDate>
      <guid isPermaLink="false">urn:uuid:f271e06c-1a6c-4ea4-bc97-ca021e534247</guid>
      <link>http://blog.lathi.net/articles/2007/01/13/how-i-quit-fighting-the-man#comment-288</link>
    </item>
  </channel>
</rss>
