Unsubtle geekery: CalDAV and Lightning

Recently I was trying to migrate from a Google Calendar and iCal/Sunbird to a Kerio Connect CalDAV server with multiple calendars and iCal / (Thunderbird & Lightning.) I ran into a bug that has existed for 7 years and 5 days, as of today.

Apparently the CalDAV specification outlines essentially a per-domain authentication instead of per-user. So when you add multiple calendars to Lightning all calendars from the same domain use the same login as the first time it was entered. The second (and 3rd, 4th, etc) calendars will fail to load because Lightning is providing only the user1@example.com password for all calendar.example.com calendars, including user2, user3, etc.

The solution is to step outside of Lightning and configure delegation so the user1 has access to the calendars of user2, user3, and so on. I used iCal to add each account and then added the two primary users to all 5 of the calendars available. Write access must be granted, otherwise as of Lightning 1.0b2 it will fail.

Side note, I’m not entirely sure it’s necessary but in order to lookup users to delegate to at least according to the manual, in Kerio Connect 7.2 you must use the auto setup utility (for the main account. and possibly for Address Book as well?) I could be wrong on that but I think I remember trying under the manual config and the auto-complete did not work.

After configuring delegation in iCal add the primary user first and then all of the other accounts – it will now work as it should have in the first place. Hope this helps some random internet searcher! (I’ll never know since spammers essentially made me turn off all user registration.)