Fastmail/DAV on KDE & Akonadi

akonadi-config-header

The CalDAV and CardDAV services are my favourite bonus features of Fastmail. For 40 bucks a year I get hosted email, contacts and calendars. It’s the bits of Exchange I actually use, except delivered with open protocols, run by a reputable Australian company.

The sad thing is that client support is not widely available. Apple has extremely good integration on both iOS and OSX. Other companies are weird about it—for example, Google provides a CardDAV service for iOS users but Android requires third party apps to use CardDAV. Windows Phone supports CardDAV for Google but won’t let you type in your own server address. Some Fastmail users have worked around it by screwing around with an iCloud account type.

Earlier this week I set up a Linux workstation. I thought, surely KDE would have good support for CalDAV and CardDAV? It turns out it’s mostly there but it is a little rough. My status so far:

  • KMail – works fine if you configure it right
  • KAddressBook – works fine if you configure it right
  • KOrganizer – write-only sync, i.e., doesn’t read events or changes from server. This seems to be an ongoing bug in KOrganizer.

Much of the information needed is available on Fastmail’s Server Names and Ports page.

KMail (IMAP/SMTP)

IMAP works as usual; you just need to be careful to use your full Fastmail login including domain as the username.

Initially KMail would not download any email from my main Inbox. Various folders were also missing. I fixed this by editing the IMAP account settings, going to the Advanced tab and unchecking Enable server-side subscriptions. Once I disabled it all my email downloaded.

sss

After I set up my account I had to configure SMTP separately. It’s important to select the SSL option with port 465. Even though “SSL” is really TLS these days I think the TLS option refers to STARTTLS and it won’t work if you try to use it.

smtp

With this in place I can send and receive email. Hooray! But I still need my address book with all my contacts’ email addresses…

KAddressBook (CalDAV)

It’s not exactly obvious how to add a DAV resource. You can either do it through the Akonadi program itself or you can open KAddressBook, right click in the left-most pane and select Add Address Book…. What we need is a DAV Groupware Resource. Sounds enterprisey, hey. If asked, choose to Configure the resource manually.

carddav-config

The automatic discovery does not seem to work. When you enter the server URL you need to use one of the long ones Fastmail provides in the CardDAV section of their server information page. Remember to change username@domain.tld to whatever you normally use to log in to Fastmail.

There’s a button to Fetch collections. It won’t show much for CardDAV and it’s not needed. Just make sure the URL is right—in my case I was using my personal address book so it ended in /Default/.

Now my contacts appear in KAddressBook and KMail. Any edits I make are synchronised in both directions. Superb.

KOrganizer (CalDAV)

I’m a little disappointed that I haven’t made this work fully. KOrganizer is connecting and uploading events but if it can’t download them it’s not much use to me.

The process is similar to CardDAV, though it isn’t documented so well on the Fastmail website. Open KOrganizer, right click on the bottom-left pane where Calendars are listed and select Add Calendar…. Again it is a DAV Groupware Resource.

Add a server with the following URL. Make sure to replace username@domain.tld with your actual Fastmail login.

https://caldav.messagingengine.com/dav/calendars/user/username@domain.tld/

This time you can use the Fetch button to list the calendars that you have configured on your account. Assuming you want to use all your calendars it doesn’t really matter. Just click OK. You will find that your list of Calendars now appears in that bottom-left pane in KOrganizer.

added-calendars

Creating events syncs fine. Deleting events syncs fine. If you delete the event on the Fastmail web interface KOrganizer continues to think it exists. You don’t ever see any events that were created elsewhere.

It just isn’t all that useful. Hopefully it will be fixed in a future release of Debian.

Certificate troubles

I ran into a strange issue while I was testing CalDAV—the DigiCert root certificate used by Fastmail was not trusted by KDE. I’m not sure whether this is a Debian Stable thing or a KDE thing. In any case the certificate definitely did not show up in KDE’s SSL Preferences.

ssl2

If you get an error like this one from Akonadi you can download the root certificate in question directly from DigiCert.

I needed to convert it to PEM format before KDE would let me import it:

openssl x509 -in DigiCertSHA2HighAssuranceServerCA.crt -inform DER -text > DigiCert.crt

From there I was able to import it as a user-added certificate.

imported-cert


Post a comment

All comments are held for moderation; basic HTML formatting accepted.

Name: (required)
E-mail: (required, not published)
Website: (optional)
This blog's name is?
"tinkering down _____"
(required)