Accessing calendars and contacts with CalDAV and CardDAV
About CalDAV and CardDAV
CalDAV is a web-based protocol that gives calendaring applications access to users' calendars. It is used by CalDAV clients such as the Mac and iOS Calendar applications.
CardDAV is like CalDAV, but gives access to contacts. It is used by CardDAV clients such as the Mac and iOS Contacts applications.
Note
Only contacts in the Contacts folder are accessible. Because CardDAV specification RFC 6352 forbids nested contact databases inside the Contacts folder, Internet Services suppresses sending information about any nested contact databases. Users with nested contact databases won't see the contact information from those databases when using their CardDAV clients.
Both protocols allow clients to create new items in FirstClass.
Enabling CalDAV and CardDAV
To enable CalDAV and CardDAV, add the following lines to the PRE section of user.HeaderMatch:
*: SET enablewebdavfeatures = WebDAV_Basic,WebDAV_Locking,WebDAV_CalDAV,WebDAV_CardDAV
*: IF user-agent == "CalendarAgent/" VAR ISWEBDAVCLIENT = 1
Make sure there are no spaces after the commas.
Although not strictly required, adding the following entries to the AddHandler document make configuring some clients much more automatic, by just specifying a host name or IP and a user ID and password. Other clients must be manually configured to point to these locations:
https://domain name/Login/Calendar/
or
https://domain name/Login/Contacts/
Note that the https: is required if SSL is enabled because some clients can't do the http:// to https:// redirect.
<AddURLHandler /.well-known/caldav>
Site: *
Rewrite: /Login/Calendar/
HTTP-Response-Code: 301
</AddURLHandler>
<AddURLHandler /.well-known/carddav>
Site: *
Rewrite: /Login/Contacts/
HTTP-Response-Code: 301
</AddURLHandler>
<AddURLHandler /principals/>
Site: *
Rewrite: /Login/
HTTP-Response-Code: 301
</AddURLHandler>
<AddURLHandler ~ /principals/users/(.+)/>
Site: *
Rewrite: /Login/
HTTP-Response-Code: 301
</AddURLHandler>
<AddURLHandler /dav/principals/>
Site: *
Rewrite: /Login/
HTTP-Response-Code: 301
</AddURLHandler>
<AddURLHandler /calendar/dav/(.+)/user/>
Site: *
Rewrite: /Login/Calendar/
HTTP-Response-Code: 301
</AddURLHandler>
|