One of the reasons I use Roundcube is that when I was shopping for a webmail client, there was a plugin that provided Google Contacts integration. Unfortunately, that plugin hasn’t been updated for over a year and it has rate limiting issues. So, when upgrading my Roundcube installation to 0.8.4 I decided it had to be replaced. Updated for Roundcube 0.9.
Great. Another Roundcube-adventure.
Fortunately, Google Contacts supports CardDAV. Having a standard protocol makes the odds of finding a working plugin a lot bigger. Unfortunately, setting up CardDAV for Google Contacts takes a bit more effort. Fortunately, I decided to write those steps down, so you don’t have to figure out how to do it.
I’ve used the RCMCardDAV plugin. I could not get the latest release at the time of this writing (0.7.0) to work. YMMV, since I did change some configuration settings after seeing the better error messages provided by trunk. In any case, I used the latest SVN revision (rev 261). The repository is at https://svn.crash-override.net/rcmcarddav/. Update October 9th, 2013: RCMCardDAV now has a GitHub repository: https://github.com/blind-coder/rcmcarddav.
The installation instructions are pretty clear (refer to INSTALL for the latest instructions):
- Unpack to <roundcube>/plugins
- Add the name of the plugin folder to the $rcmail_config[‘plugins’] in <roundcube>/config/main.inc.php
- Run <carddav-plugin>/dbinit/<yourdatabase>.sql in your database-tool of choice
Now all we need to do is configure a CardDAV address book in our account. First, create an application-specific password in your Google Account if you use two-step verification. Then log in to Roundcube:
- Go to Settings → Preferences → CardDAV
- Fill in the fields with the following information:
- Name of the addressbook: any name you want. I used the very original “Google Contacts”. The address book should not need to exist yet. It will be created.
- Activate CardDAV-Addressbook: keep checked.
- Username: the full email-address for your Google Account, e.g. email@example.com
- Password: if you use two-step verification, your application-specific password. If you don’t, the password to your Google Account.
- URL: https://google.com/m8/carddav/ (This is notably different from the iOS CardDAV setup. Google will simply instruct you to use “google.com”. That value does not work here.) Update October 9th, 2013: If you use the latest revision of RCMCardDAV (here), you can simply enter “google.com”. RCMCardDAV now has service discovery. (Tested with Roundcube 0.9.)
- Update interval (hours): I kept it at “1”. Do as you like.
And that’s it. If you go to Address Book, you will see a new address book called “Google Contacts (default)”. Give it a moment if your contacts haven’t shown up yet.
RCMCardDAV stores two log files in your Roundcube log directory (<roundcube>/logs): carddav and carddav.warn. If you have any problems, those two files should be the first place to look if you have any problems. If the files don’t exist, no log messages have been written to it.
Update October 9th, 2013: Updated for Roundcube 0.9 and latest revision of RCMCardDAV.
Update June 17th, 2014: Larry Rosenman writes: “if you have a lot of contacts (I have 4600+), you may need to adjust the timeout in carddave_common.php from 10 to something bigger. I used 120.”