From: Whomever
To: Someone
Date: Whenever
Subject: whatever
MIME-Version: 1.0
Message-ID: <id1@host.com>
Content-Type: multipart/alternative; boundary=42
Content-ID: <id001@guppylake.bellcore.com>

--42
Content-Type: message/external-body; name="BodyFormats.ps";
            site="thumper.bellcore.com"; mode="image";
            access-type=ANON-FTP; directory="pub";
            expiration="Fri, 14 Jun 1991 19:13:14 -0400 (EDT)"

Content-type: application/postscript
Content-ID: <id42@guppylake.bellcore.com>

--42
Content-Type: message/external-body; access-type=local-file;
            name="/u/nsb/writing/rfcs/RFC-MIME.ps";
            site="thumper.bellcore.com";
            expiration="Fri, 14 Jun 1991 19:13:14 -0400 (EDT)"

Content-type: application/postscript
Content-ID: <id42@guppylake.bellcore.com>

--42
Content-Type: message/external-body;
            access-type=mail-server
            server="listserv@bogus.bitnet";
            expiration="Fri, 14 Jun 1991 19:13:14 -0400 (EDT)"

Content-type: application/postscript
Content-ID: <id42@guppylake.bellcore.com>

get RFC-MIME.DOC

--42--


---- EXPECTED STRUCTURE ----
{
  "headers": {
    "values": {
      "mime_version": {
        "Text": "1.0"
      },
      "message_id": {
        "Text": "id1@host.com"
      },
      "content_type": {
        "ContentType": {
          "c_type": "multipart",
          "c_subtype": "alternative",
          "attributes": {
            "boundary": "42"
          }
        }
      },
      "content_id": {
        "Text": "id001@guppylake.bellcore.com"
      },
      "subject": {
        "Text": "whatever"
      },
      "to": {
        "Address": {
          "name": "Someone"
        }
      },
      "from": {
        "Address": {
          "name": "Whomever"
        }
      }
    },
    "offsets": [
      {
        "name": {
          "Rfc": "from"
        },
        "start": 5,
        "end": 15
      },
      {
        "name": {
          "Rfc": "to"
        },
        "start": 18,
        "end": 27
      },
      {
        "name": {
          "Rfc": "date"
        },
        "start": 32,
        "end": 42
      },
      {
        "name": {
          "Rfc": "subject"
        },
        "start": 50,
        "end": 60
      },
      {
        "name": {
          "Rfc": "mime_version"
        },
        "start": 73,
        "end": 78
      },
      {
        "name": {
          "Rfc": "message_id"
        },
        "start": 89,
        "end": 105
      },
      {
        "name": {
          "Rfc": "content_type"
        },
        "start": 118,
        "end": 154
      },
      {
        "name": {
          "Rfc": "content_id"
        },
        "start": 165,
        "end": 197
      }
    ]
  },
  "attachments": [
    {
      "Attachment": 0
    },
    {
      "Attachment": 1
    },
    {
      "Attachment": 2
    }
  ],
  "parts": [
    {
      "Binary": {
        "headers": {
          "values": {
            "content_type": {
              "ContentType": {
                "c_type": "message",
                "c_subtype": "external-body",
                "attributes": {
                  "name": "BodyFormats.ps",
                  "site": "thumper.bellcore.com",
                  "mode": "image",
                  "directory": "pub",
                  "expiration": "Fri, 14 Jun 1991 19:13:14 -0400 (EDT)",
                  "access-type": "ANON-FTP"
                }
              }
            }
          },
          "offsets": [
            {
              "name": {
                "Rfc": "content_type"
              },
              "start": 216,
              "end": 432
            }
          ]
        },
        "contents": [
          67,
          111,
          110,
          116,
          101,
          110,
          116,
          45,
          116,
          121,
          112,
          101,
          58,
          32,
          97,
          112,
          112,
          108,
          105,
          99,
          97,
          116,
          105,
          111,
          110,
          47,
          112,
          111,
          115,
          116,
          115,
          99,
          114,
          105,
          112,
          116,
          10,
          67,
          111,
          110,
          116,
          101,
          110,
          116,
          45,
          73,
          68,
          58,
          32,
          60,
          105,
          100,
          52,
          50,
          64,
          103,
          117,
          112,
          112,
          121,
          108,
          97,
          107,
          101,
          46,
          98,
          101,
          108,
          108,
          99,
          111,
          114,
          101,
          46,
          99,
          111,
          109,
          62,
          10
        ]
      }
    },
    {
      "Binary": {
        "headers": {
          "values": {
            "content_type": {
              "ContentType": {
                "c_type": "message",
                "c_subtype": "external-body",
                "attributes": {
                  "site": "thumper.bellcore.com",
                  "expiration": "Fri, 14 Jun 1991 19:13:14 -0400 (EDT)",
                  "access-type": "local-file",
                  "name": "/u/nsb/writing/rfcs/RFC-MIME.ps"
                }
              }
            }
          },
          "offsets": [
            {
              "name": {
                "Rfc": "content_type"
              },
              "start": 531,
              "end": 735
            }
          ]
        },
        "contents": [
          67,
          111,
          110,
          116,
          101,
          110,
          116,
          45,
          116,
          121,
          112,
          101,
          58,
          32,
          97,
          112,
          112,
          108,
          105,
          99,
          97,
          116,
          105,
          111,
          110,
          47,
          112,
          111,
          115,
          116,
          115,
          99,
          114,
          105,
          112,
          116,
          10,
          67,
          111,
          110,
          116,
          101,
          110,
          116,
          45,
          73,
          68,
          58,
          32,
          60,
          105,
          100,
          52,
          50,
          64,
          103,
          117,
          112,
          112,
          121,
          108,
          97,
          107,
          101,
          46,
          98,
          101,
          108,
          108,
          99,
          111,
          114,
          101,
          46,
          99,
          111,
          109,
          62,
          10
        ]
      }
    },
    {
      "Binary": {
        "headers": {
          "values": {
            "content_type": {
              "ContentType": {
                "c_type": "message",
                "c_subtype": "external-body",
                "attributes": {
                  "server": "listserv@bogus.bitnet",
                  "expiration": "Fri, 14 Jun 1991 19:13:14 -0400 (EDT)",
                  "access-type": "mail-server"
                }
              }
            }
          },
          "offsets": [
            {
              "name": {
                "Rfc": "content_type"
              },
              "start": 834,
              "end": 1001
            }
          ]
        },
        "contents": [
          67,
          111,
          110,
          116,
          101,
          110,
          116,
          45,
          116,
          121,
          112,
          101,
          58,
          32,
          97,
          112,
          112,
          108,
          105,
          99,
          97,
          116,
          105,
          111,
          110,
          47,
          112,
          111,
          115,
          116,
          115,
          99,
          114,
          105,
          112,
          116,
          10,
          67,
          111,
          110,
          116,
          101,
          110,
          116,
          45,
          73,
          68,
          58,
          32,
          60,
          105,
          100,
          52,
          50,
          64,
          103,
          117,
          112,
          112,
          121,
          108,
          97,
          107,
          101,
          46,
          98,
          101,
          108,
          108,
          99,
          111,
          114,
          101,
          46,
          99,
          111,
          109,
          62,
          10,
          10,
          103,
          101,
          116,
          32,
          82,
          70,
          67,
          45,
          77,
          73,
          77,
          69,
          46,
          68,
          79,
          67,
          10
        ]
      }
    }
  ],
  "structure": {
    "List": [
      {
        "Part": 0
      },
      {
        "Part": 1
      },
      {
        "Part": 2
      }
    ]
  },
  "offset_header": 0,
  "offset_body": 198,
  "offset_end": 1106
}