yarilo

module
v2.4.5 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 31, 2026 License: AGPL-3.0

README

yarilo

yarilo logo

Production-grade IMAP / POP3 / LMTP / ManageSieve / Submission mail server with built-in full-text search, written in Go. Multi-binary architecture - each protocol component is a separate process. Kubernetes-native via Helm.

Website: yarilomail.org · Docs: doc.yarilomail.org

CI Coverage Go 1.26 Platform


Architecture

Yarilo is a multi-binary server. Each protocol and infrastructure role is a separate compiled binary - no mode flags, no combined processes. Deployment topology is configured purely through Helm values; the same binaries serve standalone and clustered installations.

Login pods - terminate TLS (SNI per-domain), authenticate via passdb, enforce per-user connection limits (warden), pass the raw fd to session pods via SCM_RIGHTS. Stateless; scale independently.

Session pods - full mail processing: IMAP / POP3 / LMTP / Sieve / Submission / ManageSieve. Each protocol scales as a separate StatefulSet so IMAP can scale independently of LMTP.

yarilo-auth - shared passdb chain (MySQL / Postgres / SQLite / passwd-file / static), auth-token cache, SASL dispatch, master protocol for userdb lookups.

yarilo-locks - cross-process write coordination. TCP mTLS :9104, Redis-backed state. All Kubernetes deployments (standalone and backend) use remote mode - embedded Unix-socket mode is reserved for unit tests and single-process CLI runs.

yarilo-warden - connection rate limiting and penalty tracking. Shared across all login pods.


Protocol support

Protocol Standard Extensions Status
IMAP4rev2 RFC 9051 IDLE, MOVE, CONDSTORE, QRESYNC, UIDPLUS, UNSELECT, NAMESPACE, QUOTA, ACL, BINARY, SORT, THREAD, ESEARCH, NOTIFY, URLAUTH, SPECIAL-USE, ID, OBJECTID, METADATA ✅
POP3 RFC 1939 STLS, UIDL, CAPA, XCLIENT ✅
LMTP RFC 2033 per-recipient status, HAProxy, XCLIENT, STARTTLS, Delivered-To, Sieve delivery ✅
ManageSieve RFC 5804 full script management ✅
Sieve RFC 5228 fileinto, reject, ereject, envelope, encoded-character, variables, relational, copy, subaddress, environment, body, vacation, vacation-seconds, regex, date, index, editheader, mailbox, mailboxid, duplicate, ihave, special-use, imap4flags, fcc, include, enotify, spamtest, spamtestplus, virustest, foreverypart, mime, extracttext, replace, enclose, mboxmetadata, servermetadata, imapsieve, vnd.yarilo.debug, vnd.yarilo.environment, vnd.yarilo.pipe, vnd.yarilo.filter, vnd.yarilo.report, vnd.yarilo.execute ✅
Submission RFC 6409 STARTTLS, SASL PLAIN, SIZE, PIPELINING, relay to upstream MTA ✅
SASL - PLAIN, LOGIN, SCRAM-SHA-256, XOAUTH2, OAUTHBEARER ✅
JMAP RFC 8620/8621 session, Mailbox/{get,query,changes}, Email/{get,query,set,changes}, Thread/{get,changes}, SearchSnippet/get, blob download, back-references partial

Storage

Layer Backend Status
Mailbox Maildir ✅
Mailbox sdbox (single-file dbox with GUID metadata) ✅
Mailbox mdbox (multi-message dbox, higher density) ✅
Mailbox obox (S3-compatible object storage) planned
Index FileIndex (binary mail-index v7.3 wire format, .index / .index.log / .index.names) ✅

All index mutations go through the cross-process mailbox lock (yarilo-locks). Sessions sharing a pod serialise on an in-process sync.RWMutex - the Redis lock is only ever contested across pods, not within a single pod.

Self-healing (Maildir sync-on-open, dbox/mdbox reactive heal), the operator rebuild path, and mdbox rotation/tuning knobs: see STORAGE.


SEARCH BODY, SEARCH TEXT and SEARCH HEADER are backed by a per-user full-text index instead of a linear message scan. SEARCH RETURN (RELEVANCY) (RFC 4731/6203) surfaces the engine's ranking as scores 1-100, min-max normalized per result set - requires a yarilo-patches go-imap fork, since upstream has no RELEVANCY support.

Component Backend Status
Engine flatcurve (Xapian, on-disk glass shards) via go-xapian ✅
Indexer / lookup service yarilo-fts (sole writer; sessions dial it) ✅

The yarilo-fts service owns the index end-to-end (indexing and lookups) and is the only process linking libxapian (cgo); session binaries stay pure-Go and send LOOKUP over the internal TAB protocol. Enable it with fts.enabled + fts_engine: flatcurve. Multi-language indexing/search, attachment decoders, and the full config surface are documented in FTS.

Acceptance benchmark (app/fts-bench, synthetic corpus, local Xapian glass shards):

Corpus Shards Index size Index rate SEARCH p95 (indexed vs scan)
5,000 1 1.59× corpus 9,654 msg/s 0.08 ms vs 77.7 ms (942×)
10,000 2 1.62× corpus 9,764 msg/s 0.14 ms vs 149 ms (1,090×)
20,000 4 1.63× corpus 10,027 msg/s 0.23 ms vs 322 ms (1,410×)

Search stays sub-millisecond as the mailbox grows; the linear scan it replaces grows with message count. See https://doc.yarilomail.org/latest/features/fts.html for the full design and the phased roadmap (relevancy / strict-substring / multi-language, then attachment decoders).


Cluster components

Binary Role Status
yarilo-imap IMAP4rev2 session server ✅
yarilo-imap-login IMAPS / IMAP login proxy - TLS termination, passdb, fd-passing ✅
yarilo-pop3 POP3 session server ✅
yarilo-pop3-login POP3S / POP3 login proxy ✅
yarilo-lmtp LMTP delivery server (Sieve, quota) ✅
yarilo-lmtp-login LMTP login proxy - HAProxy, XCLIENT, preamble strip ✅
yarilo-managesieve ManageSieve script management server ✅
yarilo-managesieve-login ManageSieve login proxy - STARTTLS, HAProxy ✅
yarilo-submission Submission relay server ✅
yarilo-submission-login Submission login proxy ✅
yarilo-jmap-login JMAP login proxy - TLS termination, auth, warden, HTTP proxy ✅
yarilo-jmap JMAP backend - session resource, RFC 8620/8621 methods ✅
yarilo-sasl-login SASL auth socket for Postfix / Exim relay ✅
yarilo-auth Passdb chain, auth cache, SASL dispatch, master userdb ✅
yarilo-warden Connection rate limiting + penalty ✅
yarilo-locks Cross-process write coordination - Redis-backed, TCP mTLS ✅
yarilo-quota-status Quota policy socket (Postfix quota check) ✅
yarilo-fts Full-text search indexer + lookup service (flatcurve/Xapian; sole cgo/libxapian process) ✅
yarilo-backend-api HTTP admin API (dict, ACL, folder, quota, rebuild) ✅
yarilo-backend-reg Co-located backend registration sidecar - one BACKEND-UP per pod IP, readiness-gated heartbeat, graceful LEAVE on SIGTERM (#776/#788) ✅
yarctl CLI control tool - director and backend planes (backward-compat alias: yarilo-admin) ✅
yarilo-migrate Offline mailbox FORMAT converter (Maildir → sdbox/mdbox); not cross-server dsync/imapc ✅
yarilo-director Consistent-hashing ring, sticky sessions, throttled evacuation, failover ✅

All intra-cluster protocols are TAB-delimited text with LF termination and a version handshake.

Session routing (backend_addr / director_addr precedence), sticky assignments, username-hash templates (username_hash), domain placement and the operator's domain move (yarctl director domains move), backend evacuation, the per-user flush hook, tag sharding models, and the self-organizing ring formation (with its design history) are all documented in DIRECTOR.


Quick start (Helm)

# Add the chart (local checkout)
helm upgrade --install yarilo ./helm \
  -f helm_values/values-sandbox.yaml \
  -n yarilo --create-namespace

See the installation guide for a full Kubernetes walkthrough with cert-manager, Let's Encrypt, and an external MySQL passdb.

Minimal yarilo.yaml for bare-metal single-node:

hostname: mail.example.com

auth:
  passdb:
    - driver: mysql
      dsn: "yarilo:secret@tcp(127.0.0.1:3306)/yarilo"

storage:
  persistence:
    enabled: true
    size: 50Gi

locks:
  mode: embedded   # single-node only; use remote in k8s
LOG_LEVEL=debug yarilo-imap -config yarilo.yaml

LOG_LEVEL=debug is per-service - set it on the process whose code path you are tracing (a delivery breadcrumb lives in yarilo-lmtp, a search one in yarilo-imap). At debug level every write path emits an explicit "wrote UID=N file=Q" line (lmtp: delivered, imap: append saved, imapsieve: fileinto saved, sieve/pipe: invoked, sieve/sender: notification sent), and the read side logs what it actually scanned when a lookup comes back empty (imap: search matched no messages with the folder's record count and UID range, imap: fetch skipped uid absent from client view, fileindex: reload applied / reset folder with record counts before/after) - so a delivery→visibility mismatch is diagnosable from the log alone. The full-text search pipeline is instrumented the same way: yarilo-fts logs every request it handles (fts: indexed / expunged / lookup / rescanned / status) and the indexing worker reports each run (fts: index run start / done with checkpoint, indexed/skipped counts and duration, plus per-message fts: message indexed), while the yarilo-imap/yarilo-lmtp sides log the handoff (imap: fts notify sent, lmtp: fts autoindex queued) and how many candidates a search got back (imap: fts search candidates). FTS lines log result and term COUNTS, never the query terms (private mail content).

These lines carry only metadata (user, folder, UID, filename, counts); passwords, tokens, SASL response data, and search query terms are never logged.


Quick start (Docker Compose)

Single-host, no Kubernetes - the standalone topology (login proxies + session backends + auth/warden/locks + Redis) on one host, SQLite userdb, one image:

cd deploy/compose
cp .env.example .env
./gen-certs.sh mail.example.test     # self-signed TLS for local use
docker compose up -d

Full walkthrough - creating users, TLS, MTA (Postfix) integration, verifying, backups - in DOCKER-COMPOSE.


Mailbox format migration (offline)

yarilo-migrate is an offline, on-disk format converter for a per-user mailbox tree - sources maildir / dbox-v1 / mdbox-v1, destinations sdbox / mdbox. It is not a cross-server (dsync/imapc) migration that pulls mail over IMAP from another server.

yarilo-migrate \
  --from /var/mail/vhosts \
  --to   /var/mail/dbox \
  --format dbox   # or mdbox; --dry-run to preview
GUID pre-migration

Mail stored before yarilo 2.3.8 carries no per-message GUID, so its EMAILID (RFC 8474) is stamped the first time a client selects the folder. That one-off pass is automatic and needs no operator action; this command only moves the cost off the first SELECT, which is worth doing for very large folders.

yarilo-migrate --guid-backfill \
  --config /etc/yarilo/yarilo.yaml \   # layout, driver, userdb and yarilo-locks
  --user   u1@example.com               # optional: one user instead of all
                                        # --dry-run reports what is pending
Flag Meaning
--guid-backfill Run the GUID pass instead of a format conversion
--config yarilo.yaml supplying storage.mailbox, storage.maildir_root, storage.mail_home_template, backend_api.auth_master_addr, and the yarilo-locks client
--driver Override storage.mailbox: maildir | sdbox | mdbox
--root Override storage.maildir_root
--home-template Override storage.mail_home_template, e.g. %d/%u
--user Restrict to one user@domain; default is every user under the root
--offline Resolve per-user paths from flags instead of userdb
--index-template Offline stand-in for the userdb INDEX= override, e.g. %h/index
--mail-template Offline stand-in for the userdb mail_path override
--dry-run Report the folders that would be stamped, write nothing

Per-user INDEX=, CONTROL=, ALT= and mail_path overrides live in the userdb, not in yarilo.yaml, so by default the tool looks each user up through backend_api.auth_master_addr exactly as a session does. A store whose auth is not running is handled by --offline plus the templates; the two sources are mutually exclusive, because a template disagreeing with userdb would address a mailbox the sessions never use.

The templates take ~/ or %h for the user's home, plus %u/%n/%d, so a userdb value of INDEX=~/index is written the same way here.

The tool never creates an index. A path holding no index is an error naming the path, not an empty folder reported as complete.

Without --config both --driver and --root are required, and the run is unlocked. Users are enumerated only for a layout whose leaf directory names the user (%u, or %n with %d above it); any other mail_home_template has to be driven one user at a time with --user.

The command writes to shared storage, so pass --config to make it take the same locks the services take; it is then safe to run against a live store. Without --config it runs unlocked, which is only safe with the store stopped. Repeat runs are no-ops: a stamped folder is recorded as done and an already assigned GUID is never rewritten.


Test coverage

The coverage badge reports main, the released code, measured by .github/workflows/coverage.yml on every release and on demand: the whole tree with -coverpkg=./..., so a package's statements count when any package's tests run them, plus the flatcurve engine under its build tag. A branch is measured by running the workflow on it by hand (Actions → Coverage → Run workflow); Codecov shows each branch apart.

Left out (codecov.yml): the main packages in app/ that are entry points, which wire the config into components tested in internal/ and start them, and the stand tools (auth-bench, fts-bench, smoketest-e2e) that run against a live deployment. Counted: yarctl, smoketest and yarilo-migrate, which hold command logic of their own.


Documentation

Full documentation lives at doc.yarilomail.org (source: yarilomail/documentation).

Document Contents
ARCHITECTURE Code-level architecture, process model, storage contract, deployment diagrams
DEPLOYMENT K8s topology, sizing, HA strategy, sharding via tags
GENERAL general: SSL, HAProxy, XCLIENT, connection limits
SERVICES services: per-listener config
IMAP protocol.imap: IDLE, line length, ACL, NAMESPACE, NOTIFY, METADATA, OBJECTID
NAMESPACE IMAP namespaces (RFC 2342 / 9051): personal / shared / other_users
SUBMISSION protocol.submission: hostname, size, relay
LMTP protocol.lmtp: delivery, HAProxy, XCLIENT, TLS, headers
POP3 protocol.pop3: UIDL, soft-delete, migration
SIEVE sieve: filtering, ManageSieve, imapsieve, vacation, extensions
AUTH auth.passdb: SQL / passwd-file / static backends, password schemes, userdb extra fields
QUOTA quota: count-authoritative engine, grace, warnings, mail_size, clone mirror, over-status
STORAGE Mailbox self-healing, operator rebuild, mdbox rotation/tuning knobs
FTS Full-text search: engine, multi-language, decoders, config, phases
SMOKE End-to-end smoke test
DIRECTOR director_service: ring, peers, mTLS, session routing, sticky assignments, username-hash, evacuation, flush hook, ring formation history
DIRECTOR-API Director HTTP admin API
BACKEND-API Backend HTTP admin API
YARILO-ADMIN yarctl CLI reference
DICT pkg/dict KV-store abstraction: drivers, YAML schema

License

GNU Affero General Public License v3.0 - see LICENSE.

Directories

Path Synopsis
app
auth-bench command
auth-bench times what a dial to the yarilo-auth master costs against the lookup it carries -- the ratio the connection pool decision turned on (#1402) and the way to confirm the pool in the field afterwards.
auth-bench times what a dial to the yarilo-auth master costs against the lookup it carries -- the ratio the connection pool decision turned on (#1402) and the way to confirm the pool in the field afterwards.
fts-bench command
smoketest command
smoketest verifies a live yarilo deployment: exit 0 when every check passed, 1 otherwise.
smoketest verifies a live yarilo deployment: exit 0 when every check passed, 1 otherwise.
smoketest-e2e command
smoketest-e2e drives a live yarilo instance end-to-end:
smoketest-e2e drives a live yarilo instance end-to-end:
smoketest-e2e/seed command
seed creates the yarilo_users table (if missing) and inserts a single user with a bcrypt-hashed password.
seed creates the yarilo_users table (if missing) and inserts a single user with a bcrypt-hashed password.
yarctl command
yarctl is the yarilo operator CLI.
yarctl is the yarilo operator CLI.
yarilo command
yarilo-auth command
yarilo-auth is the standalone authentication service for the yarilo mail server.
yarilo-auth is the standalone authentication service for the yarilo mail server.
yarilo-backend-api command
yarilo-backend-api is the backend-plane admin HTTP API.
yarilo-backend-api is the backend-plane admin HTTP API.
yarilo-backend-reg command
yarilo-backend-reg is the co-located backend pod's registration sidecar (#788).
yarilo-backend-reg is the co-located backend pod's registration sidecar (#788).
yarilo-dict command
yarilo-dict serves the named dicts from yarilo.yaml: the only process that links a dict engine, which sessions reach by name (#1733).
yarilo-dict serves the named dicts from yarilo.yaml: the only process that links a dict engine, which sessions reach by name (#1733).
yarilo-director command
yarilo-director routes mail sessions to backend pods by consistent hash of the username and proxies them directly to the pod IP (bypassing kube-proxy).
yarilo-director routes mail sessions to backend pods by consistent hash of the username and proxies them directly to the pod IP (bypassing kube-proxy).
yarilo-fts command
yarilo-fts is the full-text-search service: the sole owner of the FTS indexes - indexing queue + worker and the LOOKUP endpoint - speaking the pkg/ftsproto wire protocol.
yarilo-fts is the full-text-search service: the sole owner of the FTS indexes - indexing queue + worker and the LOOKUP endpoint - speaking the pkg/ftsproto wire protocol.
yarilo-imap command
yarilo-imap is the IMAP/IMAPS backend for the yarilo mail server.
yarilo-imap is the IMAP/IMAPS backend for the yarilo mail server.
yarilo-imap-login command
yarilo-imap-login is the IMAP/IMAPS login proxy for the yarilo mail server.
yarilo-imap-login is the IMAP/IMAPS login proxy for the yarilo mail server.
yarilo-jmap command
yarilo-jmap is the JMAP backend (RFC 8620 core, RFC 8621 mail).
yarilo-jmap is the JMAP backend (RFC 8620 core, RFC 8621 mail).
yarilo-jmap-login command
yarilo-jmap-login is the JMAP login proxy.
yarilo-jmap-login is the JMAP login proxy.
yarilo-lmtp command
yarilo-lmtp is the LMTP backend for the yarilo mail server.
yarilo-lmtp is the LMTP backend for the yarilo mail server.
yarilo-lmtp-login command
yarilo-lmtp-login is the LMTP login proxy for the yarilo mail server.
yarilo-lmtp-login is the LMTP login proxy for the yarilo mail server.
yarilo-locks command
yarilo-locks is the cross-process write-coordination service, selected by locks_service.mode in yarilo.yaml:
yarilo-locks is the cross-process write-coordination service, selected by locks_service.mode in yarilo.yaml:
yarilo-managesieve command
yarilo-managesieve is the ManageSieve backend for the yarilo mail server.
yarilo-managesieve is the ManageSieve backend for the yarilo mail server.
yarilo-managesieve-login command
yarilo-managesieve-login is the ManageSieve (RFC 5804) login proxy.
yarilo-managesieve-login is the ManageSieve (RFC 5804) login proxy.
yarilo-migrate command
yarilo-migrate converts a per-user mailbox tree from one storage shape to another.
yarilo-migrate converts a per-user mailbox tree from one storage shape to another.
yarilo-pop3 command
yarilo-pop3 is the POP3/POP3S backend for the yarilo mail server.
yarilo-pop3 is the POP3/POP3S backend for the yarilo mail server.
yarilo-pop3-login command
yarilo-pop3-login is the POP3/POP3S login proxy for the yarilo mail server.
yarilo-pop3-login is the POP3/POP3S login proxy for the yarilo mail server.
yarilo-quota-status command
yarilo-quota-status is a Postfix policy service that rejects incoming messages to recipients whose mailbox is over quota.
yarilo-quota-status is a Postfix policy service that rejects incoming messages to recipients whose mailbox is over quota.
yarilo-sasl-login command
yarilo-sasl-login proxies Postfix SASL authentication to yarilo-auth.
yarilo-sasl-login proxies Postfix SASL authentication to yarilo-auth.
yarilo-submission command
yarilo-submission is the SMTP submission proxy: it authenticates the client on 587/465 and relays to the upstream MTA, opening no mailbox.
yarilo-submission is the SMTP submission proxy: it authenticates the client on 587/465 and relays to the upstream MTA, opening no mailbox.
yarilo-submission-login command
yarilo-submission-login is the SMTP submission login proxy for the yarilo mail server.
yarilo-submission-login is the SMTP submission login proxy for the yarilo mail server.
yarilo-warden command
yarilo-warden is the connection-accounting service for the yarilo mail server.
yarilo-warden is the connection-accounting service for the yarilo mail server.
hack
commentcensus command
commentcensus lists the multi-line comment blocks in the tree and measures what share of each package is comment.
commentcensus lists the multi-line comment blocks in the tree and measures what share of each package is comment.
fts-decoder-stub command
fts-decoder-stub is a minimal server implementing the fts_decoder_driver=script wire protocol (see internal/fts/decoder/script.go), for live sandbox verification of the attachment-decoder code path - not for production use.
fts-decoder-stub is a minimal server implementing the fts_decoder_driver=script wire protocol (see internal/fts/decoder/script.go), for live sandbox verification of the attachment-decoder code path - not for production use.
settingsexport command
settingsexport prints every yarilo.yaml key as JSON: full path, section, Go type and the value config.Defaults() gives it.
settingsexport prints every yarilo.yaml key as JSON: full path, section, Go type and the value config.Defaults() gives it.
internal
auth/authtest
Package authtest wires a session's auth relay to an in-process auth service, so a test that once held a passdb drives the same credential over the wire.
Package authtest wires a session's auth relay to an in-process auth service, so a test that once held a passdb drives the same credential over the wire.
auth/client
Package client implements the yarilo-auth TAB-delimited client protocol.
Package client implements the yarilo-auth TAB-delimited client protocol.
auth/oauth2
Package oauth2 validates OAuth 2.0 bearer tokens for the SASL OAUTHBEARER mechanism (RFC 7628) and exposes the result as a passdb.Passdb, so OAuth logins flow through the regular yarilo-auth pipeline unchanged.
Package oauth2 validates OAuth 2.0 bearer tokens for the SASL OAUTHBEARER mechanism (RFC 7628) and exposes the result as a passdb.Passdb, so OAuth logins flow through the regular yarilo-auth pipeline unchanged.
auth/passdbs
Package passdbs builds passdb and userdb chains from config entries, dispatching on the driver name.
Package passdbs builds passdb and userdb chains from config entries, dispatching on the driver name.
auth/passwdfile
Package passwdfile implements a passwd-file passdb and userdb: a flat, colon-separated file of users (classic /etc/passwd layout with an optional extra-fields column).
Package passwdfile implements a passwd-file passdb and userdb: a flat, colon-separated file of users (classic /etc/passwd layout with an optional extra-fields column).
auth/policy
Package policy implements a wforce-compatible HTTP policy client.
Package policy implements a wforce-compatible HTTP policy client.
auth/protocol
Package protocol implements the yarilo-auth TCP+mTLS protocol.
Package protocol implements the yarilo-auth TCP+mTLS protocol.
auth/scheme
Package scheme verifies a plaintext password against a stored {SCHEME}-prefixed password string and parses SCRAM verifier blobs.
Package scheme verifies a plaintext password against a stored {SCHEME}-prefixed password string and parses SCRAM verifier blobs.
auth/scram
Package scram adapts the go-sasl SCRAM servers for session use: it captures the authenticated username (the sasl factory doesn't expose it) and runs a post-success hook before the connection is marked authenticated.
Package scram adapts the go-sasl SCRAM servers for session use: it captures the authenticated username (the sasl factory doesn't expose it) and runs a post-success hook before the connection is marked authenticated.
auth/sql
Package sql implements SQL passdb/userdb for yarilo-auth.
Package sql implements SQL passdb/userdb for yarilo-auth.
auth/static
Package static implements a static passdb and userdb: one shared credential and a set of templated fields applied to every user.
Package static implements a static passdb and userdb: one shared credential and a set of templated fields applied to every user.
authwait
Package authwait holds the guard that keeps startup dials to yarilo-auth bounded by a wait rather than by an immediate exit (#1369).
Package authwait holds the guard that keeps startup dials to yarilo-auth bounded by a wait rather than by an immediate exit (#1369).
backend
Package backend wires all server components for the backend (or single) mode.
Package backend wires all server components for the backend (or single) mode.
backendapi
Package backendapi is the backend-plane admin HTTP API.
Package backendapi is the backend-plane admin HTTP API.
backendreg
Package backendreg self-registers a backend with the director and heartbeats, so the ring reflects live backend pods.
Package backendreg self-registers a backend with the director and heartbeats, so the ring reflects live backend pods.
cluster/proto
Package proto implements the yarilo-director TAB-delimited wire protocol.
Package proto implements the yarilo-director TAB-delimited wire protocol.
cluster/ring
Package ring implements the director's consistent-hashing ring: MD5, 100 virtual nodes per backend (configurable), binary search.
Package ring implements the director's consistent-hashing ring: MD5, 100 virtual nodes per backend (configurable), binary search.
connlimit
Package connlimit provides per-user@IP connection counting for IMAP/POP3/SMTP, enforcing the mail_max_userip_connections limit.
Package connlimit provides per-user@IP connection counting for IMAP/POP3/SMTP, enforcing the mail_max_userip_connections limit.
dictsrv
Package dictsrv serves the dict protocol on behalf of named dicts, so the engines live in one process instead of every session binary (#1733).
Package dictsrv serves the dict protocol on behalf of named dicts, so the engines live in one process instead of every session binary (#1733).
director
Package director - Membership implements the self-organizing director ring: members ordered by (ip, port), each node dialing its right neighbor, joined via an HMAC-authenticated JOIN against a seed.
Package director - Membership implements the self-organizing director ring: members ordered by (ip, port), each node dialing its right neighbor, joined via an HMAC-authenticated JOIN against a seed.
fts/buildmail
Package buildmail turns a raw RFC 5322 message into the FTS build-key stream: KeyHeader/KeyMIMEHeader for indexable header fields, KeyBodyPart for decoded text parts (HTML converted to text, other attachments via an optional external decoder).
Package buildmail turns a raw RFC 5322 message into the FTS build-key stream: KeyHeader/KeyMIMEHeader for indexable header fields, KeyBodyPart for decoded text parts (HTML converted to text, other attachments via an optional external decoder).
fts/decoder
Package decoder extracts indexable text from non-text MIME parts (PDF, office documents, etc.) via an external script or Apache Tika; no built-in format parsing.
Package decoder extracts indexable text from non-text MIME parts (PDF, office documents, etc.) via an external script or Apache Tika; no built-in format parsing.
fts/flatcurve
Package flatcurve is the Xapian-backed FTS engine, on-disk compatible with the flatcurve index format: per-mailbox "fts-flatcurve" directory of Xapian shards (current.### write shard, index.### sealed shards), docid == IMAP UID, term prefixes A (all headers), H<NAME> (indexed header), B (header existence).
Package flatcurve is the Xapian-backed FTS engine, on-disk compatible with the flatcurve index format: per-mailbox "fts-flatcurve" directory of Xapian shards (current.### write shard, index.### sealed shards), docid == IMAP UID, term prefixes A (all headers), H<NAME> (indexed header), B (header existence).
fts/ftsstore
Package ftsstore builds the fts.IndexStore an engine writes its indexes through, from the driver named in fts_index_root.
Package ftsstore builds the fts.IndexStore an engine writes its indexes through, from the driver named in fts_index_root.
fts/language
Package language is the tokenization and filter layer shared by FTS indexing and search.
Package language is the tokenization and filter layer shared by FTS indexing and search.
fts/query
Package query turns the full-text part of a search into the engine query.
Package query turns the full-text part of a search into the engine query.
ftsbench
Package ftsbench is the FTS acceptance benchmark: it builds a synthetic mail corpus, indexes it through the yarilo-fts service (embedded, flatcurve engine), and compares an index-backed SEARCH against the brute-force scan on the two axes the design commits to (https://doc.yarilomail.org/latest/features/fts.html §12): search latency and index size.
Package ftsbench is the FTS acceptance benchmark: it builds a synthetic mail corpus, indexes it through the yarilo-fts service (embedded, flatcurve engine), and compares an index-backed SEARCH against the brute-force scan on the two axes the design commits to (https://doc.yarilomail.org/latest/features/fts.html §12): search latency and index size.
ftsservice
Package ftsservice is the yarilo-fts core: the sole owner of the FTS indexes (single writer + lookup endpoint, https://doc.yarilomail.org/latest/features/fts.html §4), an indexing queue with priority inserts for on-demand search catch-up, and the worker that streams messages through buildmail into the engine.
Package ftsservice is the yarilo-fts core: the sole owner of the FTS indexes (single writer + lookup endpoint, https://doc.yarilomail.org/latest/features/fts.html §4), an indexing queue with priority inserts for on-demand search catch-up, and the worker that streams messages through buildmail into the engine.
hostnamewiring
Package hostnamewiring holds no code.
Package hostnamewiring holds no code.
imap
Package imap wires go-imap/v2 to yarilo's mailbox and index backends.
Package imap wires go-imap/v2 to yarilo's mailbox and index backends.
imaptext
Package imaptext writes and reads the ENVELOPE and BODYSTRUCTURE text the reference keeps in its index cache, byte for byte (#1714).
Package imaptext writes and reads the ENVELOPE and BODYSTRUCTURE text the reference keeps in its index cache, byte for byte (#1714).
imapthread
Package imapthread implements the THREAD command of RFC 5256.
Package imapthread implements the THREAD command of RFC 5256.
jmap
Package jmap is the JMAP backend: the pod that owns one user's state and answers the JMAP methods for it.
Package jmap is the JMAP backend: the pod that owns one user's state and answers the JMAP methods for it.
jmaplogin
Package jmaplogin is the JMAP login proxy: client TLS, auth, warden accounting, director lookup, then a proxied request.
Package jmaplogin is the JMAP login proxy: client TLS, auth, warden accounting, director lookup, then a proxied request.
lmtp
Package lmtp implements an LMTP server (RFC 2033) for local mail delivery.
Package lmtp implements an LMTP server (RFC 2033) for local mail delivery.
lmtplogin
Package lmtplogin implements the yarilo-lmtp-login service.
Package lmtplogin implements the yarilo-lmtp-login service.
lmtpreply
Package lmtpreply holds helpers shared by the LMTP proxy implementations (internal/lmtp and internal/lmtplogin) so a fix to the relayed reply format lands in one place rather than diverging between the two proxies.
Package lmtpreply holds helpers shared by the LMTP proxy implementations (internal/lmtp and internal/lmtplogin) so a fix to the relayed reply format lands in one place rather than diverging between the two proxies.
login
Package login is the mail-protocol login proxy: authenticate, resolve the backend, proxy the session.
Package login is the mail-protocol login proxy: authenticate, resolve the backend, proxy the session.
loginproto
Package loginproto defines the internal login-pod → backend preamble protocol.
Package loginproto defines the internal login-pod → backend preamble protocol.
mailboxcreate
Package mailboxcreate makes a folder for a protocol server, and the folders a namespace's configuration says every user has (#2005).
Package mailboxcreate makes a folder for a protocol server, and the folders a namespace's configuration says every user has (#2005).
managesieve
Package managesieve implements the RFC 5804 ManageSieve backend.
Package managesieve implements the RFC 5804 ManageSieve backend.
msgcache
Package msgcache reads and writes the per-folder index cache (yarilo.index.cache) that lets a listing answer without opening message files.
Package msgcache reads and writes the per-folder index cache (yarilo.index.cache) that lets a listing answer without opening message files.
pipelines
Package pipelines holds no code.
Package pipelines holds no code.
pop3
Package pop3 implements a POP3 server (RFC 1939).
Package pop3 implements a POP3 server (RFC 1939).
quotastatus
Package quotastatus answers Postfix check_policy_service requests on whether a recipient's mailbox can take a message; the answers are quota_status_* settings.
Package quotastatus answers Postfix check_policy_service requests on whether a recipient's mailbox can take a message; the answers are quota_status_* settings.
quotawarn
Package quotawarn runs a quota_warning's program from a fixed bin dir, best-effort, with the warning context in the environment.
Package quotawarn runs a quota_warning's program from a fixed bin dir, best-effort, with the warning context in the environment.
readyfile
Package readyfile implements the co-located backend pod's readiness signal (#788): each protocol container periodically touches a file in a shared directory ONLY while it is actually ready, and the yarilo-backend-reg sidecar gates its director heartbeat on all those files being fresh.
Package readyfile implements the co-located backend pod's readiness signal (#788): each protocol container periodically touches a file in a shared directory ONLY while it is actually ready, and the yarilo-backend-reg sidecar gates its director heartbeat on all those files being fresh.
sasllogin
Package sasllogin proxies Postfix SASL authentication to yarilo-auth.
Package sasllogin proxies Postfix SASL authentication to yarilo-auth.
stopaccept
Package stopaccept serves a backend listener until shutdown and then closes it, so a stopping backend refuses new sessions; open ones end with the process.
Package stopaccept serves a backend listener until shutdown and then closes it, so a stopping backend refuses new sessions; open ones end with the process.
storage/idxrebuild
Package idxrebuild holds the driver-agnostic folder index rebuild core: scan the physical storage (UserMailbox.Scan), match the result against the current index by filename to preserve UIDs, and atomically replace the record set (UserIndex.ResetFolder).
Package idxrebuild holds the driver-agnostic folder index rebuild core: scan the physical storage (UserMailbox.Scan), match the result against the current index by filename to preserve UIDs, and atomically replace the record set (UserIndex.ResetFolder).
storage/index/file
Package file is the per-folder index implementation that underlies every yarilo storage driver (maildir, dbox, mdbox).
Package file is the per-folder index implementation that underlies every yarilo storage driver (maildir, dbox, mdbox).
storage/logrotate
Package logrotate owns the thresholds that decide when an append log is folded into its base file.
Package logrotate owns the thresholds that decide when an append log is folded into its base file.
storage/mailbox/crlf
Package crlf turns bare LF into CRLF as bytes are read, without holding the message in memory.
Package crlf turns bare LF into CRLF as bytes are read, without holding the message in memory.
storage/mailbox/dbox/v1legacy
Package v1legacy is a read-only reader for yarilo's pre-Phase-3 dbox format.
Package v1legacy is a read-only reader for yarilo's pre-Phase-3 dbox format.
storage/mailbox/dboxconv
Package dboxconv converts another implementation's dbox store into ours in place: their map entries become ours, pointing at the same files at the same offsets.
Package dboxconv converts another implementation's dbox store into ours in place: their map entries become ours, pointing at the same files at the same offsets.
storage/mailbox/dboxindex
Package dboxindex reads the index files another dbox v2 implementation writes, for the one-shot import in #1524.
Package dboxindex reads the index files another dbox v2 implementation writes, for the one-shot import in #1524.
storage/mailbox/dboxref
Package dboxref holds dbox v2 files produced by the reference implementation, and hands them to the storage drivers' tests.
Package dboxref holds dbox v2 files produced by the reference implementation, and hands them to the storage drivers' tests.
storage/mailbox/dboxv2
Package dboxv2 implements the single-message dbox (sdbox) storage driver, replacing yarilo's pre-Phase-3 internal/storage/mailbox/dbox implementation.
Package dboxv2 implements the single-message dbox (sdbox) storage driver, replacing yarilo's pre-Phase-3 internal/storage/mailbox/dbox implementation.
storage/mailbox/maildir
Package maildir implements MailboxBackend for Maildir format.
Package maildir implements MailboxBackend for Maildir format.
storage/mailbox/mboxenc
Package mboxenc implements folder name encoding helpers shared across all mailbox storage backends (maildir, sdbox, mdbox).
Package mboxenc implements folder name encoding helpers shared across all mailbox storage backends (maildir, sdbox, mdbox).
storage/mailbox/mdbox
Package mdbox is the multi-message dbox storage driver over mdboxmap.
Package mdbox is the multi-message dbox storage driver over mdboxmap.
storage/mailbox/mdbox/mdboxmap
Package mdboxmap implements the per-user mdbox map (`yarilo.map.index`): one record per stored message under a map_uid every folder index references and no storage file carries, so the map is not derivable from the messages on disk.
Package mdboxmap implements the per-user mdbox map (`yarilo.map.index`): one record per stored message under a map_uid every folder index references and no storage file carries, so the map is not derivable from the messages on disk.
storage/mailbox/mdbox/v1legacy
Package v1legacy is a read-only reader for yarilo's pre-Phase-5 mdbox format.
Package v1legacy is a read-only reader for yarilo's pre-Phase-5 mdbox format.
storage/mailbox/virtual
Package virtual holds the virtual mailbox: a mailbox whose messages live in other folders.
Package virtual holds the virtual mailbox: a mailbox whose messages live in other folders.
storage/mailboxbuild
Package mailboxbuild is the single place a MailboxBackend is constructed from storage config.
Package mailboxbuild is the single place a MailboxBackend is constructed from storage config.
storage/mailboxmetrics
Package mailboxmetrics holds the timings shared by the mailbox drivers.
Package mailboxmetrics holds the timings shared by the mailbox drivers.
storage/mailindex
Package mailindex is a wire-compatible Go implementation of the mail-index binary format (major=7 minor=3).
Package mailindex is a wire-compatible Go implementation of the mail-index binary format (major=7 minor=3).
storage/mailops
Package mailops runs the mutations of one user's mail and what follows them: quota, the full-text index and mailbox events (#2207).
Package mailops runs the mutations of one user's mail and what follows them: quota, the full-text index and mailbox events (#2207).
storage/search
Package search evaluates IMAP search criteria over a folder's messages, with the full-text index where it can answer: SEARCH and virtual mailboxes use it.
Package search evaluates IMAP search criteria over a folder's messages, with the full-text index where it can answer: SEARCH and virtual mailboxes use it.
submission
Package submission implements the submission servers (port 587 / 465).
Package submission implements the submission servers (port 587 / 465).
submission/proxy
Package proxy implements the outbound submission proxy.
Package proxy implements the outbound submission proxy.
telemetry
Package telemetry exposes /healthz, /readyz, and /metrics on a dedicated port.
Package telemetry exposes /healthz, /readyz, and /metrics on a dedicated port.
threading
Package threading decides which messages belong to one conversation.
Package threading decides which messages belong to one conversation.
toolchain
Package toolchain holds no code.
Package toolchain holds no code.
userdbinfo
Package userdbinfo overlays a userdb lookup onto a resolver-derived UserInfo.
Package userdbinfo overlays a userdb lookup onto a resolver-derived UserInfo.
userstate/acl
Package acl persists per-mailbox ACL state in a yarilo-acl file inside the folder's mailbox directory: the ACL lives with the mail data and does NOT follow INDEX=.
Package acl persists per-mailbox ACL state in a yarilo-acl file inside the folder's mailbox directory: the ACL lives with the mail data and does NOT follow INDEX=.
userstate/counters
Package counters names the JMAP data types a push stream reports a change of.
Package counters names the JMAP data types a push stream reports a change of.
userstate/folders
Package folders keeps one durable per-user record of folder identity: for each folder name, the UIDVALIDITY it was created with, and the watermark that makes a fresh one impossible to repeat.
Package folders keeps one durable per-user record of folder identity: for each folder name, the UIDVALIDITY it was created with, and the watermark that makes a fresh one impossible to repeat.
userstate/specialuse
Package specialuse persists per-user RFC 6154 special-use overrides set via IMAP CREATE (USE ...).
Package specialuse persists per-user RFC 6154 special-use overrides set via IMAP CREATE (USE ...).
userstate/subs
Package subs persists the set of mailbox names a user has SUBSCRIBE'd.
Package subs persists the set of mailbox names a user has SUBSCRIBE'd.
userstate/threads
Package threads persists which conversation each message belongs to.
Package threads persists which conversation each message belongs to.
userstate/uidvalidity
Package uidvalidity hands out per-user UIDVALIDITY values that are never handed out twice.
Package uidvalidity hands out per-user UIDVALIDITY values that are never handed out twice.
warden
Package warden implements the yarilo-warden TCP+mTLS connection-accounting server.
Package warden implements the yarilo-warden TCP+mTLS connection-accounting server.
xclient
Package xclient implements the XCLIENT SMTP extension (Postfix-compatible).
Package xclient implements the XCLIENT SMTP extension (Postfix-compatible).
pkg
authclient
Package authclient is the Go client for the yarilo-auth master protocol.
Package authclient is the Go client for the yarilo-auth master protocol.
authtoken
Package authtoken implements the one-time session token store used by yarilo-auth to hand off authenticated sessions to backend pods without replaying credentials.
Package authtoken implements the one-time session token store used by yarilo-auth to hand off authenticated sessions to backend pods without replaying credentials.
build
Package build exposes build-time metadata stamped via -ldflags.
Package build exposes build-time metadata stamped via -ldflags.
config
Package config loads yarilo.yaml: Defaults fills every key, the file overrides what it names, and Load refuses a value no component can use.
Package config loads yarilo.yaml: Defaults fills every key, the file overrides what it names, and Load refuses a value no component can use.
dict
Package dict is yarilo's pluggable key-value store abstraction.
Package dict is yarilo's pluggable key-value store abstraction.
dict/dicttest
Package dicttest is a contract test suite that any pkg/dict driver can run against.
Package dicttest is a contract test suite that any pkg/dict driver can run against.
dict/drivers/all
Package all blank-imports every in-tree dict driver so a single import enables all of them in the importing binary.
Package all blank-imports every in-tree dict driver so a single import enables all of them in the importing binary.
dict/fail
Package fail is a dict driver that fails every operation.
Package fail is a dict driver that fails every operation.
dict/file
Package file is a JSON-backed local-filesystem dict driver.
Package file is a JSON-backed local-filesystem dict driver.
dict/memory
Package memory is an in-process dict driver backed by a sync.Map.
Package memory is an in-process dict driver backed by a sync.Map.
dict/proxy
Package proxy speaks the dict protocol to yarilo-dict, so a session holds a dict by name while the engines live in one process (#1733).
Package proxy speaks the dict protocol to yarilo-dict, so a session holds a dict by name while the engines live in one process (#1733).
dict/redis
Package redis is a Redis-backed dict driver for state shared across pods.
Package redis is a Redis-backed dict driver for state shared across pods.
dict/sql
Package sql is a database/sql-backed dict driver.
Package sql is a database/sql-backed dict driver.
dict/varexpand
Package varexpand performs %-variable substitution for templated path / prefix strings used by dict drivers.
Package varexpand performs %-variable substitution for templated path / prefix strings used by dict drivers.
expand
Package expand is the %{...} template language of configuration values: variables, providers such as env: and filters chained with |.
Package expand is the %{...} template language of configuration values: variables, providers such as env: and filters chained with |.
filelock
Package filelock takes the kernel's lock on a file: what arbitrates writers on one volume, between processes and across hosts (#1840).
Package filelock takes the kernel's lock on a file: what arbitrates writers on one volume, between processes and across hosts (#1840).
fts
Package fts defines the full-text-search engine contract: the build-key model an indexer feeds documents through, the query/result shapes a lookup speaks, and the per-user index handle engines implement.
Package fts defines the full-text-search engine contract: the build-key model an indexer feeds documents through, the query/result shapes a lookup speaks, and the per-user index handle engines implement.
ftsproto
Package ftsproto is the TAB-delimited, LF-terminated wire protocol between session processes and the yarilo-fts service, plus the client.
Package ftsproto is the TAB-delimited, LF-terminated wire protocol between session processes and the yarilo-fts service, plus the client.
jmapcore
Package jmapcore is the JMAP protocol layer: the wire types of RFC 8620 (core) and RFC 8621 (mail), and the encoding rules around them.
Package jmapcore is the JMAP protocol layer: the wire types of RFC 8620 (core) and RFC 8621 (mail), and the encoding rules around them.
lineio
Package lineio reads LF-terminated lines without holding more than a bound.
Package lineio reads LF-terminated lines without holding more than a bound.
lineio/linetest
Package linetest checks that a line-oriented server bounds the line it reads.
Package linetest checks that a line-oriented server bounds the line it reads.
locks
Package locks is the single cross-process write-coordination abstraction for yarilo.
Package locks is the single cross-process write-coordination abstraction for yarilo.
locks/lockstest
Package lockstest holds lock service doubles for tests.
Package lockstest holds lock service doubles for tests.
logging
Package logging installs the process-wide slog handler with a runtime-changeable level.
Package logging installs the process-wide slog handler with a runtime-changeable level.
mailbox
Package mailbox is the contract between the session processes and every storage driver: the per-user mailbox and index interfaces and their types.
Package mailbox is the contract between the session processes and every storage driver: the per-user mailbox and index interfaces and their types.
mimesalvage
Package mimesalvage reads a message whose MIME is damaged.
Package mimesalvage reads a message whose MIME is damaged.
mtls
Package mtls provides helpers for building mutual-TLS configs used between yarilo components (auth, warden, director, imap-login → imap, etc.).
Package mtls provides helpers for building mutual-TLS configs used between yarilo components (auth, warden, director, imap-login → imap, etc.).
mtls/mtlstest
Package mtlstest issues an internal CA and role certificates for tests.
Package mtlstest issues an internal CA and role certificates for tests.
quota
Package quota tracks and enforces per-user storage and message-count quota.
Package quota tracks and enforces per-user storage and message-count quota.
redisopt
Package redisopt builds Redis client options from a URL and a password kept apart from it, so the password can come from a Secret, not the ConfigMap.
Package redisopt builds Redis client options from a URL and a password kept apart from it, so the password can come from a Secret, not the ConfigMap.
retry
Package retry provides a simple exponential-backoff retry helper for startup-time dials that must succeed before a service can accept traffic.
Package retry provides a simple exponential-backoff retry helper for startup-time dials that must succeed before a service can accept traffic.
sqlpool
Package sqlpool applies connection-pool limits to a database/sql handle.
Package sqlpool applies connection-pool limits to a database/sql handle.
sqlvars
Package sqlvars is the variable grammar of the SQL passdb and userdb queries: which variables a query may name, and how they become bound parameters.
Package sqlvars is the variable grammar of the SQL passdb and userdb queries: which variables a query may name, and how they become bound parameters.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL