deploy/mail-mbsync/ Compose recipe runs mbsync beside Suchi. mbsync
mirrors selected folders into Maildir and fans new messages into Suchi’s
watched directory. Suchi then ingests EML and attachment documents through its
normal pipeline.
Prefer the built-in Mail intake poller unless you need a
local Maildir mirror, already operate mbsync, or want mailbox credentials kept
outside Suchi.
This producer uses the watcher’s captured INGEST_FS_SYSTEM destination (omission:
original system 1), not mailbox addresses or sidecars as a router. Introduce the
target via taxonomy import first and ensure the watcher owner can enter it.
Messages and attachment children inherit that system; see Configuration.
Configure and start
setup.sh asks for provider, credentials, folders, limits, and local UID/GID.
It writes config/.env for container settings and .env for Compose settings.
Suchi binds to 127.0.0.1 only. Use a TLS reverse proxy for remote access.
Compose scopes container and build-image names to the deployment project;
use service names such as suchi and bridge in Compose commands.
For Proton, initialize the Bridge profile first and use the Bridge-generated
IMAP password:
Persistent paths
Back up
config/.env, .env, Maildir state when needed, and the complete
suchi-data/ directory. Restrict credentials to the deployment user.
Configuration changes
Re-run./setup.sh or edit config/.env, then reload the external mbsync
container:
Verification
./smoke-test.sh exercises the generic provider handoff, EML ingest, and
attachment fanout with synthetic data. It requires Docker, Go, curl, sqlite3,
and ss; ImageMagick adds an optional HEIC check. It builds the current checkout
in a temporary recipe directory with a unique Compose project and a loopback-only
port. Existing recipe credentials, containers, mail, and archives are untouched.
On exit it removes its test containers, project images, and temporary files. If teardown
fails, it retains the temporary directory and prints its location and project
name for recovery.
Common issues:
- The first sync is bounded by
MAIL_MAX_MESSAGES; later runs are incremental. MAIL_MAX_SIZEskips oversized messages.- Proton labels appear as IMAP folders through Bridge.
- Gmail’s All Mail overlaps Inbox; select explicit folders to avoid duplicate local copies.
docker compose down. Remove local directories only when
you intend to delete credentials, mirrored mail, and the Suchi archive.