My attempt to make Evolution and Exchange play nice + code for everyone
For the past two weeks or so I’ve been trying to solve an annoying problem related to using Evolution as my E-Mail/Calendar/ToDo list program and Exchange 2003 as my E-Mail “proxy” that my SmartPhone connects to. With the exception of the following problem, everything works great and it’s really handy being able to read and respond to mail on my phone, as well as being able to post to Flickr and what.
However, the one thing that doesn’t work the way I want to is the Calendars. In Evolution, organizing your schedule is done via the use of multiple calendars; I have “Work”, “School”, and “Personal”. Evo lets you select which ones are visible and it’s really handy. However, Outlook 2003 works a bit differently, it has one calendar and organizes things via “Categories”. Either way is fine, but the problem is, the people who wrote ActiveSync were used to the latter paradigm and as a result, my phone will only sync with one calendar.
So I went to work; my original plan was to make some sort of synchronization program that would take my Evo calendars and copy them to the Exchange calendar, and add some extra info so that my changes on the phone would propagate back. I got lazy however and decided that it was enough to make the sync one-way so I could at least read the schedule on my phone. Thus was created two tools:
- ecalclear [source]:calendar-name – Clears an Evolution calendar (deletes ALL items)
- ecalcopy [source]:from-calendar-name [source]:to-calendar-name – Copies all entries from one calendar to another
Either tool takes the –list parameter which will print the calendar names and which sources they are in.
While this approach works fine for local calendars, it fails horribly when the target is an Exchange calendar; firstly, it tries to pop up a gnome-keyring authentication dialog, so putting it into a cron job is out (or worse, it prints “Authentication Required” and exits). Secondly, for some reason the calendar never actually gets copied. It will show up in Evolution initially, but opening OWA shows it didn’t get copied, and closing and reopening Evolution loses all the entries (meaning that they were probably just in the cache).
However, I suppose these tools might be useful for someone, so I’ve posted them online; naturally since they’re based on Glib and Evolution, they’re under the GPL.
- Source: ecal_tools-0.1.tar.bz2
- Debian/Ubuntu Package:ecal-tools_0.1-1_i386.deb
Note: The Edgy package doesn’t have any dependency info encoded in it; it’s built against Evolution 2.8 and for some reason got linked to a bunch of other libraries like Avahi that it doesn’t need. Sorry; the source package does check deps correctly though so if you have problems, rebuild it from source.