Return-Path: <test@example.org>
Subject: Hello world
From: Test User <test@example.org>
To: Another User <test2@example.org>
Message-Id: <1.2.3.4@example>
Mime-Version: 1.0
Date: Sun, 23 May 2007 04:58:08 +0300
Content-Type: multipart/signed; micalg=pgp-sha1;
	protocol="application/pgp-signature";
	boundary="=-GNQXLhuj24Pl1aCkk4/d"

--=-GNQXLhuj24Pl1aCkk4/d
Content-Type: text/plain
Content-Transfer-Encoding: quoted-printable

There was a day=20
a happy=20day

--=-GNQXLhuj24Pl1aCkk4/d
Content-Type: application/pgp-signature; name=signature.asc

invalid

--=-GNQXLhuj24Pl1aCkk4/d--


---- EXPECTED STRUCTURE ----
{
  "headers": {
    "values": {
      "from": {
        "Address": {
          "name": "Test User",
          "address": "test@example.org"
        }
      },
      "content_type": {
        "ContentType": {
          "c_type": "multipart",
          "c_subtype": "signed",
          "attributes": {
            "boundary": "=-GNQXLhuj24Pl1aCkk4/d",
            "protocol": "application/pgp-signature",
            "micalg": "pgp-sha1"
          }
        }
      },
      "to": {
        "Address": {
          "name": "Another User",
          "address": "test2@example.org"
        }
      },
      "subject": {
        "Text": "Hello world"
      },
      "message_id": {
        "Text": "1.2.3.4@example"
      },
      "return_path": {
        "Text": "test@example.org"
      },
      "mime_version": {
        "Text": "1.0"
      },
      "date": {
        "DateTime": {
          "year": 2007,
          "month": 5,
          "day": 23,
          "hour": 4,
          "minute": 58,
          "second": 8,
          "tz_before_gmt": false,
          "tz_hour": 3,
          "tz_minute": 0
        }
      }
    },
    "offsets": [
      {
        "name": {
          "Rfc": "return_path"
        },
        "start": 12,
        "end": 32
      },
      {
        "name": {
          "Rfc": "subject"
        },
        "start": 40,
        "end": 53
      },
      {
        "name": {
          "Rfc": "from"
        },
        "start": 58,
        "end": 88
      },
      {
        "name": {
          "Rfc": "to"
        },
        "start": 91,
        "end": 125
      },
      {
        "name": {
          "Rfc": "message_id"
        },
        "start": 136,
        "end": 155
      },
      {
        "name": {
          "Rfc": "mime_version"
        },
        "start": 168,
        "end": 173
      },
      {
        "name": {
          "Rfc": "date"
        },
        "start": 178,
        "end": 211
      },
      {
        "name": {
          "Rfc": "content_type"
        },
        "start": 224,
        "end": 334
      }
    ]
  },
  "html_body": [
    0
  ],
  "text_body": [
    0
  ],
  "attachments": [
    {
      "Attachment": 1
    }
  ],
  "parts": [
    {
      "Text": {
        "headers": {
          "values": {
            "content_transfer_encoding": {
              "Text": "quoted-printable"
            },
            "content_type": {
              "ContentType": {
                "c_type": "text",
                "c_subtype": "plain"
              }
            }
          },
          "offsets": [
            {
              "name": {
                "Rfc": "content_type"
              },
              "start": 373,
              "end": 385
            },
            {
              "name": {
                "Rfc": "content_transfer_encoding"
              },
              "start": 411,
              "end": 429
            }
          ]
        },
        "contents": "There was a day \na happy day\n",
        "is_html": false
      }
    },
    {
      "Binary": {
        "headers": {
          "values": {
            "content_type": {
              "ContentType": {
                "c_type": "application",
                "c_subtype": "pgp-signature",
                "attributes": {
                  "name": "signature.asc"
                }
              }
            }
          },
          "offsets": [
            {
              "name": {
                "Rfc": "content_type"
              },
              "start": 502,
              "end": 549
            }
          ]
        },
        "contents": [
          105,
          110,
          118,
          97,
          108,
          105,
          100,
          10
        ]
      }
    }
  ],
  "structure": {
    "List": [
      {
        "Part": 0
      },
      {
        "Part": 1
      }
    ]
  },
  "offset_header": 0,
  "offset_body": 335,
  "offset_end": 585
}