Skip to content

config.pkl

The main configuration file. Defines accounts, app-wide settings, sync intervals, and signatures.

import "modulepath:/Config.pkl" as C

settings {
  theme = "system"
  notifications_enabled = true
  load_remote_images = false
}

sync {
  gui_auto_sync = true
  auto_fetch_interval = 120
  full_sync_interval = 7200
}

signatures {
  ["default"] = "Best regards"
}

accounts {
  new {
    name = "Personal"
    email = "you@example.com"
    alias = "personal"
    smtp { host = "smtp.example.com"; port = 587; auth = "password" }
    imap { host = "imap.example.com"; port = 993; auth = "password" }
    auth { username = "you@example.com" }
  }
}

settings

FieldTypeDefaultNotes
theme"light" | "dark" | "system""system"GUI theme
notifications_enabledBooleantrueGlobal notification toggle (override per account)
load_remote_imagesBooleanfalseBlock tracking pixels by default
accent_colorString?nullHex color, e.g. "#3B82F6"

sync

FieldTypeDefaultNotes
gui_auto_syncBooleantrueGUI syncs on launch and periodically
auto_fetch_intervalInt (seconds)120Quick sync interval
full_sync_intervalInt (seconds)7200Full sync interval
tag_syncobject?nullOptional remote tag sync — see tag sync server
attachment_cacheobject?null{ max_size_mb, ttl_days }

accounts

A Listing<AccountConfig>. Each entry can be a literal new { ... } (password auth) or amend a provider preset ((C.gmail) { ... }, (C.microsoft365) { ... }).

FieldNotes
nameDisplay name in the sidebar
emailAccount address
aliasShort name for CLI (durian sync <alias>)
display_name“From” header value
defaulttrue on the default compose account
default_signatureSignature key from signatures {}
notificationsPer-account override of settings.notifications_enabled
smtp{ host, port, auth }
imap{ host, port, auth, max_messages }
auth{ username } for password, or oauth { client_id, client_secret } for Google

Provider presets

Config.pkl exposes:

  • C.microsoft365 — pre-fills Microsoft endpoints, auth = "oauth". Default OAuth app is bundled.
  • C.microsoft365Shared — shared mailbox variant; needs auth_email (the delegating user).
  • C.gmail — pre-fills Google endpoints, auth = "oauth". Requires your own client_id / client_secret — see OAuth setup.

signatures

A map of label → HTML string. Reference per-account via default_signature = "<label>".

signatures {
  ["default"] = "Best regards"
  ["work"] = """
    <b>Your Name</b><br>
    Position
    """
}

Validate

durian validate config

Errors point to the specific field and line.