How gburd/isync works
mbsync is a command-line mailbox synchronizer, with isync retained as a compatibility wrapper. The principal workflow is to select channels and operations, open corresponding IMAP or Maildir mailboxes, reconcile message UIDs, flags and deletions, and persist per-pair synchronization state. The README also documents mailbox collections, partial mirrors, trashing, IMAP security and authentication capabilities, and disconnected operation. The excerpts show orchestration, synchronization, protocol and local-store responsibilities; some indirect driver and configuration wiring is not shown, so uncertain links are omitted or marked unverified.
Main entry points: src/main.c mbsync orchestration · compat/main.c isync wrapper · sync.c Sync engine · drv_imap.c IMAP driver
Components 16
Entry and configuration
- mbsync orchestration
src/main.c - Channel configuration
src/config.c
Synchronization
- Sync engine
src/sync.c - Pair state and journal
src/sync.c
Mailbox stores
- IMAP driver
src/drv_imap.c - Maildir driver
src/drv_maildir.c
IMAP transport
- Socket and TLS
src/socket.c - Runtime utilities
src/util.c
Compatibility tools
- isync wrapper
src/compat/main.c - Legacy configuration
src/compat/config.c - Maildir conversion
src/compat/convert.c - Legacy utilities
src/compat/util.c - State conversion tool
src/mdconvert.c
Other components
- CLI user
- IMAP server
- Local Maildir
Connections 18
- CLI user → mbsync orchestration: invokes
README - mbsync orchestration → Sync engine: starts sync
src/main.c - mbsync orchestration → Channel configuration: loads config
- Sync engine → Pair state and journal: writes state
src/sync.c - Sync engine → IMAP driver: uses store
- Sync engine → Maildir driver: uses store
- IMAP driver → IMAP server: exchanges IMAP
- Maildir driver → Local Maildir: reads and writes
- IMAP driver → Socket and TLS: uses transport
- Socket and TLS → IMAP server: connects securely
- mbsync orchestration → isync wrapper: executes wrapper target
- isync wrapper → Legacy configuration: loads legacy config
- isync wrapper → Maildir conversion: converts mailboxes
src/compat/main.c - isync wrapper → mbsync orchestration: executes
src/compat/main.c - Maildir conversion → Local Maildir: reads and updates
src/compat/convert.c - State conversion tool → Pair state and journal: converts state
- isync wrapper → Legacy utilities: uses helpers
- mbsync orchestration → Runtime utilities: uses utilities