# 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 (GPL-2.0-or-later)
- Latest version: 1.5.1
- Maintained: yes
- Website: https://isync.sourceforge.io/
- Source: https://sourceforge.net/p/isync/isync/
- Documentation: https://isync.sourceforge.io/mbsync.html

## Install

### Linux

Native.

- apt: `sudo apt install isync`
- dnf: `sudo dnf install isync`
- pacman: `sudo pacman -S isync`
- apk: `sudo apk add isync`

### macOS

Native.

- Homebrew: `brew install isync`
- MacPorts: `sudo port install isync`

### Windows

Through WSL. No native Windows build; use WSL.

- WSL: `sudo apt install isync`

### BSD

Native.

- FreeBSD pkg: `pkg install isync`
- OpenBSD: `pkg_add isync`

### Android

Through Termux.

- Termux: `pkg install isync`

## Protocols

- IMAP: Yes
- POP3: No
- SMTP: No
- JMAP: No
- Maildir: Yes
- mbox: No
- notmuch: No

## Features

- 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

- 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

File: `~/.mbsyncrc`

```
# 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. Password: the one from Generate Password next to the alias. Folders: INBOX, Drafts, Sent Mail, Trash, Spam and Archive.

## 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

- https://isync.sourceforge.io/
- https://sourceforge.net/p/isync/isync/ci/master/tree/
- https://sourceforge.net/p/isync/isync/ci/master/tree/NEWS
- https://sourceforge.net/p/isync/isync/ci/master/tree/src/mbsync.1.in
- https://sourceforge.net/p/isync/isync/ci/master/tree/src/mbsyncrc.sample
- https://sourceforge.net/p/isync/isync/ci/master/tree/LICENSES/
- https://packages.debian.org/search?keywords=isync&searchon=names&exact=1
- https://packages.ubuntu.com/isync
- https://mdapi.fedoraproject.org/rawhide/pkg/isync
- https://archlinux.org/packages/extra/x86_64/isync/
- https://pkgs.alpinelinux.org/packages?name=isync
- https://formulae.brew.sh/formula/isync
- https://ports.macports.org/port/isync/
- https://www.freshports.org/mail/isync/
- https://openports.pl/path/mail/isync
- https://github.com/termux/termux-packages/tree/master/packages/isync
