Keep a local IMAP mirror, painlessly
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
LICENSE.txt Add LICENSE.txt Jul 14, 2014
Makefile Add Makefile for installing Dec 21, 2014
README.md Add Makefile for installing Dec 21, 2014
sdimap
sdsync

README.md

Standalone Dovecot IMAP

Keep a local IMAP mirror, painlessly

Installation

git clone https://github.com/mkropat/standalone-dovecot-imap.git
cd standalone-dovecot-imap
sudo make install

Usage

Use the sdimap tool to set up a standalone Dovecot IMAP instance in seconds:

mkdir mail-mirror
cd mail-mirror
sdimap init
sdimap start

The new instance runs under your user account and keeps all of its files within its instance directory (mail-mirror in the example). By being self-contained, it is trivial to place the instance directory inside an encrypted volume, ensuring all your emails are encrypted.

Before you connect to the local IMAP mirror, you'll want to download all your email from your server:

sdsync mirror youruser@yourdomain.com youruser@yourserver.yourdomain.com

Replace youruser@yourdomain.com with your email account, and youruser@yourserver.yourdomain.com with the system username and hostname of the server that hosts your email with Dovecot.

Now you're ready to connect to the local IMAP mirror with your mail client of choice. Instead of port 143, use the output of sdimap get port:

$ sdimap get port
10143

For the username, specify the same email account you supplied to sdsync (youruser@yourdomain.com in the example).

For the password, use the output of sdimap get password:

$ sdimap get password
4IpKjzZmu24Cq3wqpPo6jUYuQSVLoCJb

Now you can access all your mail locally. Run sdsync at any time to pull down the latest email to your local mirror. If your mail server dies and has to be rebuilt, run sdync to restore all your email back to the server.