Kmail — `products/horizontal/kmail/desktop`

  • Area: Workspace
  • Path: products/horizontal/kmail/engine
  • Kind: Consumer webmail product (B2C flagship for Raven engine)

Role in the stack

Kmail is the consumer-facing webmail client that runs on top of the Raven email platform engine. It provides a full-featured web inbox: JMAP-backed mailboxes, composing, search, contacts, identities, Sieve filters, CalDAV event integration, and file attachment via Koder Drive.

Kmail (product) → Raven engine → Stalwart MTA

Primary couplings

Consumer Relationship
products/horizontal/kmail/raven Email engine — domain provisioning, JMAP proxy
Stalwart MTA JMAP source; blob upload for attachments and migration
services/foundation/id/platform OIDC login and session JWT
products/horizontal/drive/engine File attachment storage (ticket KMAIL-042)
Gmail API Personal Gmail connector via OAuth 2.0 PKCE

Gmail Connector

Kmail ships a personal Gmail connector (internal/gmail) allowing users to:

  • OAuth connect — PKCE Authorization Code Flow, stores token in TokenStore
  • Browse Gmail — list labels, list/get messages
  • Send via Gmail — proxy raw MIME through Gmail API
  • Migrate to Kmail — bulk import: phase 1 inventories all message IDs, phase 2 downloads raw RFC 5322 bytes, uploads blob to Stalwart, calls Email/import JMAP method; cancellable at any time
  • Label mappingSystemLabelMap converts Gmail labels (INBOX, SENT, DRAFT, TRASH, SPAM, STARRED, IMPORTANT, CATEGORY_*) to JMAP mailbox names and keywords

Enabled conditionally when cfg.Gmail.ClientID is set. OAuth endpoints at /auth/gmail and /auth/gmail/callback are outside the auth group; API routes at `apigmail