From user-return-5855-apmail-couchdb-user-archive=couchdb.apache.org@couchdb.apache.org Fri Aug 07 12:16:33 2009 Return-Path: Delivered-To: apmail-couchdb-user-archive@www.apache.org Received: (qmail 60567 invoked from network); 7 Aug 2009 12:16:33 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 7 Aug 2009 12:16:33 -0000 Received: (qmail 26195 invoked by uid 500); 7 Aug 2009 12:16:39 -0000 Delivered-To: apmail-couchdb-user-archive@couchdb.apache.org Received: (qmail 26108 invoked by uid 500); 7 Aug 2009 12:16:39 -0000 Mailing-List: contact user-help@couchdb.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: user@couchdb.apache.org Delivered-To: mailing list user@couchdb.apache.org Received: (qmail 26098 invoked by uid 99); 7 Aug 2009 12:16:39 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 07 Aug 2009 12:16:39 +0000 X-ASF-Spam-Status: No, hits=-0.0 required=10.0 tests=SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of b.candler@pobox.com designates 64.74.157.62 as permitted sender) Received: from [64.74.157.62] (HELO sasl.smtp.pobox.com) (64.74.157.62) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 07 Aug 2009 12:16:28 +0000 Received: from localhost.localdomain (unknown [127.0.0.1]) by a-pb-sasl-sd.pobox.com (Postfix) with ESMTP id 965FE20630; Fri, 7 Aug 2009 08:16:06 -0400 (EDT) Received: from mappit (unknown [80.45.95.114]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) by a-pb-sasl-sd.pobox.com (Postfix) with ESMTPSA id 03F0C2062E; Fri, 7 Aug 2009 08:16:04 -0400 (EDT) Received: from brian by mappit with local (Exim 4.69) (envelope-from ) id 1MZOMd-0003rR-5R; Fri, 07 Aug 2009 13:16:03 +0100 Date: Fri, 7 Aug 2009 13:16:03 +0100 From: Brian Candler To: Nitin Borwankar Cc: user@couchdb.apache.org Subject: Re: MIME dump/load and implications Message-ID: <20090807121603.GA14661@uk.tiscali.com> References: <4A7B65AA.3030005@borwankar.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <4A7B65AA.3030005@borwankar.com> User-Agent: Mutt/1.5.17+20080114 (2008-01-14) X-Pobox-Relay-ID: 154D6380-834C-11DE-8515-AEF1826986A2-28021239!a-pb-sasl-sd.pobox.com X-Virus-Checked: Checked by ClamAV on apache.org 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.