Claws-mail + vdirsyncer + vCalendar plugin

The steps I followed to sync remote (CalDav) calendars and contacts with the claws-mail mail client:

Step 1: Install the vCalendar plugin:

https://www.claws-mail.org/plugin.php?plugin=vcalendar

On debian it’s part of the claws-mail-extra-plugins package, so you can run:

Step 2: Load the vCalendar plugin:

Open claws-mail, go to Configuration->Plugins->Load and select the vcalendar.so. It must be in the directory:

Make sure it appears in the Loaded plugins in Configuration->Plugins afterwards:vCalendar plugin loaded

Step 3: Configure the vdirsyncer to sync your remote calendars and contacts:

Note that you don’t necessarily need to sync the calendars with vdirsyncer because vCalendar will do the sync for you when you add the calendars in Step 4. I just added this here because it’s useful in case you want to use other (for example console) calendar viewers too and you want to update their input *.ics files with vdirsyncer.

Create 2 directories one for the calendars one  for the contacts:

Then create a vdirsyncer configuration file “config” in the default vdirsyncer dir that will probably be this one:

This file must look like this:

If you also want to sync the calendars you can add these lines:

After that you can run:

and [optional] if you want to sync the calendars:

(man vdirsyncer for extra options like metasync)

Step 4: Open claws-mail add your contacts and  sync the calendars:

To add your contacts, go to:

Tools->AddressBook and select: Book->New vCard

Type a name for your vCard entry and select the downloaded *.vcf file that should be in your .contacts directory after the vdirsyncer sync.

add vCard entry to claws-mail

If you have many vcf files in your directory and you don’t know which ones are valid vCard entries you can press Check File and validate there are no error messages first. Press ok and you will see your remote contacts appear in the Address book. Something like this:

contacts in claws-mail

I’ve hidden some “sensitive” info although the screenshot was from a list of Igalians, that is public in our site anyway. :p

Now you must see a new entry in the accounts section called “vCalendar” where you can add your calendars if you right click vCalendar and select: Subscribe to WebCal (use the domain, username, pass from above). Events should be loaded after clicking on a calendar folder. If not  right click the calendar and press “Update Subscriptions”. This is how events appear:

calendars on claws with vCalendar

Step 5: Create a cron job to sync the contacts automatically:

In case you don’t want to manually run vdirsyncer sync every now and then you can automate it by creating a cronjob. (Note that sync will also update your calendars if you followed the optional steps, so better use “sync contacts” if you only want to sync the contacts)

I wanted to sync everything once a week early in the morning so my cronjob looks like:

And that’s it.

Leave a Reply

Your email address will not be published. Required fields are marked *