Establish Dovecot’s writable virtual-Maildir contract #2
Labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference: phg/fuse-mail-dir-by-tag#2
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Part of #1
Question
Against current official Dovecot documentation and source, what filesystem and configuration contract must a separate FUSE-backed Maildir namespace satisfy so Dovecot can discover folders, keep control/index metadata outside the generated message view where appropriate, assign stable UIDs and UIDVALIDITY, change standard Maildir flags, expunge messages, handle cur/new transitions, use either dot or slash mailbox hierarchy separators, and operate safely with FUSE caching and permissions?
Claimed by Codex agent
/root/research_dovecot_contractfor primary-source research on 2026-07-23.Resolution
Use a separate private Dovecot Maildir namespace with
mailbox_list_layout = fs. The FUSE mount exposes only complete<encoded-tag>/{cur,new,tmp}trees and immutable message bytes; persistent per-folderdovecot-uidlist/keyword control state and rebuildable indexes live in unique native writable paths outside the mount. Stable projection base names plus persistent control state preserve UIDVALIDITY and UIDs within each tag folder.The writable surface is narrowly defined: standard Maildir flag renames (
D,F,R,S,T), idempotentnew/tocur/renames, and expunge unlink. Flag renames must be merged as deltas under a Source Maildir message lock and fanned out to every Message projection; returningENOENTfor a stale alias can silently lose a Dovecot flag change. Append/copy into tags, message-content writes, folder mutation, non-standard keywords, and multi-server access are unsupported.Keep
maildir_very_dirty_syncs = noand, for correctness with externally generated non-INBOX mailboxes,mailbox_list_index = no. Use zero negative-cache timeout, bounded entry/attribute timeouts, no writeback cache or cached readdir, and low-level FUSE invalidation notifications after mutations and watcher updates. Prefer the same mail UID/GID; ifallow_otheris needed, requiredefault_permissions. The bare unmounted mountpoint must not be writable to Dovecot.If Dovecot also exposes the Source Maildir directly, source rename/unlink must participate in its source
dovecot-uidlistdotlock, requiring the exact source control path. Otherwise declare that Source Maildir delivery-only. This source-access mode must be explicit in the implementation specification.Full cited findings: branch, commit
5b767c5, findings file.