isync
Command line program (mbsync) that syncs IMAP mailboxes with local Maildir folders in both directions.
isync is the project name; the program is called mbsync. It keeps a local Maildir copy of IMAP folders and propagates new messages, deletions and flag changes both ways, using one state file per mailbox pair. It is a common companion to Maildir-based clients such as NeoMutt, aerc, mu4e and notmuch. Sending mail is out of scope; pair it with an SMTP tool such as msmtp.
- Type
- Mail tool
- Interface
- Command-line tools and prompts
- Systems
- Runs on Linux, macOS and BSD, on Windows through WSL, on Android through Termux.
- Language
- C
- License
- GPL 2.0 or later
- Latest version
1.5.1- Maintained
- Yes
- Website
- isync.sourceforge.io
- Source
- sourceforge.net/p/isync/isync
- Documentation
- isync.sourceforge.io
Install
| System | Support | Install |
|---|---|---|
| Linux | Native | apt sudo apt install isyncdnf sudo dnf install isyncpacman sudo pacman -S isyncapk sudo apk add isync |
| macOS | Native | Homebrew brew install isyncMacPorts sudo port install isync |
| Windows | Through WSL | WSL sudo apt install isyncNo native Windows build; use WSL. |
| BSD | Native | FreeBSD pkg pkg install isyncOpenBSD pkg_add isync |
| Android | Through Termux | Termux pkg install isync |
Protocols and features
| Protocol | isync |
|---|---|
| IMAP | Yes |
| POP3 | No |
| SMTP | No |
| JMAP | No |
| Maildir | Yes |
| mbox | No |
| notmuch | No |
| Feature | isync |
|---|---|
| OpenPGP | No |
| S/MIME | No |
| OAuth2 sign-in | via a Cyrus SASL XOAUTH2 plugin and PassCmd |
| Threads | No |
| Search | No |
| HTML mail | No |
| Mouse | No |
| Multiple accounts | Yes |
| Offline use | keeps a full local Maildir copy |
| Calendar | No |
| Contacts | No |
| Vim-style keys | No |
| Configuration | ~/.mbsyncrc or ~/.config/isyncrc text file |
Pros and cons
Pros
- Two-way sync of messages, deletions and flags between IMAP and Maildir
- PassCmd reads the password from any command, such as pass or gpg
- Packaged for nearly every Linux distribution, macOS, the BSDs and Termux
Cons
- Version 1.5 renamed options (SSLType to TLSType), so older guides need edits
- Only IMAP and Maildir; no POP3 and no sending
- No built-in daemon or IDLE watch; runs from cron, a timer or the mail client
Use isync with Forward Email
How isync fits with a Forward Email mailbox. Replace you@example.com with your alias and the password command with your own. The same settings work with any provider once the server names change.
# Sync a Forward Email mailbox to ~/Mail/forwardemail (run: mkdir -p ~/Mail/forwardemail)
# TLSType needs isync 1.5 or newer; on 1.4 write "SSLType IMAPS" instead.
IMAPAccount forwardemail
Host imap.forwardemail.net
Port 993
User you@example.com
PassCmd "pass show forwardemail/you@example.com"
TLSType IMAPS
IMAPStore forwardemail-remote
Account forwardemail
MaildirStore forwardemail-local
SubFolders Verbatim
Path ~/Mail/forwardemail/
Inbox ~/Mail/forwardemail/INBOX
Channel forwardemail
Far :forwardemail-remote:
Near :forwardemail-local:
Patterns *
Create Both
Expunge Both
SyncState *
# Then run: mbsync forwardemail| Protocol | Server | Port | Security |
|---|---|---|---|
| IMAP | imap.forwardemail.net | 993 | SSL/TLS |
| POP3 | pop3.forwardemail.net | 995 | SSL/TLS |
| SMTP | smtp.forwardemail.net | 465 | SSL/TLS |
| SMTP | smtp.forwardemail.net | 587 | STARTTLS |
Username: your full alias address, such as you@example.com. Password: the one shown by Generate Password next to the alias in your Forward Email account. Folders: INBOX, Drafts, Sent Mail, Trash, Spam and Archive.
Prefer no config at all? Forward Email's terminal app signs in with your account and has mail, calendar and contacts in one program.
Questions
Does isync work on Windows?
Not natively. It runs in Windows Subsystem for Linux (WSL). No native Windows build; use WSL.
Does isync support IMAP?
Yes, isync connects to IMAP servers directly.
Is isync open source?
Yes, under the GPL 2.0 or later.
How do I use isync with Forward Email?
Use the config in the Forward Email section on this page, saved as ~/.mbsyncrc, and replace the address and password with your own.
Sources
- isync.sourceforge.io/
- sourceforge.net/p/isync/isync/ci/master/tree/
- sourceforge.net/p/isync/isync/ci/master/tree/NEWS
- sourceforge.net/p/isync/isync/ci/master/tree/src/mbsync.1.in
- sourceforge.net/p/isync/isync/ci/master/tree/src/mbsyncrc.sample
- sourceforge.net/p/isync/isync/ci/master/tree/LICENSES/
- packages.debian.org/search?keywords=isync&searchon=names&exact=1
- packages.ubuntu.com/isync
- mdapi.fedoraproject.org/rawhide/pkg/isync
- archlinux.org/packages/extra/x86_64/isync/
- pkgs.alpinelinux.org/packages?name=isync
- formulae.brew.sh/formula/isync
- ports.macports.org/port/isync/
- freshports.org/mail/isync/
- openports.pl/path/mail/isync
- github.com/termux/termux-packages/tree/master/packages/isync