Offlineimap with notmuch and dovecot

Rainer M Krug r.m.krug at
Sun Nov 25 16:14:40 GMT 2012

Hash: SHA1

On 23/11/12 21:33, Ryan Kavanagh wrote:
> Hi Rainer,

Hi Ryan,

> On Fri, Nov 23, 2012 at 08:26:20PM +0100, Rainer M Krug wrote:
>> What is the best configuration for offlineimap, notmuch and dovecot? Is there a good way of
>> doing this? I have offlinimap and notmuch running nicely, but don't get dovecot to work with
>> it.
> I have offlineimap sync from remote imap to local dovecot, where dovecot is setup to put my
> mail in ~/.maildb/GMAIL in a maildir++ format. This location can be changed to suit your wishes
> by changing dovecot's mail_location setting, e.g., my in set to:
> mail_location = maildir:%h/.maildb/GMAIL:LAYOUT=maildir++
> My offlineimaprc syncing from several remote hosts to local dovecot can be found here[0].
> notmuch is called from the appropriate postsynchook. My notmuch-config can be found here[1]. I
> only use notmuch via notmuch-mutt[2], so the above configs might not work if you want 
> notmuch-{emacs,vim}.

Thanks a lot for the info - very interestiung, but I am somehow overwhelmed by the info (I am not
familiar with python, so the nametrans rules confuse me and I have the feeling I am missing
something. So I would like to slice this into different layers.

1) I have setup dovecot in the default settings, and the mail dir is located in ~/Maildir. It is
per default using maildir++. - is this correct?

2) I would like to configure offlineimap so that it
  a) syncs my gmail account into the local imap account
  b) syncs the gmail account into a *subfolder* in my local imap account.The reasoning is that I
can then move messages from the GMAIL folder into a second folder (e.g. Archive) so that they are
archived locally and removed from the GMAIL account. I have no idea how I can achieve this. I
could however have one imap account which is synched via offlineimap and a second local imap
account for local archiving? Then: How could I set this up via dovecot? I would however prefer the
GMAIL subfolder solution as it seems to be cleaner for me and I could easily add additional accounts.

I have no problem in configuring offlineimap so that it syncs all GMAIL folders into a local imap
account. But How can I sync it into a subfolder?



> Hope this helps, let me know if you have any questions.
> Ryan
> [0]
> [2]
> _______________________________________________ OfflineIMAP-project mailing list 
> OfflineIMAP-project at 
> OfflineIMAP homepage:

Version: GnuPG v1.4.11 (GNU/Linux)
Comment: Using GnuPG with Mozilla -


More information about the OfflineIMAP-project mailing list