--- /dev/null
+Return-Path: <amthrax@drake.mit.edu>\r
+X-Original-To: notmuch@notmuchmail.org\r
+Delivered-To: notmuch@notmuchmail.org\r
+Received: from localhost (localhost [127.0.0.1])\r
+ by olra.theworths.org (Postfix) with ESMTP id 6DCE1431FD6\r
+ for <notmuch@notmuchmail.org>; Tue, 14 Feb 2012 09:34:08 -0800 (PST)\r
+X-Virus-Scanned: Debian amavisd-new at olra.theworths.org\r
+X-Spam-Flag: NO\r
+X-Spam-Score: -0.7\r
+X-Spam-Level: \r
+X-Spam-Status: No, score=-0.7 tagged_above=-999 required=5\r
+ tests=[RCVD_IN_DNSWL_LOW=-0.7] autolearn=disabled\r
+Received: from olra.theworths.org ([127.0.0.1])\r
+ by localhost (olra.theworths.org [127.0.0.1]) (amavisd-new, port 10024)\r
+ with ESMTP id Iqn2dsnCLDns for <notmuch@notmuchmail.org>;\r
+ Tue, 14 Feb 2012 09:34:05 -0800 (PST)\r
+Received: from dmz-mailsec-scanner-7.mit.edu (DMZ-MAILSEC-SCANNER-7.MIT.EDU\r
+ [18.7.68.36])\r
+ by olra.theworths.org (Postfix) with ESMTP id 372B7431FBF\r
+ for <notmuch@notmuchmail.org>; Tue, 14 Feb 2012 09:34:00 -0800 (PST)\r
+X-AuditID: 12074424-b7fae6d000000906-7c-4f3a9b0703e7\r
+Received: from mailhub-auth-4.mit.edu ( [18.7.62.39])\r
+ by dmz-mailsec-scanner-7.mit.edu (Symantec Messaging Gateway) with SMTP\r
+ id D6.57.02310.70B9A3F4; Tue, 14 Feb 2012 12:33:59 -0500 (EST)\r
+Received: from outgoing.mit.edu (OUTGOING-AUTH.MIT.EDU [18.7.22.103])\r
+ by mailhub-auth-4.mit.edu (8.13.8/8.9.2) with ESMTP id q1EHXxCL019626; \r
+ Tue, 14 Feb 2012 12:33:59 -0500\r
+Received: from drake.mit.edu\r
+ (209-6-116-242.c3-0.arl-ubr1.sbo-arl.ma.cable.rcn.com\r
+ [209.6.116.242]) (authenticated bits=0)\r
+ (User authenticated as amdragon@ATHENA.MIT.EDU)\r
+ by outgoing.mit.edu (8.13.6/8.12.4) with ESMTP id q1EHXvvq016511\r
+ (version=TLSv1/SSLv3 cipher=AES256-SHA bits=256 verify=NOT);\r
+ Tue, 14 Feb 2012 12:33:58 -0500 (EST)\r
+Received: from amthrax by drake.mit.edu with local (Exim 4.77)\r
+ (envelope-from <amthrax@drake.mit.edu>)\r
+ id 1RxMGL-00027H-P0; Tue, 14 Feb 2012 12:33:57 -0500\r
+From: Austin Clements <amdragon@MIT.EDU>\r
+To: notmuch@notmuchmail.org\r
+Subject:\r
+ [PATCH 4/8] show: Unify JSON header output for messages and message parts\r
+Date: Tue, 14 Feb 2012 12:33:39 -0500\r
+Message-Id: <1329240823-7856-5-git-send-email-amdragon@mit.edu>\r
+X-Mailer: git-send-email 1.7.7.3\r
+In-Reply-To: <1329240823-7856-1-git-send-email-amdragon@mit.edu>\r
+References: <1329240823-7856-1-git-send-email-amdragon@mit.edu>\r
+MIME-Version: 1.0\r
+Content-Type: text/plain; charset=UTF-8\r
+Content-Transfer-Encoding: 8bit\r
+X-Brightmail-Tracker:\r
+ H4sIAAAAAAAAA+NgFprOKsWRmVeSWpSXmKPExsUixG6nrss+28rfoP2fosWRPbPYLa5u7We3\r
+ uH5zJrMDs8fOWXfZPZ6tusXs0fRjMWsAcxSXTUpqTmZZapG+XQJXxseugIIj6RUn3kU3ML6M\r
+ 6GLk5JAQMJGY+PoYG4QtJnHh3nogm4tDSGAfo0T3vu/sEM4GRol9K25AZe4zSdxb3csM4cxn\r
+ lLj9tIMdpJ9NQENi2/7ljCC2iIC0xM67s1lBbGaBeIkjbevB4sICVRKf5xwDqufgYBFQlWjd\r
+ KwMS5hWwl2hf9ogZ4gwFiXOrz4GN5BRwkNi/7z/YGCGgmkt3t7JA1AtKnJz5hAVkDLOAusT6\r
+ eUIQm+QlmrfOZp7AKDQLSdUshKpZSKoWMDKvYpRNya3SzU3MzClOTdYtTk7My0st0jXXy80s\r
+ 0UtNKd3ECA5zF5UdjM2HlA4xCnAwKvHwGlhY+guxJpYVV+YeYpTkYFIS5RWeYeUvxJeUn1KZ\r
+ kVicEV9UmpNafIhRgoNZSYR303SgHG9KYmVValE+TEqag0VJnFdD652fkEB6YklqdmpqQWoR\r
+ TFaGg0NJgpdtFlCjYFFqempFWmZOCUKaiYMTZDgP0PAvM0GGFxck5hZnpkPkTzHqcnzvXH+B\r
+ UYglLz8vVUqc9y1IkQBIUUZpHtwcWHp6xSgO9JYw7y2QKh5gaoOb9ApoCRPQku2nLUCWlCQi\r
+ pKQaGGsW/hA/Nulxb/vdb8s+OP08W6hQH5fFlzWTObLn1a/N0zaV7VHsColwWcs4UyfLbue0\r
+ K02v79rFMibnFn/hk34r48n/ffPFay5VQZdm71AqFQubeM139+2HrqnvllxWnXTo57I37xZc\r
+ Sw6SurnvRqSjWbXsB6sLJW3/7h1gn2V6PHX18lXlWv+VWIozEg21mIuKEwFzQ2D7KgMAAA==\r
+X-BeenThere: notmuch@notmuchmail.org\r
+X-Mailman-Version: 2.1.13\r
+Precedence: list\r
+List-Id: "Use and development of the notmuch mail system."\r
+ <notmuch.notmuchmail.org>\r
+List-Unsubscribe: <http://notmuchmail.org/mailman/options/notmuch>,\r
+ <mailto:notmuch-request@notmuchmail.org?subject=unsubscribe>\r
+List-Archive: <http://notmuchmail.org/pipermail/notmuch>\r
+List-Post: <mailto:notmuch@notmuchmail.org>\r
+List-Help: <mailto:notmuch-request@notmuchmail.org?subject=help>\r
+List-Subscribe: <http://notmuchmail.org/mailman/listinfo/notmuch>,\r
+ <mailto:notmuch-request@notmuchmail.org?subject=subscribe>\r
+X-List-Received-Date: Tue, 14 Feb 2012 17:34:08 -0000\r
+\r
+This has three ramifications:\r
+- Blank To and Cc headers are no longer output for messages.\r
+- Dates are now canonicalized for messages, which means they always\r
+ have a day of the week and GMT is printed +0000 (never -0000)\r
+- Invalid From message headers are handled slightly differently, since\r
+ they get parsed by GMime now instead of notmuch.\r
+---\r
+ notmuch-show.c | 35 +++--------------------------------\r
+ test/crypto | 35 ++++++++++++++---------------------\r
+ test/emacs | 4 ++--\r
+ test/json | 6 +++---\r
+ test/maildir-sync | 2 --\r
+ test/multipart | 2 +-\r
+ 6 files changed, 23 insertions(+), 61 deletions(-)\r
+\r
+diff --git a/notmuch-show.c b/notmuch-show.c\r
+index 9ca9882..209ff45 100644\r
+--- a/notmuch-show.c\r
++++ b/notmuch-show.c\r
+@@ -291,36 +291,7 @@ format_headers_message_part_text (GMimeMessage *message)\r
+ }\r
+ \r
+ static void\r
+-format_headers_json (const void *ctx, notmuch_message_t *message)\r
+-{\r
+- const char *headers[] = {\r
+- "Subject", "From", "To", "Cc", "Bcc", "Date"\r
+- };\r
+- const char *name, *value;\r
+- unsigned int i;\r
+- int first_header = 1;\r
+- void *ctx_quote = talloc_new (ctx);\r
+-\r
+- for (i = 0; i < ARRAY_SIZE (headers); i++) {\r
+- name = headers[i];\r
+- value = notmuch_message_get_header (message, name);\r
+- if (value)\r
+- {\r
+- if (!first_header)\r
+- fputs (", ", stdout);\r
+- first_header = 0;\r
+-\r
+- printf ("%s: %s",\r
+- json_quote_str (ctx_quote, name),\r
+- json_quote_str (ctx_quote, value));\r
+- }\r
+- }\r
+-\r
+- talloc_free (ctx_quote);\r
+-}\r
+-\r
+-static void\r
+-format_headers_message_part_json (GMimeMessage *message)\r
++format_headers_json (GMimeMessage *message)\r
+ {\r
+ void *ctx = talloc_new (NULL);\r
+ void *ctx_quote = talloc_new (ctx);\r
+@@ -690,7 +661,7 @@ format_part_json (const void *ctx, mime_node_t *node, notmuch_bool_t first)\r
+ format_message_json (ctx, node->envelope_file);\r
+ \r
+ printf ("\"headers\": {");\r
+- format_headers_json (ctx, node->envelope_file);\r
++ format_headers_json (GMIME_MESSAGE (node->part));\r
+ printf ("}");\r
+ \r
+ printf (", \"body\": [");\r
+@@ -778,7 +749,7 @@ format_part_json (const void *ctx, mime_node_t *node, notmuch_bool_t first)\r
+ \r
+ if (GMIME_IS_MESSAGE (node->part)) {\r
+ printf ("\"headers\": {");\r
+- format_headers_message_part_json (GMIME_MESSAGE (node->part));\r
++ format_headers_json (GMIME_MESSAGE (node->part));\r
+ printf ("}");\r
+ \r
+ printf (", \"body\": [");\r
+diff --git a/test/crypto b/test/crypto\r
+index 1dbb60a..7e774c8 100755\r
+--- a/test/crypto\r
++++ b/test/crypto\r
+@@ -50,9 +50,8 @@ expected='[[[{"id": "XXXXX",\r
+ "headers": {"Subject": "test signed message 001",\r
+ "From": "Notmuch Test Suite <test_suite@notmuchmail.org>",\r
+ "To": "test_suite@notmuchmail.org",\r
+- "Cc": "",\r
+- "Bcc": "",\r
+- "Date": "01 Jan 2000 12:00:00 -0000"},\r
++ "Date": "Sat,\r
++ 01 Jan 2000 12:00:00 +0000"},\r
+ "body": [{"id": 1,\r
+ "sigstatus": [{"status": "good",\r
+ "fingerprint": "'$FINGERPRINT'",\r
+@@ -84,9 +83,8 @@ expected='[[[{"id": "XXXXX",\r
+ "headers": {"Subject": "test signed message 001",\r
+ "From": "Notmuch Test Suite <test_suite@notmuchmail.org>",\r
+ "To": "test_suite@notmuchmail.org",\r
+- "Cc": "",\r
+- "Bcc": "",\r
+- "Date": "01 Jan 2000 12:00:00 -0000"},\r
++ "Date": "Sat,\r
++ 01 Jan 2000 12:00:00 +0000"},\r
+ "body": [{"id": 1,\r
+ "sigstatus": [{"status": "good",\r
+ "fingerprint": "'$FINGERPRINT'",\r
+@@ -120,9 +118,8 @@ expected='[[[{"id": "XXXXX",\r
+ "headers": {"Subject": "test signed message 001",\r
+ "From": "Notmuch Test Suite <test_suite@notmuchmail.org>",\r
+ "To": "test_suite@notmuchmail.org",\r
+- "Cc": "",\r
+- "Bcc": "",\r
+- "Date": "01 Jan 2000 12:00:00 -0000"},\r
++ "Date": "Sat,\r
++ 01 Jan 2000 12:00:00 +0000"},\r
+ "body": [{"id": 1,\r
+ "sigstatus": [{"status": "error",\r
+ "keyid": "'$(echo $FINGERPRINT | cut -c 25-)'",\r
+@@ -194,9 +191,8 @@ expected='[[[{"id": "XXXXX",\r
+ "headers": {"Subject": "test encrypted message 001",\r
+ "From": "Notmuch Test Suite <test_suite@notmuchmail.org>",\r
+ "To": "test_suite@notmuchmail.org",\r
+- "Cc": "",\r
+- "Bcc": "",\r
+- "Date": "01 Jan 2000 12:00:00 -0000"},\r
++ "Date": "Sat,\r
++ 01 Jan 2000 12:00:00 +0000"},\r
+ "body": [{"id": 1,\r
+ "encstatus": [{"status": "good"}],\r
+ "sigstatus": [],\r
+@@ -249,9 +245,8 @@ expected='[[[{"id": "XXXXX",\r
+ "headers": {"Subject": "test encrypted message 001",\r
+ "From": "Notmuch Test Suite <test_suite@notmuchmail.org>",\r
+ "To": "test_suite@notmuchmail.org",\r
+- "Cc": "",\r
+- "Bcc": "",\r
+- "Date": "01 Jan 2000 12:00:00 -0000"},\r
++ "Date": "Sat,\r
++ 01 Jan 2000 12:00:00 +0000"},\r
+ "body": [{"id": 1,\r
+ "encstatus": [{"status": "bad"}],\r
+ "content-type": "multipart/encrypted",\r
+@@ -284,9 +279,8 @@ expected='[[[{"id": "XXXXX",\r
+ "headers": {"Subject": "test encrypted message 002",\r
+ "From": "Notmuch Test Suite <test_suite@notmuchmail.org>",\r
+ "To": "test_suite@notmuchmail.org",\r
+- "Cc": "",\r
+- "Bcc": "",\r
+- "Date": "01 Jan 2000 12:00:00 -0000"},\r
++ "Date": "Sat,\r
++ 01 Jan 2000 12:00:00 +0000"},\r
+ "body": [{"id": 1,\r
+ "encstatus": [{"status": "good"}],\r
+ "sigstatus": [{"status": "good",\r
+@@ -339,9 +333,8 @@ expected='[[[{"id": "XXXXX",\r
+ "headers": {"Subject": "test signed message 001",\r
+ "From": "Notmuch Test Suite <test_suite@notmuchmail.org>",\r
+ "To": "test_suite@notmuchmail.org",\r
+- "Cc": "",\r
+- "Bcc": "",\r
+- "Date": "01 Jan 2000 12:00:00 -0000"},\r
++ "Date": "Sat,\r
++ 01 Jan 2000 12:00:00 +0000"},\r
+ "body": [{"id": 1,\r
+ "sigstatus": [{"status": "error",\r
+ "keyid": "6D92612D94E46381",\r
+diff --git a/test/emacs b/test/emacs\r
+index b74cfa9..d4a8d30 100755\r
+--- a/test/emacs\r
++++ b/test/emacs\r
+@@ -78,7 +78,7 @@ thread=$(notmuch search --output=threads subject:message-with-invalid-from)\r
+ test_emacs "(notmuch-show \"$thread\")\r
+ (test-output)"\r
+ cat <<EOF >EXPECTED\r
+-Invalid " From <test_suite@notmuchmail.org> (2001-01-05) (inbox)\r
++"Invalid " (2001-01-05) (inbox)\r
+ Subject: message-with-invalid-from\r
+ To: Notmuch Test Suite <test_suite@notmuchmail.org>\r
+ Date: Fri, 05 Jan 2001 15:43:57 +0000\r
+@@ -411,7 +411,7 @@ test_emacs '(notmuch-show "id:\"bought\"")\r
+ (reverse-region (point-min) (point-max))\r
+ (test-output)'\r
+ cat <<EOF >EXPECTED\r
+-Sat, 01 Jan 2000 12:00:00 -0000\r
++Sat, 01 Jan 2000 12:00:00 +0000\r
+ Some One <someone@somewhere.org>\r
+ Some One Else <notsomeone@somewhere.org>\r
+ Notmuch <notmuch@notmuchmail.org>\r
+diff --git a/test/json b/test/json\r
+index 7df4380..1bdffd2 100755\r
+--- a/test/json\r
++++ b/test/json\r
+@@ -5,7 +5,7 @@ test_description="--format=json output"\r
+ test_begin_subtest "Show message: json"\r
+ add_message "[subject]=\"json-show-subject\"" "[date]=\"Sat, 01 Jan 2000 12:00:00 -0000\"" "[body]=\"json-show-message\""\r
+ output=$(notmuch show --format=json "json-show-message")\r
+-test_expect_equal "$output" "[[[{\"id\": \"${gen_msg_id}\", \"match\": true, \"filename\": \"${gen_msg_filename}\", \"timestamp\": 946728000, \"date_relative\": \"2000-01-01\", \"tags\": [\"inbox\",\"unread\"], \"headers\": {\"Subject\": \"json-show-subject\", \"From\": \"Notmuch Test Suite <test_suite@notmuchmail.org>\", \"To\": \"Notmuch Test Suite <test_suite@notmuchmail.org>\", \"Cc\": \"\", \"Bcc\": \"\", \"Date\": \"Sat, 01 Jan 2000 12:00:00 -0000\"}, \"body\": [{\"id\": 1, \"content-type\": \"text/plain\", \"content\": \"json-show-message\n\"}]}, []]]]"\r
++test_expect_equal "$output" "[[[{\"id\": \"${gen_msg_id}\", \"match\": true, \"filename\": \"${gen_msg_filename}\", \"timestamp\": 946728000, \"date_relative\": \"2000-01-01\", \"tags\": [\"inbox\",\"unread\"], \"headers\": {\"Subject\": \"json-show-subject\", \"From\": \"Notmuch Test Suite <test_suite@notmuchmail.org>\", \"To\": \"Notmuch Test Suite <test_suite@notmuchmail.org>\", \"Date\": \"Sat, 01 Jan 2000 12:00:00 +0000\"}, \"body\": [{\"id\": 1, \"content-type\": \"text/plain\", \"content\": \"json-show-message\n\"}]}, []]]]"\r
+ \r
+ test_begin_subtest "Search message: json"\r
+ add_message "[subject]=\"json-search-subject\"" "[date]=\"Sat, 01 Jan 2000 12:00:00 -0000\"" "[body]=\"json-search-message\""\r
+@@ -22,7 +22,7 @@ test_expect_equal "$output" "[{\"thread\": \"XXX\",\r
+ test_begin_subtest "Show message: json, utf-8"\r
+ add_message "[subject]=\"json-show-utf8-body-sübjéct\"" "[date]=\"Sat, 01 Jan 2000 12:00:00 -0000\"" "[body]=\"jsön-show-méssage\""\r
+ output=$(notmuch show --format=json "jsön-show-méssage")\r
+-test_expect_equal "$output" "[[[{\"id\": \"${gen_msg_id}\", \"match\": true, \"filename\": \"${gen_msg_filename}\", \"timestamp\": 946728000, \"date_relative\": \"2000-01-01\", \"tags\": [\"inbox\",\"unread\"], \"headers\": {\"Subject\": \"json-show-utf8-body-sübjéct\", \"From\": \"Notmuch Test Suite <test_suite@notmuchmail.org>\", \"To\": \"Notmuch Test Suite <test_suite@notmuchmail.org>\", \"Cc\": \"\", \"Bcc\": \"\", \"Date\": \"Sat, 01 Jan 2000 12:00:00 -0000\"}, \"body\": [{\"id\": 1, \"content-type\": \"text/plain\", \"content\": \"jsön-show-méssage\n\"}]}, []]]]"\r
++test_expect_equal "$output" "[[[{\"id\": \"${gen_msg_id}\", \"match\": true, \"filename\": \"${gen_msg_filename}\", \"timestamp\": 946728000, \"date_relative\": \"2000-01-01\", \"tags\": [\"inbox\",\"unread\"], \"headers\": {\"Subject\": \"json-show-utf8-body-sübjéct\", \"From\": \"Notmuch Test Suite <test_suite@notmuchmail.org>\", \"To\": \"Notmuch Test Suite <test_suite@notmuchmail.org>\", \"Date\": \"Sat, 01 Jan 2000 12:00:00 +0000\"}, \"body\": [{\"id\": 1, \"content-type\": \"text/plain\", \"content\": \"jsön-show-méssage\n\"}]}, []]]]"\r
+ \r
+ test_begin_subtest "Show message: json, inline attachment filename"\r
+ subject='json-show-inline-attachment-filename'\r
+@@ -35,7 +35,7 @@ emacs_deliver_message \\r
+ (insert \"Message-ID: <$id>\n\")"\r
+ output=$(notmuch show --format=json "id:$id")\r
+ filename=$(notmuch search --output=files "id:$id")\r
+-test_expect_equal "$output" "[[[{\"id\": \"$id\", \"match\": true, \"filename\": \"$filename\", \"timestamp\": 946728000, \"date_relative\": \"2000-01-01\", \"tags\": [\"inbox\"], \"headers\": {\"Subject\": \"$subject\", \"From\": \"Notmuch Test Suite <test_suite@notmuchmail.org>\", \"To\": \"test_suite@notmuchmail.org\", \"Cc\": \"\", \"Bcc\": \"\", \"Date\": \"01 Jan 2000 12:00:00 -0000\"}, \"body\": [{\"id\": 1, \"content-type\": \"multipart/mixed\", \"content\": [{\"id\": 2, \"content-type\": \"text/plain\", \"content\": \"This is a test message with inline attachment with a filename\"}, {\"id\": 3, \"content-type\": \"application/octet-stream\", \"filename\": \"README\"}]}]}, []]]]"\r
++test_expect_equal "$output" "[[[{\"id\": \"$id\", \"match\": true, \"filename\": \"$filename\", \"timestamp\": 946728000, \"date_relative\": \"2000-01-01\", \"tags\": [\"inbox\"], \"headers\": {\"Subject\": \"$subject\", \"From\": \"Notmuch Test Suite <test_suite@notmuchmail.org>\", \"To\": \"test_suite@notmuchmail.org\", \"Date\": \"Sat, 01 Jan 2000 12:00:00 +0000\"}, \"body\": [{\"id\": 1, \"content-type\": \"multipart/mixed\", \"content\": [{\"id\": 2, \"content-type\": \"text/plain\", \"content\": \"This is a test message with inline attachment with a filename\"}, {\"id\": 3, \"content-type\": \"application/octet-stream\", \"filename\": \"README\"}]}]}, []]]]"\r
+ \r
+ test_begin_subtest "Search message: json, utf-8"\r
+ add_message "[subject]=\"json-search-utf8-body-sübjéct\"" "[date]=\"Sat, 01 Jan 2000 12:00:00 -0000\"" "[body]=\"jsön-search-méssage\""\r
+diff --git a/test/maildir-sync b/test/maildir-sync\r
+index d5872a5..1ee2db0 100755\r
+--- a/test/maildir-sync\r
++++ b/test/maildir-sync\r
+@@ -53,8 +53,6 @@ test_expect_equal "$output" '[[[{"id": "adding-replied-tag@notmuch-test-suite",\r
+ "headers": {"Subject": "Adding replied tag",\r
+ "From": "Notmuch Test Suite <test_suite@notmuchmail.org>",\r
+ "To": "Notmuch Test Suite <test_suite@notmuchmail.org>",\r
+-"Cc": "",\r
+-"Bcc": "",\r
+ "Date": "Fri,\r
+ 05 Jan 2001 15:43:57 +0000"},\r
+ "body": [{"id": 1,\r
+diff --git a/test/multipart b/test/multipart\r
+index 4d14804..a3036b4 100755\r
+--- a/test/multipart\r
++++ b/test/multipart\r
+@@ -322,7 +322,7 @@ notmuch show --format=json --part=0 'id:87liy5ap00.fsf@yoom.home.cworth.org' | s\r
+ echo >>OUTPUT # expect *no* newline at end of output\r
+ cat <<EOF >EXPECTED\r
+ \r
+-{"id": "87liy5ap00.fsf@yoom.home.cworth.org", "match": true, "filename": "${MAIL_DIR}/multipart", "timestamp": 978709437, "date_relative": "2001-01-05", "tags": ["attachment","inbox","signed","unread"], "headers": {"Subject": "Multipart message", "From": "Carl Worth <cworth@cworth.org>", "To": "cworth@cworth.org", "Cc": "", "Bcc": "", "Date": "Fri, 05 Jan 2001 15:43:57 +0000"}, "body": [\r
++{"id": "87liy5ap00.fsf@yoom.home.cworth.org", "match": true, "filename": "${MAIL_DIR}/multipart", "timestamp": 978709437, "date_relative": "2001-01-05", "tags": ["attachment","inbox","signed","unread"], "headers": {"Subject": "Multipart message", "From": "Carl Worth <cworth@cworth.org>", "To": "cworth@cworth.org", "Date": "Fri, 05 Jan 2001 15:43:57 +0000"}, "body": [\r
+ {"id": 1, "content-type": "multipart/signed", "content": [\r
+ {"id": 2, "content-type": "multipart/mixed", "content": [\r
+ {"id": 3, "content-type": "message/rfc822", "content": [{"headers": {"Subject": "html message", "From": "Carl Worth <cworth@cworth.org>", "To": "cworth@cworth.org", "Date": "Fri, 05 Jan 2001 15:42:57 +0000"}, "body": [\r
+-- \r
+1.7.7.3\r
+\r