From: Moderator-Address <moderator>
Content-Type: multipart/digest; boundary=1;


--1

From: someone-else <someone@else>
Subject: my opinion

This is my opinion
--1

From: another one <another@one>
Subject: i disagree

Not agreeing one bit!
--1

From: attachment <attachment@user>
Subject: funny hat
Content-Type: multipart/mixed; boundary=2

--2
Content-Type: text/plain
Content-Transfer-Encoding: binary

Lovely attachment for you
--2
Content-Type: application/octet-stream; disposition=attachment; name="test.txt"
Content-Transfer-Encoding: binary

Foobar
--2--
--1--
---- EXPECTED STRUCTURE ----{
  "headers_rfc": {
    "from": {
      "Address": {
        "name": "Moderator-Address",
        "address": "moderator"
      }
    },
    "content_type": {
      "ContentType": {
        "c_type": "multipart",
        "c_subtype": "digest",
        "attributes": {
          "boundary": "1"
        }
      }
    }
  },
  "html_body": [],
  "text_body": [],
  "attachments": [
    0,
    1,
    2
  ],
  "parts": [
    {
      "Message": {
        "headers_rfc": {
          "content_type": {
            "ContentType": {
              "c_type": "message",
              "c_subtype": "rfc822",
              "attributes": null
            }
          }
        },
        "is_encoding_problem": false,
        "body": {
          "headers_rfc": {
            "from": {
              "Address": {
                "name": "someone-else",
                "address": "someone@else"
              }
            },
            "subject": {
              "Text": "my opinion"
            }
          },
          "html_body": [
            0
          ],
          "text_body": [
            0
          ],
          "attachments": [],
          "parts": [
            {
              "Text": {
                "headers_rfc": {
                  "content_type": {
                    "ContentType": {
                      "c_type": "text",
                      "c_subtype": "plain",
                      "attributes": null
                    }
                  }
                },
                "is_encoding_problem": false,
                "body": "This is my opinion"
              }
            }
          ],
          "structure": {
            "Part": 0
          },
          "offset_header": 87,
          "offset_body": 142,
          "offset_end": 166
        }
      }
    },
    {
      "Message": {
        "headers_rfc": {
          "content_type": {
            "ContentType": {
              "c_type": "message",
              "c_subtype": "rfc822",
              "attributes": null
            }
          }
        },
        "is_encoding_problem": false,
        "body": {
          "headers_rfc": {
            "from": {
              "Address": {
                "name": "another one",
                "address": "another@one"
              }
            },
            "subject": {
              "Text": "i disagree"
            }
          },
          "html_body": [
            0
          ],
          "text_body": [
            0
          ],
          "attachments": [],
          "parts": [
            {
              "Text": {
                "headers_rfc": {
                  "content_type": {
                    "ContentType": {
                      "c_type": "text",
                      "c_subtype": "plain",
                      "attributes": null
                    }
                  }
                },
                "is_encoding_problem": false,
                "body": "Not agreeing one bit!"
              }
            }
          ],
          "structure": {
            "Part": 0
          },
          "offset_header": 166,
          "offset_body": 219,
          "offset_end": 246
        }
      }
    },
    {
      "Message": {
        "headers_rfc": {
          "content_type": {
            "ContentType": {
              "c_type": "message",
              "c_subtype": "rfc822",
              "attributes": null
            }
          }
        },
        "is_encoding_problem": false,
        "body": {
          "headers_rfc": {
            "content_type": {
              "ContentType": {
                "c_type": "multipart",
                "c_subtype": "mixed",
                "attributes": {
                  "boundary": "2"
                }
              }
            },
            "from": {
              "Address": {
                "name": "attachment",
                "address": "attachment@user"
              }
            },
            "subject": {
              "Text": "funny hat"
            }
          },
          "html_body": [
            0
          ],
          "text_body": [
            0
          ],
          "attachments": [
            1
          ],
          "parts": [
            {
              "Text": {
                "headers_rfc": {
                  "content_type": {
                    "ContentType": {
                      "c_type": "text",
                      "c_subtype": "plain",
                      "attributes": null
                    }
                  },
                  "content_transfer_encoding": {
                    "Text": "binary"
                  }
                },
                "is_encoding_problem": false,
                "body": "Lovely attachment for you"
              }
            },
            {
              "Binary": {
                "headers_rfc": {
                  "content_type": {
                    "ContentType": {
                      "c_type": "application",
                      "c_subtype": "octet-stream",
                      "attributes": {
                        "name": "test.txt",
                        "disposition": "attachment"
                      }
                    }
                  },
                  "content_transfer_encoding": {
                    "Text": "binary"
                  }
                },
                "is_encoding_problem": false,
                "body": [
                  70,
                  111,
                  111,
                  98,
                  97,
                  114
                ]
              }
            }
          ],
          "structure": {
            "List": [
              {
                "Part": 0
              },
              {
                "Part": 1
              }
            ]
          },
          "offset_header": 246,
          "offset_body": 343,
          "offset_end": 565
        }
      }
    }
  ],
  "structure": {
    "List": [
      {
        "Part": 0
      },
      {
        "Part": 1
      },
      {
        "Part": 2
      }
    ]
  },
  "offset_header": 0,
  "offset_body": 82,
  "offset_end": 570
}