Synchronise IMAP with local maildir

heads

tip
browse log

clone

read-only
https://hg.sr.ht/~flub/imapsyncer
read/write
ssh://hg@hg.sr.ht/~flub/imapsyncer

#Imapsyncer

Work-in-progress bi-directional synchronisation between an IMAP folder and a local maildir directory.

At the time of writing it can bi-directionally synchronise messages and the maildir flags of a single folder. Only a TLS connection to the IMAP server is supported with plain credential, usually this done on port 993.

#Usage

The binary only supports one lone argument, which is required: a path to the configuration file:

imapsyncer config.yaml

#Configuration

Configured using YAML:

---
  imap:
    server: "imap.exaple.com"
    port: 993
    user: "you@example.com"
    password: "your-secret"
    folder: "INBOX"
  maildir:
    path: "~/.mail/inbox"
 

#Known issues

  • Sometimes parsing the IMAP server response gets stuck in an infinite loop. This usually happens only after a few thousands of messages have been downloaded.

  • There is currently no benefit whatsoever from using an async Rust stack.

  • Uploading new messages to the IMAP server does not yet immediately synchronise the flags. They will only be synchronised on the next run.

#Roadmap

This is only to give a rough idea of the possible directions this might take.

  • IMAP IDLE support instead of only "oneshot" synchronisation.

  • Synchronise all IMAP flags, including custom flags. Local IMAP flag storage probably via an SQLite table which would need to be updated by whatever local software might want to manipulate those instead of the maildir flags.

  • Synchronise GMail tags. Likely by storing local tags in an SQLite table which would need to be updated

  • Avoid storing maildir flags on the filenames. This is strictly no longer maildir, but is a mode supported by notmuch and allows more efficient maildir manipulations.

  • Optional direct support for synhronising notmuch tags.