Adding a CouchDB backend
Théodore biadala
theodore at biadala.net
Mon Sep 5 16:25:23 BST 2011
Thanks for the review !
> parseToCouch():
> I see that you store them with the Message-ID as key. In theory (and
> also in practice) you can have 2 emails with the exact same Message
> ID. In this case, you overwrite your messages.
I actually ran into problems because of that, I changed that since this
morning, it's based on accountname, folder and uid now. It makes the _id
a bit big, couchdb can handle it.
> > https://github.com/theodoreb/offlineimap/blob/couchdb-lite/offlineimap/repository/CouchDB.py
>
> Looking good to me. Even better if it works.
It does :)
> > The config file looks like this :
> >
> > [Repository Couch]
> > type = CouchDB
> > dbname = offlineimap
> > server = http://localhost:5984/
> >
> > Works as local and remote repository.
>
> Nice. Seems decent and optional enough to push as experimental. My only
> reservation is the reliance on unique Message-IDs for the filenames.
That's fixed. It's still only message-id for the name of the attached
file but if it's the same message-id it should be the same content. It's
the mail as it was received, there is no flags or metadata in the
attached file. The only possible problem from a couchdb point of view
would have been with _id.
I plan on adding a couple of other things and test with big mailboxes
too, so it's likely to change a bit for a couple of days.
Thanks again.
--
Théo
More information about the OfflineIMAP-project
mailing list