OWA Sync on Ubuntu

Update: OWA Sync V0.6 (the current version) is not compatible with Exchange 2007. When I set this up, I was connecting to Exchange 2003.

I use OWA Sync to get all of my calendar information onto my Ubuntu desktop. I recently rediscovered the Little Brother’s Database and decided to make my OWA contacts available in Mutt on my Ubuntu desktop, too. (I used lbdb to make my contacts in Apple Address Book available to Mutt when I was still using Mac OS X as my primary operating system.)

The OWA Sync website has a decent explanation of creating a owaSyncrc file. After I created that, I wrote a script that runs as a cron job.

#! /bin/bash

export PATH=$PATH:/usr/local/bin/

/usr/local/bin/owaSync.kit -update

cat $HOME/.owa/Calendar/*.ics > $HOME/.calendar.ics
cat $HOME/.owa/Contacts/*.vcf > $HOME/.contacts.vcf

After a bit of trial and error, I figured out that “/usr/local/bin/” needed to be in the path for the owaSync.kit script to run. After the synchronization is complete, I then concatenate all of the calendar events into a single file and all of the contact cards into a single file. I now have a single calendar file that I can use with PHP iCalendar and a single contacts file that I can use with lbdb. It requires a fairly simple rc file that looks something like this:

METHODS="$METHODS m_vcf m_muttalias"

VCF_FILES="$HOME/.contacts.vcf"
MUTTALIAS_FILES="$HOME/.mutt/aliases"

I add “m_vcf” and “m_muttaliases” to the “METHODS” and then I specify the locations of my OWA contacts and my Mutt aliases. Now when I launch Mutt, I can query for addresses that I downloaded from OWA.