Overview

Kantoor is Dutch for office. Kantoor is an email, calendar, contacts and tasks server with a web interface. It is written in Elixir on Phoenix LiveView and Postgres, and is published under the MIT license by Shiloh B.V.

Kantoor keeps a virtual mailbox index in Postgres: folders, flags, UIDs, modification sequences and pointers. The message bodies are not stored in Kantoor; it fetches them on demand from a mail source and keeps only a bounded cache. Today the only mail source is Karta, an optional sibling project (see Connecting to Karta).

Version 1.0.0

This is 1.0.0. The features below exist and are covered by tests. On the authors' live installation they were exercised on 12 and 13 November 2026 with protocol libraries, vdirsyncer and mbsync, and by hand in a browser. Kantoor has not been tested with a real Thunderbird, Apple Mail, iOS, Outlook, K-9 or DAVx5, and nobody has published a record of using it in production. Do not rely on it for important mail without your own testing. Status and roadmap lists what was checked and what was not.

What Kantoor does today

  • Webmail (LiveView): inbox and folders in two panes (the list or the open message) or, as a setting, three panes (a phone layout on narrow screens), message view with sanitised HTML and attachments, compose, reply, reply all, forward, drafts, search, move, flag, mark read and bulk actions, with sending identities and signatures, filters and a vacation reply. English and Dutch, light and dark.
  • An IMAP4rev1 server with CONDSTORE, QRESYNC, ESEARCH, SORT, THREAD, IDLE, MOVE, UIDPLUS, LIST-EXTENDED and SPECIAL-USE. Off by default.
  • A POP3 server. Off by default; by default a download never deletes mail.
  • SMTP submission for mail clients (STARTTLS and implicit TLS, an app password of the smtp scope). Mail goes out through Karta. Off by default.
  • Client auto-configuration for Thunderbird-style clients, Outlook and Apple devices (Client auto-configuration).
  • CalDAV and CardDAV at /dav, with .well-known redirects, plus tasks (VTODO). Built on a fork of the Apache-2.0 dav library.
  • Calendar, contacts and tasks pages in the web interface, which refresh when another client changes the data: repeating events, a read-only Birthdays calendar, a tasks board with a column per status, and contacts with typed phones and emails, addresses, birthday and photo.
  • Invitations (iTIP/iMIP): an invitation card (one per event) for received mail, and invitations to people on other servers sent as mail. A received invitation is applied only when the mail source reports that the sender passed authentication (SPF, DKIM or DMARC).
  • Subscribed calendars: a calendar published elsewhere as an iCalendar feed, shown read only (Subscribed calendars).
  • Sharing of calendars, task lists and address books between users, and an opt-in free/busy.
  • Accounts: sign-in with any OpenID Connect provider, per-device app passwords for IMAP, POP3 and DAV, and login throttling per IP and login.
  • Admin pages: a dashboard, domains (with the DNS records mail clients need), mailboxes, users, held mail, operator API keys and the audit log.
  • A provisioning API (/api/v1/provisioning) for an external system that sets customers up (Provisioning API).
  • Several replicas on one database (Running several replicas).
  • Quotas: virtual, per domain with a per-mailbox override. Mail over quota is accepted but held out of sight until space is freed.
  • Scheduled maintenance jobs (tombstone and cache sweeps, held-mail release, retrying body fetches), each of which can be switched off.

How it is put together

A single Phoenix application serves the web interface, the CalDAV/CardDAV endpoint and the Karta inbound webhook. The IMAP and POP3 servers run as separate listeners in the same release when they are enabled. Postgres holds the index, the accounts, the DAV data and a bounded cache of message bodies; Karta remains the store of record for mail bodies and the transport for incoming and outgoing mail.

Architecture describes the modules, the database tables and the request and mail paths.

Where to go next