aluxnimm / outlookcaldavsynchronizer

Sync Outlook with Google, SOGo, Nextcloud or any other CalDAV/CardDAV server
GNU Affero General Public License v3.0
921 stars 97 forks source link
caldav calendar carddav contacts google-calendar outlook synchronization tasks

Outlook CalDav Synchronizer

Outlook Plugin, which synchronizes events, tasks and contacts between Outlook and Google, SOGo, Horde or any other CalDAV or CardDAV server. Supported Outlook versions are 2021, 2019, 2016, 2013, 2010 and 2007 and Office 365 for Desktop.

Project Homepage

http://caldavsynchronizer.org

License

Affero GNU Public License

Authors

This project was initially started in 2015 as a master thesis project at the University of Applied Sciences Technikum Wien, Software Engineering Degree program and is now powered by Generalize-IT Solutions OG, FN 466962i, 1210 Vienna, Austria.

Outlook CalDav Synchronizer is Free and Open-Source Software (FOSS), still you can support the project by donating on Sourceforge or directly at PayPal

paypal.

Collaboration with Nextcloud

New collaboration with Nextcloud, see https://nextcloud.com/blog/nextcloud-offers-caldav-synchronizer-for-outlook-users/

For possible enterprise support, please contact us here!

Recommended Android DAV client

We work closely together and test interopability with DAVx⁵ for Android, see https://www.davx5.com, so we can really recommend it! Together with DAVx⁵ we now have experimental support for per-event coloring by mapping the Outlook category color to the COLOR attribute of the event.

Tested CalDAV Servers

- Baïkal - Cozy Cloud - cPanel - Cyrus Imap 2.5 - DAViCal - EGroupware - FastMail - Fruux - GMX - Google Calendar - Group-Office - Horde Kronolith - iCloud - Kolab - Landmarks - Mac OS X Server - mail.ru - mailbox.org - Nextcloud - One.com - Open-Xchange - Owncloud - Posteo - Radicale - SabreDAV - SmarterMail - SOGo - Synology DSM - Tine 2.0 - Yahoo - Yandex - Zimbra 8.5 - Zoho Calendar

Features

Used Libraries

Install instructions

WARNING: Beginning with release 4.0.0 .NET framework 4.8 is the minimal requirement.

Download and extract the OutlookCalDavSynchronizer-<Version>.zip into any directory and start setup.exe. You can change the default install path, but you need to use a directory on the C:\ drive. If the installer is complaining about the missing Visual Studio 2010 Tools for Office Runtime, install it manually from Microsoft Download Link You should also update manually to the latest Visual Studio 2010 Tools for Office Runtime (Version 10.0.60912) if you have an older version installed, since some COMExceptions have been fixed.

Beginning with version 2.9.0 the default install location is ProgramFilesDir\CalDavSynchronizer\ and the installer remembers the chosen directory for the next updates. Also the install option to install for Everyone instead of the current user is working now for Outlook 2010 and higher, if you want to install the addin for all users on the current machine. For Outlook 2007 you can only install the addin for the current user.

We recommend updating to the latest .Net Framework but the minimal required version is .NET 4.8, which is not supported on Windows XP, Windows 8 or Windows Vista. If you need Outlook CalDav Synchronizer for Windows XP you can download a backport to .Net 4.0 from a forked project here, thanks to Salvatore Isaja for the awesome work!

Changelog

4.4.1

4.4.0

4.3.0

4.2.0

4.1.0

4.0.0

3.8.2

3.8.1

3.8.0

3.7.0

3.6.2

3.6.1

3.6.0

3.5.0

3.4.0

3.3.0

3.2.1

3.2.0

3.1.1

3.1.0

3.0.0

2.27.0

2.26.0

2.25.0

2.24.0

2.23.0

2.22.2

2.22.1

2.22.0

2.21.0

2.20.0

2.19.2

2.19.1

2.19.0

2.18.0

2.17.0

2.16.0

2.15.1

2.15.0

2.14.1

2.14.0

2.13.0

2.12.1

2.12.0

2.11.0

2.10.0

2.9.1

2.9.0

2.8.2

2.8.1

2.8.0

2.7.0

2.6.1

2.6.0

2.5.1

2.5.0

2.4.0

2.3.1

2.3.0

2.2.0

2.1.3

2.1.2

2.1.1

2.1.0

2.0.2

2.0.1

2.0.0

1.24.0

1.23.0

1.22.0

1.21.0

1.20.3

1.20.0

1.19.0

1.18.0

1.17.0

1.16.0

1.15.0

1.14.2

1.14.0

1.13.2

1.13.0

1.12.0

1.11.0

1.10.0

1.8.0

1.7.0

1.6.0

1.5.4

1.5.3

1.5.2

1.5.1

1.5.0

1.4.5

1.4.4

1.4.3

1.4.2

1.4.1

1.4.0

1.3.4

1.3.3

1.3.2

1.3.1

1.3.0

1.2.2

1.2.1

1.2.0

1.1.0

1.0.4

-Fix TimeRange filter for events

1.0.3

1.0.2

0.99.16

0.99.15

0.99.14

0.99.13

0.99.12

0.99.10

0.99.9

0.99.8

0.99.7

0.99.6

0.99.4

0.99.3

0.99.2

0.99.1

0.99

0.98

0.97.8

0.97.7

0.97.6

0.97.5

0.97.3

0.97.2

0.97.1

0.97

0.96

0.95.1

0.95

0.94

User Documentation

After installing the plugin, a new ribbon called 'Caldav Synchronizer' is added in Outlook with 6 menu items.

For better accessibility the ribbon also supports keytips, accessible via ALT key followed by CDS and SN,SP,GO,AB,RE,ST respectively for the 6 items.

Use the Synchronization Profiles dialog to configure different synchronization profiles. Each profile is responsible for synchronizing one Outlook calendar/task or contact folder with a remote folder of a CalDAV/CardDAV server.

Beginning with version 2.15.0 advanced configuration settings are hidden by default and you can enable them by clicking on Show advanced settings and disable them again by clicking on Hide advanced settings. The default behaviour can also be configured as a general option, see below.

The toolbar on the left upper part provides the following options:

When adding a new profile you can choose between a generic CalDAV/CardDAV, a google profile to simplify the google profile creation and predefined CalDAV/CardDAV profiles for iCloud Calendar and Contacts, SOGo, Fruux, Posteo, Yandex, GMX, Sarenet, Landmarks, Cozy Cloud, Nextcloud, mailbox.org, Open-Xchange, EasyProject, Web.de, SmarterMail, Mail.de, Kolab, Swisscom Addressbooks, EGroupware and FastMail where the DAV Url for autodiscovery is already entered.

The following properties need to be set for a new generic profile:

If you expand the tree view of the profile you can configure network and proxy options and mapping configuration options. (only in advanced settings)

Timezone settings

Outlook and Windows use different Timezone definitions than most CalDAV servers and other clients. When adding new events on the server you have different options how the timezone of the newly created VEVENT is generated. The default setting uses the default Windows Timezone from Outlook (e.g. W. Europe Standard Time) or the selected timezones for the start and end of the appointment. Since some servers have problems with that timezone definitions you can change that behaviour in the event mapping configuration with the following options:

Managing meetings and invites

Outlook can only track meeting responses and invites in the main calender folder. If you schedule meetings from Outlook which are synced with the CalDAV server you have two possibilities to avoid double invitation mails for all attendees. First, you can enable the option SCHEDULE-AGENT=CLIENT (or Don't send appointment notifications (from SOGo)" for SOGo servers) and let only Outlook send the meeting invites, if the server supports this option. Or you can disable this option and let the server schedule the meetings after syncing the meeting. Then you need to disable the invitation mails sent from Outlook. This is possible by unchecking the checkbox left to the attendee name in the meeting planning dialog. When syncing meetings created in Outlook to the server, the option Use GlobalAppointmentID for UID attribute is recommended. This can avoid duplicate events from invitations.

When creating meetings in Outlook you can also use Act on behalf of server identity to set the server identity (Email Address in the server settings of the sync profile) as the organizer and the Outlook identity acting on behalf with the SENT-BY property. This can be useful when Outlook and server identity do not match to avoid invites sent by the wrong email or if meetings are created in a shared calendar on behalf of the calendar owner.

The response status of all attendees can be synced from Outlook to the server but only the status of the own Outlook identity (if included in the attendees) can be synced from the server to Outlook due to limitations of the Outlook Object Model.

When receiving invites from the CalDAV server and via Email in your INBOX, Outlook will automatically create a tentative meeting in the main calendar folder (This can be controlled with the Outlook Option 'Automatically process meeting requests and responses to meeting requests and polls').

To avoid double meetings the option Cleanup duplicate events after each sync run in event mapping configuration is recommended.

Free/busy lookups

You can configure free/busy lookups globally in the outlook options. Select Options/Calendar and there free/busy information and use a free/busy url of your server with placeholder like %Name%, e.g. http://myserver/freebusy.php/%Name% Then every attendee in the outlook planning view gets resolved with that url for a free/busy lookup against your server.

Scheduling settings and resources

If your server supports resources (for SOGo see http://wiki.sogo.nu/ResourceConfiguration) disable "set SCHEDULE-AGENT=CLIENT" in Mapping Configuration, so that the server can handle the resource invitation mails, add the resource email adress as attendee in the Outlook appointment and choose type ressource (house icon) for it.

Category Filter and Color

If you want to sync multiple CalDAV calendars or tasklists into one Outlook folder you can configure an Outlook category for filtering in the Mapping Configuration. You can choose a category from the dropdown list of all available Outlook categories or enter a new category name. For all events/tasks from the server the defined category is added in Outlook, when syncing back from Outlook to the server only appointments/tasks with that category are considered but the filter category is removed. The category name must not contain any commas or semicolons! With the checkbox Sync also Appointments without any category also all appointments/tasks without a category are synced to the server. With the checkbox below you can alternatively negate the filter and sync all appointments/tasks except this category. For calendars it is also possible to choose the color of the category or to fetch the calendar color from the server and map it to the nearest supported Outlook category color with the button Fetch Color. With Set DAV Color it is also possible to sync the choosen category color back to set the server calendar color accordingly. With Category Shortcut Key you can define the shortcut key of the selected category for easier access when creating appointments.

Experimental mapping of the first category color of the appointment to the matching COLOR attribute of the event is also available with the option Map Event Color to Category. When mapping a COLOR from the server to Outlook the first matching Outlook category with that color is used, but mapping can be manually changed in the options.xml config file. Together with DAVdroid for Android https://davdroid.bitfire.at you can map individual event colors from Android to Outlook,but not all calendar apps support it or can even crash, see https://davdroid.bitfire.at/faq/entry/setting-event-colors-crash/

Reminders

In event and task mapping configuration you can define if you want to map (all/non/just upcoming) reminders. If you get the following error message when trying to set reminders in Outlook

The reminder will not appear because the item is in a folder that doesn’t support reminders.

you can try to change the Outlook options as discussed in http://answers.microsoft.com/en-us/office/forum/office_2016-outlook/outlook-2016-calendar-reminders/8f40bcdd-e3fc-4f29-acaf-544f48d63992 or try the following reported by #Todo18

  1. Create a new storage folder in Outlook via the File menu, Info, Account Settings. In the Data Files tab, you can Add a new (.pst) data file. After the file has been added, Make it the default [data file], and close the dialog.
  2. Go to the Calendar window, right click on the calendar that's giving you problems, and select Move Calendar. In the dialog, pick the data file that you created in the first step, and confirm. Don't forget to update the storage folder in the CalDav Synchronizer settings!

Custom properties mapping

When you expand the tree view of the profile for events and tasks, you can configure the mapping of custom properties.

Distribution Lists

When enabled in Contact Mapping configuration you can now also sync Outlook Distribution Lists with your server contact groups. Since different servers use different formats to store contact groups, you will be able to choose the used DAV contact group format. Right now, the VLIST format for SOGo servers, vCards with KIND:group and iCloud groups are supported. Don't enable any of these options when your server doesn't support it!

Since Outlook Distribution Lists also support list members which aren't in the addressbook but SOGo VLISTs don't, we add them as custom X-Attributes. With this workaround those members aren't displayed in SOGo but won't get lost when syncing back to Outlook.

Since vCard in version 3.0 doesn't support contact groups we use X-ADDRESSBOOK-SERVER attributes for KIND and MEMBER for contact groups. The contact group format vCard with KIND:group will map the member CN and EMAIL and the format iCloud groups will map the member UID if available or also CN and EMAIL for external members, which are not in the addressbook.

Google Calender / Addressbooks / Tasks settings

For Google you can use the new Google type profile which simplifies the setup. You just need to enter the email address of your google account. When testing the settings, you will be redirected to your browser to enter your Google Account password and grant access rights to your Google Calender, Contacts and Tasks for OutlookCalDavSynchronizer via the safe OAuth protocol. After that Autodiscovery will try to find available calendar, addressbook and task resources.

You can control which calendars are available via CalDAV and shown in autodiscovery in your calendar settings, see https://calendar.google.com/calendar/syncselect

Known Issue: Please use CardDAV instead of Google native API for contacts

When switching between native API and CardDAV the sync cache is cleared and a complete initial sync is performed during next sync run.

For tasks you can choose the tasklist you want to sync with an Outlook task folder and the id of the task list is shown in the Discovered Url. With the button 'Edit Url' you still can manually change the Url e.g. when you want to sync a shared google calendar from another account.

If you get an error with insufficient access you need to refresh the token by deleting the previous token in C:\Users\<your Username>\AppData\Roaming\Google.Apis.Auth

GMX calendar settings

For GMX calendar use the GMX Calendar account type, which sets the autodiscovery DAV Url https://caldav.gmx.net Since GMX doesn't allow to create events with the Windows Timezone IDs, for the GMX account type the Create events on server with downloaded IANA Timezones checkbox in Mapping Configuration is checked by default to avoid errors when creating events and syncing from Outlook to GMX.

For GMX addressbook use the DAV Url https://carddav.gmx.net

Synology NAS settings

When test settings for your synology NAS profile, you can ignore the warning "The specified Url does not support calendar queries. Some features like time range filter may not work!". But a user reported, that "Disable directory browsing" setting must not be enabled for the calendar folder for proper syncing.

For Synology NAS with SSL support use port 5006 and the following settings in your NAS: In Synology DSM Navigate to control panel > Terminal & SNMP Select Enable SSH Then enter Advanced Settings and set it to High Now it will work on port 5006 with https.

iCloud settings

Apple changed their security policy recently (June 2017). You need to enable Two-Factor-Authentication and an app-specific password for CalDavSynchronizer, see https://support.apple.com/en-us/HT204397

For syncing iCloud Calendar select the preconfigured iCloud Calendar profile type, which uses the following CalDAV URL

https://caldav.icloud.com

Only as a fallback if the autodiscovery fails you can use the following procedur To find the correct DAV url for iCloud you need some information from the MacOS, where you are connected with your calendar.

Open with Textedit: ~/Library/Calendars/*.caldav/Info.plist (Its in the hidden User-Library)

Check iCloud Path: PrincipalURL <string>https://p**-caldav.icloud.com/*********/principal/</string>

Check: DefaultCalendarPath <string>/*********/calendars/********-****-****-****-************</string>

Then you get the DAV url of the calendar: https://p**-caldav.icloud.com/*********/calendars/********-****-****-****-************/

For syncing iCloud contacts select the preconfigured iCloud contacts profile type, which uses the following CardDAV URL

https://contacts.icloud.com

and press 'Test or discover settings' for autodiscovery, the final URL should look like

https://contacts.icloud.com:443/<YOUR UNIQUE Apple USER_ID>/carddavhome/card/

There are infos available to determine your Apple USER_ID, see

https://community.jamf.com/t5/jamf-pro/what-is-the-current-apple-id-on-the-mac/m-p/229968

https://github.com/muhlba91/icloud

One.com settings

The one.com caldav server has problems with escaping, so if your calendar url looks something like

https://caldav.one.com/calendars/users/USERNAME@DOMAIN.COM/calendar/

use the url

https://caldav.one.com/calendars/users/USERNAME%40DOMAIN.COM/calendar/

Autodiscovery

When you are using an IMAP/POP3 Account with the same server settings (Username, Email address) you can press Get IMAP/POP3 account settings to discover those settings. The DAV url is discovered via DNS lookup from the account email address or the IMAP/POP3/SMTP server url if that fails. Together with the Use IMAP/POP3 account password checkbox activated you can fully autoconfigure the server settings from your existing account.

Instead of using the exact calendar/addressbook URL you can use the server address or the principal url and use the 'Test or discover settings' button in the option dialog to try to autodiscover available calendars and addressbooks on the server.

If the server has calendar-proxy support (calendar-proxy-read-for, calendar-proxy-write-for), see https://github.com/apple/ccs-calendarserver/blob/master/doc/Extensions/caldav-proxy.txt shared calendars can also be discovered. You can then choose one of the found calendars or addressbooks in the new window.

If your server has redirections for well-known Urls (./well-known/caldav/ and ./well-known/carddav/ ) you need to enter the server name only (without path). If your domain configured DNS SRV and/or TXT lookups it is also possible leave the DAV url empty and discover it from the entered Email Address or Username via DNS lookups, for example:

_carddavs._tcp 86400 IN SRV 10 20 443 dav.example.org.
_caldavs._tcp 86400 IN SRV 10 20 443 dav.example.org.

Proxy Settings

You can now set manual proxy settings in the Network and proxy options dialog in each profile. To override the default proxy settings from Windows Internet Explorer you can also specify settings in the app config file, see config options below. More information can be found at https://msdn.microsoft.com/en-us/library/sa91de1e%28v=vs.110%29.aspx

General Options and SSL settings

In the General Options Dialog you can change settings which are used for all synchronization profiles.

Profile Import/Export

In the toolbar of the synchronization profiles you can export all profiles to a file and import profiles from an earlier exported file. When exporting, you can choose a filename, the extension is *.cdsp and all options are saved in an xml format into this file. When importing the file, existing profiles are merged with the imported ones. If the selected Outlook folder for the profile doesn't exist during import, you need to manually select a folder before you can save the options, they are not automatically created. You need also be aware of the fact, that saved profile passwords won't work on other accounts or machines, since the encryption is dependant on the current user. But you can use the account password from the IMAP/POP3 account if available. General options are not saved in that file, but in the registry in HKEY_CURRENT_USER\Software\CalDavSynchronizer.

Reports of sync runs

You can also configure Synchronization reports for all profiles, this can be configured via general Options:

You can show reports manually with the Reports button in the CalDav Synchronizer Ribbon. There you can choose from available reports (shown as profile name with timestamp of the sync run) and see informations about items synced and if there were any warnings or errors. You can also delete reports or add them to a zip file via the context menu. If the last sync run lead to any errors, a warning symbol is shown in the Ribbon or the Report window opens if configured in the general options.

Synchronization Status and System TrayIcon with Notifications

With the Status button in the CalDav Synchronizer Ribbon or via doubleclick from the TrayIcon you can access the status of the active sync profiles with their last sync run shown in minutes ago and the status OK, error, or warning. When clicking on the profile name you get to the according sync profile settings, when clicking the status icon, you can open the according sync report. When a sync run has any errors or warnings you will get a notification from the CalDav Synchronizer TrayIcon.

Trouble Shooting

Options and state information is normally stored in the following folder:

C:\Users\<Your Username>\AppData\Local\CalDavSychronizer

If you activated Store data in roaming folder the location is changed to the following folder:

C:\Users\<Your Username>\AppData\Roaming\CalDavSychronizer

There is one options_<your outlook profile>.xml file which stores the options for each outlook profile. For each sync profile there is a subfolder with state information stored in a relations.xml file after the inital sync. If you delete that folder, a fresh inital sync is performed. In the Synchronization profiles dialog a context menu is available in each profile (right click), which allows to open the cache directory and read the relations.xml file.

Each synchronization attempt is logged in the log.txt file. There you can find information about sync duration and the amount of added, deleted or modified events. Errors and Exceptions are logged aswell. You can view and clear the log file in General Options. There you can also change the log level from INFO to DEBUG.

Debugging and more config options

In the install dir (The default is 'C:\Program Files (x86)\CalDavSynchronizer') you will find the app config file

CalDavSynchronizer.dll.config

In that xml file you can config timeout parameters and config options in the section appSettings After changing parameters you have to restart Outlook.

You can also change defaults for some of the general options like CheckForNewVersions, StoreAppDatainRoamingFolder, IncludeCustomMessageClasses and SSL/TLS options, useful for All Users deployment, because general options are stored per user in the HKCU registry hive.

In the section system.net you can define proxy settings, e.g. use of NTLM credentials

<defaultProxy useDefaultCredentials="true">
</defaultProxy>

In this section you can also allow UnsafeHeaderParsing if the server sends invalid http headers.

<system.net>
    <settings>
        <servicePointManager expect100Continue="false" />
        <httpWebRequest useUnsafeHeaderParsing="true" />
    </settings>
</system.net>

This setting can also be enabled in the general options, starting with version 2.10.0.

In the section log4net you can define the log level for the main log (also possible in general options now) and for the caldav data access, level value can be DEBUG or INFO, e.g. :

<root>
  <level value="DEBUG" />
  <appender-ref ref="MainLogAppender" />
</root>

Common network errors