Repository navigation
Release notes 4.0.3
Inboxora docs edited this page Sep 18, 2026
·
1 revision
Status: released 2026-09-18 · Previous version: 4.0.2 · Type: patch
4.0.3 adapts the upstream MailFlow 3.4-3.5 reliability fixes that still applied to Inboxora's dev: physical-copy identity, explicit IMAP IDLE, STATUS-gated folder refresh, plus frontend hardening (Error Boundary, BFCache wake reuse, dangerous-attachment download warning). It also ships the missing antispam v0.2 layer (hybrid rules + per-user Naive Bayes, hardened against connection storms) and a one-time repair pass for databases that ran the old Message-ID relocation. Apply the included migrations before deploying; antispam auto-move is opt-in per account.
- Physical messages are now identified by
(account, uid, folder); an RFC Message-ID match no longer relocates one physical copy onto another. Self-sent Gmail and mailing-list copies that share a Message-ID persist as separate rows and are grouped only at the Conversation Engine layer.
- Persistent sync connections enter IDLE explicitly after each sync tick instead of relying on ImapFlow's delayed auto-IDLE, which never started at the supported 15-second interval. Health now distinguishes
idleAttemptedAt(we calledidle()) fromidleEnteredAt(the server acknowledged IDLE), and concurrent_enterExplicitIdlecalls share one in-flight promise per account instead of issuing duplicate IDLE commands.
- The old Message-ID relocation is gone, but rows it already collapsed across folders stay missing — including old UIDs far below the recent sync window. Repair is now a backfill-style SEARCH ALL → UID diff → fetch-only-missing pass per selectable folder (metadata-only), per account. Completion is recorded in the new
account_maintenance_statetable (migration0096) — never as a pseudo-folder row, whichsyncFolders()would prune andbackfillAllFolders()would try to SELECT on IMAP. The in-process guard covers only runs in flight, so a failed run retries on the next tick instead of waiting for a restart; each folder is re-diffed after repair and the marker is written only when every folder verifies clean, so a parse failure that leaves a UID missing does not mark the account repaired. The first successful sync tick per account triggers it once, fire-and-forget.
- Deterministic 14-rule engine always on (pharma/money keywords, CTA phrases, URL shorteners, reply-to mismatch, executable/double-extension attachments, DKIM/SPF/DMARC fail only from a trusted authserv-id, mailing-list and known-contact ham signals — contacts limited to
is_auto = falseplus own identity addresses resolved through the same helper the Conversation Engine uses, so inbound spam cannot whitelist itself). Multinomial Naive Bayes joins at distinct-message maturity:>= minRecordsusable unique samples with a minimum of each class (default 10), blending 60/40 tosoftRecordsthen 20/80; verdict/auto-move use the configuredspamThreshold/autoMoveThreshold. One mail confirmed 50x, or 50 spams with zero hams, stays rules-only; legacy featureless rows no longer mature the model (newspam_models.usable_spam/usable_ham, migration0097). Manual feedback goes throughrecordManualFeedback: the training INSERT (carrying a stabletraining_identity, migration0098) and the incremental model update share one per-user serializer hold and one database transaction, so concurrent clicks cannot double-mint a sample and the row plus the model commit together. Identities are stable for messages without a Message-ID: the normalized content hash outranks the(account, folder, uid)triple, so a Spam→Ham correction stays one sample after the server re-keys folder+UID (migration0099re-derives identities for databases that applied the first0098revision). One rule holds everywhere — one identity = exactly one effective sample = the user's latest decision: a repeat confirmation is logged without moving the vocabulary or the usable counters, and a label flip rebuilds the model from the log with latest-decision-wins, so the incrementally maintained model equals the post-retrain model. - Training is DB-only and atomic:
/spamand/hamcompute features from the already-loaded row and INSERT one complete training row (noUPDATE...ORDER BY...LIMIT, which PostgreSQL rejects); the already-in-folder path trains too. Incremental updates and full retrains serialize per user (lock slots released after each run); the hourly scheduler staggers byhash(user_id) % 24, refuses overlap (409), and awaits slow users instead of interleaving. - Live ingest tagging is fire-and-forget with
deferAutoMoveon the backfill path (no per-message IMAP storm); auto-move is INBOX-only (Sent/Archive/custom folders are classified but never auto-moved), resolves the full account row, issues exactly one IMAP MOVE per physical copy (double-MOVE fixed, concurrent callers coalesced), re-reads the row immediately before the MOVE so an Inbox-Rule/Block-List relocation, delete or fresh user override skips the move, keeps folder badges in step, and broadcastsfolder_updated. User override always wins, including under races; auto-verdicts never train the model. -
GET /api/spam/explainanswers from storedspam_details(recompute only for legacy rows); thresholds live inusers.preferences.spam_thresholdsand actually drive the pipeline.PATCH /api/spam/thresholdsvalidatesminRecords/softRecords, enforcessoftRecords >= minRecords, and drops the deadhardRecordskey;GET /api/spam/statusderives maturity from the configured thresholds and the usable per-class split instead of hardcoded 50/500. - Defaults are safe: master switch on, per-account
antispam_enabledoff (opt-in viaPUT /api/accounts/:idand the account form, alongsidetrusted_authserv_id). Migrations0095–0100must be applied in order before rollout.POST /api/spam/retrain-nowretrains only the caller; fleet-wide rebuilds are admin-only viaPOST /api/spam/retrain-all.POST /api/accounts/:id/spam/reset-trainingerases one account's feedback and immediately rebuilds the user's model from the remaining records (rules-only when nothing is left), so a multi-account user does not lose antispam on the untouched accounts until the next scheduled retrain. - Frontend:
SpamBadgeverdict chip + explain dialog (mounted inMessageDetailContent, fed byspam_verdict/spam_score_ml/spam_score_blendedprojections in the list, thread, message and resolve-message queries — including the threaded final projection; the chip shows the blended score the verdict was decided on, and omits the percentage for rows classified before that column existed),SpamSettingsstatus/master-switch/retrain panel mounted as Settings → Rules → Antispam (with search index entry; maturity reported from distinct usable samples with a per-class breakdown; Retrain now rebuilds only the caller's model), per-account antispam toggle in the account form, locale keys in all 9 locales. - Repair hardening: an empty local folder list defers instead of recording completion, and one-time repairs share the per-host background-connection budget so multi-account upgrades do not fire concurrent SEARCH ALL passes. Concurrent auto-move callers share the first outcome instead of reporting a phantom
moved=true.
- After each LIST, cached non-INBOX folders are revalidated with a lightweight STATUS check. A folder whose server UIDNEXT, message count, and unseen count all match the cache is skipped on reopen; folders with an advanced UIDNEXT are queued for a metadata sync. New
folders.uid_nextcolumn; migration0094_folder_uidnext_status.sqlmust be applied before rollout. - Fix STATUS gate self-cancellation:
uid_nextnow represents the watermark of the last completed sync, not the last observed STATUS. Detecting a change no longer writes the new value to the DB before the fetch runs (which previously caused_folderNeedsSyncto see matching values and skip the sync).
- A React Error Boundary wraps the router at the entrypoint; a render-time exception now shows a translated recovery screen with a reload action instead of a blank page.
- The WebSocket wake effect handles
pageshowfor BFCache (event.persisted) by reusing the existing refresh-and-reconnect path. - Attachments classified as potentially dangerous (common executable, script and shortcut extensions and matching media types) trigger a confirmation dialog before download; the Download-all ZIP path cannot bypass the prompt. Downloads are never blocked outright.
- Backend:
tsc --noEmitclean,eslint src --max-warnings 0clean, migration integrity suite clean (0094–0100). Focused regression suites cover physical-copy identity, explicit IDLE (attempted vs entered, reject path, and two concurrent_enterExplicitIdlecalls collapsing to oneidle()), STATUS no-self-cancel including an end-to-end gate test (cached uid_next → STATUS advances → the folder is queued and the watermark is untouched →syncMessagesingests the message → only then is uid_next advanced), SEARCH-ALL-diff repair with maintenance-table marker (retry, per-folder verification, empty-list deferral), the single-MOVE auto-move (concurrency + reject + shared outcome), INBOX-only eligibility with pre-move revalidation, spam field projections (including the threaded final SELECT and the blended score), training-identity MOVE stability (content outranks folder+UID, normalization equivalence, copy fallback), distinct-message maturity with stable training_identity (duplicate-feedback, per-class minimum, legacy rows, latest-wins correction), latest-wins incremental semantics (repeat logged without touching the model, label flip rebuilds, single transaction), threshold validation, per-user retrain scope, per-account reset rebuilding the model from the remaining records (fallback to rules-only when empty or the rebuild fails), and the per-user lock release — plus the full spam stack (tokenizer/rules/Bayes/store/pipeline/scheduler plus HTTP route tests for atomic training, per-account enable and explain-from-stored). - Frontend: production build passes, spam contract + i18n parity green (1717), plus Error Boundary contract, BFCache wake contract, and dangerous-attachment classifier.
See docs/CHANGELOG.md for the concise release record.
- Home — documentation for 4.3.3
- Installation
- Getting started
- Workspace
- Operations
- Reference
- Releases