Adding a CouchDB backend

Théodore biadala theodore at biadala.net
Tue Sep 6 22:20:21 BST 2011


> As I understand, it still needs a additional work to serve emails
> through the web server, doesn't it?

> Or does the CouchDB web server is enough to read emails?

It's enough to access the raw mail, you can download/view the mail with
a url like :
http://localhost:5984/offlineimap/CouchTest-Trash-1-1315220097.4496.3.camel%40work/1315220097.4496.3.camel%40work.eml
and you can view all the metadata in JSON format with the url :
http://localhost:5984/offlineimap/CouchTest-Trash-1-1315220097.4496.3.camel%40work

It works, it's just not practical, Opera view the mail fine (it's also a
mail client) other browsers download the file. 

In another branch I have support for decoding the most parts of the
email: subject, figuring out the attachments and getting the plaintext
and html body (most of the time). But I'm not planning to add that my
offlineimap branch. It's ugly, error-prone and a whole different thing
really.


> What can be done with the mails in the current state of your project
> (read, deletion, move to a folder, etc)?

Using the built-in admin interface of couchdb you can view the list of
mails, delete stuff, download the original email, change all the
metadata (flags, mailbox, accounts, uid) but changing this directly
could cause conflicts due to the way I build id for couchdb. Using a
random id could fix that.

So, beside keeping them somewhere nice for backup, not a lot. A HTML/JS
interface to view and edit the metadata could work but that's not really
a job for offlineimap IMO.


> I think the whole idea is smart and fine. IOW, I would be happy to merge
> such new feature as long as:
> - whole topic is sent as emails in this mailing list;
> - everything else needed for the users is either:
>   - placed in the current repository (perhaps using a contrib/ directory);
>   or
>   - pointed by a public URL.
> - the feature is documented;
> - the feature is marked as EXPERIMENTAL.
> 
> Obviously, it can be done step by step. ,-)

No problem with that :)



-- 
Théodore





More information about the OfflineIMAP-project mailing list