Calendar, contacts and tasks
Kantoor stores calendars, address books and task lists (VTODO) and serves
them over CalDAV and CardDAV at /dav. The same data is shown in the web
interface at /calendar, /contacts and /tasks, and it refreshes when
another client changes it.
Connecting a client
Create an app password with the dav scope in Settings, App passwords.
DAV uses HTTP Basic authentication: the login is the user's sign-in email
address or the address of a mailbox they may open, and the password is the
app password. The web session cookie never authenticates DAV.
The public host name below is mail.example.com. The reverse proxy must pass
the WebDAV methods (PROPFIND, PROPPATCH, REPORT, MKCALENDAR,
MKCOL, COPY, MOVE) and request bodies up to 6 MiB.
| Client or setting | Value |
|---|---|
| Automatic discovery (DAVx5, iOS, macOS, Thunderbird) | https://mail.example.com |
| Manual calendar and contacts URL | https://mail.example.com/dav/ |
| Principal | https://mail.example.com/dav/principals/users/<user-id>/ |
| Calendar home | https://mail.example.com/dav/calendars/<user-id>/ |
| Address book home | https://mail.example.com/dav/addressbooks/<user-id>/ |
Clients that ask for /.well-known/caldav or /.well-known/carddav receive
a 301 to /dav/ before credentials are checked.
Every user gets, the first time they connect or open one of the pages:
- a calendar "Calendar" for events and tasks;
- a task list "Tasks" for VTODO only. A task made without choosing a list, on the Tasks page, goes here; the calendar "Calendar" accepts tasks too, but only when you or your app choose it;
- an address book "Contacts";
- a scheduling inbox and outbox.
A user who deletes every calendar or address book gets a fresh default on the next connection.
The body of a DAV request is limited to 6 MiB; a larger Content-Length
receives 413, and a request with a body but no length receives 411. vCards
over 5 MB are refused. Cookies are dropped before anything reads them.
The web interface
Calendar (
/calendar): the user's events on a day, week or month grid. The day and week views have a time axis with one column per day; a month is a grid of weeks, with the days of the weeks it shows. The calendar creates, edits and deletes events, including repeating ones (see below), and shows your tasks that have a date (see Tasks on the calendar).Moving and resizing. Drag an event to move it; drag its lower edge to change its end. A drag works with a mouse and with a finger: on a phone a week swipes sideways and a day scrolls down. A month chip can be dragged to another day. The quarter-hour a drop lands on is what is written, and the server checks the permission again (
Kantoor.Events), so a read-only share refuses the move. A repeating event is moved as that one occurrence: the other events of the series stay where they are (use the form for the others).Keyboard. Tab to an event and use the arrow keys: up and down move it a quarter of an hour, left and right move it a day, and Shift+up / Shift+down change its end. A month chip moves a week with up and down. Enter opens the event for editing. While an event has focus its own delete button and the resize edge are reachable with the keyboard.
A move keeps a repeating event's other days and an all-day event's number of days; an event over midnight is drawn on each day it covers.
Booking link in the page's heading opens Booking links, where the free times you offer to others are set.
Tasks (
/tasks): filter by list, status, due date and text; create, edit, complete and delete. The form has a due date (optional) with quick choices (today, tomorrow, in a week, no date) and an optional time. A task made here is stored withDUEas a date, or as a floating date-time when a time is given, and with noDUEat all when the date is left empty. The "No date" filter lists the tasks that have neitherDUEnorDTSTART, which is also the number the calendar's legend shows.List and Board. The switch at the top of the page changes between the list and a board with one column per status: To do (
NEEDS-ACTION), In progress (IN-PROCESS), Completed (COMPLETED) and Cancelled (CANCELLED), the four values CalDAV clients write inSTATUS. A card shows the title, the due date (in red when overdue), the priority and the list. Drag a card to another column, or open Move to... on the card (the way that works with a keyboard and on a phone), to change its status; clicking the title opens the same form as the list. Completing on the board writes exactly what the checkbox writes (STATUS,COMPLETEDandPERCENT-COMPLETE:100); moving a task back clears them. Cards are ordered by due date, then title: tasks have no order of their own. The search, due date and list filters apply to the board; the status filter does not (every status has a column). Below 768 px, one full-width column is shown at a time. Tap its name and count in the sticky header, use the arrow keys, or swipe sideways to switch columns. The last column is remembered on this browser. Move to... opens a bottom sheet with the other columns; the card moves immediately and the server checks access again. Add task starts a task in the current column and selected writable list. A shared read-only list has no edit, move or add controls. The view you choose is remembered (also under Settings, Profile, Tasks view); the list is the default. Tasks have no assignee in Kantoor, so cards show none.Contacts (
/contacts): list and search the address books; create, edit and delete. A contact shows and edits its name, any number of email addresses and phone numbers (each with a type: home, work, mobile or other), postal addresses (a type and the seven parts of a vCard address: PO box, extended address, street, city, region, postal code, country), organisation, job title, web addresses, birthday, anniversary and notes. Dates are chosen with a date picker; tick "Year not known" for a date without a year (written as--MMDDin a vCard 4.0 card, and the way Apple's Contacts does it in a 3.0 card). Any form a client wrote (19850412,1985-04-12,--0412, a date-time) is read.The photo is shown when the card carries one: embedded data only (a JPEG, PNG, GIF or WebP, up to about 110 KB), checked by its bytes and not by its label. A
PHOTOthat points at a web address is never fetched or shown, and a photo too large to show is kept on the card.Saving a contact in the page changes only what the page shows. Every other property of the card stays as the client wrote it: the photo, categories, labels (
item1.X-ABLabel),X-fields and anything else. A phone number, email, address or date that is not changed keeps the exact line the client wrote, with its other parameters; a changed type rewrites only theTYPE. The photo cannot be changed on the page.
Birthdays
When any contact has a birthday, a Birthdays calendar appears next to your calendars on the calendar page, with one all-day entry a year for each (with the age when the year is known; a birthday without a year has none). It is computed from the contacts you can see, your own and those shared with you, each time the page loads. It is read-only, can be switched off with its button, is not offered to calendar apps and cannot be written to. A 29 February birthday falls on the 28th in a year without one.
Tasks on the calendar
A task that has a date is shown on its day in the day, week and month views,
next to the events (in the all-day row of a day column, and in the month cell),
so a task you add on the Tasks page is on the calendar. It sits on the day of
its DUE, or of its DTSTART when it has no DUE.
- A task due on a date is listed as All day; a task with a time is listed at that time. Times follow the same rules as events (see Time zones below): a time in UTC or in a named zone is shown in your zone, a floating time as it is.
- A task has a tick box in front of its title, so it is not taken for an event; a
done task is struck through and dimmed. Ticking the box marks the task done (or
open again) exactly as on the Tasks page, so CalDAV clients see
STATUS:COMPLETED. Clicking the title opens the task in the Tasks page editor. - A task keeps the colour of its list. Task lists shared with you follow the same rules as on the Tasks page: with a read-only share the task is shown without a tick box and without an edit link.
- Show tasks in the legend above the list switches tasks on and off (on by default, remembered for your account). Tasks of a calendar switched off in the legend are hidden with it.
- A task that is not done and whose day has passed stays on its day, marked overdue, and is also listed under today (with "Was due ...") while today is on screen, so it is not lost.
- A task without a date cannot be placed on a day. When there are such tasks the legend says how many ("3 tasks without a date") and links to the Tasks page filtered to the tasks with no due date.
- Tasks never make you busy in free/busy. Nothing changes over CalDAV except what ticking a task already does.
- Kantoor does not repeat tasks: the Tasks page neither creates nor expands an
RRULE. A repeating task made by another client is shown once, on its own day.
Time zones
The time zone in the user's profile (see Settings) decides how times are shown and written:
- Times in UTC and in a named zone are converted into the user's zone, each on its own date, so a Monday 09:00 meeting in Amsterdam is 04:00 or 03:00 in Curaçao depending on daylight saving. Floating times (no zone) and all-day events are shown as they are.
- A new event is written in the user's zone. An event that already has a zone keeps it: the times in the form are converted back when it is saved.
- Without a profile zone nothing is converted: events are shown in the zone they
were written in, and new events use
KANTOOR_TIME_ZONEwhen it is set (an IANA name such asEurope/Amsterdam), otherwise they are floating.
Repeating events
An event can repeat daily, weekly (on the chosen weekdays), monthly (on the same
day of the month, the same weekday of the same week, or the last such weekday)
or yearly, every n days, weeks, months or years, and end never, on a date or
after a number of times. The page writes a standard RRULE, so any CalDAV
client shows the same series. A pattern the page cannot express (for example
BYSETPOS, or BYMONTH) is shown as "Custom" and kept untouched when the
event is edited, unless a new pattern is chosen.
A series is expanded only for the days on screen. A series in a named zone repeats on its own wall clock, so "every week at 09:00 in Amsterdam" stays at 09:00 across the daylight saving changes.
Editing or deleting one occurrence asks This event, This and following events or All events, and writes what CalDAV clients expect:
| Choice | Change | Delete |
|---|---|---|
| This event | an override (RECURRENCE-ID) with the new details; the series and the guests are untouched | an EXDATE on the series |
| This and following | the series ends before this occurrence (UNTIL) and a new series with a new UID carries on with the edits; if the pattern was not changed, the new series has what is left of the old COUNT. Changes made to single occurrences after the split are not carried over | the series ends before this occurrence (deleting the first one deletes the series) |
| All events | the series changes; moving the occurrence you picked moves the whole series by the same amount | the series is deleted |
For events with guests the changes go through the same scheduling as any edit (updates, cancellations).
Subscribed calendars
A calendar published elsewhere as an iCalendar feed can be followed in Kantoor and appears here and in calendar apps, read-only: Subscribed calendars.
Sharing
At Settings, Sharing the owner of a calendar, task list or address book
can share it with another user of the same server, read-only or read-write.
The person is found by the exact address typed in; there is no search or
user listing. The grantee sees the collection in their own home as
shared-<collection id>.
Sharing lists, changes and revocations are recorded in the admin audit log,
and a revocation applies on the grantee's next request. Inboxes and outboxes
cannot be shared. The DAV ACL method is not offered.
On the same page a user can allow others on the server to see when they are busy. That setting is off by default. Free/busy works only between users of this server; a user who has not opted in is answered exactly like an address that does not exist. Free/busy for people outside the server is not supported.
Invitations
A message that carries a text/calendar part (REQUEST, CANCEL or
REPLY) shows an invitation card in the message view. The user can accept,
answer tentative or decline; the answer goes only to the ORGANIZER in the
iTIP data.
A received invitation is applied automatically only when the mail source
reports that the sender passed authentication: the From domain passed
DMARC, or DKIM or SPF passed for an aligned domain, and the verdict was about
that From domain. This verdict is never read from the message's own
headers. Without a passing verdict the card shows a "sender not verified"
warning and the user may still answer by hand.
An invitation to a repeating event says what repeats ("Repeats every week
on Tue, 4 times."), lists the first occurrences (an occurrence that was changed
is listed at its new time) and says how many were changed. The answer is for
all events or for only one of the listed occurrences; an answer for one
occurrence is written as an override with that RECURRENCE-ID and the reply to
the organiser (RFC 5546) names it. An answer for all events is also written into
every occurrence that was changed on its own.
Counter-proposals (COUNTER) are not supported. A message that holds several
different events (different UIDs) shows one card for each, numbered "1 of 3",
each with its own Accept, Tentative and Decline buttons. RFC 5546 allows only one
UID per iTIP message, so a sender who packs several events into one is not
following it; Kantoor reads it anyway, and answers each event by itself: an
answer stores that event in your calendar and sends one reply, for that event,
to that event's organiser. Answering one does not answer the others. Up to ten
events are shown; the card says how many more there are. A trusted message with
several events is added to your calendar event by event on arrival.
Invitations to people on other servers are sent as iMIP mail (RFC 6047) through the mail source. Invitations between users of this server are delivered inside the DAV scheduling inbox and outbox.
Limits
- The calendar page has no grid. Attendees cannot be changed for one occurrence from the page.
- Tasks on the calendar are not repeated (see above), and a week or month list is limited to the first 1000 tasks that match.
- The Birthdays calendar is only on the calendar page: it is not a CalDAV collection, so no calendar app sees it.
- Counter-proposals are not handled on the invitation card.
- There are no DAV quotas, no Apple
CS:share, no iSchedule and no locking. - Deleted DAV members leave tombstones for sync. The provided pruning
functions are not scheduled; the
dav_tombstonesmaintenance job prunes collections that have been quiet forKANTOOR_TOMBSTONE_DAYS(90 by default).