incubator-couchdb-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Brian Candler <B.Cand...@pobox.com>
Subject Re: MIME dump/load and implications
Date Fri, 07 Aug 2009 12:16:03 GMT
On Thu, Aug 06, 2009 at 04:22:18PM -0700, Nitin Borwankar wrote:
>> on the rest of your topic, does storing emails as attachments do the trick?
>>
>>   
>
> not quite - a MIME message has it's own attachments - a MIME message = a  
> doc not an attachment.

A MIME message may be a single part, or a multipart containing other MIME
components (which may be nested recursively to any depth).

In the couchdb world, a "document" must be a JSON object. However it can
also have "attachments", which are binary clean and each have their own MIME
type.

It would be quite reasonable for an E-mail message to be a CouchDB object,
with a single "attachment" in the CouchDB sense, which was the entire RFC822
message (header+body), which may or may not be MIME wrapped. Or you could
parse the headers into the JSON, and leave just the body as the
"attachment".

It would also be possible to do some up-front parsing and store the
individual MIME components as "attachments" in the CouchDB sense.

Regards,

Brian.

Mime
View raw message