Evolution + dovecot + offlinemap

I think I have finally found the best way to use Evolution with Gmail IMAP on a laptop.
I installed a local dovecot server that only listens on localhost and setup offlineimap to sync my local dovecot imap server with gmail's server.
I then connect evolution to my local server and have offlineimap run as often as I want to sync.
Now I have offline messages and evolution is very fast. Using offlineimap to store the messages in a folder did not work so well because evolution did not recognize the inbox folder as the actual inbox.

In ubuntu, this process is pretty trivial. The following command will install offlineimap and dovecot:

sudo apt-get install offlineimap dovecot

Dovecot config



I then changed two lines in dovecot. Since I am running a local server, I don't need ssl, and I don't want to listen on external interfaces so I edited /etc/dovecot/dovecot.conf as follows:

protocols = imap
listen = localhost

offlineimap config



Configuring offline imap is pretty easy. Here is my $HOME/.offlineimaprc:

# Sample minimal config file. Copy this to ~/.offlineimaprc and edit to
# suit to get started fast.
[general]
accounts = GMail

[Account GMail]
localrepository = dovecot
remoterepository = gmailRemote

[Repository gmailLocal]
type = Maildir
localfolders = /path/to/email/directory
sep = /
restoreatime = no

[Repository dovecot]
type = IMAP
remotehost = localhost
remoteuser = localusername
remotepass = password
realdelete = yes

[Repository gmailRemote]
type = IMAP
remotehost = imap.gmail.com
remoteuser = user@gmail.com
remotepass = password
realdelete = no
ssl = yes

Then just run offlineimap, and configure evolution to connect to an imap server on localhost. I used smtp sending through gmail for sending mail.

Comments

Popular posts from this blog

iChat IRC transport with OpenFire and Kraken

Save kerberos password in keychain for use with kinit on MacOS (was OS X) for use with network drives

Recording the iPhone screen and Mac screen at the same time in one video