Compare commits

...
11 Commits
Author SHA1 Message Date
Mauro D d88bc20336 Improved API. 2021-12-16 10:01:32 +00:00
Mauro D 3f99761706 Improved storage of headers. 2021-12-15 14:24:57 +00:00
Mauro D ac87792052 Improved storage of headers. 2021-12-15 14:24:28 +00:00
Mauro D 3ebe77098a Lazy HTML/text body conversion. 2021-12-14 15:23:07 +00:00
Mauro D ba750b4dee Fixed tests. 2021-12-14 13:45:25 +00:00
Mauro D de82b6ea34 Body structure and raw offsets support. 2021-12-14 12:30:35 +00:00
Geert Stappers 6ddbedae48 Rust bytes (#6)
* Use rust byte string, introduction of byte string

Replacing "input" with a multi-line rust byte string.
The `assert_eq!(old, new);` proofs no changes.

(this part one of a two part change)

* Using rust byte string, removing assembled string

(this is part two of a two part change)

Now removing the assembled input.
Also removal of the test on both byte strings being equal.
2021-11-18 09:28:38 +01:00
Mauro D bd78d654c2 Structs made public. 2021-11-16 11:02:33 +00:00
Mauro D f820cee04a v0.3.0: Added CHANGELOG. 2021-11-09 10:36:41 +00:00
Mauro D ea23e474d3 v0.3.0: Improved API. 2021-11-08 11:55:28 +00:00
Mauro D 3c14e77932 v0.2.2 2021-11-04 07:24:36 +00:00
109 changed files with 16579 additions and 7363 deletions
+44
View File
@@ -0,0 +1,44 @@
mail-parser 0.4.0
================================
- Lazy conversion to/from HTML an plain text parts.
- Improved API.
- Parts are now generics.
mail-parser 0.3.1
================================
- Support for non-standard headers.
- Raw message offsets are stored in the message object.
- Message body structure is now stored in the message object.
mail-parser 0.3
================================
- Improved API, now `Message::parse` returns `Option<Message>` to indicate when parsing was successful.
- Headers are now stored internally in a `HashMap` instead of `struct` fields.
- Added support for new RFCs:
- [RFC 2557 - MIME Encapsulation of Aggregate Documents, such as HTML (MHTML)](https://datatracker.ietf.org/doc/html/rfc2557)
- [RFC 2392 - Content-ID and Message-ID Uniform Resource Locators](https://datatracker.ietf.org/doc/html/rfc2392)
- [RFC 3282 - Content Language Headers](https://datatracker.ietf.org/doc/html/rfc3282)
- [RFC 3339 - Date and Time on the Internet: Timestamps](https://datatracker.ietf.org/doc/html/rfc3339)
mail-parser 0.2.1
================================
- Performance enhacements, now *mail-parser* is almost as fast as the `unsafe` 0.1 version.
mail-parser 0.2
================================
- Re-factoring to use **100% safe** Rust after a [discussion on Reddit](https://www.reddit.com/r/rust/comments/qkc5rk/fast_and_robust_email_parsing_library_for_rust/).
- Added `Message::is_empty`.
mail-parser 0.1.1
================================
- Bug-fixing after **fuzzing** the library.
mail-parser 0.1
================================
- Initial release with plenty of `unsafe` code to speed things up.
Generated
+1 -1
View File
@@ -59,7 +59,7 @@ checksum = "7fb9b38af92608140b86b693604b9ffcc5824240a484d1ecd4795bacb2fe88f3"
[[package]]
name = "mail-parser"
version = "0.2.1"
version = "0.4.0"
dependencies = [
"encoding_rs",
"serde",
+6 -6
View File
@@ -1,7 +1,7 @@
[package]
name = "mail-parser"
description = "Fast and robust e-mail parsing library for Rust"
version = "0.2.1"
version = "0.4.0"
edition = "2018"
authors = [ "Stalwart Labs <hello@stalw.art>"]
license = "Apache-2.0 OR MIT"
@@ -12,13 +12,13 @@ categories = ["email", "parser-implementations"]
readme = "README.md"
[dependencies]
encoding_rs = {version=">=0.8.28", optional=true}
serde = { version = ">=1.0.117", features = ["derive"], optional=true}
serde_bytes = { version = ">=0.11.5", optional=true}
encoding_rs = {version="0.8", optional=true}
serde = { version = "1.0", features = ["derive"], optional=true}
serde_bytes = { version = "0.11", optional=true}
[dev-dependencies]
serde_yaml = ">=0.8.21"
serde_json = ">=1.0.59"
serde_yaml = "0.8"
serde_json = "1.0"
[features]
default = ["serde_support", "full_encoding"]
+61 -57
View File
@@ -7,7 +7,7 @@
[![Twitter Follow](https://img.shields.io/twitter/follow/stalwartlabs?style=social)](https://twitter.com/stalwartlabs)
_mail-parser_ is an **e-mail parsing library** written in Rust that fully conforms to the Internet Message Format standard (_RFC 5322_), the
Multipurpose Internet Mail Extensions (MIME; _RFC 2045 - 2049_) as well as other [internet messaging RFCs](#conformed-rfcs).
Multipurpose Internet Mail Extensions (MIME; _RFC 2045 - 2049_) as well as many other [internet messaging RFCs](#conformed-rfcs).
It also supports decoding messages in [41 different character sets](#supported-character-sets) including obsolete formats such as UTF-7.
All Unicode (UTF-*) and single-byte character sets are handled internally by the library while support for legacy multi-byte encodings of Chinese
@@ -29,62 +29,66 @@ Performance and memory safety were two important factors while designing _mail-p
- **Fast parsing** of message header fields, character set names and HTML entities using [perfect hashing](https://en.wikipedia.org/wiki/Perfect_hash_function).
- Written in **100% safe** Rust with no external dependencies.
- Every function in the library has been [fuzzed](#testing-fuzzing--benchmarking) and
meticulously [tested with MIRI](#testing-fuzzing--benchmarking).
- Thoroughly **battle-tested** with millions of real-world e-mail messages dating from 1995 until today.
thoroughly [tested with MIRI](#testing-fuzzing--benchmarking).
- **Battle-tested** with millions of real-world e-mail messages dating from 1995 until today.
## Usage Example
```rust
let input = concat!(
"From: Art Vandelay <art@vandelay.com> (Vandelay Industries)\n",
"To: \"Colleagues\": \"James Smythe\" <james@vandelay.com>; Friends:\n",
" jane@example.com, =?UTF-8?Q?John_Sm=C3=AEth?= <john@example.com>;\n",
"Date: Sat, 20 Nov 2021 14:22:01 -0800\n",
"Subject: Why not both importing AND exporting? =?utf-8?b?4pi6?=\n",
"Content-Type: multipart/mixed; boundary=\"festivus\";\n\n",
"--festivus\n",
"Content-Type: text/html; charset=\"us-ascii\"\n",
"Content-Transfer-Encoding: base64\n\n",
"PGh0bWw+PHA+SSB3YXMgdGhpbmtpbmcgYWJvdXQgcXVpdHRpbmcgdGhlICZsZHF1bztle\n",
"HBvcnRpbmcmcmRxdW87IHRvIGZvY3VzIGp1c3Qgb24gdGhlICZsZHF1bztpbXBvcnRpbm\n",
"cmcmRxdW87LDwvcD48cD5idXQgdGhlbiBJIHRob3VnaHQsIHdoeSBub3QgZG8gYm90aD8\n",
"gJiN4MjYzQTs8L3A+PC9odG1sPg==\n",
"--festivus\n",
"Content-Type: message/rfc822\n\n",
"From: \"Cosmo Kramer\" <kramer@kramerica.com>\n",
"Subject: Exporting my book about coffee tables\n",
"Content-Type: multipart/mixed; boundary=\"giddyup\";\n\n",
"--giddyup\n",
"Content-Type: text/plain; charset=\"utf-16\"\n",
"Content-Transfer-Encoding: quoted-printable\n\n",
"=FF=FE=0C!5=D8\"=DD5=D8)=DD5=D8-=DD =005=D8*=DD5=D8\"=DD =005=D8\"=\n",
"=DD5=D85=DD5=D8-=DD5=D8,=DD5=D8/=DD5=D81=DD =005=D8*=DD5=D86=DD =\n",
"=005=D8=1F=DD5=D8,=DD5=D8,=DD5=D8(=DD =005=D8-=DD5=D8)=DD5=D8\"=\n",
"=DD5=D8=1E=DD5=D80=DD5=D8\"=DD!=00\n",
"--giddyup\n",
"Content-Type: image/gif; name*1=\"about \"; name*0=\"Book \";\n",
" name*2*=utf-8''%e2%98%95 tables.gif\n",
"Content-Transfer-Encoding: Base64\n",
"Content-Disposition: attachment\n\n",
"R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7\n",
"--giddyup--\n",
"--festivus--\n",
)
.as_bytes();
let input = br#"From: Art Vandelay <art@vandelay.com> (Vandelay Industries)
To: "Colleagues": "James Smythe" <james@vandelay.com>; Friends:
jane@example.com, =?UTF-8?Q?John_Sm=C3=AEth?= <john@example.com>;
Date: Sat, 20 Nov 2021 14:22:01 -0800
Subject: Why not both importing AND exporting? =?utf-8?b?4pi6?=
Content-Type: multipart/mixed; boundary="festivus";
let message = Message::parse(input);
--festivus
Content-Type: text/html; charset="us-ascii"
Content-Transfer-Encoding: base64
PGh0bWw+PHA+SSB3YXMgdGhpbmtpbmcgYWJvdXQgcXVpdHRpbmcgdGhlICZsZHF1bztle
HBvcnRpbmcmcmRxdW87IHRvIGZvY3VzIGp1c3Qgb24gdGhlICZsZHF1bztpbXBvcnRpbm
cmcmRxdW87LDwvcD48cD5idXQgdGhlbiBJIHRob3VnaHQsIHdoeSBub3QgZG8gYm90aD8
gJiN4MjYzQTs8L3A+PC9odG1sPg==
--festivus
Content-Type: message/rfc822
From: "Cosmo Kramer" <kramer@kramerica.com>
Subject: Exporting my book about coffee tables
Content-Type: multipart/mixed; boundary="giddyup";
--giddyup
Content-Type: text/plain; charset="utf-16"
Content-Transfer-Encoding: quoted-printable
=FF=FE=0C!5=D8"=DD5=D8)=DD5=D8-=DD =005=D8*=DD5=D8"=DD =005=D8"=
=DD5=D85=DD5=D8-=DD5=D8,=DD5=D8/=DD5=D81=DD =005=D8*=DD5=D86=DD =
=005=D8=1F=DD5=D8,=DD5=D8,=DD5=D8(=DD =005=D8-=DD5=D8)=DD5=D8"=
=DD5=D8=1E=DD5=D80=DD5=D8"=DD!=00
--giddyup
Content-Type: image/gif; name*1="about "; name*0="Book ";
name*2*=utf-8''%e2%98%95 tables.gif
Content-Transfer-Encoding: Base64
Content-Disposition: attachment
R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7
--giddyup--
--festivus--
"#;
let message = Message::parse(input).unwrap();
// Parses addresses (including comments), lists and groups
assert_eq!(
message.get_from(),
&Address::Address(Addr {
&HeaderValue::Address(Addr {
name: Some("Art Vandelay (Vandelay Industries)".into()),
address: Some("art@vandelay.com".into())
})
);
assert_eq!(
message.get_to(),
&Address::GroupList(vec![
&HeaderValue::GroupList(vec![
Group {
name: Some("Colleagues".into()),
addresses: vec![Addr {
@@ -119,9 +123,9 @@ Performance and memory safety were two important factors while designing _mail-p
"Why not both importing AND exporting? ☺"
);
// HTML and text body parts are returned conforming to RFC8621, Section 4.1.4
// HTML and text body parts are returned conforming to RFC8621, Section 4.1.4
assert_eq!(
message.get_html_body(0).unwrap().to_string(),
message.get_html_body(0).unwrap(),
concat!(
"<html><p>I was thinking about quitting the &ldquo;exporting&rdquo; to ",
"focus just on the &ldquo;importing&rdquo;,</p><p>but then I thought,",
@@ -131,7 +135,7 @@ Performance and memory safety were two important factors while designing _mail-p
// HTML parts are converted to plain text (and viceversa) when missing
assert_eq!(
message.get_text_body(0).unwrap().to_string(),
message.get_text_body(0).unwrap(),
concat!(
"I was thinking about quitting the “exporting” to focus just on the",
" “importing”,\nbut then I thought, why not do both? ☺\n"
@@ -139,10 +143,11 @@ Performance and memory safety were two important factors while designing _mail-p
);
// Supports nested messages as well as multipart/digest
let nested_message = match message.get_attachment(0).unwrap() {
MessagePart::Message(v) => v,
_ => unreachable!(),
};
let nested_message = message
.get_attachment(0)
.unwrap()
.unwrap_message()
.get_body();
assert_eq!(
nested_message.get_subject().unwrap(),
@@ -151,26 +156,21 @@ Performance and memory safety were two important factors while designing _mail-p
// Handles UTF-* as well as many legacy encodings
assert_eq!(
nested_message.get_text_body(0).unwrap().to_string(),
nested_message.get_text_body(0).unwrap(),
"ℌ𝔢𝔩𝔭 𝔪𝔢 𝔢𝔵𝔭𝔬𝔯𝔱 𝔪𝔶 𝔟𝔬𝔬𝔨 𝔭𝔩𝔢𝔞𝔰𝔢!"
);
assert_eq!(
nested_message.get_html_body(0).unwrap().to_string(),
nested_message.get_html_body(0).unwrap(),
"<html><body>ℌ𝔢𝔩𝔭 𝔪𝔢 𝔢𝔵𝔭𝔬𝔯𝔱 𝔪𝔶 𝔟𝔬𝔬𝔨 𝔭𝔩𝔢𝔞𝔰𝔢!</body></html>"
);
let nested_attachment = match nested_message.get_attachment(0).unwrap() {
MessagePart::Binary(v) => v,
_ => unreachable!(),
};
let nested_attachment = nested_message.get_attachment(0).unwrap().unwrap_binary();
assert_eq!(nested_attachment.len(), 42);
// Full RFC2231 support for continuations and character sets
assert_eq!(
nested_attachment
.get_header()
.unwrap()
.get_content_type()
.unwrap()
.get_attribute("name")
@@ -219,11 +219,15 @@ and, to run the benchmarks:
- [RFC 2048 - Multipurpose Internet Mail Extensions (MIME) Part Four: Registration Procedures](https://datatracker.ietf.org/doc/html/rfc2048)
- [RFC 2049 - Multipurpose Internet Mail Extensions (MIME) Part Five: Conformance Criteria and Examples](https://datatracker.ietf.org/doc/html/rfc2049)
- [RFC 2231 - MIME Parameter Value and Encoded Word Extensions: Character Sets, Languages, and Continuations](https://datatracker.ietf.org/doc/html/rfc2231)
- [RFC 2557 - MIME Encapsulation of Aggregate Documents, such as HTML (MHTML)](https://datatracker.ietf.org/doc/html/rfc2557)
- [RFC 2183 - Communicating Presentation Information in Internet Messages: The Content-Disposition Header Field](https://datatracker.ietf.org/doc/html/rfc2183)
- [RFC 2392 - Content-ID and Message-ID Uniform Resource Locators](https://datatracker.ietf.org/doc/html/rfc2392)
- [RFC 3282 - Content Language Headers](https://datatracker.ietf.org/doc/html/rfc3282)
- [RFC 6532 - Internationalized Email Headers](https://datatracker.ietf.org/doc/html/rfc6532)
- [RFC 2152 - UTF-7 - A Mail-Safe Transformation Format of Unicode](https://datatracker.ietf.org/doc/html/rfc2152)
- [RFC 2369 - The Use of URLs as Meta-Syntax for Core Mail List Commands and their Transport through Message Header Fields](https://datatracker.ietf.org/doc/html/rfc2369)
- [RFC 2919 - List-Id: A Structured Field and Namespace for the Identification of Mailing Lists](https://datatracker.ietf.org/doc/html/rfc2919)
- [RFC 3339 - Date and Time on the Internet: Timestamps](https://datatracker.ietf.org/doc/html/rfc3339)
- [RFC 8621 - The JSON Meta Application Protocol (JMAP) for Mail (Section 4.1.4)](https://datatracker.ietf.org/doc/html/rfc8621#section-4.1.4)
## Supported Character Sets
@@ -9,59 +9,63 @@
* except according to those terms.
*/
use mail_parser::{Addr, Address, BodyPart, Group, Message, MessagePart, MimeFieldGet};
use mail_parser::*;
fn main() {
let input = concat!(
"From: Art Vandelay <art@vandelay.com> (Vandelay Industries)\n",
"To: \"Colleagues\": \"James Smythe\" <james@vandelay.com>; Friends:\n",
" jane@example.com, =?UTF-8?Q?John_Sm=C3=AEth?= <john@example.com>;\n",
"Date: Sat, 20 Nov 2021 14:22:01 -0800\n",
"Subject: Why not both importing AND exporting? =?utf-8?b?4pi6?=\n",
"Content-Type: multipart/mixed; boundary=\"festivus\";\n\n",
"--festivus\n",
"Content-Type: text/html; charset=\"us-ascii\"\n",
"Content-Transfer-Encoding: base64\n\n",
"PGh0bWw+PHA+SSB3YXMgdGhpbmtpbmcgYWJvdXQgcXVpdHRpbmcgdGhlICZsZHF1bztle\n",
"HBvcnRpbmcmcmRxdW87IHRvIGZvY3VzIGp1c3Qgb24gdGhlICZsZHF1bztpbXBvcnRpbm\n",
"cmcmRxdW87LDwvcD48cD5idXQgdGhlbiBJIHRob3VnaHQsIHdoeSBub3QgZG8gYm90aD8\n",
"gJiN4MjYzQTs8L3A+PC9odG1sPg==\n",
"--festivus\n",
"Content-Type: message/rfc822\n\n",
"From: \"Cosmo Kramer\" <kramer@kramerica.com>\n",
"Subject: Exporting my book about coffee tables\n",
"Content-Type: multipart/mixed; boundary=\"giddyup\";\n\n",
"--giddyup\n",
"Content-Type: text/plain; charset=\"utf-16\"\n",
"Content-Transfer-Encoding: quoted-printable\n\n",
"=FF=FE=0C!5=D8\"=DD5=D8)=DD5=D8-=DD =005=D8*=DD5=D8\"=DD =005=D8\"=\n",
"=DD5=D85=DD5=D8-=DD5=D8,=DD5=D8/=DD5=D81=DD =005=D8*=DD5=D86=DD =\n",
"=005=D8=1F=DD5=D8,=DD5=D8,=DD5=D8(=DD =005=D8-=DD5=D8)=DD5=D8\"=\n",
"=DD5=D8=1E=DD5=D80=DD5=D8\"=DD!=00\n",
"--giddyup\n",
"Content-Type: image/gif; name*1=\"about \"; name*0=\"Book \";\n",
" name*2*=utf-8''%e2%98%95 tables.gif\n",
"Content-Transfer-Encoding: Base64\n",
"Content-Disposition: attachment\n\n",
"R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7\n",
"--giddyup--\n",
"--festivus--\n",
)
.as_bytes();
let input = br#"From: Art Vandelay <art@vandelay.com> (Vandelay Industries)
To: "Colleagues": "James Smythe" <james@vandelay.com>; Friends:
jane@example.com, =?UTF-8?Q?John_Sm=C3=AEth?= <john@example.com>;
Date: Sat, 20 Nov 2021 14:22:01 -0800
Subject: Why not both importing AND exporting? =?utf-8?b?4pi6?=
Content-Type: multipart/mixed; boundary="festivus";
let message = Message::parse(input);
--festivus
Content-Type: text/html; charset="us-ascii"
Content-Transfer-Encoding: base64
PGh0bWw+PHA+SSB3YXMgdGhpbmtpbmcgYWJvdXQgcXVpdHRpbmcgdGhlICZsZHF1bztle
HBvcnRpbmcmcmRxdW87IHRvIGZvY3VzIGp1c3Qgb24gdGhlICZsZHF1bztpbXBvcnRpbm
cmcmRxdW87LDwvcD48cD5idXQgdGhlbiBJIHRob3VnaHQsIHdoeSBub3QgZG8gYm90aD8
gJiN4MjYzQTs8L3A+PC9odG1sPg==
--festivus
Content-Type: message/rfc822
From: "Cosmo Kramer" <kramer@kramerica.com>
Subject: Exporting my book about coffee tables
Content-Type: multipart/mixed; boundary="giddyup";
--giddyup
Content-Type: text/plain; charset="utf-16"
Content-Transfer-Encoding: quoted-printable
=FF=FE=0C!5=D8"=DD5=D8)=DD5=D8-=DD =005=D8*=DD5=D8"=DD =005=D8"=
=DD5=D85=DD5=D8-=DD5=D8,=DD5=D8/=DD5=D81=DD =005=D8*=DD5=D86=DD =
=005=D8=1F=DD5=D8,=DD5=D8,=DD5=D8(=DD =005=D8-=DD5=D8)=DD5=D8"=
=DD5=D8=1E=DD5=D80=DD5=D8"=DD!=00
--giddyup
Content-Type: image/gif; name*1="about "; name*0="Book ";
name*2*=utf-8''%e2%98%95 tables.gif
Content-Transfer-Encoding: Base64
Content-Disposition: attachment
R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7
--giddyup--
--festivus--
"#;
let message = Message::parse(input).unwrap();
// Parses addresses (including comments), lists and groups
assert_eq!(
message.get_from(),
&Address::Address(Addr {
&HeaderValue::Address(Addr {
name: Some("Art Vandelay (Vandelay Industries)".into()),
address: Some("art@vandelay.com".into())
})
);
assert_eq!(
message.get_to(),
&Address::GroupList(vec![
&HeaderValue::GroupList(vec![
Group {
name: Some("Colleagues".into()),
addresses: vec![Addr {
@@ -98,7 +102,7 @@ fn main() {
// HTML and text body parts are returned conforming to RFC8621, Section 4.1.4
assert_eq!(
message.get_html_body(0).unwrap().to_string(),
message.get_html_body(0).unwrap(),
concat!(
"<html><p>I was thinking about quitting the &ldquo;exporting&rdquo; to ",
"focus just on the &ldquo;importing&rdquo;,</p><p>but then I thought,",
@@ -108,7 +112,7 @@ fn main() {
// HTML parts are converted to plain text (and viceversa) when missing
assert_eq!(
message.get_text_body(0).unwrap().to_string(),
message.get_text_body(0).unwrap(),
concat!(
"I was thinking about quitting the “exporting” to focus just on the",
" “importing”,\nbut then I thought, why not do both? ☺\n"
@@ -116,10 +120,11 @@ fn main() {
);
// Supports nested messages as well as multipart/digest
let nested_message = match message.get_attachment(0).unwrap() {
MessagePart::Message(v) => v,
_ => unreachable!(),
};
let nested_message = message
.get_attachment(0)
.unwrap()
.unwrap_message()
.get_body();
assert_eq!(
nested_message.get_subject().unwrap(),
@@ -128,26 +133,21 @@ fn main() {
// Handles UTF-* as well as many legacy encodings
assert_eq!(
nested_message.get_text_body(0).unwrap().to_string(),
nested_message.get_text_body(0).unwrap(),
"ℌ𝔢𝔩𝔭 𝔪𝔢 𝔢𝔵𝔭𝔬𝔯𝔱 𝔪𝔶 𝔟𝔬𝔬𝔨 𝔭𝔩𝔢𝔞𝔰𝔢!"
);
assert_eq!(
nested_message.get_html_body(0).unwrap().to_string(),
nested_message.get_html_body(0).unwrap(),
"<html><body>ℌ𝔢𝔩𝔭 𝔪𝔢 𝔢𝔵𝔭𝔬𝔯𝔱 𝔪𝔶 𝔟𝔬𝔬𝔨 𝔭𝔩𝔢𝔞𝔰𝔢!</body></html>"
);
let nested_attachment = match nested_message.get_attachment(0).unwrap() {
MessagePart::Binary(v) => v,
_ => unreachable!(),
};
let nested_attachment = nested_message.get_attachment(0).unwrap().unwrap_binary();
assert_eq!(nested_attachment.len(), 42);
// Full RFC2231 support for continuations and character sets
assert_eq!(
nested_attachment
.get_header()
.unwrap()
.get_content_type()
.unwrap()
.get_attribute("name")
+87
View File
@@ -0,0 +1,87 @@
/*
* Copyright Stalwart Labs, Minter Ltd. See the COPYING
* file at the top-level directory of this distribution.
*
* Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
* https://www.apache.org/licenses/LICENSE-2.0> or the MIT license
* <LICENSE-MIT or https://opensource.org/licenses/MIT>, at your
* option. This file may not be copied, modified, or distributed
* except according to those terms.
*/
use mail_parser::*;
fn main() {
let input = br#"From: Art Vandelay <art@vandelay.com> (Vandelay Industries)
To: "Colleagues": "James Smythe" <james@vandelay.com>; Friends:
jane@example.com, =?UTF-8?Q?John_Sm=C3=AEth?= <john@example.com>;
Date: Sat, 20 Nov 2021 14:22:01 -0800
Subject: Why not both importing AND exporting? =?utf-8?b?4pi6?=
Content-Type: multipart/mixed; boundary="festivus";
--festivus
Content-Type: text/html; charset="us-ascii"
Content-Transfer-Encoding: base64
PGh0bWw+PHA+SSB3YXMgdGhpbmtpbmcgYWJvdXQgcXVpdHRpbmcgdGhlICZsZHF1bztle
HBvcnRpbmcmcmRxdW87IHRvIGZvY3VzIGp1c3Qgb24gdGhlICZsZHF1bztpbXBvcnRpbm
cmcmRxdW87LDwvcD48cD5idXQgdGhlbiBJIHRob3VnaHQsIHdoeSBub3QgZG8gYm90aD8
gJiN4MjYzQTs8L3A+PC9odG1sPg==
--festivus
Content-Type: message/rfc822; name="Exporting my book about coffee tables.eml"
Content-Disposition: inline; filename="Exporting my book about coffee tables.eml"
Content-Transfer-Encoding: 7bit
From: "Cosmo Kramer" <kramer@kramerica.com>
Subject: Exporting my book about coffee tables
Content-Type: multipart/mixed; boundary="giddyup";
--giddyup
Content-Type: text/plain; charset="utf-16"
Content-Transfer-Encoding: quoted-printable
=FF=FE=0C!5=D8"=DD5=D8)=DD5=D8-=DD =005=D8*=DD5=D8"=DD =005=D8"=
=DD5=D85=DD5=D8-=DD5=D8,=DD5=D8/=DD5=D81=DD =005=D8*=DD5=D86=DD =
=005=D8=1F=DD5=D8,=DD5=D8,=DD5=D8(=DD =005=D8-=DD5=D8)=DD5=D8"=
=DD5=D8=1E=DD5=D80=DD5=D8"=DD!=00
--giddyup
Content-Type: image/gif; name*1="about "; name*0="Book ";
name*2*=utf-8''%e2%98%95 tables.gif
Content-Transfer-Encoding: Base64
Content-Disposition: attachment
R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7
--giddyup--
--festivus--
"#;
write_attachments(&Message::parse(input).unwrap());
}
fn write_attachments(message: &Message) {
for attachment in message.get_attachments() {
match attachment {
MessagePart::Text(text) | MessagePart::Html(text) => write_part(text),
MessagePart::Binary(blob) | MessagePart::InlineBinary(blob) => write_part(blob),
MessagePart::Message(message) => {
write_part(message);
write_attachments(message.get_body());
}
_ => (),
}
}
}
fn write_part<'x>(part: &'x impl BodyPart<'x>) {
std::fs::write(
part.get_content_disposition()
.and_then(|cd| cd.get_attribute("filename"))
.unwrap_or_else(|| {
part.get_content_type()
.and_then(|ct| ct.get_attribute("name"))
.unwrap_or("Untitled")
}),
part.get_contents(),
)
.unwrap();
}
+682 -636
View File
File diff suppressed because it is too large Load Diff
+9 -21
View File
@@ -12,21 +12,10 @@
use std::borrow::Cow;
use crate::{
decoders::encoded_word::decode_rfc2047, parsers::message::MessageStream, Addr, Address, Group,
decoders::encoded_word::decode_rfc2047, parsers::message::MessageStream, Addr, Group,
HeaderValue,
};
impl<'x> Default for Address<'x> {
fn default() -> Self {
Address::Empty
}
}
impl<'x> Address<'x> {
pub fn is_empty(&self) -> bool {
*self == Address::Empty
}
}
#[derive(PartialEq, Clone, Copy, Debug)]
enum AddressState {
Address,
@@ -224,7 +213,7 @@ pub fn add_group(parser: &mut AddressParser) {
});
}
pub fn parse_address<'x>(stream: &mut MessageStream<'x>) -> Address<'x> {
pub fn parse_address<'x>(stream: &mut MessageStream<'x>) -> HeaderValue<'x> {
let mut parser = AddressParser {
token_start: 0,
token_end: 0,
@@ -394,18 +383,18 @@ pub fn parse_address<'x>(stream: &mut MessageStream<'x>) -> Address<'x> {
if parser.group_name.is_some() || !parser.result.is_empty() {
add_group(&mut parser);
if parser.result.len() > 1 {
Address::GroupList(parser.result)
HeaderValue::GroupList(parser.result)
} else {
Address::Group(parser.result.pop().unwrap())
HeaderValue::Group(parser.result.pop().unwrap())
}
} else if !parser.addresses.is_empty() {
if parser.addresses.len() > 1 {
Address::AddressList(parser.addresses)
HeaderValue::AddressList(parser.addresses)
} else {
Address::Address(parser.addresses.pop().unwrap())
HeaderValue::Address(parser.addresses.pop().unwrap())
}
} else {
Address::Empty
HeaderValue::Empty
}
}
@@ -933,10 +922,9 @@ mod tests {
];
for input in inputs {
println!("Testiong {}", input.0);
let str = input.0.to_string();
let result = parse_address(&mut MessageStream::new(str.as_bytes()));
let expected: Address = serde_yaml::from_str(input.1).unwrap_or(Address::Empty);
let expected: HeaderValue = serde_yaml::from_str(input.1).unwrap_or(HeaderValue::Empty);
/*if input.0.len() >= 70 {
println!(
File diff suppressed because it is too large Load Diff
+11 -7
View File
@@ -11,7 +11,7 @@
use std::fmt;
use crate::{parsers::message::MessageStream, DateTime};
use crate::{parsers::message::MessageStream, DateTime, HeaderValue};
impl DateTime {
/// Returns an ISO-8601 representation of the parsed RFC5322 datetime field
@@ -37,7 +37,7 @@ impl fmt::Display for DateTime {
}
}
pub fn parse_date(stream: &mut MessageStream) -> Option<DateTime> {
pub fn parse_date<'x>(stream: &mut MessageStream<'x>) -> HeaderValue<'x> {
let mut pos = 0;
let mut parts = [0u32; 7];
let mut parts_sizes = [
@@ -151,7 +151,7 @@ pub fn parse_date(stream: &mut MessageStream) -> Option<DateTime> {
}
if pos >= 6 {
Some(DateTime {
HeaderValue::DateTime(DateTime {
year: if (1..=99).contains(&parts[2]) {
parts[2] + 1900
} else {
@@ -171,7 +171,7 @@ pub fn parse_date(stream: &mut MessageStream) -> Option<DateTime> {
tz_before_gmt: !is_plus,
})
} else {
None
HeaderValue::Empty
}
}
@@ -195,7 +195,10 @@ pub static MONTH_MAP: &[u8; 31] = &[
#[cfg(test)]
mod tests {
use crate::parsers::{fields::date::parse_date, message::MessageStream};
use crate::{
parsers::{fields::date::parse_date, message::MessageStream},
HeaderValue,
};
#[test]
fn parse_dates() {
@@ -262,14 +265,15 @@ mod tests {
for input in inputs {
let str = input.0.to_string();
match parse_date(&mut MessageStream::new(str.as_bytes())) {
Some(date) => {
HeaderValue::DateTime(date) => {
//println!("{} -> {}", input.0.escape_debug(), date.to_iso8601());
assert_eq!(input.1, date.to_iso8601());
}
None => {
HeaderValue::Empty => {
//println!("{} -> None", input.0.escape_debug());
assert!(input.1.is_empty());
}
_ => panic!("Unexpected result"),
}
}
}
+19 -12
View File
@@ -9,11 +9,9 @@
* except according to those terms.
*/
use std::borrow::Cow;
use crate::{parsers::message::MessageStream, HeaderValue};
use crate::parsers::message::MessageStream;
pub fn parse_id<'x>(stream: &mut MessageStream<'x>) -> Option<Vec<Cow<'x, str>>> {
pub fn parse_id<'x>(stream: &mut MessageStream<'x>) -> HeaderValue<'x> {
let mut token_start: usize = 0;
let mut token_end: usize = 0;
let mut is_id_part = false;
@@ -31,7 +29,11 @@ pub fn parse_id<'x>(stream: &mut MessageStream<'x>) -> Option<Vec<Cow<'x, str>>>
continue;
}
_ => {
return if !ids.is_empty() { Some(ids) } else { None };
return match ids.len() {
1 => HeaderValue::Text(ids.pop().unwrap()),
0 => HeaderValue::Empty,
_ => HeaderValue::TextList(ids),
};
}
},
b'<' => {
@@ -60,13 +62,14 @@ pub fn parse_id<'x>(stream: &mut MessageStream<'x>) -> Option<Vec<Cow<'x, str>>>
}
}
None
HeaderValue::Empty
}
#[cfg(test)]
mod tests {
use crate::parsers::fields::id::parse_id;
use crate::parsers::message::MessageStream;
use crate::HeaderValue;
#[test]
fn parse_message_ids() {
@@ -103,12 +106,16 @@ mod tests {
for input in inputs {
let str = input.0.to_string();
assert_eq!(
input.1,
parse_id(&mut MessageStream::new(str.as_bytes())).unwrap(),
"Failed to parse '{:?}'",
input.0
);
match parse_id(&mut MessageStream::new(str.as_bytes())) {
HeaderValue::TextList(ids) => {
assert_eq!(ids, input.1, "Failed to parse '{:?}'", input.0);
}
HeaderValue::Text(id) => {
assert!(input.1.len() == 1, "Failed to parse '{:?}'", input.0);
assert_eq!(id, input.1[0], "Failed to parse '{:?}'", input.0);
}
_ => panic!("Unexpected result"),
}
}
}
}
+19 -11
View File
@@ -11,7 +11,7 @@
use std::borrow::Cow;
use crate::{decoders::encoded_word::decode_rfc2047, parsers::message::MessageStream};
use crate::{decoders::encoded_word::decode_rfc2047, parsers::message::MessageStream, HeaderValue};
struct ListParser<'x> {
token_start: usize,
@@ -51,7 +51,7 @@ fn add_tokens_to_list(parser: &mut ListParser) {
}
}
pub fn parse_comma_separared<'x>(stream: &mut MessageStream<'x>) -> Option<Vec<Cow<'x, str>>> {
pub fn parse_comma_separared<'x>(stream: &mut MessageStream<'x>) -> HeaderValue<'x> {
let mut parser = ListParser {
token_start: 0,
token_end: 0,
@@ -80,10 +80,10 @@ pub fn parse_comma_separared<'x>(stream: &mut MessageStream<'x>) -> Option<Vec<C
_ => {
add_tokens_to_list(&mut parser);
return if !parser.list.is_empty() {
parser.list.into()
} else {
None
return match parser.list.len() {
1 => HeaderValue::Text(parser.list.pop().unwrap()),
0 => HeaderValue::Empty,
_ => HeaderValue::TextList(parser.list),
};
}
}
@@ -123,13 +123,14 @@ pub fn parse_comma_separared<'x>(stream: &mut MessageStream<'x>) -> Option<Vec<C
parser.token_end = stream.pos;
}
None
HeaderValue::Empty
}
#[cfg(test)]
mod tests {
use crate::parsers::fields::list::parse_comma_separared;
use crate::parsers::message::MessageStream;
use crate::HeaderValue;
#[test]
fn parse_comma_separated_text() {
@@ -172,10 +173,17 @@ mod tests {
for input in inputs {
let str = input.0.to_string();
assert_eq!(
parse_comma_separared(&mut MessageStream::new(str.as_bytes()),).unwrap(),
input.1
);
match parse_comma_separared(&mut MessageStream::new(str.as_bytes())) {
HeaderValue::TextList(ids) => {
assert_eq!(ids, input.1, "Failed to parse '{:?}'", input.0);
}
HeaderValue::Text(id) => {
assert!(input.1.len() == 1, "Failed to parse '{:?}'", input.0);
assert_eq!(id, input.1[0], "Failed to parse '{:?}'", input.0);
}
_ => panic!("Unexpected result"),
}
}
}
}
-569
View File
@@ -9,20 +9,6 @@
* except according to those terms.
*/
use std::borrow::Cow;
use crate::{Address, DateTime, MessageHeader, MimeFieldGet, MimeHeader};
use self::{
address::parse_address,
id::parse_id,
list::parse_comma_separared,
raw::{parse_and_ignore, parse_raw},
unstructured::parse_unstructured,
};
use super::message::MessageStream;
pub mod address;
pub mod content_type;
pub mod date;
@@ -30,558 +16,3 @@ pub mod id;
pub mod list;
pub mod raw;
pub mod unstructured;
pub trait MessageField<'x>: FieldSet<'x> + MimeFieldGet<'x> {}
impl<'x, T: FieldSet<'x> + MimeFieldGet<'x>> MessageField<'x> for T {}
pub trait FieldSet<'x> {
fn set_date(&mut self, stream: &mut MessageStream<'x>);
fn set_sender(&mut self, stream: &mut MessageStream<'x>);
fn set_received(&mut self, stream: &mut MessageStream<'x>);
fn set_references(&mut self, stream: &mut MessageStream<'x>);
fn set_cc(&mut self, stream: &mut MessageStream<'x>);
fn set_comments(&mut self, stream: &mut MessageStream<'x>);
fn set_resent_cc(&mut self, stream: &mut MessageStream<'x>);
fn set_content_id(&mut self, stream: &mut MessageStream<'x>);
fn set_resent_message_id(&mut self, stream: &mut MessageStream<'x>);
fn set_reply_to(&mut self, stream: &mut MessageStream<'x>);
fn set_resent_to(&mut self, stream: &mut MessageStream<'x>);
fn set_resent_bcc(&mut self, stream: &mut MessageStream<'x>);
fn set_subject(&mut self, stream: &mut MessageStream<'x>);
fn set_keywords(&mut self, stream: &mut MessageStream<'x>);
fn set_list_help(&mut self, stream: &mut MessageStream<'x>);
fn set_list_id(&mut self, stream: &mut MessageStream<'x>);
fn set_list_owner(&mut self, stream: &mut MessageStream<'x>);
fn set_resent_date(&mut self, stream: &mut MessageStream<'x>);
fn set_to(&mut self, stream: &mut MessageStream<'x>);
fn set_bcc(&mut self, stream: &mut MessageStream<'x>);
fn set_from(&mut self, stream: &mut MessageStream<'x>);
fn set_content_transfer_encoding(&mut self, stream: &mut MessageStream<'x>);
fn set_return_path(&mut self, stream: &mut MessageStream<'x>);
fn set_list_archive(&mut self, stream: &mut MessageStream<'x>);
fn set_resent_sender(&mut self, stream: &mut MessageStream<'x>);
fn set_list_subscribe(&mut self, stream: &mut MessageStream<'x>);
fn set_message_id(&mut self, stream: &mut MessageStream<'x>);
fn set_content_type(&mut self, stream: &mut MessageStream<'x>);
fn set_list_post(&mut self, stream: &mut MessageStream<'x>);
fn set_in_reply_to(&mut self, stream: &mut MessageStream<'x>);
fn set_content_description(&mut self, stream: &mut MessageStream<'x>);
fn set_resent_from(&mut self, stream: &mut MessageStream<'x>);
fn set_content_disposition(&mut self, stream: &mut MessageStream<'x>);
fn set_list_unsubscribe(&mut self, stream: &mut MessageStream<'x>);
fn set_mime_version(&mut self, stream: &mut MessageStream<'x>);
fn set_unsupported(&mut self, stream: &mut MessageStream<'x>, name: &'x [u8]);
}
impl<'x> FieldSet<'x> for MessageHeader<'x> {
fn set_date(&mut self, stream: &mut MessageStream<'x>) {
self.date = self::date::parse_date(stream);
}
fn set_sender(&mut self, stream: &mut MessageStream<'x>) {
self.sender = parse_address(stream);
}
fn set_received(&mut self, stream: &mut MessageStream<'x>) {
append_line(&mut self.received, parse_raw(stream));
}
fn set_references(&mut self, stream: &mut MessageStream<'x>) {
self.references = parse_id(stream);
}
fn set_cc(&mut self, stream: &mut MessageStream<'x>) {
self.cc = parse_address(stream);
}
fn set_comments(&mut self, stream: &mut MessageStream<'x>) {
append_line(&mut self.comments, parse_unstructured(stream));
}
fn set_resent_cc(&mut self, stream: &mut MessageStream<'x>) {
append_address_line(&mut self.resent_cc, parse_address(stream));
}
fn set_resent_message_id(&mut self, stream: &mut MessageStream<'x>) {
append_line_many(&mut self.resent_message_id, parse_id(stream));
}
fn set_reply_to(&mut self, stream: &mut MessageStream<'x>) {
self.reply_to = parse_address(stream);
}
fn set_resent_to(&mut self, stream: &mut MessageStream<'x>) {
append_address_line(&mut self.resent_to, parse_address(stream));
}
fn set_resent_bcc(&mut self, stream: &mut MessageStream<'x>) {
append_address_line(&mut self.resent_bcc, parse_address(stream));
}
fn set_subject(&mut self, stream: &mut MessageStream<'x>) {
self.subject = parse_unstructured(stream);
}
fn set_keywords(&mut self, stream: &mut MessageStream<'x>) {
append_line_many(&mut self.keywords, parse_comma_separared(stream));
}
fn set_list_help(&mut self, stream: &mut MessageStream<'x>) {
self.list_help = parse_address(stream);
}
fn set_list_id(&mut self, stream: &mut MessageStream<'x>) {
self.list_id = parse_address(stream);
}
fn set_list_owner(&mut self, stream: &mut MessageStream<'x>) {
self.list_owner = parse_address(stream);
}
fn set_resent_date(&mut self, stream: &mut MessageStream<'x>) {
append_date_line(&mut self.resent_date, self::date::parse_date(stream));
}
fn set_to(&mut self, stream: &mut MessageStream<'x>) {
self.to = parse_address(stream);
}
fn set_bcc(&mut self, stream: &mut MessageStream<'x>) {
self.bcc = parse_address(stream);
}
fn set_from(&mut self, stream: &mut MessageStream<'x>) {
self.from = parse_address(stream);
}
fn set_return_path(&mut self, stream: &mut MessageStream<'x>) {
append_line_many(&mut self.return_path, parse_id(stream));
}
fn set_list_archive(&mut self, stream: &mut MessageStream<'x>) {
self.list_archive = parse_address(stream);
}
fn set_resent_sender(&mut self, stream: &mut MessageStream<'x>) {
append_address_line(&mut self.resent_sender, parse_address(stream));
}
fn set_list_subscribe(&mut self, stream: &mut MessageStream<'x>) {
self.list_subscribe = parse_address(stream);
}
fn set_message_id(&mut self, stream: &mut MessageStream<'x>) {
self.message_id = parse_id(stream).map(|mut v| v.pop().unwrap());
}
fn set_list_post(&mut self, stream: &mut MessageStream<'x>) {
self.list_post = parse_address(stream);
}
fn set_in_reply_to(&mut self, stream: &mut MessageStream<'x>) {
self.reply_to = parse_address(stream);
}
fn set_resent_from(&mut self, stream: &mut MessageStream<'x>) {
append_address_line(&mut self.resent_from, parse_address(stream));
}
fn set_list_unsubscribe(&mut self, stream: &mut MessageStream<'x>) {
self.list_unsubscribe = parse_address(stream);
}
fn set_mime_version(&mut self, stream: &mut MessageStream<'x>) {
self.mime_version = parse_raw(stream);
}
fn set_unsupported(&mut self, stream: &mut MessageStream<'x>, name: &'x [u8]) {
if let Ok(name) = std::str::from_utf8(name) {
if let Some(value) = parse_unstructured(stream) {
if let Some(arr) = self.others.get_mut(name) {
arr.push(value);
} else {
self.others.insert(name, vec![value]);
}
}
}
}
fn set_content_id(&mut self, stream: &mut MessageStream<'x>) {
self.content_id = parse_id(stream).map(|mut v| v.pop().unwrap());
}
fn set_content_transfer_encoding(&mut self, stream: &mut MessageStream<'x>) {
self.content_transfer_encoding = parse_unstructured(stream);
}
fn set_content_type(&mut self, stream: &mut MessageStream<'x>) {
self.content_type = self::content_type::parse_content_type(stream);
}
fn set_content_description(&mut self, stream: &mut MessageStream<'x>) {
self.content_description = parse_unstructured(stream);
}
fn set_content_disposition(&mut self, stream: &mut MessageStream<'x>) {
self.content_disposition = self::content_type::parse_content_type(stream);
}
}
impl<'x> FieldSet<'x> for MimeHeader<'x> {
fn set_date(&mut self, stream: &mut MessageStream<'x>) {
parse_and_ignore(stream);
}
fn set_sender(&mut self, stream: &mut MessageStream<'x>) {
parse_and_ignore(stream);
}
fn set_received(&mut self, stream: &mut MessageStream<'x>) {
parse_and_ignore(stream);
}
fn set_references(&mut self, stream: &mut MessageStream<'x>) {
parse_and_ignore(stream);
}
fn set_cc(&mut self, stream: &mut MessageStream<'x>) {
parse_and_ignore(stream);
}
fn set_comments(&mut self, stream: &mut MessageStream<'x>) {
parse_and_ignore(stream);
}
fn set_resent_cc(&mut self, stream: &mut MessageStream<'x>) {
parse_and_ignore(stream);
}
fn set_resent_message_id(&mut self, stream: &mut MessageStream<'x>) {
parse_and_ignore(stream);
}
fn set_reply_to(&mut self, stream: &mut MessageStream<'x>) {
parse_and_ignore(stream);
}
fn set_resent_to(&mut self, stream: &mut MessageStream<'x>) {
parse_and_ignore(stream);
}
fn set_resent_bcc(&mut self, stream: &mut MessageStream<'x>) {
parse_and_ignore(stream);
}
fn set_subject(&mut self, stream: &mut MessageStream<'x>) {
parse_and_ignore(stream);
}
fn set_keywords(&mut self, stream: &mut MessageStream<'x>) {
parse_and_ignore(stream);
}
fn set_list_help(&mut self, stream: &mut MessageStream<'x>) {
parse_and_ignore(stream);
}
fn set_list_id(&mut self, stream: &mut MessageStream<'x>) {
parse_and_ignore(stream);
}
fn set_list_owner(&mut self, stream: &mut MessageStream<'x>) {
parse_and_ignore(stream);
}
fn set_resent_date(&mut self, stream: &mut MessageStream<'x>) {
parse_and_ignore(stream);
}
fn set_to(&mut self, stream: &mut MessageStream<'x>) {
parse_and_ignore(stream);
}
fn set_bcc(&mut self, stream: &mut MessageStream<'x>) {
parse_and_ignore(stream);
}
fn set_from(&mut self, stream: &mut MessageStream<'x>) {
parse_and_ignore(stream);
}
fn set_return_path(&mut self, stream: &mut MessageStream<'x>) {
parse_and_ignore(stream);
}
fn set_list_archive(&mut self, stream: &mut MessageStream<'x>) {
parse_and_ignore(stream);
}
fn set_resent_sender(&mut self, stream: &mut MessageStream<'x>) {
parse_and_ignore(stream);
}
fn set_list_subscribe(&mut self, stream: &mut MessageStream<'x>) {
parse_and_ignore(stream);
}
fn set_message_id(&mut self, stream: &mut MessageStream<'x>) {
parse_and_ignore(stream);
}
fn set_list_post(&mut self, stream: &mut MessageStream<'x>) {
parse_and_ignore(stream);
}
fn set_in_reply_to(&mut self, stream: &mut MessageStream<'x>) {
parse_and_ignore(stream);
}
fn set_resent_from(&mut self, stream: &mut MessageStream<'x>) {
parse_and_ignore(stream);
}
fn set_list_unsubscribe(&mut self, stream: &mut MessageStream<'x>) {
parse_and_ignore(stream);
}
fn set_mime_version(&mut self, stream: &mut MessageStream<'x>) {
parse_and_ignore(stream);
}
fn set_unsupported(&mut self, stream: &mut MessageStream<'x>, _name: &'x [u8]) {
parse_and_ignore(stream);
}
fn set_content_id(&mut self, stream: &mut MessageStream<'x>) {
self.content_id = parse_id(stream).map(|mut v| v.pop().unwrap());
}
fn set_content_transfer_encoding(&mut self, stream: &mut MessageStream<'x>) {
self.content_transfer_encoding = parse_unstructured(stream);
}
fn set_content_type(&mut self, stream: &mut MessageStream<'x>) {
self.content_type = self::content_type::parse_content_type(stream);
}
fn set_content_description(&mut self, stream: &mut MessageStream<'x>) {
self.content_description = parse_unstructured(stream);
}
fn set_content_disposition(&mut self, stream: &mut MessageStream<'x>) {
self.content_disposition = self::content_type::parse_content_type(stream);
}
}
pub fn parse_date<'x>(header: &mut dyn MessageField<'x>, stream: &mut MessageStream<'x>) {
header.set_date(stream);
}
pub fn parse_sender<'x>(header: &mut dyn MessageField<'x>, stream: &mut MessageStream<'x>) {
header.set_sender(stream);
}
pub fn parse_received<'x>(header: &mut dyn MessageField<'x>, stream: &mut MessageStream<'x>) {
header.set_received(stream);
}
pub fn parse_references<'x>(header: &mut dyn MessageField<'x>, stream: &mut MessageStream<'x>) {
header.set_references(stream);
}
pub fn parse_cc<'x>(header: &mut dyn MessageField<'x>, stream: &mut MessageStream<'x>) {
header.set_cc(stream);
}
pub fn parse_comments<'x>(header: &mut dyn MessageField<'x>, stream: &mut MessageStream<'x>) {
header.set_comments(stream);
}
pub fn parse_resent_cc<'x>(header: &mut dyn MessageField<'x>, stream: &mut MessageStream<'x>) {
header.set_resent_cc(stream);
}
pub fn parse_content_id<'x>(header: &mut dyn MessageField<'x>, stream: &mut MessageStream<'x>) {
header.set_content_id(stream);
}
pub fn parse_resent_message_id<'x>(
header: &mut dyn MessageField<'x>,
stream: &mut MessageStream<'x>,
) {
header.set_resent_message_id(stream);
}
pub fn parse_reply_to<'x>(header: &mut dyn MessageField<'x>, stream: &mut MessageStream<'x>) {
header.set_reply_to(stream);
}
pub fn parse_resent_to<'x>(header: &mut dyn MessageField<'x>, stream: &mut MessageStream<'x>) {
header.set_resent_to(stream);
}
pub fn parse_resent_bcc<'x>(header: &mut dyn MessageField<'x>, stream: &mut MessageStream<'x>) {
header.set_resent_bcc(stream);
}
pub fn parse_subject<'x>(header: &mut dyn MessageField<'x>, stream: &mut MessageStream<'x>) {
header.set_subject(stream);
}
pub fn parse_keywords<'x>(header: &mut dyn MessageField<'x>, stream: &mut MessageStream<'x>) {
header.set_keywords(stream);
}
pub fn parse_list_help<'x>(header: &mut dyn MessageField<'x>, stream: &mut MessageStream<'x>) {
header.set_list_help(stream);
}
pub fn parse_list_id<'x>(header: &mut dyn MessageField<'x>, stream: &mut MessageStream<'x>) {
header.set_list_id(stream);
}
pub fn parse_list_owner<'x>(header: &mut dyn MessageField<'x>, stream: &mut MessageStream<'x>) {
header.set_list_owner(stream);
}
pub fn parse_resent_date<'x>(header: &mut dyn MessageField<'x>, stream: &mut MessageStream<'x>) {
header.set_resent_date(stream);
}
pub fn parse_to<'x>(header: &mut dyn MessageField<'x>, stream: &mut MessageStream<'x>) {
header.set_to(stream);
}
pub fn parse_bcc<'x>(header: &mut dyn MessageField<'x>, stream: &mut MessageStream<'x>) {
header.set_bcc(stream);
}
pub fn parse_from<'x>(header: &mut dyn MessageField<'x>, stream: &mut MessageStream<'x>) {
header.set_from(stream);
}
pub fn parse_content_transfer_encoding<'x>(
header: &mut dyn MessageField<'x>,
stream: &mut MessageStream<'x>,
) {
header.set_content_transfer_encoding(stream);
}
pub fn parse_return_path<'x>(header: &mut dyn MessageField<'x>, stream: &mut MessageStream<'x>) {
header.set_return_path(stream);
}
pub fn parse_list_archive<'x>(header: &mut dyn MessageField<'x>, stream: &mut MessageStream<'x>) {
header.set_list_archive(stream);
}
pub fn parse_resent_sender<'x>(header: &mut dyn MessageField<'x>, stream: &mut MessageStream<'x>) {
header.set_resent_sender(stream);
}
pub fn parse_list_subscribe<'x>(header: &mut dyn MessageField<'x>, stream: &mut MessageStream<'x>) {
header.set_list_subscribe(stream);
}
pub fn parse_message_id<'x>(header: &mut dyn MessageField<'x>, stream: &mut MessageStream<'x>) {
header.set_message_id(stream);
}
pub fn parse_content_type<'x>(header: &mut dyn MessageField<'x>, stream: &mut MessageStream<'x>) {
header.set_content_type(stream);
}
pub fn parse_list_post<'x>(header: &mut dyn MessageField<'x>, stream: &mut MessageStream<'x>) {
header.set_list_post(stream);
}
pub fn parse_in_reply_to<'x>(header: &mut dyn MessageField<'x>, stream: &mut MessageStream<'x>) {
header.set_in_reply_to(stream);
}
pub fn parse_content_description<'x>(
header: &mut dyn MessageField<'x>,
stream: &mut MessageStream<'x>,
) {
header.set_content_description(stream);
}
pub fn parse_resent_from<'x>(header: &mut dyn MessageField<'x>, stream: &mut MessageStream<'x>) {
header.set_resent_from(stream);
}
pub fn parse_content_disposition<'x>(
header: &mut dyn MessageField<'x>,
stream: &mut MessageStream<'x>,
) {
header.set_content_disposition(stream);
}
pub fn parse_list_unsubscribe<'x>(
header: &mut dyn MessageField<'x>,
stream: &mut MessageStream<'x>,
) {
header.set_list_unsubscribe(stream);
}
pub fn parse_mime_version<'x>(header: &mut dyn MessageField<'x>, stream: &mut MessageStream<'x>) {
header.set_mime_version(stream);
}
fn append_address_line<'x>(value: &mut Address<'x>, new_value: Address<'x>) {
if new_value != Address::Empty {
match value {
Address::Collection(ref mut arr) => {
arr.push(new_value);
}
Address::Empty => *value = new_value,
_ => {
*value = Address::Collection(vec![std::mem::take(value), new_value]);
}
}
}
}
fn append_date_line(value: &mut Option<Vec<DateTime>>, new_value: Option<DateTime>) {
if let Some(new_value) = new_value {
if let Some(value) = value {
value.push(new_value);
} else {
*value = Some(vec![new_value]);
}
}
}
fn append_line<'x>(value: &mut Option<Vec<Cow<'x, str>>>, new_value: Option<Cow<'x, str>>) {
if let Some(new_value) = new_value {
if let Some(value) = value {
value.push(new_value);
} else {
*value = Some(vec![new_value]);
}
}
}
fn append_line_many<'x>(
value: &mut Option<Vec<Cow<'x, str>>>,
new_value: Option<Vec<Cow<'x, str>>>,
) {
if let Some(mut new_value) = new_value {
if let Some(value) = value {
value.append(&mut new_value);
} else {
*value = Some(new_value);
}
}
}
pub fn parse_no_op<'x>(_header: &mut dyn MessageField<'x>, _stream: &mut MessageStream<'x>) {}
pub fn parse_unsupported<'x>(
header: &mut dyn MessageField<'x>,
stream: &mut MessageStream<'x>,
name: &'x [u8],
) {
header.set_unsupported(stream, name);
}
+8 -8
View File
@@ -9,11 +9,9 @@
* except according to those terms.
*/
use std::borrow::Cow;
use crate::{parsers::message::MessageStream, HeaderValue};
use crate::parsers::message::MessageStream;
pub fn parse_raw<'x>(stream: &mut MessageStream<'x>) -> Option<Cow<'x, str>> {
pub fn parse_raw<'x>(stream: &mut MessageStream<'x>) -> HeaderValue<'x> {
let mut token_start: usize = 0;
let mut token_end: usize = 0;
@@ -30,9 +28,11 @@ pub fn parse_raw<'x>(stream: &mut MessageStream<'x>) -> Option<Cow<'x, str>> {
}
_ => {
return if token_start > 0 {
String::from_utf8_lossy(&stream.data[token_start - 1..token_end]).into()
HeaderValue::Text(String::from_utf8_lossy(
&stream.data[token_start - 1..token_end],
))
} else {
None
HeaderValue::Empty
};
}
},
@@ -47,7 +47,7 @@ pub fn parse_raw<'x>(stream: &mut MessageStream<'x>) -> Option<Cow<'x, str>> {
token_end = stream.pos;
}
None
HeaderValue::Empty
}
pub fn parse_and_ignore(stream: &mut MessageStream) {
@@ -96,7 +96,7 @@ mod tests {
for input in inputs {
let str = input.0.to_string();
assert_eq!(
parse_raw(&mut MessageStream::new(str.as_bytes())).unwrap(),
parse_raw(&mut MessageStream::new(str.as_bytes())).unwrap_text(),
input.1,
"Failed for '{:?}'",
input.0
+7 -7
View File
@@ -11,7 +11,7 @@
use std::borrow::Cow;
use crate::{decoders::encoded_word::decode_rfc2047, parsers::message::MessageStream};
use crate::{decoders::encoded_word::decode_rfc2047, parsers::message::MessageStream, HeaderValue};
struct UnstructuredParser<'x> {
token_start: usize,
token_end: usize,
@@ -37,7 +37,7 @@ fn add_token<'x>(parser: &mut UnstructuredParser<'x>, stream: &MessageStream<'x>
}
}
pub fn parse_unstructured<'x>(stream: &mut MessageStream<'x>) -> Option<Cow<'x, str>> {
pub fn parse_unstructured<'x>(stream: &mut MessageStream<'x>) -> HeaderValue<'x> {
let mut parser = UnstructuredParser {
token_start: 0,
token_end: 0,
@@ -64,9 +64,9 @@ pub fn parse_unstructured<'x>(stream: &mut MessageStream<'x>) -> Option<Cow<'x,
}
_ => {
return match parser.tokens.len() {
1 => parser.tokens.pop().unwrap().into(),
0 => None,
_ => Some(parser.tokens.concat().into()),
1 => HeaderValue::Text(parser.tokens.pop().unwrap()),
0 => HeaderValue::Empty,
_ => HeaderValue::Text(parser.tokens.concat().into()),
};
}
}
@@ -101,7 +101,7 @@ pub fn parse_unstructured<'x>(stream: &mut MessageStream<'x>) -> Option<Cow<'x,
parser.token_end = stream.pos;
}
None
HeaderValue::Empty
}
#[cfg(test)]
@@ -184,7 +184,7 @@ mod tests {
for input in inputs {
let str = input.0.to_string();
assert_eq!(
parse_unstructured(&mut MessageStream::new(str.as_bytes()),).unwrap(),
parse_unstructured(&mut MessageStream::new(str.as_bytes()),).unwrap_text(),
input.1,
"Failed to parse '{:?}'",
input.0
+278 -177
View File
@@ -9,107 +9,155 @@
* except according to those terms.
*/
use crate::{MessageHeader, MimeHeader};
use std::{borrow::Cow, collections::hash_map::Entry};
use crate::{HeaderName, HeaderOffset, HeaderOffsetName, HeaderValue, OtherHeaders, RfcHeaders};
use super::{
fields::{parse_unsupported, MessageField},
fields::{
address::parse_address, content_type::parse_content_type, date::parse_date, id::parse_id,
list::parse_comma_separared, raw::parse_raw, unstructured::parse_unstructured,
},
message::MessageStream,
};
impl<'x> MessageHeader<'x> {
pub fn new() -> MessageHeader<'x> {
MessageHeader {
..Default::default()
}
}
}
impl<'x> MimeHeader<'x> {
pub fn new() -> MimeHeader<'x> {
MimeHeader {
..Default::default()
}
}
pub fn clear(&mut self) {
self.content_description = None;
self.content_disposition = None;
self.content_id = None;
self.content_transfer_encoding = None;
self.content_type = None;
}
pub fn is_empty(&self) -> bool {
self.content_description.is_none()
&& self.content_disposition.is_none()
&& self.content_id.is_none()
&& self.content_transfer_encoding.is_none()
&& self.content_type.is_none()
}
}
#[derive(Debug, PartialEq)]
pub enum HeaderParserResult<'x> {
Supported(fn(&mut dyn MessageField<'x>, &mut MessageStream<'x>)),
Unsupported(&'x [u8]),
Rfc(HeaderName),
Other(Cow<'x, str>),
Lf,
Eof,
}
pub fn parse_headers<'x>(
header: &mut dyn MessageField<'x>,
headers_rfc: &mut RfcHeaders<'x>,
mut headers_other: Option<&mut OtherHeaders<'x>>,
mut headers_offsets: Option<&mut Vec<HeaderOffset<'x>>>,
stream: &mut MessageStream<'x>,
) -> bool {
loop {
match parse_header_name(stream) {
HeaderParserResult::Supported(fnc) => fnc(header, stream),
HeaderParserResult::Unsupported(name) => parse_unsupported(header, stream, name),
let (bytes_read, result) = parse_header_name(&stream.data[stream.pos..]);
stream.pos += bytes_read;
match result {
HeaderParserResult::Rfc(name) => {
let (is_many, parser) = HDR_PARSER[name as usize];
let from_offset = stream.pos;
let value = parser(stream);
if let Some(headers_offsets) = headers_offsets.as_mut() {
headers_offsets.push(HeaderOffset {
name: HeaderOffsetName::Rfc(name),
start: from_offset,
end: stream.pos,
});
}
if !value.is_empty() {
if is_many {
match headers_rfc.entry(name) {
Entry::Occupied(mut e) => {
if let HeaderValue::Collection(col) = e.get_mut() {
col.push(value);
} else {
let old_value = e.remove();
headers_rfc.insert(
name,
HeaderValue::Collection(vec![old_value, value]),
);
}
}
Entry::Vacant(e) => {
e.insert(value);
}
}
} else {
headers_rfc.insert(name, value);
}
}
}
HeaderParserResult::Other(name) => {
if let Some(headers_other) = headers_other.as_mut() {
let from_offset = stream.pos;
let value = parse_raw(stream);
if let Some(headers_offsets) = headers_offsets.as_mut() {
headers_offsets.push(HeaderOffset {
name: HeaderOffsetName::Other(name.clone()),
start: from_offset,
end: stream.pos,
});
}
if !value.is_empty() {
match headers_other.entry(name.clone()) {
Entry::Occupied(mut e) => {
if let HeaderValue::Collection(col) = e.get_mut() {
col.push(value);
} else {
let old_value = e.remove();
headers_other.insert(
name,
HeaderValue::Collection(vec![old_value, value]),
);
}
}
Entry::Vacant(e) => {
e.insert(value);
}
}
}
}
}
HeaderParserResult::Lf => return true,
HeaderParserResult::Eof => return false,
}
}
}
pub fn parse_header_name<'x>(stream: &mut MessageStream<'x>) -> HeaderParserResult<'x> {
pub fn parse_header_name(data: &[u8]) -> (usize, HeaderParserResult) {
let mut token_start: usize = 0;
let mut token_end: usize = 0;
let mut token_len: usize = 0;
let mut token_hash: usize = 0;
let mut last_ch: u8 = 0;
let mut bytes_read: usize = 0;
for ch in stream.data[stream.pos..].iter() {
stream.pos += 1;
for ch in data.iter() {
bytes_read += 1;
match ch {
b':' => {
if token_start != 0 {
let field = &stream.data[token_start - 1..token_end];
let field = &data[token_start - 1..token_end];
if (2..=25).contains(&token_len) {
token_hash +=
token_len + HDR_HASH[last_ch.to_ascii_lowercase() as usize] as usize;
if (4..=61).contains(&token_hash) {
if (4..=72).contains(&token_hash) {
let token_hash = token_hash - 4;
if field.eq_ignore_ascii_case(HDR_NAMES[token_hash]) {
return HeaderParserResult::Supported(HDR_FNCS[token_hash]);
return (bytes_read, HeaderParserResult::Rfc(HDR_MAP[token_hash]));
}
}
}
return HeaderParserResult::Unsupported(field);
return (
bytes_read,
HeaderParserResult::Other(String::from_utf8_lossy(field)),
);
}
}
b'\n' => {
stream.pos -= 1;
return HeaderParserResult::Lf;
return (bytes_read - 1, HeaderParserResult::Lf);
}
_ => {
if !(*ch).is_ascii_whitespace() {
if token_start == 0 {
token_start = stream.pos;
token_start = bytes_read;
token_end = token_start;
} else {
token_end = stream.pos;
token_end = bytes_read;
last_ch = *ch;
}
@@ -122,199 +170,252 @@ pub fn parse_header_name<'x>(stream: &mut MessageStream<'x>) -> HeaderParserResu
}
}
HeaderParserResult::Eof
(bytes_read, HeaderParserResult::Eof)
}
impl From<HeaderName> for u8 {
fn from(name: HeaderName) -> Self {
name as u8
}
}
#[cfg(test)]
mod tests {
use crate::parsers::{
fields::{parse_from, parse_mime_version, parse_received, parse_subject},
header::parse_header_name,
message::MessageStream,
};
use crate::{parsers::header::parse_header_name, HeaderName};
use super::HeaderParserResult;
#[test]
fn header_name_parse() {
let inputs = [
("From: ", HeaderParserResult::Supported(parse_from)),
("receiVED: ", HeaderParserResult::Supported(parse_received)),
("From: ", HeaderParserResult::Rfc(HeaderName::From)),
("receiVED: ", HeaderParserResult::Rfc(HeaderName::Received)),
(
" subject : ",
HeaderParserResult::Supported(parse_subject),
HeaderParserResult::Rfc(HeaderName::Subject),
),
(
"X-Custom-Field : ",
HeaderParserResult::Unsupported(b"X-Custom-Field"),
HeaderParserResult::Other("X-Custom-Field".into()),
),
(" T : ", HeaderParserResult::Unsupported(b"T")),
(" T : ", HeaderParserResult::Other("T".into())),
(
"mal formed: ",
HeaderParserResult::Unsupported(b"mal formed"),
HeaderParserResult::Other("mal formed".into()),
),
(
"MIME-version : ",
HeaderParserResult::Supported(parse_mime_version),
HeaderParserResult::Rfc(HeaderName::MimeVersion),
),
];
for input in inputs {
let str = input.0.to_string();
match parse_header_name(&mut MessageStream::new(str.as_bytes())) {
HeaderParserResult::Supported(f) => {
if let HeaderParserResult::Supported(val) = input.1 {
if f as usize == val as usize {
continue;
}
}
}
HeaderParserResult::Unsupported(name) => {
if let HeaderParserResult::Unsupported(val) = input.1 {
if name == val {
continue;
}
}
}
_ => panic!("Eof/Lf for '{:?}'", input.0),
}
panic!("Failed to parse '{:?}'", input.0)
let (_, result) = parse_header_name(str.as_bytes());
assert_eq!(input.1, result, "Failed to parse '{:?}'", input.0);
}
}
}
#[allow(clippy::type_complexity)]
static HDR_PARSER: &[(
bool,
for<'x, 'y> fn(&mut MessageStream<'x>) -> HeaderValue<'x>,
)] = &[
(false, parse_unstructured), // Subject = 0,
(false, parse_address), // From = 1,
(false, parse_address), // To = 2,
(false, parse_address), // Cc = 3,
(false, parse_date), // Date = 4,
(false, parse_address), // Bcc = 5,
(false, parse_address), // ReplyTo = 6,
(false, parse_address), // Sender = 7,
(true, parse_unstructured), // Comments = 8,
(false, parse_address), // InReplyTo = 9,
(true, parse_comma_separared), // Keywords = 10,
(true, parse_raw), // Received = 11,
(false, parse_id), // MessageId = 12,
(true, parse_id), // References = 13, (RFC 5322 recommends One)
(false, parse_id), // ReturnPath = 14,
(false, parse_raw), // MimeVersion = 15,
(false, parse_unstructured), // ContentDescription = 16,
(false, parse_id), // ContentId = 17,
(false, parse_comma_separared), // ContentLanguage = 18
(false, parse_unstructured), // ContentLocation = 19
(false, parse_unstructured), // ContentTransferEncoding = 20,
(false, parse_content_type), // ContentType = 21,
(false, parse_content_type), // ContentDisposition = 22,
(true, parse_address), // ResentTo = 23,
(true, parse_address), // ResentFrom = 24,
(true, parse_address), // ResentBcc = 25,
(true, parse_address), // ResentCc = 26,
(true, parse_address), // ResentSender = 27,
(true, parse_date), // ResentDate = 28,
(true, parse_id), // ResentMessageId = 29,
(false, parse_address), // ListArchive = 30,
(false, parse_address), // ListHelp = 31,
(false, parse_address), // ListId = 32,
(false, parse_address), // ListOwner = 33,
(false, parse_address), // ListPost = 34,
(false, parse_address), // ListSubscribe = 35,
(false, parse_address), // ListUnsubscribe = 36,
(true, parse_raw), // Other = 37,
];
static HDR_HASH: &[u8] = &[
62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62,
62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62,
62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62,
62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62,
62, 62, 15, 5, 0, 0, 30, 5, 5, 15, 62, 20, 15, 20, 5, 30, 25, 62, 0, 0, 0, 62, 62, 62, 62, 10,
62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62,
62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62,
62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62,
62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62,
62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62,
62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62,
73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73,
73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73,
73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73,
73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73,
73, 0, 20, 5, 0, 0, 25, 0, 5, 20, 73, 25, 25, 30, 10, 10, 5, 73, 0, 0, 15, 73, 73, 73, 73, 20,
73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73,
73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73,
73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73,
73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73,
73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73,
73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73,
];
static HDR_FNCS: &[for<'x, 'y> fn(&mut dyn MessageField<'x>, &mut MessageStream<'x>); 58] = &[
super::fields::parse_date,
super::fields::parse_no_op,
super::fields::parse_sender,
super::fields::parse_subject,
super::fields::parse_received,
super::fields::parse_no_op,
super::fields::parse_references,
super::fields::parse_resent_date,
super::fields::parse_cc,
super::fields::parse_comments,
super::fields::parse_resent_cc,
super::fields::parse_content_id,
super::fields::parse_return_path,
super::fields::parse_resent_message_id,
super::fields::parse_resent_sender,
super::fields::parse_no_op,
super::fields::parse_resent_bcc,
super::fields::parse_no_op,
super::fields::parse_list_id,
super::fields::parse_bcc,
super::fields::parse_list_post,
super::fields::parse_list_owner,
super::fields::parse_no_op,
super::fields::parse_content_type,
super::fields::parse_keywords,
super::fields::parse_content_description,
super::fields::parse_message_id,
super::fields::parse_no_op,
super::fields::parse_to,
super::fields::parse_no_op,
super::fields::parse_list_subscribe,
super::fields::parse_content_transfer_encoding,
super::fields::parse_no_op,
super::fields::parse_no_op,
super::fields::parse_reply_to,
super::fields::parse_resent_to,
super::fields::parse_no_op,
super::fields::parse_no_op,
super::fields::parse_list_archive,
super::fields::parse_no_op,
super::fields::parse_content_disposition,
super::fields::parse_no_op,
super::fields::parse_list_unsubscribe,
super::fields::parse_no_op,
super::fields::parse_no_op,
super::fields::parse_list_help,
super::fields::parse_no_op,
super::fields::parse_no_op,
super::fields::parse_mime_version,
super::fields::parse_no_op,
super::fields::parse_from,
super::fields::parse_no_op,
super::fields::parse_in_reply_to,
super::fields::parse_no_op,
super::fields::parse_no_op,
super::fields::parse_no_op,
super::fields::parse_no_op,
super::fields::parse_resent_from,
static HDR_MAP: &[HeaderName] = &[
HeaderName::Date,
HeaderName::Other,
HeaderName::Sender,
HeaderName::Other,
HeaderName::Received,
HeaderName::Other,
HeaderName::References,
HeaderName::Other,
HeaderName::Cc,
HeaderName::Comments,
HeaderName::ResentCc,
HeaderName::ContentId,
HeaderName::Other,
HeaderName::ResentMessageId,
HeaderName::ReplyTo,
HeaderName::ResentTo,
HeaderName::ResentBcc,
HeaderName::ContentLanguage,
HeaderName::Subject,
HeaderName::ResentSender,
HeaderName::Other,
HeaderName::Other,
HeaderName::ResentDate,
HeaderName::To,
HeaderName::Bcc,
HeaderName::Other,
HeaderName::ContentTransferEncoding,
HeaderName::ReturnPath,
HeaderName::ListId,
HeaderName::Keywords,
HeaderName::ContentDescription,
HeaderName::ListOwner,
HeaderName::Other,
HeaderName::ContentType,
HeaderName::Other,
HeaderName::ListHelp,
HeaderName::MessageId,
HeaderName::ContentLocation,
HeaderName::Other,
HeaderName::Other,
HeaderName::ListSubscribe,
HeaderName::Other,
HeaderName::Other,
HeaderName::Other,
HeaderName::Other,
HeaderName::ListPost,
HeaderName::Other,
HeaderName::ResentFrom,
HeaderName::Other,
HeaderName::Other,
HeaderName::ContentDisposition,
HeaderName::Other,
HeaderName::InReplyTo,
HeaderName::ListArchive,
HeaderName::Other,
HeaderName::From,
HeaderName::Other,
HeaderName::ListUnsubscribe,
HeaderName::Other,
HeaderName::Other,
HeaderName::Other,
HeaderName::Other,
HeaderName::Other,
HeaderName::Other,
HeaderName::Other,
HeaderName::Other,
HeaderName::Other,
HeaderName::Other,
HeaderName::MimeVersion,
];
static HDR_NAMES: &[&[u8]; 58] = &[
static HDR_NAMES: &[&[u8]] = &[
b"date",
b"",
b"sender",
b"subject",
b"",
b"received",
b"",
b"references",
b"resent-date",
b"",
b"cc",
b"comments",
b"resent-cc",
b"content-id",
b"return-path",
b"",
b"resent-message-id",
b"reply-to",
b"resent-to",
b"resent-bcc",
b"content-language",
b"subject",
b"resent-sender",
b"",
b"resent-bcc",
b"",
b"list-id",
b"resent-date",
b"to",
b"bcc",
b"list-post",
b"",
b"content-transfer-encoding",
b"return-path",
b"list-id",
b"keywords",
b"content-description",
b"list-owner",
b"",
b"content-type",
b"keywords",
b"content-description",
b"message-id",
b"",
b"to",
b"list-help",
b"message-id",
b"content-location",
b"",
b"",
b"list-subscribe",
b"content-transfer-encoding",
b"",
b"",
b"reply-to",
b"resent-to",
b"",
b"",
b"list-archive",
b"list-post",
b"",
b"resent-from",
b"",
b"",
b"content-disposition",
b"",
b"in-reply-to",
b"list-archive",
b"",
b"from",
b"",
b"list-unsubscribe",
b"",
b"",
b"list-help",
b"",
b"",
b"",
b"",
b"",
b"",
b"",
b"",
b"mime-version",
b"",
b"from",
b"",
b"in-reply-to",
b"",
b"",
b"",
b"",
b"resent-from",
];
+228 -116
View File
@@ -13,19 +13,16 @@ use std::borrow::Cow;
use crate::{
decoders::{
base64::decode_base64,
charsets::map::get_charset_decoder,
html::{html_to_text, text_to_html},
quoted_printable::decode_quoted_printable,
DecodeFnc, DecodeResult,
base64::decode_base64, charsets::map::get_charset_decoder,
quoted_printable::decode_quoted_printable, DecodeFnc, DecodeResult,
},
BinaryPart, ContentType, InlinePart, Message, MessageHeader, MessagePart, MimeHeader, TextPart,
ContentType, HeaderName, HeaderValue, Message, MessagePart, MessagePartId, MessageStructure,
Part, RfcHeaders,
};
use super::{
fields::MessageField,
header::parse_headers,
mime::{get_bytes_to_boundary, seek_next_part, skip_crlf, skip_multipart_end},
mime::{get_bytes_to_boundary, seek_crlf_end, seek_next_part, skip_crlf, skip_multipart_end},
};
#[derive(Debug, PartialEq)]
@@ -42,6 +39,12 @@ enum MimeType {
Other,
}
impl Default for MimeType {
fn default() -> Self {
MimeType::Message
}
}
fn result_to_string<'x>(
result: DecodeResult,
data: &'x [u8],
@@ -111,6 +114,7 @@ fn get_mime_type(
}
}
#[derive(Default)]
struct MessageParserState {
mime_type: MimeType,
mime_boundary: Option<Vec<u8>>,
@@ -120,6 +124,8 @@ struct MessageParserState {
text_parts: usize,
need_html_body: bool,
need_text_body: bool,
header_id: Option<MessagePartId>,
structure: Vec<MessageStructure>,
}
impl MessageParserState {
@@ -133,6 +139,19 @@ impl MessageParserState {
text_parts: 0,
need_text_body: true,
need_html_body: true,
..Default::default()
}
}
pub fn get_structure(&mut self) -> MessageStructure {
if let Some(header_id) = self.header_id {
MessageStructure::MultiPart((header_id, std::mem::take(&mut self.structure)))
} else if self.structure.len() > 1 {
MessageStructure::List(std::mem::take(&mut self.structure))
} else if self.structure.len() == 1 {
self.structure.pop().unwrap()
} else {
MessageStructure::List(vec![])
}
}
}
@@ -151,56 +170,68 @@ impl<'x> MessageStream<'x> {
impl<'x> Message<'x> {
fn new() -> Message<'x> {
Message {
header: Box::new(MessageHeader::new()),
..Default::default()
}
}
/// Returns `false` if at least one header field was successfully parsed.
pub fn is_empty(&self) -> bool {
self.header.is_empty()
self.headers_rfc.is_empty() && self.headers_other.is_empty()
}
/// Parses a byte slice containing the RFC5322 raw message and returns a
/// `Message` struct.
///
/// This function never panics, a best-effort is made to parse the message and
/// if no headers are found and empty `Message` struct is returned.
/// To make sure parsing was successfull use `is_empty()`.
/// if no headers are found None is returned.
///
pub fn parse(bytes: &'x [u8]) -> Message<'x> {
let mut stream = MessageStream::new(bytes);
pub fn parse(raw_message: &'x [u8]) -> Option<Message<'x>> {
let mut stream = MessageStream::new(raw_message);
let mut message = Message::new();
let mut message_stack = Vec::new();
let mut message_header_stack = Vec::new();
let mut state = MessageParserState::new();
let mut state_stack = Vec::new();
let mut mime_part_header = MimeHeader::new();
let mut mime_part_header = RfcHeaders::new();
message.raw_message = raw_message;
'outer: loop {
// Obtain reference to either the message or the MIME part's header
let header: &mut dyn MessageField = if let MimeType::Message = state.mime_type {
message.header.as_mut()
} else {
&mut mime_part_header
};
// Parse headers
if !parse_headers(header, &mut stream) {
break;
}
let (is_message, header) = if let MimeType::Message = state.mime_type {
message.offset_header = stream.pos;
if !parse_headers(
&mut message.headers_rfc,
Some(&mut message.headers_other),
Some(&mut message.headers_offsets),
&mut stream,
) {
break;
}
message.offset_body = seek_crlf_end(&stream, stream.pos);
(true, &mut message.headers_rfc)
} else {
if !parse_headers(&mut mime_part_header, None, None, &mut stream) {
break;
}
(false, &mut mime_part_header)
};
state.parts += 1;
let content_type = header
.get(&HeaderName::ContentType)
.and_then(|c| c.as_content_type_ref());
let (is_multipart, mut is_inline, mut is_text, mut mime_type) =
get_mime_type(header.get_content_type(), &state.mime_type);
get_mime_type(content_type, &state.mime_type);
if is_multipart {
if let Some(mime_boundary) = header
.get_content_type()
.map_or_else(|| None, |f| f.get_attribute("boundary"))
if let Some(mime_boundary) =
content_type.map_or_else(|| None, |f| f.get_attribute("boundary"))
{
let mime_boundary = ("\n--".to_string() + mime_boundary).into_bytes();
@@ -210,13 +241,32 @@ impl<'x> Message<'x> {
|| mime_type == MimeType::MultipartAlernative,
mime_type,
mime_boundary: mime_boundary.into(),
parts: 0,
html_parts: message.html_body.len(),
text_parts: message.text_body.len(),
need_html_body: state.need_html_body,
need_text_body: state.need_text_body,
header_id: if !is_message {
Some(message.parts.len())
} else {
None
},
..Default::default()
};
mime_part_header.clear();
if !is_message {
if mime_part_header.is_empty() {
mime_part_header.insert(
HeaderName::ContentType,
HeaderValue::ContentType(ContentType {
c_type: "text".into(),
c_subtype: Some("plain".into()),
attributes: None,
}),
);
}
message.parts.push(MessagePart::Multipart(std::mem::take(
&mut mime_part_header,
)));
}
state_stack.push(state);
state = new_state;
skip_crlf(&mut stream);
@@ -230,14 +280,21 @@ impl<'x> Message<'x> {
let new_state = MessageParserState {
mime_type: MimeType::Message,
mime_boundary: state.mime_boundary.take(),
in_alternative: false,
parts: 0,
html_parts: 0,
text_parts: 0,
need_html_body: true,
need_text_body: true,
..Default::default()
};
mime_part_header.clear();
if mime_part_header.is_empty() {
mime_part_header.insert(
HeaderName::ContentType,
HeaderValue::ContentType(ContentType {
c_type: "message".into(),
c_subtype: Some("rfc822".into()),
attributes: None,
}),
);
}
message_header_stack.push(std::mem::take(&mut mime_part_header));
message_stack.push(message);
state_stack.push(state);
message = Message::new();
@@ -249,10 +306,14 @@ impl<'x> Message<'x> {
skip_crlf(&mut stream);
let (is_binary, decode_fnc): (bool, DecodeFnc) = match header
.get_content_transfer_encoding()
.get(&HeaderName::ContentTransferEncoding)
{
Some(encoding) if encoding.eq_ignore_ascii_case("base64") => (false, decode_base64),
Some(encoding) if encoding.eq_ignore_ascii_case("quoted-printable") => {
Some(HeaderValue::Text(encoding)) if encoding.eq_ignore_ascii_case("base64") => {
(false, decode_base64)
}
Some(HeaderValue::Text(encoding))
if encoding.eq_ignore_ascii_case("quoted-printable") =>
{
(false, decode_quoted_printable)
}
_ => (true, get_bytes_to_boundary),
@@ -316,14 +377,12 @@ impl<'x> Message<'x> {
let is_inline = is_inline
&& header
.get_content_disposition()
.map_or_else(|| true, |d| !d.is_attachment())
.get(&HeaderName::ContentDisposition)
.map_or_else(|| true, |d| !d.get_content_type().is_attachment())
&& (state.parts == 1
|| (state.mime_type != MimeType::MultipartRelated
&& (mime_type == MimeType::Inline
|| header
.get_content_type()
.map_or_else(|| true, |c| !c.has_attribute("name")))));
|| content_type.map_or_else(|| true, |c| !c.has_attribute("name")))));
let (add_to_html, add_to_text) = if let MimeType::MultipartAlernative = state.mime_type
{
@@ -350,58 +409,53 @@ impl<'x> Message<'x> {
};
if is_text {
let text_part = TextPart {
contents: result_to_string(bytes, stream.data, header.get_content_type()),
header: if !mime_part_header.is_empty() {
Some(std::mem::take(&mut mime_part_header))
} else {
None
},
let is_html = mime_type == MimeType::TextHtml;
let text_part = Part {
body: result_to_string(bytes, stream.data, content_type),
headers: std::mem::take(&mut mime_part_header),
};
let is_html = mime_type == MimeType::TextHtml;
if add_to_html && !is_html {
message.html_body.push(InlinePart::Text(TextPart {
header: None,
contents: text_to_html(&text_part.contents).into(),
}));
message.html_body.push(message.parts.len());
} else if add_to_text && is_html {
message.text_body.push(InlinePart::Text(TextPart {
header: None,
contents: html_to_text(&text_part.contents).into(),
}));
message.text_body.push(message.parts.len());
}
if add_to_html && is_html {
message.html_body.push(InlinePart::Text(text_part));
message.html_body.push(message.parts.len());
} else if add_to_text && !is_html {
message.text_body.push(InlinePart::Text(text_part));
message.text_body.push(message.parts.len());
} else {
message.attachments.push(MessagePart::Text(text_part));
message.attachments.push(message.parts.len());
}
state
.structure
.push(MessageStructure::Part(message.parts.len()));
message.parts.push(if is_html {
MessagePart::Html(text_part)
} else {
MessagePart::Text(text_part)
});
} else {
let binary_part = BinaryPart {
header: if !mime_part_header.is_empty() {
Some(std::mem::take(&mut mime_part_header))
} else {
None
},
contents: result_to_bytes(bytes, stream.data),
};
if add_to_html {
message
.html_body
.push(InlinePart::InlineBinary(message.attachments.len() as u32));
message.html_body.push(message.parts.len());
}
if add_to_text {
message
.text_body
.push(InlinePart::InlineBinary(message.attachments.len() as u32));
message.text_body.push(message.parts.len());
}
message.attachments.push(if !is_inline {
message.attachments.push(message.parts.len());
state
.structure
.push(MessageStructure::Part(message.parts.len()));
let binary_part = Part::new(
std::mem::take(&mut mime_part_header),
result_to_bytes(bytes, stream.data),
);
message.parts.push(if !is_inline {
MessagePart::Binary(binary_part)
} else {
MessagePart::InlineBinary(binary_part)
@@ -410,6 +464,7 @@ impl<'x> Message<'x> {
if state.mime_boundary.is_some() {
// Currently processing a MIME part
let mut last_part_offset = stream.pos;
'inner: loop {
if let MimeType::Message = state.mime_type {
@@ -417,7 +472,15 @@ impl<'x> Message<'x> {
if let (Some(mut prev_message), Some(mut prev_state)) =
(message_stack.pop(), state_stack.pop())
{
prev_message.attachments.push(MessagePart::Message(message));
message.structure = state.get_structure();
message.offset_end = seek_crlf_end(&stream, last_part_offset);
message.raw_message =
&raw_message[message.offset_header..message.offset_end];
prev_message.attachments.push(prev_message.parts.len());
prev_message.parts.push(MessagePart::Message(Part::new(
message_header_stack.pop().unwrap(),
Box::new(message),
)));
message = prev_message;
prev_state.mime_boundary = state.mime_boundary;
state = prev_state;
@@ -438,16 +501,8 @@ impl<'x> Message<'x> {
if state.text_parts == message.text_body.len()
&& state.html_parts != message.html_body.len()
{
for part in message.html_body[state.html_parts..].iter() {
message.text_body.push(match part {
InlinePart::Text(part) => InlinePart::Text(TextPart {
header: None,
contents: html_to_text(&part.contents).into(),
}),
InlinePart::InlineBinary(index) => {
InlinePart::InlineBinary(*index)
}
});
for &part_id in &message.html_body[state.html_parts..] {
message.text_body.push(part_id);
}
}
@@ -455,23 +510,19 @@ impl<'x> Message<'x> {
if state.html_parts == message.html_body.len()
&& state.text_parts != message.text_body.len()
{
for part in message.text_body[state.text_parts..].iter() {
message.html_body.push(match part {
InlinePart::Text(part) => InlinePart::Text(TextPart {
header: None,
contents: text_to_html(&part.contents).into(),
}),
InlinePart::InlineBinary(index) => {
InlinePart::InlineBinary(*index)
}
});
for &part_id in &message.text_body[state.html_parts..] {
message.html_body.push(part_id);
}
}
}
if let Some(prev_state) = state_stack.pop() {
if let Some(mut prev_state) = state_stack.pop() {
// Add headers and substructure to parent part
prev_state.structure.push(state.get_structure());
// Restore ancestor's state
state = prev_state;
last_part_offset = stream.pos;
if let Some(ref mime_boundary) = state.mime_boundary {
// Ancestor has a MIME boundary, seek it.
@@ -492,24 +543,42 @@ impl<'x> Message<'x> {
}
}
while let Some(mut prev_message) = message_stack.pop() {
prev_message.attachments.push(MessagePart::Message(message));
while let (Some(mut prev_message), Some(prev_state)) =
(message_stack.pop(), state_stack.pop())
{
message.offset_end = stream.pos;
if !message.is_empty() {
message.structure = state.get_structure();
prev_message.attachments.push(prev_message.parts.len());
prev_message.parts.push(MessagePart::Message(Part::new(
message_header_stack.pop().unwrap(),
Box::new(message),
)));
}
message = prev_message;
state = prev_state;
}
message
message.structure = state.get_structure();
message.offset_end = stream.pos;
if !message.is_empty() {
Some(message)
} else {
None
}
}
}
#[cfg(test)]
mod tests {
use std::{fs, path::PathBuf};
use crate::parsers::message::Message;
use crate::{parsers::message::Message, MessagePart};
const SEPARATOR: &[u8] = "\n---- EXPECTED STRUCTURE ----\n".as_bytes();
#[test]
fn parse_full_messages() {
const SEPARATOR: &[u8] = "\n---- EXPECTED STRUCTURE ----\n".as_bytes();
for test_suite in ["rfc", "legacy", "thirdparty", "malformed"] {
let mut test_dir = PathBuf::from(env!("CARGO_MANIFEST_DIR"));
test_dir.push("tests");
@@ -539,9 +608,20 @@ mod tests {
tests_run += 1;
let input = input.split_at_mut(pos);
let message = Message::parse(input.0);
let mut message = Message::parse(input.0).unwrap();
assert!(!message.is_empty());
// Remove raw message references before comparing
message.raw_message = &[];
for parts in &mut message.parts {
if let MessagePart::Message(part) = parts {
part.body.raw_message = &[];
for parts in &mut part.body.parts {
if let MessagePart::Message(part) = parts {
part.body.raw_message = &[];
}
}
}
}
assert_eq!(
message,
@@ -562,25 +642,57 @@ mod tests {
}
/*#[test]
fn message_to_yaml() {
let mut file_name = PathBuf::from(env!("CARGO_MANIFEST_DIR"));
file_name.push("tests");
file_name.push("rfc");
file_name.push("007.txt");
let mut input = fs::read(&file_name).unwrap();
let mut pos = 0;
for sep_pos in 0..input.len() {
if input[sep_pos..sep_pos + SEPARATOR.len()].eq(SEPARATOR) {
pos = sep_pos;
break;
}
}
assert!(
pos > 0,
"Failed to find separator in test file '{}'.",
file_name.display()
);
let input = input.split_at_mut(pos).0;
let message = Message::parse(input).unwrap();
let result = serde_yaml::to_string(&message).unwrap();
fs::write("test.yaml", &result).unwrap();
println!("{:}", result);
}
#[test]
fn generate_test_samples() {
const SEPARATOR: &[u8] = "\n---- EXPECTED STRUCTURE ----\n".as_bytes();
for test_suite in ["malformed" /*"legacy","malformed"*/] {
for test_suite in ["legacy", "malformed", "rfc", "thirdparty"] {
let mut test_dir = PathBuf::from(env!("CARGO_MANIFEST_DIR"));
test_dir.push("tests");
test_dir.push(test_suite);
for file_name in fs::read_dir(test_dir).unwrap() {
/*if !file_name
if file_name
.as_ref()
.unwrap()
.path()
.to_str()
.unwrap()
.contains("001")
.contains("COPYING")
{
continue;
}*/
}
let mut input = fs::read(file_name.as_ref().unwrap().path()).unwrap();
let mut pos = 0;
@@ -602,8 +714,8 @@ mod tests {
output.extend_from_slice(input.0);
output.extend_from_slice(SEPARATOR);
output.extend_from_slice(
serde_json::to_string_pretty(&Message::parse(input.0))
.unwrap_or_else(|_| "".to_string())
serde_json::to_string_pretty(&Message::parse(input.0).unwrap())
.unwrap()
.as_bytes(),
);
fs::write(file_name.as_ref().unwrap().path(), &output).unwrap();
+17 -5
View File
@@ -19,7 +19,7 @@ pub fn seek_next_part(stream: &mut MessageStream, boundary: &[u8]) -> bool {
let mut match_count = 0;
for ch in stream.data[pos..].iter() {
for ch in &stream.data[pos..] {
pos += 1;
if ch == &boundary[match_count] {
@@ -52,10 +52,10 @@ pub fn get_bytes_to_boundary<'x>(
) -> (usize, DecodeResult) {
let mut read_pos = start_pos;
return if !boundary.is_empty() {
if !boundary.is_empty() {
let mut match_count = 0;
for ch in stream.data[read_pos..].iter() {
for ch in &stream.data[read_pos..] {
read_pos += 1;
if ch == &boundary[match_count] {
@@ -95,7 +95,7 @@ pub fn get_bytes_to_boundary<'x>(
)
} else {
(0, DecodeResult::Empty)
};
}
}
#[inline(always)]
@@ -123,7 +123,7 @@ pub fn skip_multipart_end(stream: &mut MessageStream) -> bool {
#[inline(always)]
pub fn skip_crlf(stream: &mut MessageStream) {
for ch in stream.data[stream.pos..].iter() {
for ch in &stream.data[stream.pos..] {
match ch {
b'\r' | b' ' | b'\t' => stream.pos += 1,
b'\n' => {
@@ -134,3 +134,15 @@ pub fn skip_crlf(stream: &mut MessageStream) {
}
}
}
#[inline(always)]
pub fn seek_crlf_end(stream: &MessageStream, mut start_pos: usize) -> usize {
for ch in &stream.data[start_pos..] {
if ch.is_ascii_whitespace() {
start_pos += 1;
} else {
break;
}
}
start_pos
}
+53 -53
View File
@@ -13,55 +13,59 @@ use mail_parser::*;
#[test]
fn test_api() {
let input = concat!(
"From: Art Vandelay <art@vandelay.com> (Vandelay Industries)\n",
"To: \"Colleagues\": \"James Smythe\" <james@vandelay.com>; Friends:\n",
" jane@example.com, =?UTF-8?Q?John_Sm=C3=AEth?= <john@example.com>;\n",
"Date: Sat, 20 Nov 2021 14:22:01 -0800\n",
"Subject: Why not both importing AND exporting? =?utf-8?b?4pi6?=\n",
"Content-Type: multipart/mixed; boundary=\"festivus\";\n\n",
"--festivus\n",
"Content-Type: text/html; charset=\"us-ascii\"\n",
"Content-Transfer-Encoding: base64\n\n",
"PGh0bWw+PHA+SSB3YXMgdGhpbmtpbmcgYWJvdXQgcXVpdHRpbmcgdGhlICZsZHF1bztle\n",
"HBvcnRpbmcmcmRxdW87IHRvIGZvY3VzIGp1c3Qgb24gdGhlICZsZHF1bztpbXBvcnRpbm\n",
"cmcmRxdW87LDwvcD48cD5idXQgdGhlbiBJIHRob3VnaHQsIHdoeSBub3QgZG8gYm90aD8\n",
"gJiN4MjYzQTs8L3A+PC9odG1sPg==\n",
"--festivus\n",
"Content-Type: message/rfc822\n\n",
"From: \"Cosmo Kramer\" <kramer@kramerica.com>\n",
"Subject: Exporting my book about coffee tables\n",
"Content-Type: multipart/mixed; boundary=\"giddyup\";\n\n",
"--giddyup\n",
"Content-Type: text/plain; charset=\"utf-16\"\n",
"Content-Transfer-Encoding: quoted-printable\n\n",
"=FF=FE=0C!5=D8\"=DD5=D8)=DD5=D8-=DD =005=D8*=DD5=D8\"=DD =005=D8\"=\n",
"=DD5=D85=DD5=D8-=DD5=D8,=DD5=D8/=DD5=D81=DD =005=D8*=DD5=D86=DD =\n",
"=005=D8=1F=DD5=D8,=DD5=D8,=DD5=D8(=DD =005=D8-=DD5=D8)=DD5=D8\"=\n",
"=DD5=D8=1E=DD5=D80=DD5=D8\"=DD!=00\n",
"--giddyup\n",
"Content-Type: image/gif; name*1=\"about \"; name*0=\"Book \";\n",
" name*2*=utf-8''%e2%98%95 tables.gif\n",
"Content-Transfer-Encoding: Base64\n",
"Content-Disposition: attachment\n\n",
"R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7\n",
"--giddyup--\n",
"--festivus--\n",
)
.as_bytes();
let input = br#"From: Art Vandelay <art@vandelay.com> (Vandelay Industries)
To: "Colleagues": "James Smythe" <james@vandelay.com>; Friends:
jane@example.com, =?UTF-8?Q?John_Sm=C3=AEth?= <john@example.com>;
Date: Sat, 20 Nov 2021 14:22:01 -0800
Subject: Why not both importing AND exporting? =?utf-8?b?4pi6?=
Content-Type: multipart/mixed; boundary="festivus";
let message = Message::parse(input);
--festivus
Content-Type: text/html; charset="us-ascii"
Content-Transfer-Encoding: base64
PGh0bWw+PHA+SSB3YXMgdGhpbmtpbmcgYWJvdXQgcXVpdHRpbmcgdGhlICZsZHF1bztle
HBvcnRpbmcmcmRxdW87IHRvIGZvY3VzIGp1c3Qgb24gdGhlICZsZHF1bztpbXBvcnRpbm
cmcmRxdW87LDwvcD48cD5idXQgdGhlbiBJIHRob3VnaHQsIHdoeSBub3QgZG8gYm90aD8
gJiN4MjYzQTs8L3A+PC9odG1sPg==
--festivus
Content-Type: message/rfc822
From: "Cosmo Kramer" <kramer@kramerica.com>
Subject: Exporting my book about coffee tables
Content-Type: multipart/mixed; boundary="giddyup";
--giddyup
Content-Type: text/plain; charset="utf-16"
Content-Transfer-Encoding: quoted-printable
=FF=FE=0C!5=D8"=DD5=D8)=DD5=D8-=DD =005=D8*=DD5=D8"=DD =005=D8"=
=DD5=D85=DD5=D8-=DD5=D8,=DD5=D8/=DD5=D81=DD =005=D8*=DD5=D86=DD =
=005=D8=1F=DD5=D8,=DD5=D8,=DD5=D8(=DD =005=D8-=DD5=D8)=DD5=D8"=
=DD5=D8=1E=DD5=D80=DD5=D8"=DD!=00
--giddyup
Content-Type: image/gif; name*1="about "; name*0="Book ";
name*2*=utf-8''%e2%98%95 tables.gif
Content-Transfer-Encoding: Base64
Content-Disposition: attachment
R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7
--giddyup--
--festivus--
"#;
let message = Message::parse(input).unwrap();
assert_eq!(
message.get_from(),
&Address::Address(Addr {
&HeaderValue::Address(Addr {
name: Some("Art Vandelay (Vandelay Industries)".into()),
address: Some("art@vandelay.com".into())
})
);
assert_eq!(
message.get_to(),
&Address::GroupList(vec![
&HeaderValue::GroupList(vec![
Group {
name: Some("Colleagues".into()),
addresses: vec![Addr {
@@ -94,7 +98,7 @@ fn test_api() {
"Why not both importing AND exporting? ☺"
);
assert_eq!(
message.get_html_body(0).unwrap().to_string(),
message.get_html_body(0).unwrap(),
concat!(
"<html><p>I was thinking about quitting the &ldquo;exporting&rdquo; to ",
"focus just on the &ldquo;importing&rdquo;,</p><p>but then I thought,",
@@ -102,37 +106,33 @@ fn test_api() {
)
);
assert_eq!(
message.get_text_body(0).unwrap().to_string(),
message.get_text_body(0).unwrap(),
concat!(
"I was thinking about quitting the “exporting” to focus just on the",
" “importing”,\nbut then I thought, why not do both? ☺\n"
)
);
let nested_message = match message.get_attachment(0).unwrap() {
MessagePart::Message(v) => v,
_ => unreachable!(),
};
let nested_message = message
.get_attachment(0)
.unwrap()
.unwrap_message()
.get_body();
assert_eq!(
nested_message.get_subject().unwrap(),
"Exporting my book about coffee tables"
);
assert_eq!(
nested_message.get_text_body(0).unwrap().to_string(),
nested_message.get_text_body(0).unwrap(),
"ℌ𝔢𝔩𝔭 𝔪𝔢 𝔢𝔵𝔭𝔬𝔯𝔱 𝔪𝔶 𝔟𝔬𝔬𝔨 𝔭𝔩𝔢𝔞𝔰𝔢!"
);
assert_eq!(
nested_message.get_html_body(0).unwrap().to_string(),
nested_message.get_html_body(0).unwrap(),
"<html><body>ℌ𝔢𝔩𝔭 𝔪𝔢 𝔢𝔵𝔭𝔬𝔯𝔱 𝔪𝔶 𝔟𝔬𝔬𝔨 𝔭𝔩𝔢𝔞𝔰𝔢!</body></html>"
);
let nested_attachment = match nested_message.get_attachment(0).unwrap() {
MessagePart::Binary(v) => v,
_ => unreachable!(),
};
let nested_attachment = nested_message.get_attachment(0).unwrap().unwrap_binary();
assert_eq!(nested_attachment.len(), 42);
assert_eq!(
nested_attachment
.get_header()
.unwrap()
.get_content_type()
.unwrap()
.get_attribute("name")
+171 -48
View File
@@ -44,17 +44,43 @@ IFl2ZXMgUGlndWV0NnM7vAAAAABJRU5ErkJggg==
---- EXPECTED STRUCTURE ----
{
"header": {
"headers_rfc": {
"to": {
"Address": {
"name": "Joe Blow",
"address": "jblow@example.com"
}
},
"content_type": {
"ContentType": {
"c_type": "image",
"c_subtype": "png",
"attributes": {
"name": "redball.png"
}
}
},
"subject": {
"Text": "Test message from Microsoft Outlook 00"
},
"date": {
"year": 2000,
"month": 5,
"day": 17,
"hour": 19,
"minute": 35,
"second": 5,
"tz_before_gmt": true,
"tz_hour": 4,
"tz_minute": 0
"DateTime": {
"year": 2000,
"month": 5,
"day": 17,
"hour": 19,
"minute": 35,
"second": 5,
"tz_before_gmt": true,
"tz_hour": 4,
"tz_minute": 0
}
},
"message_id": {
"Text": "NDBBIAKOPKHFGPLCODIGKEKECHAA.doug@example.com"
},
"content_transfer_encoding": {
"Text": "base64"
},
"from": {
"Address": {
@@ -62,51 +88,142 @@ IFl2ZXMgUGlndWV0NnM7vAAAAABJRU5ErkJggg==
"address": "doug@example.com"
}
},
"message_id": "NDBBIAKOPKHFGPLCODIGKEKECHAA.doug@example.com",
"mime_version": "1.0",
"subject": "Test message from Microsoft Outlook 00",
"to": {
"Address": {
"name": "Joe Blow",
"address": "jblow@example.com"
}
"mime_version": {
"Text": "1.0"
},
"content_disposition": {
"c_type": "attachment",
"attributes": {
"filename": "redball.png"
"ContentType": {
"c_type": "attachment",
"attributes": {
"filename": "redball.png"
}
}
},
"content_transfer_encoding": "base64",
"content_type": {
"c_type": "image",
"c_subtype": "png",
"attributes": {
"name": "redball.png"
}
},
"others": {
"X-MSMail-Priority": [
"Normal"
],
"Importance": [
"Normal"
],
"X-Mailer": [
"Microsoft Outlook IMO, Build 9.0.2416 (9.0.2910.0)"
],
"X-MimeOLE": [
"Produced By Microsoft MimeOLE V5.00.2314.1300"
],
"X-Priority": [
"3 (Normal)"
]
}
},
"headers_other": {
"X-MSMail-Priority": {
"Text": "Normal"
},
"X-MimeOLE": {
"Text": "Produced By Microsoft MimeOLE V5.00.2314.1300"
},
"X-Mailer": {
"Text": "Microsoft Outlook IMO, Build 9.0.2416 (9.0.2910.0)"
},
"X-Priority": {
"Text": "3 (Normal)"
},
"Importance": {
"Text": "Normal"
}
},
"headers_offsets": [
{
"name": {
"Rfc": "from"
},
"start": 5,
"end": 40
},
{
"name": {
"Rfc": "to"
},
"start": 43,
"end": 76
},
{
"name": {
"Rfc": "subject"
},
"start": 84,
"end": 125
},
{
"name": {
"Rfc": "date"
},
"start": 130,
"end": 164
},
{
"name": {
"Rfc": "message_id"
},
"start": 175,
"end": 225
},
{
"name": {
"Rfc": "mime_version"
},
"start": 238,
"end": 244
},
{
"name": {
"Rfc": "content_type"
},
"start": 257,
"end": 291
},
{
"name": {
"Rfc": "content_transfer_encoding"
},
"start": 317,
"end": 326
},
{
"name": {
"Rfc": "content_disposition"
},
"start": 346,
"end": 385
},
{
"name": {
"Other": "X-Priority"
},
"start": 396,
"end": 409
},
{
"name": {
"Other": "X-MSMail-Priority"
},
"start": 427,
"end": 436
},
{
"name": {
"Other": "X-Mailer"
},
"start": 445,
"end": 498
},
{
"name": {
"Other": "Importance"
},
"start": 509,
"end": 518
},
{
"name": {
"Other": "X-MimeOLE"
},
"start": 528,
"end": 576
}
],
"attachments": [
0
],
"parts": [
{
"Binary": {
"contents": [
"body": [
137,
80,
78,
@@ -1563,5 +1680,11 @@ IFl2ZXMgUGlndWV0NnM7vAAAAABJRU5ErkJggg==
]
}
}
]
],
"structure": {
"Part": 0
},
"offset_header": 0,
"offset_body": 578,
"offset_end": 2570
}
+188 -74
View File
@@ -1,61 +1,50 @@
From: "Doug Sauder" <doug@example.com>
To: "Joe Blow" <jblow@example.com>,
=?utf-7?B?SitBUHctcmdlbiBTY2htK0FQdy1yZ2Vu?= <schmuergen@example.com>
Subject: =?utf-7?Q?Die_Hasen_und_die_Fr+APY-sche_=28Microsoft_Outlook_00=29?=
Date: Wed, 17 May 2000 19:18:39 -0400
Message-ID: <NDBBIAKOPKHFGPLCODIGMEKCCHAA.doug@example.com>
MIME-Version: 1.0
Content-Type: text/plain;
charset="utf-7"
Content-Transfer-Encoding: quoted-printable
X-Priority: 3 (Normal)
X-MSMail-Priority: Normal
X-Mailer: Microsoft Outlook IMO, Build 9.0.2416 (9.0.2910.0)
Importance: Normal
X-MimeOLE: Produced By Microsoft MimeOLE V5.00.2314.1300
Die Hasen und die Fr+APY-sche
Die Hasen klagten einst +APw-ber ihre mi+AN8-liche Lage+ADs- +ACI-wir =
leben+ACI-, sprach ein Redner, +ACI-in steter Furcht vor Menschen und =
Tieren, eine Beute der Hunde, der Adler, ja fast aller Raubtiere+ACE- =
Unsere stete Angst ist +AOQ-rger als der Tod selbst. Auf, la+AN8-t uns =
ein f+APw-r allemal sterben.+ACI-=20
In einem nahen Teich wollten sie sich nun ers+AOQ-ufen+ADs- sie eilten =
ihm zu+ADs- allein das au+AN8-erordentliche Get+APY-se und ihre =
wunderbare Gestalt erschreckte eine Menge Fr+APY-sche, die am Ufer =
sa+AN8-en, so sehr, da+AN8- sie aufs schnellste untertauchten.=20
+ACI-Halt+ACI-, rief nun eben dieser Sprecher, +ACI-wir wollen das =
Ers+AOQ-ufen noch ein wenig aufschieben, denn auch uns f+APw-rchten, wie =
ihr seht, einige Tiere, welche also wohl noch ungl+APw-cklicher sein =
m+APw-ssen als wir.+ACI-=20
From: "Doug Sauder" <doug@example.com>
To: "Joe Blow" <jblow@example.com>,
=?utf-7?B?SitBUHctcmdlbiBTY2htK0FQdy1yZ2Vu?= <schmuergen@example.com>
Subject: =?utf-7?Q?Die_Hasen_und_die_Fr+APY-sche_=28Microsoft_Outlook_00=29?=
Date: Wed, 17 May 2000 19:18:39 -0400
Message-ID: <NDBBIAKOPKHFGPLCODIGMEKCCHAA.doug@example.com>
MIME-Version: 1.0
Content-Type: text/plain;
charset="utf-7"
Content-Transfer-Encoding: quoted-printable
X-Priority: 3 (Normal)
X-MSMail-Priority: Normal
X-Mailer: Microsoft Outlook IMO, Build 9.0.2416 (9.0.2910.0)
Importance: Normal
X-MimeOLE: Produced By Microsoft MimeOLE V5.00.2314.1300
Die Hasen und die Fr+APY-sche
Die Hasen klagten einst +APw-ber ihre mi+AN8-liche Lage+ADs- +ACI-wir =
leben+ACI-, sprach ein Redner, +ACI-in steter Furcht vor Menschen und =
Tieren, eine Beute der Hunde, der Adler, ja fast aller Raubtiere+ACE- =
Unsere stete Angst ist +AOQ-rger als der Tod selbst. Auf, la+AN8-t uns =
ein f+APw-r allemal sterben.+ACI-=20
In einem nahen Teich wollten sie sich nun ers+AOQ-ufen+ADs- sie eilten =
ihm zu+ADs- allein das au+AN8-erordentliche Get+APY-se und ihre =
wunderbare Gestalt erschreckte eine Menge Fr+APY-sche, die am Ufer =
sa+AN8-en, so sehr, da+AN8- sie aufs schnellste untertauchten.=20
+ACI-Halt+ACI-, rief nun eben dieser Sprecher, +ACI-wir wollen das =
Ers+AOQ-ufen noch ein wenig aufschieben, denn auch uns f+APw-rchten, wie =
ihr seht, einige Tiere, welche also wohl noch ungl+APw-cklicher sein =
m+APw-ssen als wir.+ACI-=20
---- EXPECTED STRUCTURE ----
{
"header": {
"date": {
"year": 2000,
"month": 5,
"day": 17,
"hour": 19,
"minute": 18,
"second": 39,
"tz_before_gmt": true,
"tz_hour": 4,
"tz_minute": 0
},
"headers_rfc": {
"from": {
"Address": {
"name": "Doug Sauder",
"address": "doug@example.com"
}
},
"message_id": "NDBBIAKOPKHFGPLCODIGMEKCCHAA.doug@example.com",
"mime_version": "1.0",
"subject": "Die Hasen und die Frösche (Microsoft Outlook 00)",
"content_transfer_encoding": {
"Text": "quoted-printable"
},
"to": {
"AddressList": [
{
@@ -68,40 +57,165 @@ m+APw-ssen als wir.+ACI-=20
}
]
},
"content_transfer_encoding": "quoted-printable",
"subject": {
"Text": "Die Hasen und die Frösche (Microsoft Outlook 00)"
},
"content_type": {
"c_type": "text",
"c_subtype": "plain",
"attributes": {
"charset": "utf-7"
"ContentType": {
"c_type": "text",
"c_subtype": "plain",
"attributes": {
"charset": "utf-7"
}
}
},
"others": {
"X-Priority": [
"3 (Normal)"
],
"X-MimeOLE": [
"Produced By Microsoft MimeOLE V5.00.2314.1300"
],
"X-MSMail-Priority": [
"Normal"
],
"Importance": [
"Normal"
],
"X-Mailer": [
"Microsoft Outlook IMO, Build 9.0.2416 (9.0.2910.0)"
]
"date": {
"DateTime": {
"year": 2000,
"month": 5,
"day": 17,
"hour": 19,
"minute": 18,
"second": 39,
"tz_before_gmt": true,
"tz_hour": 4,
"tz_minute": 0
}
},
"message_id": {
"Text": "NDBBIAKOPKHFGPLCODIGMEKCCHAA.doug@example.com"
},
"mime_version": {
"Text": "1.0"
}
},
"html_body": [
"headers_other": {
"X-MSMail-Priority": {
"Text": "Normal"
},
"X-MimeOLE": {
"Text": "Produced By Microsoft MimeOLE V5.00.2314.1300"
},
"Importance": {
"Text": "Normal"
},
"X-Priority": {
"Text": "3 (Normal)"
},
"X-Mailer": {
"Text": "Microsoft Outlook IMO, Build 9.0.2416 (9.0.2910.0)"
}
},
"headers_offsets": [
{
"contents": "<html><body>Die Hasen und die Frösche<br/><br/>Die Hasen klagten einst über ihre mißliche Lage; \"wir leben\", sprach ein Redner, \"in steter Furcht vor Menschen und Tieren, eine Beute der Hunde, der Adler, ja fast aller Raubtiere! Unsere stete Angst ist ärger als der Tod selbst. Auf, laßt uns ein für allemal sterben.\" <br/><br/>In einem nahen Teich wollten sie sich nun ersäufen; sie eilten ihm zu; allein das außerordentliche Getöse und ihre wunderbare Gestalt erschreckte eine Menge Frösche, die am Ufer saßen, so sehr, daß sie aufs schnellste untertauchten. <br/><br/>\"Halt\", rief nun eben dieser Sprecher, \"wir wollen das Ersäufen noch ein wenig aufschieben, denn auch uns fürchten, wie ihr seht, einige Tiere, welche also wohl noch unglücklicher sein müssen als wir.\" <br/><br/></body></html>"
"name": {
"Rfc": "from"
},
"start": 5,
"end": 39
},
{
"name": {
"Rfc": "to"
},
"start": 42,
"end": 146
},
{
"name": {
"Rfc": "subject"
},
"start": 154,
"end": 224
},
{
"name": {
"Rfc": "date"
},
"start": 229,
"end": 262
},
{
"name": {
"Rfc": "message_id"
},
"start": 273,
"end": 322
},
{
"name": {
"Rfc": "mime_version"
},
"start": 335,
"end": 340
},
{
"name": {
"Rfc": "content_type"
},
"start": 353,
"end": 383
},
{
"name": {
"Rfc": "content_transfer_encoding"
},
"start": 409,
"end": 427
},
{
"name": {
"Other": "X-Priority"
},
"start": 438,
"end": 450
},
{
"name": {
"Other": "X-MSMail-Priority"
},
"start": 468,
"end": 476
},
{
"name": {
"Other": "X-Mailer"
},
"start": 485,
"end": 537
},
{
"name": {
"Other": "Importance"
},
"start": 548,
"end": 556
},
{
"name": {
"Other": "X-MimeOLE"
},
"start": 566,
"end": 613
}
],
"html_body": [
0
],
"text_body": [
0
],
"parts": [
{
"contents": "Die Hasen und die Frösche\n\nDie Hasen klagten einst über ihre mißliche Lage; \"wir leben\", sprach ein Redner, \"in steter Furcht vor Menschen und Tieren, eine Beute der Hunde, der Adler, ja fast aller Raubtiere! Unsere stete Angst ist ärger als der Tod selbst. Auf, laßt uns ein für allemal sterben.\" \n\nIn einem nahen Teich wollten sie sich nun ersäufen; sie eilten ihm zu; allein das außerordentliche Getöse und ihre wunderbare Gestalt erschreckte eine Menge Frösche, die am Ufer saßen, so sehr, daß sie aufs schnellste untertauchten. \n\n\"Halt\", rief nun eben dieser Sprecher, \"wir wollen das Ersäufen noch ein wenig aufschieben, denn auch uns fürchten, wie ihr seht, einige Tiere, welche also wohl noch unglücklicher sein müssen als wir.\" \n\n"
"Text": {
"body": "Die Hasen und die Frösche\n\nDie Hasen klagten einst über ihre mißliche Lage; \"wir leben\", sprach ein Redner, \"in steter Furcht vor Menschen und Tieren, eine Beute der Hunde, der Adler, ja fast aller Raubtiere! Unsere stete Angst ist ärger als der Tod selbst. Auf, laßt uns ein für allemal sterben.\" \n\nIn einem nahen Teich wollten sie sich nun ersäufen; sie eilten ihm zu; allein das außerordentliche Getöse und ihre wunderbare Gestalt erschreckte eine Menge Frösche, die am Ufer saßen, so sehr, daß sie aufs schnellste untertauchten. \n\n\"Halt\", rief nun eben dieser Sprecher, \"wir wollen das Ersäufen noch ein wenig aufschieben, denn auch uns fürchten, wie ihr seht, einige Tiere, welche also wohl noch unglücklicher sein müssen als wir.\" \n\n"
}
}
]
],
"structure": {
"Part": 0
},
"offset_header": 0,
"offset_body": 614,
"offset_end": 1491
}
+134 -34
View File
@@ -37,61 +37,161 @@ wir.&quot; <br>
---- EXPECTED STRUCTURE ----
{
"header": {
"date": {
"year": 2000,
"month": 5,
"day": 19,
"hour": 0,
"minute": 31,
"second": 0,
"tz_before_gmt": true,
"tz_hour": 4,
"tz_minute": 0
},
"headers_rfc": {
"from": {
"Address": {
"name": "Doug Sauder",
"address": "dwsauder@example.com"
}
},
"message_id": "4.2.0.58.20000519003052.00a89c40@pop.example.com",
"mime_version": "1.0",
"subject": "Die Hasen und die Frösche",
"to": {
"Address": {
"name": "Heinz Müller",
"address": "mueller@example.com"
}
},
"content_transfer_encoding": "quoted-printable",
"content_transfer_encoding": {
"Text": "quoted-printable"
},
"message_id": {
"Text": "4.2.0.58.20000519003052.00a89c40@pop.example.com"
},
"mime_version": {
"Text": "1.0"
},
"content_type": {
"c_type": "text",
"c_subtype": "html",
"attributes": {
"charset": "iso-8859-1"
"ContentType": {
"c_type": "text",
"c_subtype": "html",
"attributes": {
"charset": "iso-8859-1"
}
}
},
"others": {
"X-Mailer": [
"QUALCOMM Windows Eudora Pro Version 4.2.0.58"
],
"X-Sender": [
"dwsauder@pop.example.com (Unverified)"
],
"X-Priority": [
"2 (High)"
]
"subject": {
"Text": "Die Hasen und die Frösche"
},
"date": {
"DateTime": {
"year": 2000,
"month": 5,
"day": 19,
"hour": 0,
"minute": 31,
"second": 0,
"tz_before_gmt": true,
"tz_hour": 4,
"tz_minute": 0
}
}
},
"html_body": [
"headers_other": {
"X-Priority": {
"Text": "2 (High)"
},
"X-Mailer": {
"Text": "QUALCOMM Windows Eudora Pro Version 4.2.0.58"
},
"X-Sender": {
"Text": "dwsauder@pop.example.com (Unverified)"
}
},
"headers_offsets": [
{
"contents": "<html>\n<font face=\"Arial, Helvetica\" size=5 color=\"#0000FF\"><b>Die Hasen und die\nFrösche<br>\n<br>\n</font></b><font face=\"Arial, Helvetica\">Die Hasen klagten einst über\nihre mißliche Lage; &quot;wir leben&quot;, sprach ein Redner, &quot;in\nsteter Furcht vor Menschen und Tieren, eine Beute der Hunde, der Adler,\nja fast aller Raubtiere! Unsere stete Angst ist ärger als der Tod selbst.\nAuf, laßt uns ein für allemal sterben.&quot; <br>\n<br>\nIn einem nahen Teich wollten sie sich nun ersäufen; sie eilten ihm zu;\nallein das außerordentliche Getöse und ihre wunderbare Gestalt\nerschreckte eine Menge Frösche, die am Ufer saßen, so sehr, daß sie aufs\nschnellste untertauchten. <br>\n<br>\n&quot;Halt&quot;, rief nun eben dieser Sprecher, &quot;wir wollen das\nErsäufen noch ein wenig aufschieben, denn auch uns fürchten, wie ihr\nseht, einige Tiere, welche also wohl noch unglücklicher sein müssen als\nwir.&quot; <br>\n<br>\n</font></html>\n\n"
"name": {
"Rfc": "message_id"
},
"start": 11,
"end": 64
},
{
"name": {
"Other": "X-Sender"
},
"start": 73,
"end": 113
},
{
"name": {
"Other": "X-Mailer"
},
"start": 122,
"end": 170
},
{
"name": {
"Other": "X-Priority"
},
"start": 181,
"end": 192
},
{
"name": {
"Rfc": "date"
},
"start": 197,
"end": 231
},
{
"name": {
"Rfc": "to"
},
"start": 234,
"end": 290
},
{
"name": {
"Rfc": "from"
},
"start": 295,
"end": 332
},
{
"name": {
"Rfc": "subject"
},
"start": 340,
"end": 387
},
{
"name": {
"Rfc": "mime_version"
},
"start": 400,
"end": 406
},
{
"name": {
"Rfc": "content_type"
},
"start": 419,
"end": 453
},
{
"name": {
"Rfc": "content_transfer_encoding"
},
"start": 479,
"end": 498
}
],
"html_body": [
0
],
"text_body": [
0
],
"parts": [
{
"contents": "Die Hasen und die Frösche\n\nDie Hasen klagten einst über ihre mißliche Lage; \"wir leben\", sprach ein Redner, \"in steter Furcht vor Menschen und Tieren, eine Beute der Hunde, der Adler, ja fast aller Raubtiere! Unsere stete Angst ist ärger als der Tod selbst. Auf, laßt uns ein für allemal sterben.\"\n\nIn einem nahen Teich wollten sie sich nun ersäufen; sie eilten ihm zu; allein das außerordentliche Getöse und ihre wunderbare Gestalt erschreckte eine Menge Frösche, die am Ufer saßen, so sehr, daß sie aufs schnellste untertauchten.\n\n\"Halt\", rief nun eben dieser Sprecher, \"wir wollen das Ersäufen noch ein wenig aufschieben, denn auch uns fürchten, wie ihr seht, einige Tiere, welche also wohl noch unglücklicher sein müssen als wir.\"\n\n"
"Html": {
"body": "<html>\n<font face=\"Arial, Helvetica\" size=5 color=\"#0000FF\"><b>Die Hasen und die\nFrösche<br>\n<br>\n</font></b><font face=\"Arial, Helvetica\">Die Hasen klagten einst über\nihre mißliche Lage; &quot;wir leben&quot;, sprach ein Redner, &quot;in\nsteter Furcht vor Menschen und Tieren, eine Beute der Hunde, der Adler,\nja fast aller Raubtiere! Unsere stete Angst ist ärger als der Tod selbst.\nAuf, laßt uns ein für allemal sterben.&quot; <br>\n<br>\nIn einem nahen Teich wollten sie sich nun ersäufen; sie eilten ihm zu;\nallein das außerordentliche Getöse und ihre wunderbare Gestalt\nerschreckte eine Menge Frösche, die am Ufer saßen, so sehr, daß sie aufs\nschnellste untertauchten. <br>\n<br>\n&quot;Halt&quot;, rief nun eben dieser Sprecher, &quot;wir wollen das\nErsäufen noch ein wenig aufschieben, denn auch uns fürchten, wie ihr\nseht, einige Tiere, welche also wohl noch unglücklicher sein müssen als\nwir.&quot; <br>\n<br>\n</font></html>\n\n"
}
}
]
],
"structure": {
"Part": 0
},
"offset_header": 0,
"offset_body": 500,
"offset_end": 1499
}
+161 -50
View File
@@ -64,17 +64,25 @@ wir.&quot; <br>
---- EXPECTED STRUCTURE ----
{
"header": {
"headers_rfc": {
"subject": {
"Text": "Die Hasen und die Frösche"
},
"date": {
"year": 2000,
"month": 5,
"day": 19,
"hour": 0,
"minute": 29,
"second": 55,
"tz_before_gmt": true,
"tz_hour": 4,
"tz_minute": 0
"DateTime": {
"year": 2000,
"month": 5,
"day": 19,
"hour": 0,
"minute": 29,
"second": 55,
"tz_before_gmt": true,
"tz_hour": 4,
"tz_minute": 0
}
},
"mime_version": {
"Text": "1.0"
},
"from": {
"Address": {
@@ -82,9 +90,9 @@ wir.&quot; <br>
"address": "dwsauder@example.com"
}
},
"message_id": "4.2.0.58.20000519002557.00a88870@pop.example.com",
"mime_version": "1.0",
"subject": "Die Hasen und die Frösche",
"message_id": {
"Text": "4.2.0.58.20000519002557.00a88870@pop.example.com"
},
"to": {
"Address": {
"name": "Heinz Müller",
@@ -92,52 +100,155 @@ wir.&quot; <br>
}
},
"content_type": {
"c_type": "multipart",
"c_subtype": "alternative",
"attributes": {
"boundary": "=====================_714967308==_.ALT"
"ContentType": {
"c_type": "multipart",
"c_subtype": "alternative",
"attributes": {
"boundary": "=====================_714967308==_.ALT"
}
}
},
"others": {
"X-Priority": [
"2 (High)"
],
"X-Sender": [
"dwsauder@pop.example.com (Unverified)"
],
"X-Mailer": [
"QUALCOMM Windows Eudora Pro Version 4.2.0.58"
]
}
},
"html_body": [
"headers_other": {
"X-Priority": {
"Text": "2 (High)"
},
"X-Sender": {
"Text": "dwsauder@pop.example.com (Unverified)"
},
"X-Mailer": {
"Text": "QUALCOMM Windows Eudora Pro Version 4.2.0.58"
}
},
"headers_offsets": [
{
"header": {
"content_transfer_encoding": "quoted-printable",
"content_type": {
"c_type": "text",
"c_subtype": "html",
"attributes": {
"charset": "iso-8859-1"
}
}
"name": {
"Rfc": "message_id"
},
"contents": "<html>\n<font face=\"Arial, Helvetica\" size=5 color=\"#0000FF\"><b>Die Hasen und die\nFrösche<br>\n<br>\n</font></b><font face=\"Arial, Helvetica\">Die Hasen klagten einst über\nihre mißliche Lage; &quot;wir leben&quot;, sprach ein Redner, &quot;in\nsteter Furcht vor Menschen und Tieren, eine Beute der Hunde, der Adler,\nja fast aller Raubtiere! Unsere stete Angst ist ärger als der Tod selbst.\nAuf, laßt uns ein für allemal sterben.&quot; <br>\n<br>\nIn einem nahen Teich wollten sie sich nun ersäufen; sie eilten ihm zu;\nallein das außerordentliche Getöse und ihre wunderbare Gestalt\nerschreckte eine Menge Frösche, die am Ufer saßen, so sehr, daß sie aufs\nschnellste untertauchten. <br>\n<br>\n&quot;Halt&quot;, rief nun eben dieser Sprecher, &quot;wir wollen das\nErsäufen noch ein wenig aufschieben, denn auch uns fürchten, wie ihr\nseht, einige Tiere, welche also wohl noch unglücklicher sein müssen als\nwir.&quot; <br>\n<br>\n</font></html>\n"
"start": 11,
"end": 64
},
{
"name": {
"Other": "X-Sender"
},
"start": 73,
"end": 113
},
{
"name": {
"Other": "X-Mailer"
},
"start": 122,
"end": 170
},
{
"name": {
"Other": "X-Priority"
},
"start": 181,
"end": 192
},
{
"name": {
"Rfc": "date"
},
"start": 197,
"end": 231
},
{
"name": {
"Rfc": "to"
},
"start": 234,
"end": 290
},
{
"name": {
"Rfc": "from"
},
"start": 295,
"end": 332
},
{
"name": {
"Rfc": "subject"
},
"start": 340,
"end": 387
},
{
"name": {
"Rfc": "mime_version"
},
"start": 400,
"end": 406
},
{
"name": {
"Rfc": "content_type"
},
"start": 419,
"end": 496
}
],
"html_body": [
1
],
"text_body": [
0
],
"parts": [
{
"header": {
"content_transfer_encoding": "quoted-printable",
"content_type": {
"c_type": "text",
"c_subtype": "plain",
"attributes": {
"charset": "iso-8859-1"
"Text": {
"headers": {
"content_transfer_encoding": {
"Text": "quoted-printable"
},
"content_type": {
"ContentType": {
"c_type": "text",
"c_subtype": "plain",
"attributes": {
"charset": "iso-8859-1"
}
}
}
}
},
"contents": "Die Hasen und die Frösche\n\nDie Hasen klagten einst über ihre mißliche Lage; \"wir leben\", sprach ein Redner, \"in steter Furcht vor Menschen und Tieren, eine Beute der Hunde, der Adler, ja fast aller Raubtiere! Unsere stete Angst ist ärger als der Tod selbst. Auf, laßt uns ein für allemal sterben.\" \n\nIn einem nahen Teich wollten sie sich nun ersäufen; sie eilten ihm zu; allein das außerordentliche Getöse und ihre wunderbare Gestalt erschreckte eine Menge Frösche, die am Ufer saßen, so sehr, daß sie aufs schnellste untertauchten. \n\n\"Halt\", rief nun eben dieser Sprecher, \"wir wollen das Ersäufen noch ein wenig aufschieben, denn auch uns fürchten, wie ihr seht, einige Tiere, welche also wohl noch unglücklicher sein müssen als wir.\" \n\n"
},
"body": "Die Hasen und die Frösche\n\nDie Hasen klagten einst über ihre mißliche Lage; \"wir leben\", sprach ein Redner, \"in steter Furcht vor Menschen und Tieren, eine Beute der Hunde, der Adler, ja fast aller Raubtiere! Unsere stete Angst ist ärger als der Tod selbst. Auf, laßt uns ein für allemal sterben.\" \n\nIn einem nahen Teich wollten sie sich nun ersäufen; sie eilten ihm zu; allein das außerordentliche Getöse und ihre wunderbare Gestalt erschreckte eine Menge Frösche, die am Ufer saßen, so sehr, daß sie aufs schnellste untertauchten. \n\n\"Halt\", rief nun eben dieser Sprecher, \"wir wollen das Ersäufen noch ein wenig aufschieben, denn auch uns fürchten, wie ihr seht, einige Tiere, welche also wohl noch unglücklicher sein müssen als wir.\" \n\n"
}
},
{
"Html": {
"headers": {
"content_transfer_encoding": {
"Text": "quoted-printable"
},
"content_type": {
"ContentType": {
"c_type": "text",
"c_subtype": "html",
"attributes": {
"charset": "iso-8859-1"
}
}
}
},
"body": "<html>\n<font face=\"Arial, Helvetica\" size=5 color=\"#0000FF\"><b>Die Hasen und die\nFrösche<br>\n<br>\n</font></b><font face=\"Arial, Helvetica\">Die Hasen klagten einst über\nihre mißliche Lage; &quot;wir leben&quot;, sprach ein Redner, &quot;in\nsteter Furcht vor Menschen und Tieren, eine Beute der Hunde, der Adler,\nja fast aller Raubtiere! Unsere stete Angst ist ärger als der Tod selbst.\nAuf, laßt uns ein für allemal sterben.&quot; <br>\n<br>\nIn einem nahen Teich wollten sie sich nun ersäufen; sie eilten ihm zu;\nallein das außerordentliche Getöse und ihre wunderbare Gestalt\nerschreckte eine Menge Frösche, die am Ufer saßen, so sehr, daß sie aufs\nschnellste untertauchten. <br>\n<br>\n&quot;Halt&quot;, rief nun eben dieser Sprecher, &quot;wir wollen das\nErsäufen noch ein wenig aufschieben, denn auch uns fürchten, wie ihr\nseht, einige Tiere, welche also wohl noch unglücklicher sein müssen als\nwir.&quot; <br>\n<br>\n</font></html>\n"
}
}
]
],
"structure": {
"List": [
{
"Part": 0
},
{
"Part": 1
}
]
},
"offset_header": 0,
"offset_body": 498,
"offset_end": 2623
}
+126 -35
View File
@@ -19,17 +19,25 @@ Slow but steady wins the race.
---- EXPECTED STRUCTURE ----
{
"header": {
"headers_rfc": {
"subject": {
"Text": "The Hare and the Tortoise"
},
"mime_version": {
"Text": "1.0"
},
"date": {
"year": 2000,
"month": 5,
"day": 19,
"hour": 1,
"minute": 13,
"second": 19,
"tz_before_gmt": true,
"tz_hour": 4,
"tz_minute": 0
"DateTime": {
"year": 2000,
"month": 5,
"day": 19,
"hour": 1,
"minute": 13,
"second": 19,
"tz_before_gmt": true,
"tz_hour": 4,
"tz_minute": 0
}
},
"from": {
"Address": {
@@ -37,42 +45,125 @@ Slow but steady wins the race.
"address": "dwsauder@example.com"
}
},
"message_id": "4.2.0.58.20000519011207.00a8cd70@pop.example.com",
"mime_version": "1.0",
"subject": "The Hare and the Tortoise",
"content_type": {
"ContentType": {
"c_type": "text",
"c_subtype": "plain",
"attributes": {
"charset": "us-ascii"
}
}
},
"message_id": {
"Text": "4.2.0.58.20000519011207.00a8cd70@pop.example.com"
},
"to": {
"Address": {
"name": "Joe Blow",
"address": "blow@example.com"
}
},
"content_type": {
"c_type": "text",
"c_subtype": "plain",
"attributes": {
"charset": "us-ascii"
}
},
"others": {
"X-Priority": [
"5 (Lowest)"
],
"X-Sender": [
"dwsauder@pop.example.com (Unverified)"
],
"X-Mailer": [
"QUALCOMM Windows Eudora Pro Version 4.2.0.58"
]
}
},
"html_body": [
"headers_other": {
"X-Mailer": {
"Text": "QUALCOMM Windows Eudora Pro Version 4.2.0.58"
},
"X-Priority": {
"Text": "5 (Lowest)"
},
"X-Sender": {
"Text": "dwsauder@pop.example.com (Unverified)"
}
},
"headers_offsets": [
{
"contents": "<html><body><br/>The Hare and the Tortoise <br/> <br/>A HARE one day ridiculed the short feet and slow pace of the Tortoise, who replied, laughing: \"Though you be swift as the wind, I will beat you in a race.\" The Hare, believing her assertion to be simply impossible, assented to the proposal; and they agreed that the Fox should choose the course and fix the goal. On the day appointed for the race the two started together. The Tortoise never for a moment stopped, but went on with a slow but steady pace straight to the end of the course. The Hare, lying down by the wayside, fell fast asleep. At last waking up, and moving as fast as he could, he saw the Tortoise had reached the goal, and was comfortably dozing after her fatigue. <br/> <br/>Slow but steady wins the race. <br/><br/></body></html>"
"name": {
"Rfc": "message_id"
},
"start": 11,
"end": 64
},
{
"name": {
"Other": "X-Sender"
},
"start": 73,
"end": 113
},
{
"name": {
"Other": "X-Mailer"
},
"start": 122,
"end": 170
},
{
"name": {
"Other": "X-Priority"
},
"start": 181,
"end": 194
},
{
"name": {
"Rfc": "date"
},
"start": 199,
"end": 233
},
{
"name": {
"Rfc": "to"
},
"start": 236,
"end": 266
},
{
"name": {
"Rfc": "from"
},
"start": 271,
"end": 308
},
{
"name": {
"Rfc": "subject"
},
"start": 316,
"end": 344
},
{
"name": {
"Rfc": "mime_version"
},
"start": 357,
"end": 363
},
{
"name": {
"Rfc": "content_type"
},
"start": 376,
"end": 409
}
],
"html_body": [
0
],
"text_body": [
0
],
"parts": [
{
"contents": "\r\nThe Hare and the Tortoise \r\n \r\nA HARE one day ridiculed the short feet and slow pace of the Tortoise, who replied, laughing: \"Though you be swift as the wind, I will beat you in a race.\" The Hare, believing her assertion to be simply impossible, assented to the proposal; and they agreed that the Fox should choose the course and fix the goal. On the day appointed for the race the two started together. The Tortoise never for a moment stopped, but went on with a slow but steady pace straight to the end of the course. The Hare, lying down by the wayside, fell fast asleep. At last waking up, and moving as fast as he could, he saw the Tortoise had reached the goal, and was comfortably dozing after her fatigue. \r\n \r\nSlow but steady wins the race. \r\n\r\n"
"Text": {
"body": "\r\nThe Hare and the Tortoise \r\n \r\nA HARE one day ridiculed the short feet and slow pace of the Tortoise, who replied, laughing: \"Though you be swift as the wind, I will beat you in a race.\" The Hare, believing her assertion to be simply impossible, assented to the proposal; and they agreed that the Fox should choose the course and fix the goal. On the day appointed for the race the two started together. The Tortoise never for a moment stopped, but went on with a slow but steady pace straight to the end of the course. The Hare, lying down by the wayside, fell fast asleep. At last waking up, and moving as fast as he could, he saw the Tortoise had reached the goal, and was comfortably dozing after her fatigue. \r\n \r\nSlow but steady wins the race. \r\n\r\n"
}
}
]
],
"structure": {
"Part": 0
},
"offset_header": 0,
"offset_body": 413,
"offset_end": 1177
}
+153 -39
View File
@@ -33,17 +33,12 @@ m+APw-ssen als wir.+ACI-=20
---- EXPECTED STRUCTURE ----
{
"header": {
"date": {
"year": 2000,
"month": 5,
"day": 17,
"hour": 19,
"minute": 20,
"second": 24,
"tz_before_gmt": true,
"tz_hour": 4,
"tz_minute": 0
"headers_rfc": {
"mime_version": {
"Text": "1.0"
},
"subject": {
"Text": "Die Hasen und die Frösche (Microsoft Outlook 00)"
},
"from": {
"Address": {
@@ -51,49 +46,168 @@ m+APw-ssen als wir.+ACI-=20
"address": "doug@example.com"
}
},
"message_id": "NDBBIAKOPKHFGPLCODIGCEKDCHAA.doug@example.com",
"mime_version": "1.0",
"subject": "Die Hasen und die Frösche (Microsoft Outlook 00)",
"date": {
"DateTime": {
"year": 2000,
"month": 5,
"day": 17,
"hour": 19,
"minute": 20,
"second": 24,
"tz_before_gmt": true,
"tz_hour": 4,
"tz_minute": 0
}
},
"content_transfer_encoding": {
"Text": "quoted-printable"
},
"to": {
"Address": {
"name": "Heinz Müller",
"address": "mueller@example.com"
}
},
"content_transfer_encoding": "quoted-printable",
"content_type": {
"c_type": "text",
"c_subtype": "plain",
"attributes": {
"charset": "utf-7"
"ContentType": {
"c_type": "text",
"c_subtype": "plain",
"attributes": {
"charset": "utf-7"
}
}
},
"others": {
"Importance": [
"Normal"
],
"X-MimeOLE": [
"Produced By Microsoft MimeOLE V5.00.2314.1300"
],
"X-Mailer": [
"Microsoft Outlook IMO, Build 9.0.2416 (9.0.2910.0)"
],
"X-Priority": [
"3 (Normal)"
],
"X-MSMail-Priority": [
"Normal"
]
"message_id": {
"Text": "NDBBIAKOPKHFGPLCODIGCEKDCHAA.doug@example.com"
}
},
"html_body": [
"headers_other": {
"X-Priority": {
"Text": "3 (Normal)"
},
"Importance": {
"Text": "Normal"
},
"X-Mailer": {
"Text": "Microsoft Outlook IMO, Build 9.0.2416 (9.0.2910.0)"
},
"X-MimeOLE": {
"Text": "Produced By Microsoft MimeOLE V5.00.2314.1300"
},
"X-MSMail-Priority": {
"Text": "Normal"
}
},
"headers_offsets": [
{
"contents": "<html><body>Die Hasen und die Frösche<br/><br/>Die Hasen klagten einst über ihre mißliche Lage; \"wir leben\", sprach ein Redner, \"in steter Furcht vor Menschen und Tieren, eine Beute der Hunde, der Adler, ja fast aller Raubtiere! Unsere stete Angst ist ärger als der Tod selbst. Auf, laßt uns ein für allemal sterben.\" <br/><br/>In einem nahen Teich wollten sie sich nun ersäufen; sie eilten ihm zu; allein das außerordentliche Getöse und ihre wunderbare Gestalt erschreckte eine Menge Frösche, die am Ufer saßen, so sehr, daß sie aufs schnellste untertauchten. <br/><br/>\"Halt\", rief nun eben dieser Sprecher, \"wir wollen das Ersäufen noch ein wenig aufschieben, denn auch uns fürchten, wie ihr seht, einige Tiere, welche also wohl noch unglücklicher sein müssen als wir.\" <br/></body></html>"
"name": {
"Rfc": "from"
},
"start": 5,
"end": 40
},
{
"name": {
"Rfc": "to"
},
"start": 43,
"end": 96
},
{
"name": {
"Rfc": "subject"
},
"start": 104,
"end": 175
},
{
"name": {
"Rfc": "date"
},
"start": 180,
"end": 214
},
{
"name": {
"Rfc": "message_id"
},
"start": 225,
"end": 275
},
{
"name": {
"Rfc": "mime_version"
},
"start": 288,
"end": 294
},
{
"name": {
"Rfc": "content_type"
},
"start": 307,
"end": 339
},
{
"name": {
"Rfc": "content_transfer_encoding"
},
"start": 365,
"end": 384
},
{
"name": {
"Other": "X-Priority"
},
"start": 395,
"end": 408
},
{
"name": {
"Other": "X-MSMail-Priority"
},
"start": 426,
"end": 435
},
{
"name": {
"Other": "X-Mailer"
},
"start": 444,
"end": 497
},
{
"name": {
"Other": "Importance"
},
"start": 508,
"end": 517
},
{
"name": {
"Other": "X-MimeOLE"
},
"start": 527,
"end": 575
}
],
"html_body": [
0
],
"text_body": [
0
],
"parts": [
{
"contents": "Die Hasen und die Frösche\n\nDie Hasen klagten einst über ihre mißliche Lage; \"wir leben\", sprach ein Redner, \"in steter Furcht vor Menschen und Tieren, eine Beute der Hunde, der Adler, ja fast aller Raubtiere! Unsere stete Angst ist ärger als der Tod selbst. Auf, laßt uns ein für allemal sterben.\" \n\nIn einem nahen Teich wollten sie sich nun ersäufen; sie eilten ihm zu; allein das außerordentliche Getöse und ihre wunderbare Gestalt erschreckte eine Menge Frösche, die am Ufer saßen, so sehr, daß sie aufs schnellste untertauchten. \n\n\"Halt\", rief nun eben dieser Sprecher, \"wir wollen das Ersäufen noch ein wenig aufschieben, denn auch uns fürchten, wie ihr seht, einige Tiere, welche also wohl noch unglücklicher sein müssen als wir.\" \n"
"Text": {
"body": "Die Hasen und die Frösche\n\nDie Hasen klagten einst über ihre mißliche Lage; \"wir leben\", sprach ein Redner, \"in steter Furcht vor Menschen und Tieren, eine Beute der Hunde, der Adler, ja fast aller Raubtiere! Unsere stete Angst ist ärger als der Tod selbst. Auf, laßt uns ein für allemal sterben.\" \n\nIn einem nahen Teich wollten sie sich nun ersäufen; sie eilten ihm zu; allein das außerordentliche Getöse und ihre wunderbare Gestalt erschreckte eine Menge Frösche, die am Ufer saßen, so sehr, daß sie aufs schnellste untertauchten. \n\n\"Halt\", rief nun eben dieser Sprecher, \"wir wollen das Ersäufen noch ein wenig aufschieben, denn auch uns fürchten, wie ihr seht, einige Tiere, welche also wohl noch unglücklicher sein müssen als wir.\" \n"
}
}
]
],
"structure": {
"Part": 0
},
"offset_header": 0,
"offset_body": 577,
"offset_end": 1470
}
+186 -61
View File
@@ -84,17 +84,12 @@ IFl2ZXMgUGlndWV0NnM7vAAAAABJRU5ErkJggg==
---- EXPECTED STRUCTURE ----
{
"header": {
"date": {
"year": 2000,
"month": 5,
"day": 17,
"hour": 19,
"minute": 36,
"second": 13,
"tz_before_gmt": true,
"tz_hour": 4,
"tz_minute": 0
"headers_rfc": {
"to": {
"Address": {
"name": "Joe Blow",
"address": "jblow@example.com"
}
},
"from": {
"Address": {
@@ -102,60 +97,171 @@ IFl2ZXMgUGlndWV0NnM7vAAAAABJRU5ErkJggg==
"address": "doug@example.com"
}
},
"message_id": "NDBBIAKOPKHFGPLCODIGOEKECHAA.doug@example.com",
"mime_version": "1.0",
"subject": "Test message from Microsoft Outlook 00",
"to": {
"Address": {
"name": "Joe Blow",
"address": "jblow@example.com"
"message_id": {
"Text": "NDBBIAKOPKHFGPLCODIGOEKECHAA.doug@example.com"
},
"mime_version": {
"Text": "1.0"
},
"date": {
"DateTime": {
"year": 2000,
"month": 5,
"day": 17,
"hour": 19,
"minute": 36,
"second": 13,
"tz_before_gmt": true,
"tz_hour": 4,
"tz_minute": 0
}
},
"content_type": {
"c_type": "multipart",
"c_subtype": "mixed",
"attributes": {
"boundary": "----=_NextPart_000_0004_01BFC037.28F2FA90"
"ContentType": {
"c_type": "multipart",
"c_subtype": "mixed",
"attributes": {
"boundary": "----=_NextPart_000_0004_01BFC037.28F2FA90"
}
}
},
"others": {
"Importance": [
"Normal"
],
"X-MimeOLE": [
"Produced By Microsoft MimeOLE V5.00.2314.1300"
],
"X-MSMail-Priority": [
"Normal"
],
"X-Priority": [
"3 (Normal)"
],
"X-Mailer": [
"Microsoft Outlook IMO, Build 9.0.2416 (9.0.2910.0)"
]
"subject": {
"Text": "Test message from Microsoft Outlook 00"
}
},
"headers_other": {
"X-MimeOLE": {
"Text": "Produced By Microsoft MimeOLE V5.00.2314.1300"
},
"X-MSMail-Priority": {
"Text": "Normal"
},
"X-Priority": {
"Text": "3 (Normal)"
},
"X-Mailer": {
"Text": "Microsoft Outlook IMO, Build 9.0.2416 (9.0.2910.0)"
},
"Importance": {
"Text": "Normal"
}
},
"headers_offsets": [
{
"name": {
"Rfc": "from"
},
"start": 5,
"end": 40
},
{
"name": {
"Rfc": "to"
},
"start": 43,
"end": 76
},
{
"name": {
"Rfc": "subject"
},
"start": 84,
"end": 125
},
{
"name": {
"Rfc": "date"
},
"start": 130,
"end": 164
},
{
"name": {
"Rfc": "message_id"
},
"start": 175,
"end": 225
},
{
"name": {
"Rfc": "mime_version"
},
"start": 238,
"end": 244
},
{
"name": {
"Rfc": "content_type"
},
"start": 257,
"end": 331
},
{
"name": {
"Other": "X-Priority"
},
"start": 342,
"end": 355
},
{
"name": {
"Other": "X-MSMail-Priority"
},
"start": 373,
"end": 382
},
{
"name": {
"Other": "X-Mailer"
},
"start": 391,
"end": 444
},
{
"name": {
"Other": "Importance"
},
"start": 455,
"end": 464
},
{
"name": {
"Other": "X-MimeOLE"
},
"start": 474,
"end": 522
}
],
"attachments": [
0,
1
],
"parts": [
{
"Binary": {
"header": {
"headers": {
"content_transfer_encoding": {
"Text": "base64"
},
"content_disposition": {
"c_type": "attachment",
"attributes": {
"filename": "blueball.png"
"ContentType": {
"c_type": "attachment",
"attributes": {
"filename": "blueball.png"
}
}
},
"content_transfer_encoding": "base64",
"content_type": {
"c_type": "image",
"c_subtype": "png",
"attributes": {
"name": "blueball.png"
"ContentType": {
"c_type": "image",
"c_subtype": "png",
"attributes": {
"name": "blueball.png"
}
}
}
},
"contents": [
"body": [
137,
80,
78,
@@ -1486,23 +1592,29 @@ IFl2ZXMgUGlndWV0NnM7vAAAAABJRU5ErkJggg==
},
{
"Binary": {
"header": {
"content_disposition": {
"c_type": "attachment",
"attributes": {
"filename": "redball.png"
"headers": {
"content_type": {
"ContentType": {
"c_type": "image",
"c_subtype": "png",
"attributes": {
"name": "redball.png"
}
}
},
"content_transfer_encoding": "base64",
"content_type": {
"c_type": "image",
"c_subtype": "png",
"attributes": {
"name": "redball.png"
"content_transfer_encoding": {
"Text": "base64"
},
"content_disposition": {
"ContentType": {
"c_type": "attachment",
"attributes": {
"filename": "redball.png"
}
}
}
},
"contents": [
"body": [
137,
80,
78,
@@ -2959,5 +3071,18 @@ IFl2ZXMgUGlndWV0NnM7vAAAAABJRU5ErkJggg==
]
}
}
]
],
"structure": {
"List": [
{
"Part": 0
},
{
"Part": 1
}
]
},
"offset_header": 0,
"offset_body": 524,
"offset_end": 4807
}
+158 -44
View File
@@ -32,17 +32,12 @@ Tiere, welche also wohl noch ungl=FCcklicher sein m=FCssen als wir."=20
---- EXPECTED STRUCTURE ----
{
"header": {
"date": {
"year": 2000,
"month": 5,
"day": 17,
"hour": 19,
"minute": 15,
"second": 35,
"tz_before_gmt": true,
"tz_hour": 4,
"tz_minute": 0
"headers_rfc": {
"to": {
"Address": {
"name": "Jürgen Schmürgen",
"address": "schmuergen@example.com"
}
},
"from": {
"Address": {
@@ -50,49 +45,168 @@ Tiere, welche also wohl noch ungl=FCcklicher sein m=FCssen als wir."=20
"address": "doug@example.com"
}
},
"message_id": "NDBBIAKOPKHFGPLCODIGIEKCCHAA.doug@example.com",
"mime_version": "1.0",
"subject": "Die Hasen und die Frösche (Microsoft Outlook 00)",
"to": {
"Address": {
"name": "Jürgen Schmürgen",
"address": "schmuergen@example.com"
"mime_version": {
"Text": "1.0"
},
"message_id": {
"Text": "NDBBIAKOPKHFGPLCODIGIEKCCHAA.doug@example.com"
},
"content_transfer_encoding": {
"Text": "quoted-printable"
},
"date": {
"DateTime": {
"year": 2000,
"month": 5,
"day": 17,
"hour": 19,
"minute": 15,
"second": 35,
"tz_before_gmt": true,
"tz_hour": 4,
"tz_minute": 0
}
},
"content_transfer_encoding": "quoted-printable",
"subject": {
"Text": "Die Hasen und die Frösche (Microsoft Outlook 00)"
},
"content_type": {
"c_type": "text",
"c_subtype": "plain",
"attributes": {
"charset": "iso-8859-1"
"ContentType": {
"c_type": "text",
"c_subtype": "plain",
"attributes": {
"charset": "iso-8859-1"
}
}
},
"others": {
"X-Priority": [
"3 (Normal)"
],
"Importance": [
"Normal"
],
"X-Mailer": [
"Microsoft Outlook IMO, Build 9.0.2416 (9.0.2910.0)"
],
"X-MSMail-Priority": [
"Normal"
],
"X-MimeOLE": [
"Produced By Microsoft MimeOLE V5.00.2314.1300"
]
}
},
"html_body": [
"headers_other": {
"X-MimeOLE": {
"Text": "Produced By Microsoft MimeOLE V5.00.2314.1300"
},
"Importance": {
"Text": "Normal"
},
"X-MSMail-Priority": {
"Text": "Normal"
},
"X-Priority": {
"Text": "3 (Normal)"
},
"X-Mailer": {
"Text": "Microsoft Outlook IMO, Build 9.0.2416 (9.0.2910.0)"
}
},
"headers_offsets": [
{
"contents": "<html><body>Die Hasen und die Frösche<br/><br/>Die Hasen klagten einst über ihre mißliche Lage; \"wir leben\", sprach ein Redner, \"in steter Furcht vor Menschen und Tieren, eine Beute der Hunde, der Adler, ja fast aller Raubtiere! Unsere stete Angst ist ärger als der Tod selbst. Auf, laßt uns ein für allemal sterben.\" <br/><br/>In einem nahen Teich wollten sie sich nun ersäufen; sie eilten ihm zu; allein das außerordentliche Getöse und ihre wunderbare Gestalt erschreckte eine Menge Frösche, die am Ufer saßen, so sehr, daß sie aufs schnellste untertauchten. <br/><br/>\"Halt\", rief nun eben dieser Sprecher, \"wir wollen das Ersäufen noch ein wenig aufschieben, denn auch uns fürchten, wie ihr seht, einige Tiere, welche also wohl noch unglücklicher sein müssen als wir.\" <br/><br/></body></html>"
"name": {
"Rfc": "from"
},
"start": 5,
"end": 40
},
{
"name": {
"Rfc": "to"
},
"start": 43,
"end": 112
},
{
"name": {
"Rfc": "subject"
},
"start": 120,
"end": 194
},
{
"name": {
"Rfc": "date"
},
"start": 199,
"end": 233
},
{
"name": {
"Rfc": "message_id"
},
"start": 244,
"end": 294
},
{
"name": {
"Rfc": "mime_version"
},
"start": 307,
"end": 313
},
{
"name": {
"Rfc": "content_type"
},
"start": 326,
"end": 363
},
{
"name": {
"Rfc": "content_transfer_encoding"
},
"start": 389,
"end": 408
},
{
"name": {
"Other": "X-Priority"
},
"start": 419,
"end": 432
},
{
"name": {
"Other": "X-MSMail-Priority"
},
"start": 450,
"end": 459
},
{
"name": {
"Other": "X-Mailer"
},
"start": 468,
"end": 521
},
{
"name": {
"Other": "Importance"
},
"start": 532,
"end": 541
},
{
"name": {
"Other": "X-MimeOLE"
},
"start": 551,
"end": 599
}
],
"html_body": [
0
],
"text_body": [
0
],
"parts": [
{
"contents": "Die Hasen und die Frösche\n\nDie Hasen klagten einst über ihre mißliche Lage; \"wir leben\", sprach ein Redner, \"in steter Furcht vor Menschen und Tieren, eine Beute der Hunde, der Adler, ja fast aller Raubtiere! Unsere stete Angst ist ärger als der Tod selbst. Auf, laßt uns ein für allemal sterben.\" \n\nIn einem nahen Teich wollten sie sich nun ersäufen; sie eilten ihm zu; allein das außerordentliche Getöse und ihre wunderbare Gestalt erschreckte eine Menge Frösche, die am Ufer saßen, so sehr, daß sie aufs schnellste untertauchten. \n\n\"Halt\", rief nun eben dieser Sprecher, \"wir wollen das Ersäufen noch ein wenig aufschieben, denn auch uns fürchten, wie ihr seht, einige Tiere, welche also wohl noch unglücklicher sein müssen als wir.\" \n\n"
"Text": {
"body": "Die Hasen und die Frösche\n\nDie Hasen klagten einst über ihre mißliche Lage; \"wir leben\", sprach ein Redner, \"in steter Furcht vor Menschen und Tieren, eine Beute der Hunde, der Adler, ja fast aller Raubtiere! Unsere stete Angst ist ärger als der Tod selbst. Auf, laßt uns ein für allemal sterben.\" \n\nIn einem nahen Teich wollten sie sich nun ersäufen; sie eilten ihm zu; allein das außerordentliche Getöse und ihre wunderbare Gestalt erschreckte eine Menge Frösche, die am Ufer saßen, so sehr, daß sie aufs schnellste untertauchten. \n\n\"Halt\", rief nun eben dieser Sprecher, \"wir wollen das Ersäufen noch ein wenig aufschieben, denn auch uns fürchten, wie ihr seht, einige Tiere, welche also wohl noch unglücklicher sein müssen als wir.\" \n\n"
}
}
]
],
"structure": {
"Part": 0
},
"offset_header": 0,
"offset_body": 601,
"offset_end": 1410
}
+232 -89
View File
@@ -136,98 +136,210 @@ IFl2ZXMgUGlndWV0NnM7vAAAAABJRU5ErkJggg==
---- EXPECTED STRUCTURE ----
{
"header": {
"date": {
"year": 2000,
"month": 5,
"day": 17,
"hour": 19,
"minute": 32,
"second": 47,
"tz_before_gmt": true,
"tz_hour": 4,
"tz_minute": 0
},
"headers_rfc": {
"from": {
"Address": {
"name": "Doug Sauder",
"address": "doug@example.com"
}
},
"message_id": "NDBBIAKOPKHFGPLCODIGGEKECHAA.doug@example.com",
"mime_version": "1.0",
"subject": "Test message from Microsoft Outlook 00",
"to": {
"Address": {
"name": "Heinz Müller",
"address": "mueller@example.com"
}
},
"content_type": {
"c_type": "multipart",
"c_subtype": "mixed",
"attributes": {
"boundary": "----=_NextPart_000_0002_01BFC036.AE309650"
"date": {
"DateTime": {
"year": 2000,
"month": 5,
"day": 17,
"hour": 19,
"minute": 32,
"second": 47,
"tz_before_gmt": true,
"tz_hour": 4,
"tz_minute": 0
}
},
"others": {
"X-Priority": [
"3 (Normal)"
],
"X-MSMail-Priority": [
"Normal"
],
"Importance": [
"Normal"
],
"X-MimeOLE": [
"Produced By Microsoft MimeOLE V5.00.2314.1300"
],
"X-Mailer": [
"Microsoft Outlook IMO, Build 9.0.2416 (9.0.2910.0)"
]
"mime_version": {
"Text": "1.0"
},
"content_type": {
"ContentType": {
"c_type": "multipart",
"c_subtype": "mixed",
"attributes": {
"boundary": "----=_NextPart_000_0002_01BFC036.AE309650"
}
}
},
"message_id": {
"Text": "NDBBIAKOPKHFGPLCODIGGEKECHAA.doug@example.com"
},
"subject": {
"Text": "Test message from Microsoft Outlook 00"
}
},
"html_body": [
{
"contents": "<html><body><br/>The Hare and the Tortoise <br/> <br/>A HARE one day ridiculed the short feet and slow pace of the Tortoise, who replied, laughing: \"Though you be swift as the wind, I will beat you in a race.\" The Hare, believing her assertion to be simply impossible, assented to the proposal; and they agreed that the Fox should choose the course and fix the goal. On the day appointed for the race the two started together. The Tortoise never for a moment stopped, but went on with a slow but steady pace straight to the end of the course. The Hare, lying down by the wayside, fell fast asleep. At last waking up, and moving as fast as he could, he saw the Tortoise had reached the goal, and was comfortably dozing after her fatigue. <br/> <br/>Slow but steady wins the race. <br/></body></html>"
"headers_other": {
"Importance": {
"Text": "Normal"
},
"X-MimeOLE": {
"Text": "Produced By Microsoft MimeOLE V5.00.2314.1300"
},
"X-MSMail-Priority": {
"Text": "Normal"
},
"X-Mailer": {
"Text": "Microsoft Outlook IMO, Build 9.0.2416 (9.0.2910.0)"
},
"X-Priority": {
"Text": "3 (Normal)"
}
},
"headers_offsets": [
{
"name": {
"Rfc": "from"
},
"start": 5,
"end": 40
},
{
"name": {
"Rfc": "to"
},
"start": 43,
"end": 99
},
{
"name": {
"Rfc": "subject"
},
"start": 107,
"end": 148
},
{
"name": {
"Rfc": "date"
},
"start": 153,
"end": 187
},
{
"name": {
"Rfc": "message_id"
},
"start": 198,
"end": 248
},
{
"name": {
"Rfc": "mime_version"
},
"start": 261,
"end": 267
},
{
"name": {
"Rfc": "content_type"
},
"start": 280,
"end": 354
},
{
"name": {
"Other": "X-Priority"
},
"start": 365,
"end": 378
},
{
"name": {
"Other": "X-MSMail-Priority"
},
"start": 396,
"end": 405
},
{
"name": {
"Other": "X-Mailer"
},
"start": 414,
"end": 467
},
{
"name": {
"Other": "Importance"
},
"start": 478,
"end": 487
},
{
"name": {
"Other": "X-MimeOLE"
},
"start": 497,
"end": 545
}
],
"html_body": [
0
],
"text_body": [
{
"header": {
"content_transfer_encoding": "quoted-printable",
"content_type": {
"c_type": "text",
"c_subtype": "plain",
"attributes": {
"charset": "iso-8859-1"
}
}
},
"contents": "\nThe Hare and the Tortoise \n \nA HARE one day ridiculed the short feet and slow pace of the Tortoise, who replied, laughing: \"Though you be swift as the wind, I will beat you in a race.\" The Hare, believing her assertion to be simply impossible, assented to the proposal; and they agreed that the Fox should choose the course and fix the goal. On the day appointed for the race the two started together. The Tortoise never for a moment stopped, but went on with a slow but steady pace straight to the end of the course. The Hare, lying down by the wayside, fell fast asleep. At last waking up, and moving as fast as he could, he saw the Tortoise had reached the goal, and was comfortably dozing after her fatigue. \n \nSlow but steady wins the race. \n"
}
0
],
"attachments": [
1,
2,
3
],
"parts": [
{
"Binary": {
"header": {
"content_disposition": {
"c_type": "attachment",
"attributes": {
"filename": "blueball.png"
"Text": {
"headers": {
"content_type": {
"ContentType": {
"c_type": "text",
"c_subtype": "plain",
"attributes": {
"charset": "iso-8859-1"
}
}
},
"content_transfer_encoding": "base64",
"content_type": {
"c_type": "image",
"c_subtype": "png",
"attributes": {
"name": "blueball.png"
}
"content_transfer_encoding": {
"Text": "quoted-printable"
}
},
"contents": [
"body": "\nThe Hare and the Tortoise \n \nA HARE one day ridiculed the short feet and slow pace of the Tortoise, who replied, laughing: \"Though you be swift as the wind, I will beat you in a race.\" The Hare, believing her assertion to be simply impossible, assented to the proposal; and they agreed that the Fox should choose the course and fix the goal. On the day appointed for the race the two started together. The Tortoise never for a moment stopped, but went on with a slow but steady pace straight to the end of the course. The Hare, lying down by the wayside, fell fast asleep. At last waking up, and moving as fast as he could, he saw the Tortoise had reached the goal, and was comfortably dozing after her fatigue. \n \nSlow but steady wins the race. \n"
}
},
{
"Binary": {
"headers": {
"content_type": {
"ContentType": {
"c_type": "image",
"c_subtype": "png",
"attributes": {
"name": "blueball.png"
}
}
},
"content_disposition": {
"ContentType": {
"c_type": "attachment",
"attributes": {
"filename": "blueball.png"
}
}
},
"content_transfer_encoding": {
"Text": "base64"
}
},
"body": [
137,
80,
78,
@@ -1558,23 +1670,29 @@ IFl2ZXMgUGlndWV0NnM7vAAAAABJRU5ErkJggg==
},
{
"Binary": {
"header": {
"content_disposition": {
"c_type": "attachment",
"attributes": {
"filename": "greenball.png"
"headers": {
"content_type": {
"ContentType": {
"c_type": "image",
"c_subtype": "png",
"attributes": {
"name": "greenball.png"
}
}
},
"content_transfer_encoding": "base64",
"content_type": {
"c_type": "image",
"c_subtype": "png",
"attributes": {
"name": "greenball.png"
"content_disposition": {
"ContentType": {
"c_type": "attachment",
"attributes": {
"filename": "greenball.png"
}
}
},
"content_transfer_encoding": {
"Text": "base64"
}
},
"contents": [
"body": [
137,
80,
78,
@@ -2878,23 +2996,29 @@ IFl2ZXMgUGlndWV0NnM7vAAAAABJRU5ErkJggg==
},
{
"Binary": {
"header": {
"headers": {
"content_disposition": {
"c_type": "attachment",
"attributes": {
"filename": "redball.png"
"ContentType": {
"c_type": "attachment",
"attributes": {
"filename": "redball.png"
}
}
},
"content_transfer_encoding": "base64",
"content_transfer_encoding": {
"Text": "base64"
},
"content_type": {
"c_type": "image",
"c_subtype": "png",
"attributes": {
"name": "redball.png"
"ContentType": {
"c_type": "image",
"c_subtype": "png",
"attributes": {
"name": "redball.png"
}
}
}
},
"contents": [
"body": [
137,
80,
78,
@@ -4351,5 +4475,24 @@ IFl2ZXMgUGlndWV0NnM7vAAAAABJRU5ErkJggg==
]
}
}
]
],
"structure": {
"List": [
{
"Part": 0
},
{
"Part": 1
},
{
"Part": 2
},
{
"Part": 3
}
]
},
"offset_header": 0,
"offset_body": 547,
"offset_end": 7745
}
+149 -42
View File
@@ -37,65 +37,172 @@ welche also wohl noch ungl=FCcklicher sein m=FCssen als wir."
---- EXPECTED STRUCTURE ----
{
"header": {
"date": {
"year": 2000,
"month": 5,
"day": 19,
"hour": 1,
"minute": 6,
"second": 18,
"tz_before_gmt": true,
"tz_hour": 4,
"tz_minute": 0
"headers_rfc": {
"message_id": {
"Text": "4.2.0.58.20000519010441.00a8d140@pop.example.com"
},
"from": {
"Address": {
"name": "Doug Sauder",
"address": "dwsauder@example.com"
"mime_version": {
"Text": "1.0"
},
"content_transfer_encoding": {
"Text": "quoted-printable"
},
"content_type": {
"ContentType": {
"c_type": "text",
"c_subtype": "plain",
"attributes": {
"charset": "iso-8859-1",
"format": "flowed"
}
}
},
"message_id": "4.2.0.58.20000519010441.00a8d140@pop.example.com",
"mime_version": "1.0",
"subject": "Die Hasen und die Frösche",
"to": {
"Address": {
"name": "Jürgen Schmürgen",
"address": "jschmuergen@example.com"
}
},
"content_transfer_encoding": "quoted-printable",
"content_type": {
"c_type": "text",
"c_subtype": "plain",
"attributes": {
"charset": "iso-8859-1",
"format": "flowed"
"date": {
"DateTime": {
"year": 2000,
"month": 5,
"day": 19,
"hour": 1,
"minute": 6,
"second": 18,
"tz_before_gmt": true,
"tz_hour": 4,
"tz_minute": 0
}
},
"others": {
"X-Mailer": [
"QUALCOMM Windows Eudora Pro Version 4.2.0.58"
],
"X-Priority": [
"1 (Highest)"
],
"Disposition-Notification-To": [
"<dwsauder@example.com>"
],
"X-Sender": [
"dwsauder@pop.example.com (Unverified)"
]
"subject": {
"Text": "Die Hasen und die Frösche"
},
"from": {
"Address": {
"name": "Doug Sauder",
"address": "dwsauder@example.com"
}
}
},
"html_body": [
"headers_other": {
"Disposition-Notification-To": {
"Text": "<dwsauder@example.com>"
},
"X-Priority": {
"Text": "1 (Highest)"
},
"X-Sender": {
"Text": "dwsauder@pop.example.com (Unverified)"
},
"X-Mailer": {
"Text": "QUALCOMM Windows Eudora Pro Version 4.2.0.58"
}
},
"headers_offsets": [
{
"contents": "<html><body>Die Hasen und die Frösche<br/><br/>Die Hasen klagten einst über ihre mißliche Lage; \"wir leben\", sprach ein <br/>Redner, \"in steter Furcht vor Menschen und Tieren, eine Beute der Hunde, <br/>der Adler, ja fast aller Raubtiere! Unsere stete Angst ist ärger als der <br/>Tod selbst. Auf, laßt uns ein für allemal sterben.\"<br/><br/>In einem nahen Teich wollten sie sich nun ersäufen; sie eilten ihm zu; <br/>allein das außerordentliche Getöse und ihre wunderbare Gestalt erschreckte <br/>eine Menge Frösche, die am Ufer saßen, so sehr, daß sie aufs schnellste <br/>untertauchten.<br/><br/>\"Halt\", rief nun eben dieser Sprecher, \"wir wollen das Ersäufen noch ein <br/>wenig aufschieben, denn auch uns fürchten, wie ihr seht, einige Tiere, <br/>welche also wohl noch unglücklicher sein müssen als wir.\"<br/><br/><br/></body></html>"
"name": {
"Rfc": "message_id"
},
"start": 11,
"end": 64
},
{
"name": {
"Other": "X-Sender"
},
"start": 73,
"end": 113
},
{
"name": {
"Other": "Disposition-Notification-To"
},
"start": 141,
"end": 166
},
{
"name": {
"Other": "X-Mailer"
},
"start": 175,
"end": 223
},
{
"name": {
"Other": "X-Priority"
},
"start": 234,
"end": 248
},
{
"name": {
"Rfc": "date"
},
"start": 253,
"end": 287
},
{
"name": {
"Rfc": "to"
},
"start": 290,
"end": 373
},
{
"name": {
"Rfc": "from"
},
"start": 378,
"end": 415
},
{
"name": {
"Rfc": "subject"
},
"start": 423,
"end": 468
},
{
"name": {
"Rfc": "mime_version"
},
"start": 481,
"end": 487
},
{
"name": {
"Rfc": "content_type"
},
"start": 500,
"end": 550
},
{
"name": {
"Rfc": "content_transfer_encoding"
},
"start": 576,
"end": 595
}
],
"html_body": [
0
],
"text_body": [
0
],
"parts": [
{
"contents": "Die Hasen und die Frösche\n\nDie Hasen klagten einst über ihre mißliche Lage; \"wir leben\", sprach ein \nRedner, \"in steter Furcht vor Menschen und Tieren, eine Beute der Hunde, \nder Adler, ja fast aller Raubtiere! Unsere stete Angst ist ärger als der \nTod selbst. Auf, laßt uns ein für allemal sterben.\"\n\nIn einem nahen Teich wollten sie sich nun ersäufen; sie eilten ihm zu; \nallein das außerordentliche Getöse und ihre wunderbare Gestalt erschreckte \neine Menge Frösche, die am Ufer saßen, so sehr, daß sie aufs schnellste \nuntertauchten.\n\n\"Halt\", rief nun eben dieser Sprecher, \"wir wollen das Ersäufen noch ein \nwenig aufschieben, denn auch uns fürchten, wie ihr seht, einige Tiere, \nwelche also wohl noch unglücklicher sein müssen als wir.\"\n\n\n"
"Text": {
"body": "Die Hasen und die Frösche\n\nDie Hasen klagten einst über ihre mißliche Lage; \"wir leben\", sprach ein \nRedner, \"in steter Furcht vor Menschen und Tieren, eine Beute der Hunde, \nder Adler, ja fast aller Raubtiere! Unsere stete Angst ist ärger als der \nTod selbst. Auf, laßt uns ein für allemal sterben.\"\n\nIn einem nahen Teich wollten sie sich nun ersäufen; sie eilten ihm zu; \nallein das außerordentliche Getöse und ihre wunderbare Gestalt erschreckte \neine Menge Frösche, die am Ufer saßen, so sehr, daß sie aufs schnellste \nuntertauchten.\n\n\"Halt\", rief nun eben dieser Sprecher, \"wir wollen das Ersäufen noch ein \nwenig aufschieben, denn auch uns fürchten, wie ihr seht, einige Tiere, \nwelche also wohl noch unglücklicher sein müssen als wir.\"\n\n\n"
}
}
]
],
"structure": {
"Part": 0
},
"offset_header": 0,
"offset_body": 597,
"offset_end": 1422
}
+138 -38
View File
@@ -22,17 +22,34 @@ In einem nahen Teich wollten sie sich nun ers
---- EXPECTED STRUCTURE ----
{
"header": {
"headers_rfc": {
"content_transfer_encoding": {
"Text": "8bit"
},
"date": {
"year": 2000,
"month": 5,
"day": 19,
"hour": 1,
"minute": 10,
"second": 27,
"tz_before_gmt": true,
"tz_hour": 4,
"tz_minute": 0
"DateTime": {
"year": 2000,
"month": 5,
"day": 19,
"hour": 1,
"minute": 10,
"second": 27,
"tz_before_gmt": true,
"tz_hour": 4,
"tz_minute": 0
}
},
"message_id": {
"Text": "4.2.0.58.20000519010842.00a8c7f0@pop.example.com"
},
"subject": {
"Text": "Die Hasen und die Fr�sche"
},
"to": {
"Address": {
"name": "Heinz M�ller",
"address": "mueller@example.com"
}
},
"from": {
"Address": {
@@ -40,43 +57,126 @@ In einem nahen Teich wollten sie sich nun ers
"address": "dwsauder@example.com"
}
},
"message_id": "4.2.0.58.20000519010842.00a8c7f0@pop.example.com",
"mime_version": "1.0",
"subject": "Die Hasen und die Fr�sche",
"to": {
"Address": {
"name": "Heinz M�ller",
"address": "mueller@example.com"
}
},
"content_transfer_encoding": "8bit",
"content_type": {
"c_type": "text",
"c_subtype": "plain",
"attributes": {
"charset": "iso-8859-1"
"ContentType": {
"c_type": "text",
"c_subtype": "plain",
"attributes": {
"charset": "iso-8859-1"
}
}
},
"others": {
"X-Sender": [
"dwsauder@pop.example.com (Unverified)"
],
"X-Mailer": [
"QUALCOMM Windows Eudora Pro Version 4.2.0.58"
],
"X-Priority": [
"1 (Highest)"
]
"mime_version": {
"Text": "1.0"
}
},
"html_body": [
"headers_other": {
"X-Sender": {
"Text": "dwsauder@pop.example.com (Unverified)"
},
"X-Mailer": {
"Text": "QUALCOMM Windows Eudora Pro Version 4.2.0.58"
},
"X-Priority": {
"Text": "1 (Highest)"
}
},
"headers_offsets": [
{
"contents": "<html><body>Die Hasen und die Frösche<br/><br/>Die Hasen klagten einst über ihre mißliche Lage; \"wir leben\", sprach ein Redner, \"in steter Furcht vor Menschen und Tieren, eine Beute der Hunde, der Adler, ja fast aller Raubtiere! Unsere stete Angst ist ärger als der Tod selbst. Auf, laßt uns ein für allemal sterben.\" <br/><br/>In einem nahen Teich wollten sie sich nun ersäufen; sie eilten ihm zu; allein das außerordentliche Getöse und ihre wunderbare Gestalt erschreckte eine Menge Frösche, die am Ufer saßen, so sehr, daß sie aufs schnellste untertauchten. <br/><br/>\"Halt\", rief nun eben dieser Sprecher, \"wir wollen das Ersäufen noch ein wenig aufschieben, denn auch uns fürchten, wie ihr seht, einige Tiere, welche also wohl noch unglücklicher sein müssen als wir.\" <br/><br/><br/></body></html>"
"name": {
"Rfc": "message_id"
},
"start": 11,
"end": 64
},
{
"name": {
"Other": "X-Sender"
},
"start": 73,
"end": 113
},
{
"name": {
"Other": "X-Mailer"
},
"start": 122,
"end": 170
},
{
"name": {
"Other": "X-Priority"
},
"start": 181,
"end": 195
},
{
"name": {
"Rfc": "date"
},
"start": 200,
"end": 234
},
{
"name": {
"Rfc": "to"
},
"start": 237,
"end": 274
},
{
"name": {
"Rfc": "from"
},
"start": 279,
"end": 316
},
{
"name": {
"Rfc": "subject"
},
"start": 324,
"end": 352
},
{
"name": {
"Rfc": "mime_version"
},
"start": 365,
"end": 371
},
{
"name": {
"Rfc": "content_type"
},
"start": 384,
"end": 419
},
{
"name": {
"Rfc": "content_transfer_encoding"
},
"start": 445,
"end": 452
}
],
"html_body": [
0
],
"text_body": [
0
],
"parts": [
{
"contents": "Die Hasen und die Frösche\r\n\r\nDie Hasen klagten einst über ihre mißliche Lage; \"wir leben\", sprach ein Redner, \"in steter Furcht vor Menschen und Tieren, eine Beute der Hunde, der Adler, ja fast aller Raubtiere! Unsere stete Angst ist ärger als der Tod selbst. Auf, laßt uns ein für allemal sterben.\" \r\n\r\nIn einem nahen Teich wollten sie sich nun ersäufen; sie eilten ihm zu; allein das außerordentliche Getöse und ihre wunderbare Gestalt erschreckte eine Menge Frösche, die am Ufer saßen, so sehr, daß sie aufs schnellste untertauchten. \r\n\r\n\"Halt\", rief nun eben dieser Sprecher, \"wir wollen das Ersäufen noch ein wenig aufschieben, denn auch uns fürchten, wie ihr seht, einige Tiere, welche also wohl noch unglücklicher sein müssen als wir.\" \r\n\r\n\r\n"
"Text": {
"body": "Die Hasen und die Frösche\r\n\r\nDie Hasen klagten einst über ihre mißliche Lage; \"wir leben\", sprach ein Redner, \"in steter Furcht vor Menschen und Tieren, eine Beute der Hunde, der Adler, ja fast aller Raubtiere! Unsere stete Angst ist ärger als der Tod selbst. Auf, laßt uns ein für allemal sterben.\" \r\n\r\nIn einem nahen Teich wollten sie sich nun ersäufen; sie eilten ihm zu; allein das außerordentliche Getöse und ihre wunderbare Gestalt erschreckte eine Menge Frösche, die am Ufer saßen, so sehr, daß sie aufs schnellste untertauchten. \r\n\r\n\"Halt\", rief nun eben dieser Sprecher, \"wir wollen das Ersäufen noch ein wenig aufschieben, denn auch uns fürchten, wie ihr seht, einige Tiere, welche also wohl noch unglücklicher sein müssen als wir.\" \r\n\r\n\r\n"
}
}
]
],
"structure": {
"Part": 0
},
"offset_header": 0,
"offset_body": 454,
"offset_end": 1203
}
+123 -30
View File
@@ -30,17 +30,15 @@ In einem nahen Teich wollten sie sich nun ers=E4ufen; sie eilten ihm zu;=
---- EXPECTED STRUCTURE ----
{
"header": {
"date": {
"year": 2000,
"month": 5,
"day": 19,
"hour": 0,
"minute": 17,
"second": 39,
"tz_before_gmt": true,
"tz_hour": 4,
"tz_minute": 0
"headers_rfc": {
"subject": {
"Text": "Die Hasen und die Frösche"
},
"message_id": {
"Text": "4.2.0.58.20000519001217.00a85b60@pop.example.com"
},
"content_transfer_encoding": {
"Text": "quoted-printable"
},
"from": {
"Address": {
@@ -48,40 +46,135 @@ In einem nahen Teich wollten sie sich nun ers=E4ufen; sie eilten ihm zu;=
"address": "dwsauder@example.com"
}
},
"message_id": "4.2.0.58.20000519001217.00a85b60@pop.example.com",
"mime_version": "1.0",
"subject": "Die Hasen und die Frösche",
"to": {
"Address": {
"name": "Jürgen Schmürgen",
"address": "jschmuergen@example.com"
}
},
"content_transfer_encoding": "quoted-printable",
"mime_version": {
"Text": "1.0"
},
"content_type": {
"c_type": "text",
"c_subtype": "plain",
"attributes": {
"charset": "iso-8859-1"
"ContentType": {
"c_type": "text",
"c_subtype": "plain",
"attributes": {
"charset": "iso-8859-1"
}
}
},
"others": {
"X-Mailer": [
"QUALCOMM Windows Eudora Pro Version 4.2.0.58"
],
"X-Sender": [
"dwsauder@pop.example.com (Unverified)"
]
"date": {
"DateTime": {
"year": 2000,
"month": 5,
"day": 19,
"hour": 0,
"minute": 17,
"second": 39,
"tz_before_gmt": true,
"tz_hour": 4,
"tz_minute": 0
}
}
},
"html_body": [
"headers_other": {
"X-Mailer": {
"Text": "QUALCOMM Windows Eudora Pro Version 4.2.0.58"
},
"X-Sender": {
"Text": "dwsauder@pop.example.com (Unverified)"
}
},
"headers_offsets": [
{
"contents": "<html><body>Die Hasen und die Frösche<br/><br/>Die Hasen klagten einst über ihre mißliche Lage; \"wir leben\", sprach ein Redner, \"in steter Furcht vor Menschen und Tieren, eine Beute der Hunde, der Adler, ja fast aller Raubtiere! Unsere stete Angst ist ärger als der Tod selbst. Auf, laßt uns ein für allemal sterben.\" <br/><br/>In einem nahen Teich wollten sie sich nun ersäufen; sie eilten ihm zu; allein das außerordentliche Getöse und ihre wunderbare Gestalt erschreckte eine Menge Frösche, die am Ufer saßen, so sehr, daß sie aufs schnellste untertauchten. <br/><br/>\"Halt\", rief nun eben dieser Sprecher, \"wir wollen das Ersäufen noch ein wenig aufschieben, denn auch uns fürchten, wie ihr seht, einige Tiere, welche also wohl noch unglücklicher sein müssen als wir.\" <br/><br/><br/></body></html>"
"name": {
"Rfc": "message_id"
},
"start": 11,
"end": 64
},
{
"name": {
"Other": "X-Sender"
},
"start": 73,
"end": 113
},
{
"name": {
"Other": "X-Mailer"
},
"start": 122,
"end": 170
},
{
"name": {
"Rfc": "date"
},
"start": 175,
"end": 209
},
{
"name": {
"Rfc": "to"
},
"start": 212,
"end": 299
},
{
"name": {
"Rfc": "from"
},
"start": 304,
"end": 341
},
{
"name": {
"Rfc": "subject"
},
"start": 349,
"end": 396
},
{
"name": {
"Rfc": "mime_version"
},
"start": 409,
"end": 415
},
{
"name": {
"Rfc": "content_type"
},
"start": 428,
"end": 463
},
{
"name": {
"Rfc": "content_transfer_encoding"
},
"start": 489,
"end": 508
}
],
"html_body": [
0
],
"text_body": [
0
],
"parts": [
{
"contents": "Die Hasen und die Frösche\n\nDie Hasen klagten einst über ihre mißliche Lage; \"wir leben\", sprach ein Redner, \"in steter Furcht vor Menschen und Tieren, eine Beute der Hunde, der Adler, ja fast aller Raubtiere! Unsere stete Angst ist ärger als der Tod selbst. Auf, laßt uns ein für allemal sterben.\" \n\nIn einem nahen Teich wollten sie sich nun ersäufen; sie eilten ihm zu; allein das außerordentliche Getöse und ihre wunderbare Gestalt erschreckte eine Menge Frösche, die am Ufer saßen, so sehr, daß sie aufs schnellste untertauchten. \n\n\"Halt\", rief nun eben dieser Sprecher, \"wir wollen das Ersäufen noch ein wenig aufschieben, denn auch uns fürchten, wie ihr seht, einige Tiere, welche also wohl noch unglücklicher sein müssen als wir.\" \n\n\n"
"Text": {
"body": "Die Hasen und die Frösche\n\nDie Hasen klagten einst über ihre mißliche Lage; \"wir leben\", sprach ein Redner, \"in steter Furcht vor Menschen und Tieren, eine Beute der Hunde, der Adler, ja fast aller Raubtiere! Unsere stete Angst ist ärger als der Tod selbst. Auf, laßt uns ein für allemal sterben.\" \n\nIn einem nahen Teich wollten sie sich nun ersäufen; sie eilten ihm zu; allein das außerordentliche Getöse und ihre wunderbare Gestalt erschreckte eine Menge Frösche, die am Ufer saßen, so sehr, daß sie aufs schnellste untertauchten. \n\n\"Halt\", rief nun eben dieser Sprecher, \"wir wollen das Ersäufen noch ein wenig aufschieben, denn auch uns fürchten, wie ihr seht, einige Tiere, welche also wohl noch unglücklicher sein müssen als wir.\" \n\n\n"
}
}
]
],
"structure": {
"Part": 0
},
"offset_header": 0,
"offset_body": 510,
"offset_end": 1321
}
+156 -42
View File
@@ -31,17 +31,25 @@ Tiere, welche also wohl noch ungl=FCcklicher sein m=FCssen als wir."=20
---- EXPECTED STRUCTURE ----
{
"header": {
"headers_rfc": {
"date": {
"year": 2000,
"month": 5,
"day": 17,
"hour": 19,
"minute": 30,
"second": 20,
"tz_before_gmt": true,
"tz_hour": 4,
"tz_minute": 0
"DateTime": {
"year": 2000,
"month": 5,
"day": 17,
"hour": 19,
"minute": 30,
"second": 20,
"tz_before_gmt": true,
"tz_hour": 4,
"tz_minute": 0
}
},
"mime_version": {
"Text": "1.0"
},
"content_transfer_encoding": {
"Text": "quoted-printable"
},
"from": {
"Address": {
@@ -49,49 +57,155 @@ Tiere, welche also wohl noch ungl=FCcklicher sein m=FCssen als wir."=20
"address": "doug@example.com"
}
},
"message_id": "NDBBIAKOPKHFGPLCODIGCEKECHAA.doug@example.com",
"mime_version": "1.0",
"subject": "Die Hasen und die Frösche (Microsoft Outlook 00)",
"message_id": {
"Text": "NDBBIAKOPKHFGPLCODIGCEKECHAA.doug@example.com"
},
"content_type": {
"ContentType": {
"c_type": "text",
"c_subtype": "plain",
"attributes": {
"charset": "Windows-1252"
}
}
},
"subject": {
"Text": "Die Hasen und die Frösche (Microsoft Outlook 00)"
},
"to": {
"Address": {
"name": "Heinz Müller",
"address": "mueller@example.com"
}
},
"content_transfer_encoding": "quoted-printable",
"content_type": {
"c_type": "text",
"c_subtype": "plain",
"attributes": {
"charset": "Windows-1252"
}
},
"others": {
"X-MSMail-Priority": [
"Normal"
],
"Importance": [
"Normal"
],
"X-MimeOLE": [
"Produced By Microsoft MimeOLE V5.00.2314.1300"
],
"X-Mailer": [
"Microsoft Outlook IMO, Build 9.0.2416 (9.0.2910.0)"
],
"X-Priority": [
"3 (Normal)"
]
}
},
"html_body": [
"headers_other": {
"X-MimeOLE": {
"Text": "Produced By Microsoft MimeOLE V5.00.2314.1300"
},
"Importance": {
"Text": "Normal"
},
"X-Priority": {
"Text": "3 (Normal)"
},
"X-MSMail-Priority": {
"Text": "Normal"
},
"X-Mailer": {
"Text": "Microsoft Outlook IMO, Build 9.0.2416 (9.0.2910.0)"
}
},
"headers_offsets": [
{
"contents": "<html><body>Die Hasen und die Frösche<br/><br/>Die Hasen klagten einst über ihre mißliche Lage; \"wir leben\", sprach ein Redner, \"in steter Furcht vor Menschen und Tieren, eine Beute der Hunde, der Adler, ja fast aller Raubtiere! Unsere stete Angst ist ärger als der Tod selbst. Auf, laßt uns ein für allemal sterben.\" <br/><br/>In einem nahen Teich wollten sie sich nun ersäufen; sie eilten ihm zu; allein das außerordentliche Getöse und ihre wunderbare Gestalt erschreckte eine Menge Frösche, die am Ufer saßen, so sehr, daß sie aufs schnellste untertauchten. <br/><br/>\"Halt\", rief nun eben dieser Sprecher, \"wir wollen das Ersäufen noch ein wenig aufschieben, denn auch uns fürchten, wie ihr seht, einige Tiere, welche also wohl noch unglücklicher sein müssen als wir.\" <br/></body></html>"
"name": {
"Rfc": "from"
},
"start": 5,
"end": 40
},
{
"name": {
"Rfc": "to"
},
"start": 43,
"end": 101
},
{
"name": {
"Rfc": "subject"
},
"start": 109,
"end": 185
},
{
"name": {
"Rfc": "date"
},
"start": 190,
"end": 224
},
{
"name": {
"Rfc": "message_id"
},
"start": 235,
"end": 285
},
{
"name": {
"Rfc": "mime_version"
},
"start": 298,
"end": 304
},
{
"name": {
"Rfc": "content_type"
},
"start": 317,
"end": 356
},
{
"name": {
"Rfc": "content_transfer_encoding"
},
"start": 382,
"end": 401
},
{
"name": {
"Other": "X-Priority"
},
"start": 412,
"end": 425
},
{
"name": {
"Other": "X-MSMail-Priority"
},
"start": 443,
"end": 452
},
{
"name": {
"Other": "X-Mailer"
},
"start": 461,
"end": 514
},
{
"name": {
"Other": "Importance"
},
"start": 525,
"end": 534
},
{
"name": {
"Other": "X-MimeOLE"
},
"start": 544,
"end": 592
}
],
"html_body": [
0
],
"text_body": [
0
],
"parts": [
{
"contents": "Die Hasen und die Frösche\n\nDie Hasen klagten einst über ihre mißliche Lage; \"wir leben\", sprach ein Redner, \"in steter Furcht vor Menschen und Tieren, eine Beute der Hunde, der Adler, ja fast aller Raubtiere! Unsere stete Angst ist ärger als der Tod selbst. Auf, laßt uns ein für allemal sterben.\" \n\nIn einem nahen Teich wollten sie sich nun ersäufen; sie eilten ihm zu; allein das außerordentliche Getöse und ihre wunderbare Gestalt erschreckte eine Menge Frösche, die am Ufer saßen, so sehr, daß sie aufs schnellste untertauchten. \n\n\"Halt\", rief nun eben dieser Sprecher, \"wir wollen das Ersäufen noch ein wenig aufschieben, denn auch uns fürchten, wie ihr seht, einige Tiere, welche also wohl noch unglücklicher sein müssen als wir.\" \n"
"Text": {
"body": "Die Hasen und die Frösche\n\nDie Hasen klagten einst über ihre mißliche Lage; \"wir leben\", sprach ein Redner, \"in steter Furcht vor Menschen und Tieren, eine Beute der Hunde, der Adler, ja fast aller Raubtiere! Unsere stete Angst ist ärger als der Tod selbst. Auf, laßt uns ein für allemal sterben.\" \n\nIn einem nahen Teich wollten sie sich nun ersäufen; sie eilten ihm zu; allein das außerordentliche Getöse und ihre wunderbare Gestalt erschreckte eine Menge Frösche, die am Ufer saßen, so sehr, daß sie aufs schnellste untertauchten. \n\n\"Halt\", rief nun eben dieser Sprecher, \"wir wollen das Ersäufen noch ein wenig aufschieben, denn auch uns fürchten, wie ihr seht, einige Tiere, welche also wohl noch unglücklicher sein müssen als wir.\" \n"
}
}
]
],
"structure": {
"Part": 0
},
"offset_header": 0,
"offset_body": 594,
"offset_end": 1401
}
+155 -41
View File
@@ -32,17 +32,18 @@ welche also wohl noch ungl
---- EXPECTED STRUCTURE ----
{
"header": {
"date": {
"year": 2000,
"month": 5,
"day": 17,
"hour": 19,
"minute": 13,
"second": 51,
"tz_before_gmt": true,
"tz_hour": 4,
"tz_minute": 0
"headers_rfc": {
"content_type": {
"ContentType": {
"c_type": "text",
"c_subtype": "plain",
"attributes": {
"charset": "iso-8859-1"
}
}
},
"subject": {
"Text": "Die Hasen und die Frösche (Microsoft Outlook 00)"
},
"from": {
"Address": {
@@ -50,49 +51,162 @@ welche also wohl noch ungl
"address": "doug@example.com"
}
},
"message_id": "NDBBIAKOPKHFGPLCODIGEEKCCHAA.doug@example.com",
"mime_version": "1.0",
"subject": "Die Hasen und die Frösche (Microsoft Outlook 00)",
"to": {
"Address": {
"name": "Jürgen Schmürgen",
"address": "schmuergen@example.com"
}
},
"content_transfer_encoding": "8bit",
"content_type": {
"c_type": "text",
"c_subtype": "plain",
"attributes": {
"charset": "iso-8859-1"
}
"mime_version": {
"Text": "1.0"
},
"others": {
"X-Mailer": [
"Microsoft Outlook IMO, Build 9.0.2416 (9.0.2910.0)"
],
"Importance": [
"Normal"
],
"X-Priority": [
"3 (Normal)"
],
"X-MSMail-Priority": [
"Normal"
],
"X-MimeOLE": [
"Produced By Microsoft MimeOLE V5.00.2314.1300"
]
"message_id": {
"Text": "NDBBIAKOPKHFGPLCODIGEEKCCHAA.doug@example.com"
},
"content_transfer_encoding": {
"Text": "8bit"
},
"date": {
"DateTime": {
"year": 2000,
"month": 5,
"day": 17,
"hour": 19,
"minute": 13,
"second": 51,
"tz_before_gmt": true,
"tz_hour": 4,
"tz_minute": 0
}
}
},
"html_body": [
"headers_other": {
"X-Priority": {
"Text": "3 (Normal)"
},
"X-MSMail-Priority": {
"Text": "Normal"
},
"X-Mailer": {
"Text": "Microsoft Outlook IMO, Build 9.0.2416 (9.0.2910.0)"
},
"Importance": {
"Text": "Normal"
},
"X-MimeOLE": {
"Text": "Produced By Microsoft MimeOLE V5.00.2314.1300"
}
},
"headers_offsets": [
{
"contents": "<html><body>Die Hasen und die Frösche<br/><br/>Die Hasen klagten einst über ihre mißliche Lage; \"wir leben\", sprach ein<br/>Redner, \"in steter Furcht vor Menschen und Tieren, eine Beute der Hunde, der<br/>Adler, ja fast aller Raubtiere! Unsere stete Angst ist ärger als der Tod<br/>selbst. Auf, laßt uns ein für allemal sterben.\"<br/><br/>In einem nahen Teich wollten sie sich nun ersäufen; sie eilten ihm zu;<br/>allein das außerordentliche Getöse und ihre wunderbare Gestalt erschreckte<br/>eine Menge Frösche, die am Ufer saßen, so sehr, daß sie aufs schnellste<br/>untertauchten.<br/><br/>\"Halt\", rief nun eben dieser Sprecher, \"wir wollen das Ersäufen noch ein<br/>wenig aufschieben, denn auch uns fürchten, wie ihr seht, einige Tiere,<br/>welche also wohl noch unglücklicher sein müssen als wir.\"<br/><br/></body></html>"
"name": {
"Rfc": "from"
},
"start": 5,
"end": 40
},
{
"name": {
"Rfc": "to"
},
"start": 43,
"end": 112
},
{
"name": {
"Rfc": "subject"
},
"start": 120,
"end": 194
},
{
"name": {
"Rfc": "date"
},
"start": 199,
"end": 233
},
{
"name": {
"Rfc": "message_id"
},
"start": 244,
"end": 294
},
{
"name": {
"Rfc": "mime_version"
},
"start": 307,
"end": 313
},
{
"name": {
"Rfc": "content_type"
},
"start": 326,
"end": 363
},
{
"name": {
"Rfc": "content_transfer_encoding"
},
"start": 389,
"end": 396
},
{
"name": {
"Other": "X-Priority"
},
"start": 407,
"end": 420
},
{
"name": {
"Other": "X-MSMail-Priority"
},
"start": 438,
"end": 447
},
{
"name": {
"Other": "X-Mailer"
},
"start": 456,
"end": 509
},
{
"name": {
"Other": "Importance"
},
"start": 520,
"end": 529
},
{
"name": {
"Other": "X-MimeOLE"
},
"start": 539,
"end": 587
}
],
"html_body": [
0
],
"text_body": [
0
],
"parts": [
{
"contents": "Die Hasen und die Frösche\r\n\r\nDie Hasen klagten einst über ihre mißliche Lage; \"wir leben\", sprach ein\r\nRedner, \"in steter Furcht vor Menschen und Tieren, eine Beute der Hunde, der\r\nAdler, ja fast aller Raubtiere! Unsere stete Angst ist ärger als der Tod\r\nselbst. Auf, laßt uns ein für allemal sterben.\"\r\n\r\nIn einem nahen Teich wollten sie sich nun ersäufen; sie eilten ihm zu;\r\nallein das außerordentliche Getöse und ihre wunderbare Gestalt erschreckte\r\neine Menge Frösche, die am Ufer saßen, so sehr, daß sie aufs schnellste\r\nuntertauchten.\r\n\r\n\"Halt\", rief nun eben dieser Sprecher, \"wir wollen das Ersäufen noch ein\r\nwenig aufschieben, denn auch uns fürchten, wie ihr seht, einige Tiere,\r\nwelche also wohl noch unglücklicher sein müssen als wir.\"\r\n\r\n"
"Text": {
"body": "Die Hasen und die Frösche\r\n\r\nDie Hasen klagten einst über ihre mißliche Lage; \"wir leben\", sprach ein\r\nRedner, \"in steter Furcht vor Menschen und Tieren, eine Beute der Hunde, der\r\nAdler, ja fast aller Raubtiere! Unsere stete Angst ist ärger als der Tod\r\nselbst. Auf, laßt uns ein für allemal sterben.\"\r\n\r\nIn einem nahen Teich wollten sie sich nun ersäufen; sie eilten ihm zu;\r\nallein das außerordentliche Getöse und ihre wunderbare Gestalt erschreckte\r\neine Menge Frösche, die am Ufer saßen, so sehr, daß sie aufs schnellste\r\nuntertauchten.\r\n\r\n\"Halt\", rief nun eben dieser Sprecher, \"wir wollen das Ersäufen noch ein\r\nwenig aufschieben, denn auch uns fürchten, wie ihr seht, einige Tiere,\r\nwelche also wohl noch unglücklicher sein müssen als wir.\"\r\n\r\n"
}
}
]
],
"structure": {
"Part": 0
},
"offset_header": 0,
"offset_body": 589,
"offset_end": 1341
}
+183 -58
View File
@@ -73,27 +73,35 @@ race.&nbsp;=20
---- EXPECTED STRUCTURE ----
{
"header": {
"date": {
"year": 2000,
"month": 5,
"day": 17,
"hour": 19,
"minute": 38,
"second": 28,
"tz_before_gmt": true,
"tz_hour": 4,
"tz_minute": 0
},
"headers_rfc": {
"from": {
"Address": {
"name": "Doug Sauder",
"address": "doug@example.com"
}
},
"message_id": "NDBBIAKOPKHFGPLCODIGCEKFCHAA.doug@example.com",
"mime_version": "1.0",
"subject": "Test message from Microsoft Outlook 00",
"subject": {
"Text": "Test message from Microsoft Outlook 00"
},
"message_id": {
"Text": "NDBBIAKOPKHFGPLCODIGCEKFCHAA.doug@example.com"
},
"date": {
"DateTime": {
"year": 2000,
"month": 5,
"day": 17,
"hour": 19,
"minute": 38,
"second": 28,
"tz_before_gmt": true,
"tz_hour": 4,
"tz_minute": 0
}
},
"mime_version": {
"Text": "1.0"
},
"to": {
"Address": {
"name": "Joe Blow",
@@ -101,58 +109,175 @@ race.&nbsp;=20
}
},
"content_type": {
"c_type": "multipart",
"c_subtype": "alternative",
"attributes": {
"boundary": "----=_NextPart_000_0005_01BFC037.799BEF60"
"ContentType": {
"c_type": "multipart",
"c_subtype": "alternative",
"attributes": {
"boundary": "----=_NextPart_000_0005_01BFC037.799BEF60"
}
}
},
"others": {
"X-MSMail-Priority": [
"Normal"
],
"X-Priority": [
"3 (Normal)"
],
"X-Mailer": [
"Microsoft Outlook IMO, Build 9.0.2416 (9.0.2910.0)"
],
"Importance": [
"Normal"
],
"X-MimeOLE": [
"Produced By Microsoft MimeOLE V5.00.2314.1300"
]
}
},
"html_body": [
"headers_other": {
"Importance": {
"Text": "Normal"
},
"X-Priority": {
"Text": "3 (Normal)"
},
"X-MimeOLE": {
"Text": "Produced By Microsoft MimeOLE V5.00.2314.1300"
},
"X-Mailer": {
"Text": "Microsoft Outlook IMO, Build 9.0.2416 (9.0.2910.0)"
},
"X-MSMail-Priority": {
"Text": "Normal"
}
},
"headers_offsets": [
{
"header": {
"content_transfer_encoding": "quoted-printable",
"content_type": {
"c_type": "text",
"c_subtype": "html",
"attributes": {
"charset": "iso-8859-1"
}
}
"name": {
"Rfc": "from"
},
"contents": "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.0 Transitional//EN\">\n<HTML><HEAD>\n<META content=\"text/html; charset=iso-8859-1\" http-equiv=Content-Type>\n<META content=\"MSHTML 5.00.2314.1000\" name=GENERATOR></HEAD>\n<BODY>\n<DIV><FONT face=Arial size=2><BR>The Hare and the Tortoise <BR>&nbsp;<BR>A HARE \none day ridiculed the short feet and slow pace of the Tortoise, who replied, \nlaughing:&nbsp; \"Though you be swift as the wind, I will beat you in a \nrace.\"&nbsp; The Hare, believing her assertion to be simply impossible, assented \nto the proposal; and they agreed that the Fox should choose the course and fix \nthe goal.&nbsp; On the day appointed for the race the two started \ntogether.&nbsp; The Tortoise never for a moment stopped, but went on with a slow \nbut steady pace straight to the end of the course.&nbsp; The Hare, lying down by \nthe wayside, fell fast asleep.&nbsp; At last waking up, and moving as fast as he \ncould, he saw the Tortoise had reached the goal, and was comfortably dozing \nafter her fatigue.&nbsp; <BR>&nbsp;<BR>Slow but steady wins the race.&nbsp; \n<BR></FONT></DIV></BODY></HTML>\n"
"start": 5,
"end": 40
},
{
"name": {
"Rfc": "to"
},
"start": 43,
"end": 76
},
{
"name": {
"Rfc": "subject"
},
"start": 84,
"end": 125
},
{
"name": {
"Rfc": "date"
},
"start": 130,
"end": 164
},
{
"name": {
"Rfc": "message_id"
},
"start": 175,
"end": 225
},
{
"name": {
"Rfc": "mime_version"
},
"start": 238,
"end": 244
},
{
"name": {
"Rfc": "content_type"
},
"start": 257,
"end": 337
},
{
"name": {
"Other": "X-Priority"
},
"start": 348,
"end": 361
},
{
"name": {
"Other": "X-MSMail-Priority"
},
"start": 379,
"end": 388
},
{
"name": {
"Other": "X-Mailer"
},
"start": 397,
"end": 450
},
{
"name": {
"Other": "Importance"
},
"start": 461,
"end": 470
},
{
"name": {
"Other": "X-MimeOLE"
},
"start": 480,
"end": 528
}
],
"html_body": [
1
],
"text_body": [
0
],
"parts": [
{
"header": {
"content_transfer_encoding": "quoted-printable",
"content_type": {
"c_type": "text",
"c_subtype": "plain",
"attributes": {
"charset": "iso-8859-1"
"Text": {
"headers": {
"content_type": {
"ContentType": {
"c_type": "text",
"c_subtype": "plain",
"attributes": {
"charset": "iso-8859-1"
}
}
},
"content_transfer_encoding": {
"Text": "quoted-printable"
}
}
},
"contents": "\nThe Hare and the Tortoise \n \nA HARE one day ridiculed the short feet and slow pace of the Tortoise, who replied, laughing: \"Though you be swift as the wind, I will beat you in a race.\" The Hare, believing her assertion to be simply impossible, assented to the proposal; and they agreed that the Fox should choose the course and fix the goal. On the day appointed for the race the two started together. The Tortoise never for a moment stopped, but went on with a slow but steady pace straight to the end of the course. The Hare, lying down by the wayside, fell fast asleep. At last waking up, and moving as fast as he could, he saw the Tortoise had reached the goal, and was comfortably dozing after her fatigue. \n \nSlow but steady wins the race. \n\n"
},
"body": "\nThe Hare and the Tortoise \n \nA HARE one day ridiculed the short feet and slow pace of the Tortoise, who replied, laughing: \"Though you be swift as the wind, I will beat you in a race.\" The Hare, believing her assertion to be simply impossible, assented to the proposal; and they agreed that the Fox should choose the course and fix the goal. On the day appointed for the race the two started together. The Tortoise never for a moment stopped, but went on with a slow but steady pace straight to the end of the course. The Hare, lying down by the wayside, fell fast asleep. At last waking up, and moving as fast as he could, he saw the Tortoise had reached the goal, and was comfortably dozing after her fatigue. \n \nSlow but steady wins the race. \n\n"
}
},
{
"Html": {
"headers": {
"content_type": {
"ContentType": {
"c_type": "text",
"c_subtype": "html",
"attributes": {
"charset": "iso-8859-1"
}
}
},
"content_transfer_encoding": {
"Text": "quoted-printable"
}
},
"body": "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.0 Transitional//EN\">\n<HTML><HEAD>\n<META content=\"text/html; charset=iso-8859-1\" http-equiv=Content-Type>\n<META content=\"MSHTML 5.00.2314.1000\" name=GENERATOR></HEAD>\n<BODY>\n<DIV><FONT face=Arial size=2><BR>The Hare and the Tortoise <BR>&nbsp;<BR>A HARE \none day ridiculed the short feet and slow pace of the Tortoise, who replied, \nlaughing:&nbsp; \"Though you be swift as the wind, I will beat you in a \nrace.\"&nbsp; The Hare, believing her assertion to be simply impossible, assented \nto the proposal; and they agreed that the Fox should choose the course and fix \nthe goal.&nbsp; On the day appointed for the race the two started \ntogether.&nbsp; The Tortoise never for a moment stopped, but went on with a slow \nbut steady pace straight to the end of the course.&nbsp; The Hare, lying down by \nthe wayside, fell fast asleep.&nbsp; At last waking up, and moving as fast as he \ncould, he saw the Tortoise had reached the goal, and was comfortably dozing \nafter her fatigue.&nbsp; <BR>&nbsp;<BR>Slow but steady wins the race.&nbsp; \n<BR></FONT></DIV></BODY></HTML>\n"
}
}
]
],
"structure": {
"List": [
{
"Part": 0
},
{
"Part": 1
}
]
},
"offset_header": 0,
"offset_body": 530,
"offset_end": 2901
}
+302 -106
View File
@@ -199,17 +199,34 @@ bGlwMmdpZiB2LjAuNiBieSBZdmVzIFBpZ3VldDZzO7wAAAAASUVORK5CYII=
---- EXPECTED STRUCTURE ----
{
"header": {
"headers_rfc": {
"message_id": {
"Text": "4.2.0.58.20000519003556.00a918e0@pop.example.com"
},
"date": {
"year": 2000,
"month": 5,
"day": 19,
"hour": 0,
"minute": 36,
"second": 58,
"tz_before_gmt": true,
"tz_hour": 4,
"tz_minute": 0
"DateTime": {
"year": 2000,
"month": 5,
"day": 19,
"hour": 0,
"minute": 36,
"second": 58,
"tz_before_gmt": true,
"tz_hour": 4,
"tz_minute": 0
}
},
"to": {
"Address": {
"name": "Heinz Müller",
"address": "mueller@example.com"
}
},
"subject": {
"Text": "Die Hasen und die Frösche"
},
"mime_version": {
"Text": "1.0"
},
"from": {
"Address": {
@@ -217,85 +234,205 @@ bGlwMmdpZiB2LjAuNiBieSBZdmVzIFBpZ3VldDZzO7wAAAAASUVORK5CYII=
"address": "dwsauder@example.com"
}
},
"message_id": "4.2.0.58.20000519003556.00a918e0@pop.example.com",
"mime_version": "1.0",
"subject": "Die Hasen und die Frösche",
"to": {
"Address": {
"name": "Heinz Müller",
"address": "mueller@example.com"
}
},
"content_type": {
"c_type": "multipart",
"c_subtype": "mixed",
"attributes": {
"boundary": "=====================_715392540==_"
"ContentType": {
"c_type": "multipart",
"c_subtype": "mixed",
"attributes": {
"boundary": "=====================_715392540==_"
}
}
},
"others": {
"X-Sender": [
"dwsauder@pop.example.com (Unverified)"
],
"X-Mailer": [
"QUALCOMM Windows Eudora Pro Version 4.2.0.58"
],
"X-Priority": [
"2 (High)"
]
}
},
"html_body": [
{
"header": {
"content_transfer_encoding": "quoted-printable",
"content_type": {
"c_type": "text",
"c_subtype": "html",
"attributes": {
"charset": "iso-8859-1"
}
}
},
"contents": "<html>\n<font face=\"Arial, Helvetica\" size=5 color=\"#0000FF\"><b>Die Hasen und die\nFrösche<br>\n<br>\n</font></b><font face=\"Arial, Helvetica\">Die Hasen klagten einst über\nihre mißliche Lage; &quot;wir leben&quot;, sprach ein Redner, &quot;in\nsteter Furcht vor Menschen und Tieren, eine Beute der Hunde, der Adler,\nja fast aller Raubtiere! Unsere stete Angst ist ärger als der Tod selbst.\nAuf, laßt uns ein für allemal sterben.&quot; <br>\n<br>\nIn einem nahen Teich wollten sie sich nun ersäufen; sie eilten ihm zu;\nallein das außerordentliche Getöse und ihre wunderbare Gestalt\nerschreckte eine Menge Frösche, die am Ufer saßen, so sehr, daß sie aufs\nschnellste untertauchten. <br>\n<br>\n&quot;Halt&quot;, rief nun eben dieser Sprecher, &quot;wir wollen das\nErsäufen noch ein wenig aufschieben, denn auch uns fürchten, wie ihr\nseht, einige Tiere, welche also wohl noch unglücklicher sein müssen als\nwir.&quot; <br>\n<br>\n</font><img src=\"cid:4.2.0.58.20000519003556.00a918e0@pop.example.com.2\" width=27 height=27 alt=\"2aa3ed95.png\"><img src=\"cid:4.2.0.58.20000519003556.00a918e0@pop.example.com.3\" width=27 height=27 alt=\"2aa3edd1.png\"></html>\n"
"headers_other": {
"X-Priority": {
"Text": "2 (High)"
},
"X-Sender": {
"Text": "dwsauder@pop.example.com (Unverified)"
},
"X-Mailer": {
"Text": "QUALCOMM Windows Eudora Pro Version 4.2.0.58"
}
},
"headers_offsets": [
{
"name": {
"Rfc": "message_id"
},
"start": 11,
"end": 64
},
{
"name": {
"Other": "X-Sender"
},
"start": 73,
"end": 113
},
{
"name": {
"Other": "X-Mailer"
},
"start": 122,
"end": 170
},
{
"name": {
"Other": "X-Priority"
},
"start": 181,
"end": 192
},
{
"name": {
"Rfc": "date"
},
"start": 197,
"end": 231
},
{
"name": {
"Rfc": "to"
},
"start": 234,
"end": 288
},
{
"name": {
"Rfc": "from"
},
"start": 293,
"end": 330
},
{
"name": {
"Rfc": "subject"
},
"start": 338,
"end": 383
},
{
"name": {
"Rfc": "mime_version"
},
"start": 396,
"end": 402
},
{
"name": {
"Rfc": "content_type"
},
"start": 415,
"end": 482
}
],
"html_body": [
3
],
"text_body": [
{
"header": {
"content_transfer_encoding": "quoted-printable",
"content_type": {
"c_type": "text",
"c_subtype": "plain",
"attributes": {
"charset": "iso-8859-1"
}
}
},
"contents": "Die Hasen und die Frösche\n\nDie Hasen klagten einst über ihre mißliche Lage; \"wir leben\", sprach ein Redner, \"in steter Furcht vor Menschen und Tieren, eine Beute der Hunde, der Adler, ja fast aller Raubtiere! Unsere stete Angst ist ärger als der Tod selbst. Auf, laßt uns ein für allemal sterben.\" \n\nIn einem nahen Teich wollten sie sich nun ersäufen; sie eilten ihm zu; allein das außerordentliche Getöse und ihre wunderbare Gestalt erschreckte eine Menge Frösche, die am Ufer saßen, so sehr, daß sie aufs schnellste untertauchten. \n\n\"Halt\", rief nun eben dieser Sprecher, \"wir wollen das Ersäufen noch ein wenig aufschieben, denn auch uns fürchten, wie ihr seht, einige Tiere, welche also wohl noch unglücklicher sein müssen als wir.\" \n\n2aa3ed95.png2aa3edd1.png"
}
2
],
"attachments": [
4,
5,
6,
7
],
"parts": [
{
"Binary": {
"header": {
"content_disposition": {
"c_type": "inline",
"Multipart": {
"content_type": {
"ContentType": {
"c_type": "multipart",
"c_subtype": "related",
"attributes": {
"filename": "2aa3ed95.png"
"type": "multipart/alternative",
"boundary": "=====================_715392540==_.REL"
}
}
}
}
},
{
"Multipart": {
"content_type": {
"ContentType": {
"c_type": "multipart",
"c_subtype": "alternative",
"attributes": {
"boundary": "=====================_715392550==_.ALT"
}
}
}
}
},
{
"Text": {
"headers": {
"content_type": {
"ContentType": {
"c_type": "text",
"c_subtype": "plain",
"attributes": {
"charset": "iso-8859-1"
}
}
},
"content_id": "4.2.0.58.20000519003556.00a918e0@pop.example.com.2",
"content_transfer_encoding": "base64",
"content_transfer_encoding": {
"Text": "quoted-printable"
}
},
"body": "Die Hasen und die Frösche\n\nDie Hasen klagten einst über ihre mißliche Lage; \"wir leben\", sprach ein Redner, \"in steter Furcht vor Menschen und Tieren, eine Beute der Hunde, der Adler, ja fast aller Raubtiere! Unsere stete Angst ist ärger als der Tod selbst. Auf, laßt uns ein für allemal sterben.\" \n\nIn einem nahen Teich wollten sie sich nun ersäufen; sie eilten ihm zu; allein das außerordentliche Getöse und ihre wunderbare Gestalt erschreckte eine Menge Frösche, die am Ufer saßen, so sehr, daß sie aufs schnellste untertauchten. \n\n\"Halt\", rief nun eben dieser Sprecher, \"wir wollen das Ersäufen noch ein wenig aufschieben, denn auch uns fürchten, wie ihr seht, einige Tiere, welche also wohl noch unglücklicher sein müssen als wir.\" \n\n2aa3ed95.png2aa3edd1.png"
}
},
{
"Html": {
"headers": {
"content_type": {
"c_type": "image",
"c_subtype": "png",
"attributes": {
"name": "2aa3ed95.png"
"ContentType": {
"c_type": "text",
"c_subtype": "html",
"attributes": {
"charset": "iso-8859-1"
}
}
},
"content_transfer_encoding": {
"Text": "quoted-printable"
}
},
"body": "<html>\n<font face=\"Arial, Helvetica\" size=5 color=\"#0000FF\"><b>Die Hasen und die\nFrösche<br>\n<br>\n</font></b><font face=\"Arial, Helvetica\">Die Hasen klagten einst über\nihre mißliche Lage; &quot;wir leben&quot;, sprach ein Redner, &quot;in\nsteter Furcht vor Menschen und Tieren, eine Beute der Hunde, der Adler,\nja fast aller Raubtiere! Unsere stete Angst ist ärger als der Tod selbst.\nAuf, laßt uns ein für allemal sterben.&quot; <br>\n<br>\nIn einem nahen Teich wollten sie sich nun ersäufen; sie eilten ihm zu;\nallein das außerordentliche Getöse und ihre wunderbare Gestalt\nerschreckte eine Menge Frösche, die am Ufer saßen, so sehr, daß sie aufs\nschnellste untertauchten. <br>\n<br>\n&quot;Halt&quot;, rief nun eben dieser Sprecher, &quot;wir wollen das\nErsäufen noch ein wenig aufschieben, denn auch uns fürchten, wie ihr\nseht, einige Tiere, welche also wohl noch unglücklicher sein müssen als\nwir.&quot; <br>\n<br>\n</font><img src=\"cid:4.2.0.58.20000519003556.00a918e0@pop.example.com.2\" width=27 height=27 alt=\"2aa3ed95.png\"><img src=\"cid:4.2.0.58.20000519003556.00a918e0@pop.example.com.3\" width=27 height=27 alt=\"2aa3edd1.png\"></html>\n"
}
},
{
"Binary": {
"headers": {
"content_id": {
"Text": "4.2.0.58.20000519003556.00a918e0@pop.example.com.2"
},
"content_transfer_encoding": {
"Text": "base64"
},
"content_type": {
"ContentType": {
"c_type": "image",
"c_subtype": "png",
"attributes": {
"name": "2aa3ed95.png"
}
}
},
"content_disposition": {
"ContentType": {
"c_type": "inline",
"attributes": {
"filename": "2aa3ed95.png"
}
}
}
},
"contents": [
"body": [
137,
80,
78,
@@ -1626,24 +1763,32 @@ bGlwMmdpZiB2LjAuNiBieSBZdmVzIFBpZ3VldDZzO7wAAAAASUVORK5CYII=
},
{
"Binary": {
"header": {
"headers": {
"content_disposition": {
"c_type": "inline",
"attributes": {
"filename": "2aa3edd1.png"
"ContentType": {
"c_type": "inline",
"attributes": {
"filename": "2aa3edd1.png"
}
}
},
"content_id": "4.2.0.58.20000519003556.00a918e0@pop.example.com.3",
"content_transfer_encoding": "base64",
"content_type": {
"c_type": "image",
"c_subtype": "png",
"attributes": {
"name": "2aa3edd1.png"
"ContentType": {
"c_type": "image",
"c_subtype": "png",
"attributes": {
"name": "2aa3edd1.png"
}
}
},
"content_transfer_encoding": {
"Text": "base64"
},
"content_id": {
"Text": "4.2.0.58.20000519003556.00a918e0@pop.example.com.3"
}
},
"contents": [
"body": [
137,
80,
78,
@@ -3102,23 +3247,29 @@ bGlwMmdpZiB2LjAuNiBieSBZdmVzIFBpZ3VldDZzO7wAAAAASUVORK5CYII=
},
{
"Binary": {
"header": {
"headers": {
"content_disposition": {
"c_type": "attachment",
"attributes": {
"filename": "blueball.png"
"ContentType": {
"c_type": "attachment",
"attributes": {
"filename": "blueball.png"
}
}
},
"content_transfer_encoding": "base64",
"content_type": {
"c_type": "image",
"c_subtype": "png",
"attributes": {
"name": "blueball.png"
"ContentType": {
"c_type": "image",
"c_subtype": "png",
"attributes": {
"name": "blueball.png"
}
}
},
"content_transfer_encoding": {
"Text": "base64"
}
},
"contents": [
"body": [
137,
80,
78,
@@ -4449,23 +4600,29 @@ bGlwMmdpZiB2LjAuNiBieSBZdmVzIFBpZ3VldDZzO7wAAAAASUVORK5CYII=
},
{
"Binary": {
"header": {
"content_disposition": {
"c_type": "attachment",
"attributes": {
"filename": "greenball.png"
"headers": {
"content_type": {
"ContentType": {
"c_type": "image",
"c_subtype": "png",
"attributes": {
"name": "greenball.png"
}
}
},
"content_transfer_encoding": "base64",
"content_type": {
"c_type": "image",
"c_subtype": "png",
"attributes": {
"name": "greenball.png"
"content_transfer_encoding": {
"Text": "base64"
},
"content_disposition": {
"ContentType": {
"c_type": "attachment",
"attributes": {
"filename": "greenball.png"
}
}
}
},
"contents": [
"body": [
137,
80,
78,
@@ -5767,5 +5924,44 @@ bGlwMmdpZiB2LjAuNiBieSBZdmVzIFBpZ3VldDZzO7wAAAAASUVORK5CYII=
]
}
}
]
],
"structure": {
"List": [
{
"MultiPart": [
0,
[
{
"MultiPart": [
1,
[
{
"Part": 2
},
{
"Part": 3
}
]
]
},
{
"Part": 4
},
{
"Part": 5
}
]
]
},
{
"Part": 6
},
{
"Part": 7
}
]
},
"offset_header": 0,
"offset_body": 484,
"offset_end": 11498
}
+178 -70
View File
@@ -96,17 +96,15 @@ JB@ac)(GTFLiL)!d09'8!!!:
---- EXPECTED STRUCTURE ----
{
"header": {
"date": {
"year": 2000,
"month": 5,
"day": 19,
"hour": 0,
"minute": 53,
"second": 25,
"tz_before_gmt": true,
"tz_hour": 4,
"tz_minute": 0
"headers_rfc": {
"message_id": {
"Text": "4.2.0.58.20000519005150.00a85230@pop.example.com"
},
"to": {
"Address": {
"name": "Jürgen Schmürgen",
"address": "jschmuergen@example.com"
}
},
"from": {
"Address": {
@@ -114,70 +112,160 @@ JB@ac)(GTFLiL)!d09'8!!!:
"address": "dwsauder@example.com"
}
},
"message_id": "4.2.0.58.20000519005150.00a85230@pop.example.com",
"mime_version": "1.0",
"subject": "Die Hasen und die Frösche",
"to": {
"Address": {
"name": "Jürgen Schmürgen",
"address": "jschmuergen@example.com"
"subject": {
"Text": "Die Hasen und die Frösche"
},
"mime_version": {
"Text": "1.0"
},
"date": {
"DateTime": {
"year": 2000,
"month": 5,
"day": 19,
"hour": 0,
"minute": 53,
"second": 25,
"tz_before_gmt": true,
"tz_hour": 4,
"tz_minute": 0
}
},
"content_type": {
"c_type": "multipart",
"c_subtype": "mixed",
"attributes": {
"boundary": "=====================_716373961==_"
"ContentType": {
"c_type": "multipart",
"c_subtype": "mixed",
"attributes": {
"boundary": "=====================_716373961==_"
}
}
},
"others": {
"X-Mailer": [
"QUALCOMM Windows Eudora Pro Version 4.2.0.58"
],
"X-Sender": [
"dwsauder@pop.example.com (Unverified)"
]
}
},
"html_body": [
{
"contents": "<html><body>Die Hasen und die Frösche<br/><br/>Die Hasen klagten einst über ihre mißliche Lage; \"wir leben\", sprach ein Redner, \"in steter Furcht vor Menschen und Tieren, eine Beute der Hunde, der Adler, ja fast aller Raubtiere! Unsere stete Angst ist ärger als der Tod selbst. Auf, laßt uns ein für allemal sterben.\" <br/><br/>In einem nahen Teich wollten sie sich nun ersäufen; sie eilten ihm zu; allein das außerordentliche Getöse und ihre wunderbare Gestalt erschreckte eine Menge Frösche, die am Ufer saßen, so sehr, daß sie aufs schnellste untertauchten. <br/><br/>\"Halt\", rief nun eben dieser Sprecher, \"wir wollen das Ersäufen noch ein wenig aufschieben, denn auch uns fürchten, wie ihr seht, einige Tiere, welche also wohl noch unglücklicher sein müssen als wir.\" <br/><br/></body></html>"
"headers_other": {
"X-Mailer": {
"Text": "QUALCOMM Windows Eudora Pro Version 4.2.0.58"
},
"X-Sender": {
"Text": "dwsauder@pop.example.com (Unverified)"
}
},
"headers_offsets": [
{
"name": {
"Rfc": "message_id"
},
"start": 11,
"end": 64
},
{
"name": {
"Other": "X-Sender"
},
"start": 73,
"end": 113
},
{
"name": {
"Other": "X-Mailer"
},
"start": 122,
"end": 170
},
{
"name": {
"Rfc": "date"
},
"start": 175,
"end": 209
},
{
"name": {
"Rfc": "to"
},
"start": 212,
"end": 295
},
{
"name": {
"Rfc": "from"
},
"start": 300,
"end": 337
},
{
"name": {
"Rfc": "subject"
},
"start": 345,
"end": 390
},
{
"name": {
"Rfc": "mime_version"
},
"start": 403,
"end": 409
},
{
"name": {
"Rfc": "content_type"
},
"start": 422,
"end": 489
}
],
"html_body": [
0
],
"text_body": [
{
"header": {
"content_transfer_encoding": "quoted-printable",
"content_type": {
"c_type": "text",
"c_subtype": "plain",
"attributes": {
"charset": "iso-8859-1"
}
}
},
"contents": "Die Hasen und die Frösche\n\nDie Hasen klagten einst über ihre mißliche Lage; \"wir leben\", sprach ein Redner, \"in steter Furcht vor Menschen und Tieren, eine Beute der Hunde, der Adler, ja fast aller Raubtiere! Unsere stete Angst ist ärger als der Tod selbst. Auf, laßt uns ein für allemal sterben.\" \n\nIn einem nahen Teich wollten sie sich nun ersäufen; sie eilten ihm zu; allein das außerordentliche Getöse und ihre wunderbare Gestalt erschreckte eine Menge Frösche, die am Ufer saßen, so sehr, daß sie aufs schnellste untertauchten. \n\n\"Halt\", rief nun eben dieser Sprecher, \"wir wollen das Ersäufen noch ein wenig aufschieben, denn auch uns fürchten, wie ihr seht, einige Tiere, welche also wohl noch unglücklicher sein müssen als wir.\" \n\n"
}
0
],
"attachments": [
1,
2
],
"parts": [
{
"Binary": {
"header": {
"content_disposition": {
"c_type": "attachment",
"attributes": {
"filename": "blueball.png"
}
"Text": {
"headers": {
"content_transfer_encoding": {
"Text": "quoted-printable"
},
"content_type": {
"c_type": "application",
"c_subtype": "mac-binhex40",
"attributes": {
"name": "blueball.png"
"ContentType": {
"c_type": "text",
"c_subtype": "plain",
"attributes": {
"charset": "iso-8859-1"
}
}
}
},
"contents": [
"body": "Die Hasen und die Frösche\n\nDie Hasen klagten einst über ihre mißliche Lage; \"wir leben\", sprach ein Redner, \"in steter Furcht vor Menschen und Tieren, eine Beute der Hunde, der Adler, ja fast aller Raubtiere! Unsere stete Angst ist ärger als der Tod selbst. Auf, laßt uns ein für allemal sterben.\" \n\nIn einem nahen Teich wollten sie sich nun ersäufen; sie eilten ihm zu; allein das außerordentliche Getöse und ihre wunderbare Gestalt erschreckte eine Menge Frösche, die am Ufer saßen, so sehr, daß sie aufs schnellste untertauchten. \n\n\"Halt\", rief nun eben dieser Sprecher, \"wir wollen das Ersäufen noch ein wenig aufschieben, denn auch uns fürchten, wie ihr seht, einige Tiere, welche also wohl noch unglücklicher sein müssen als wir.\" \n\n"
}
},
{
"Binary": {
"headers": {
"content_disposition": {
"ContentType": {
"c_type": "attachment",
"attributes": {
"filename": "blueball.png"
}
}
},
"content_type": {
"ContentType": {
"c_type": "application",
"c_subtype": "mac-binhex40",
"attributes": {
"name": "blueball.png"
}
}
}
},
"body": [
13,
10,
40,
@@ -2113,22 +2201,26 @@ JB@ac)(GTFLiL)!d09'8!!!:
},
{
"Binary": {
"header": {
"content_disposition": {
"c_type": "attachment",
"attributes": {
"filename": "HasenundFr�sche.txt"
"headers": {
"content_type": {
"ContentType": {
"c_type": "application",
"c_subtype": "mac-binhex40",
"attributes": {
"name": "HasenundFr�sche.txt"
}
}
},
"content_type": {
"c_type": "application",
"c_subtype": "mac-binhex40",
"attributes": {
"name": "HasenundFr�sche.txt"
"content_disposition": {
"ContentType": {
"c_type": "attachment",
"attributes": {
"filename": "HasenundFr�sche.txt"
}
}
}
},
"contents": [
"body": [
13,
10,
40,
@@ -3264,5 +3356,21 @@ JB@ac)(GTFLiL)!d09'8!!!:
]
}
}
]
],
"structure": {
"List": [
{
"Part": 0
},
{
"Part": 1
},
{
"Part": 2
}
]
},
"offset_header": 0,
"offset_body": 491,
"offset_end": 4869
}
+178 -68
View File
@@ -103,88 +103,176 @@ end
---- EXPECTED STRUCTURE ----
{
"header": {
"date": {
"year": 2000,
"month": 5,
"day": 19,
"hour": 0,
"minute": 50,
"second": 8,
"tz_before_gmt": true,
"tz_hour": 4,
"tz_minute": 0
},
"headers_rfc": {
"from": {
"Address": {
"name": "Doug Sauder",
"address": "dwsauder@example.com"
}
},
"message_id": "4.2.0.58.20000519004755.00a86100@pop.example.com",
"mime_version": "1.0",
"subject": "The Hare and the Tortoise",
"subject": {
"Text": "The Hare and the Tortoise"
},
"to": {
"Address": {
"name": "J�rgen Schm�rgen",
"address": "jschmuergen@example.com"
}
},
"mime_version": {
"Text": "1.0"
},
"content_type": {
"c_type": "multipart",
"c_subtype": "mixed",
"attributes": {
"boundary": "=====================_716177458==_"
"ContentType": {
"c_type": "multipart",
"c_subtype": "mixed",
"attributes": {
"boundary": "=====================_716177458==_"
}
}
},
"others": {
"X-Sender": [
"dwsauder@pop.example.com (Unverified)"
],
"X-Mailer": [
"QUALCOMM Windows Eudora Pro Version 4.2.0.58"
]
"message_id": {
"Text": "4.2.0.58.20000519004755.00a86100@pop.example.com"
},
"date": {
"DateTime": {
"year": 2000,
"month": 5,
"day": 19,
"hour": 0,
"minute": 50,
"second": 8,
"tz_before_gmt": true,
"tz_hour": 4,
"tz_minute": 0
}
}
},
"html_body": [
{
"contents": "<html><body><br/>The Hare and the Tortoise <br/> <br/>A HARE one day ridiculed the short feet and slow pace of the Tortoise, who replied, laughing: \"Though you be swift as the wind, I will beat you in a race.\" The Hare, believing her assertion to be simply impossible, assented to the proposal; and they agreed that the Fox should choose the course and fix the goal. On the day appointed for the race the two started together. The Tortoise never for a moment stopped, but went on with a slow but steady pace straight to the end of the course. The Hare, lying down by the wayside, fell fast asleep. At last waking up, and moving as fast as he could, he saw the Tortoise had reached the goal, and was comfortably dozing after her fatigue. <br/> <br/>Slow but steady wins the race. <br/></body></html>"
"headers_other": {
"X-Mailer": {
"Text": "QUALCOMM Windows Eudora Pro Version 4.2.0.58"
},
"X-Sender": {
"Text": "dwsauder@pop.example.com (Unverified)"
}
},
"headers_offsets": [
{
"name": {
"Rfc": "message_id"
},
"start": 11,
"end": 64
},
{
"name": {
"Other": "X-Sender"
},
"start": 73,
"end": 113
},
{
"name": {
"Other": "X-Mailer"
},
"start": 122,
"end": 170
},
{
"name": {
"Rfc": "date"
},
"start": 175,
"end": 209
},
{
"name": {
"Rfc": "to"
},
"start": 212,
"end": 257
},
{
"name": {
"Rfc": "from"
},
"start": 262,
"end": 299
},
{
"name": {
"Rfc": "subject"
},
"start": 307,
"end": 335
},
{
"name": {
"Rfc": "mime_version"
},
"start": 348,
"end": 354
},
{
"name": {
"Rfc": "content_type"
},
"start": 367,
"end": 434
}
],
"html_body": [
0
],
"text_body": [
{
"header": {
"content_type": {
"c_type": "text",
"c_subtype": "plain",
"attributes": {
"charset": "us-ascii"
}
}
},
"contents": "\r\nThe Hare and the Tortoise \r\n \r\nA HARE one day ridiculed the short feet and slow pace of the Tortoise, who replied, laughing: \"Though you be swift as the wind, I will beat you in a race.\" The Hare, believing her assertion to be simply impossible, assented to the proposal; and they agreed that the Fox should choose the course and fix the goal. On the day appointed for the race the two started together. The Tortoise never for a moment stopped, but went on with a slow but steady pace straight to the end of the course. The Hare, lying down by the wayside, fell fast asleep. At last waking up, and moving as fast as he could, he saw the Tortoise had reached the goal, and was comfortably dozing after her fatigue. \r\n \r\nSlow but steady wins the race. \r\n\r"
}
0
],
"attachments": [
1,
2
],
"parts": [
{
"Binary": {
"header": {
"content_disposition": {
"c_type": "attachment",
"attributes": {
"filename": "greenball.png"
}
},
"content_transfer_encoding": "x-uuencode",
"Text": {
"headers": {
"content_type": {
"c_type": "image",
"c_subtype": "png",
"attributes": {
"name": "greenball.png"
"ContentType": {
"c_type": "text",
"c_subtype": "plain",
"attributes": {
"charset": "us-ascii"
}
}
}
},
"contents": [
"body": "\r\nThe Hare and the Tortoise \r\n \r\nA HARE one day ridiculed the short feet and slow pace of the Tortoise, who replied, laughing: \"Though you be swift as the wind, I will beat you in a race.\" The Hare, believing her assertion to be simply impossible, assented to the proposal; and they agreed that the Fox should choose the course and fix the goal. On the day appointed for the race the two started together. The Tortoise never for a moment stopped, but went on with a slow but steady pace straight to the end of the course. The Hare, lying down by the wayside, fell fast asleep. At last waking up, and moving as fast as he could, he saw the Tortoise had reached the goal, and was comfortably dozing after her fatigue. \r\n \r\nSlow but steady wins the race. \r\n\r"
}
},
{
"Binary": {
"headers": {
"content_transfer_encoding": {
"Text": "x-uuencode"
},
"content_type": {
"ContentType": {
"c_type": "image",
"c_subtype": "png",
"attributes": {
"name": "greenball.png"
}
}
},
"content_disposition": {
"ContentType": {
"c_type": "attachment",
"attributes": {
"filename": "greenball.png"
}
}
}
},
"body": [
13,
10,
98,
@@ -2045,23 +2133,29 @@ end
},
{
"Binary": {
"header": {
"content_disposition": {
"c_type": "attachment",
"attributes": {
"filename": "blueball.png"
"headers": {
"content_type": {
"ContentType": {
"c_type": "image",
"c_subtype": "png",
"attributes": {
"name": "blueball.png"
}
}
},
"content_transfer_encoding": "x-uuencode",
"content_type": {
"c_type": "image",
"c_subtype": "png",
"attributes": {
"name": "blueball.png"
"content_transfer_encoding": {
"Text": "x-uuencode"
},
"content_disposition": {
"ContentType": {
"c_type": "attachment",
"attributes": {
"filename": "blueball.png"
}
}
}
},
"contents": [
"body": [
13,
10,
98,
@@ -3958,5 +4052,21 @@ end
]
}
}
]
],
"structure": {
"List": [
{
"Part": 0
},
{
"Part": 1
},
{
"Part": 2
}
]
},
"offset_header": 0,
"offset_body": 436,
"offset_end": 5444
}
+243 -88
View File
@@ -139,17 +139,28 @@ IFl2ZXMgUGlndWV0NnM7vAAAAABJRU5ErkJggg==
---- EXPECTED STRUCTURE ----
{
"header": {
"date": {
"year": 2000,
"month": 5,
"day": 19,
"hour": 0,
"minute": 33,
"second": 1,
"tz_before_gmt": true,
"tz_hour": 4,
"tz_minute": 0
"headers_rfc": {
"content_type": {
"ContentType": {
"c_type": "multipart",
"c_subtype": "related",
"attributes": {
"boundary": "=====================_715157131==_.REL",
"type": "multipart/alternative"
}
}
},
"subject": {
"Text": "Die Hasen und die Frösche"
},
"message_id": {
"Text": "4.2.0.58.20000519003143.00a8d550@pop.example.com"
},
"to": {
"Address": {
"name": "Heinz Müller",
"address": "mueller@example.com"
}
},
"from": {
"Address": {
@@ -157,86 +168,196 @@ IFl2ZXMgUGlndWV0NnM7vAAAAABJRU5ErkJggg==
"address": "dwsauder@example.com"
}
},
"message_id": "4.2.0.58.20000519003143.00a8d550@pop.example.com",
"mime_version": "1.0",
"subject": "Die Hasen und die Frösche",
"to": {
"Address": {
"name": "Heinz Müller",
"address": "mueller@example.com"
"date": {
"DateTime": {
"year": 2000,
"month": 5,
"day": 19,
"hour": 0,
"minute": 33,
"second": 1,
"tz_before_gmt": true,
"tz_hour": 4,
"tz_minute": 0
}
},
"content_type": {
"c_type": "multipart",
"c_subtype": "related",
"attributes": {
"boundary": "=====================_715157131==_.REL",
"type": "multipart/alternative"
}
},
"others": {
"X-Priority": [
"2 (High)"
],
"X-Sender": [
"dwsauder@pop.example.com (Unverified)"
],
"X-Mailer": [
"QUALCOMM Windows Eudora Pro Version 4.2.0.58"
]
"mime_version": {
"Text": "1.0"
}
},
"html_body": [
{
"header": {
"content_transfer_encoding": "quoted-printable",
"content_type": {
"c_type": "text",
"c_subtype": "html",
"attributes": {
"charset": "iso-8859-1"
}
}
},
"contents": "<html>\n<img src=\"cid:4.2.0.58.20000519003143.00a8d550@pop.example.com.0\" width=27 height=27 alt=\"blueball.png\"><br>\n<br>\n<font face=\"Arial, Helvetica\" size=5 color=\"#0000FF\"><b>Die Hasen und die\nFrösche<br>\n<br>\n</font></b><font face=\"Arial, Helvetica\">Die Hasen klagten einst über\nihre mißliche Lage; &quot;wir leben&quot;, sprach ein Redner, &quot;in\nsteter Furcht vor Menschen und Tieren, eine Beute der Hunde, der Adler,\nja fast aller Raubtiere! Unsere stete Angst ist ärger als der Tod selbst.\nAuf, laßt uns ein für allemal sterben.&quot; <br>\n<br>\nIn einem nahen Teich wollten sie sich nun ersäufen; sie eilten ihm zu;\nallein das außerordentliche Getöse und ihre wunderbare Gestalt\nerschreckte eine Menge Frösche, die am Ufer saßen, so sehr, daß sie aufs\nschnellste untertauchten. <br>\n<br>\n&quot;Halt&quot;, rief nun eben dieser Sprecher, &quot;wir wollen das\nErsäufen noch ein wenig aufschieben, denn auch uns fürchten, wie ihr\nseht, einige Tiere, welche also wohl noch unglücklicher sein müssen als\nwir.&quot; <br>\n<br>\n<img src=\"cid:4.2.0.58.20000519003143.00a8d550@pop.example.com.1\" width=27 height=27 alt=\"redball.png\"></font></html>\n"
"headers_other": {
"X-Sender": {
"Text": "dwsauder@pop.example.com (Unverified)"
},
"X-Mailer": {
"Text": "QUALCOMM Windows Eudora Pro Version 4.2.0.58"
},
"X-Priority": {
"Text": "2 (High)"
}
},
"headers_offsets": [
{
"name": {
"Rfc": "message_id"
},
"start": 11,
"end": 64
},
{
"name": {
"Other": "X-Sender"
},
"start": 73,
"end": 113
},
{
"name": {
"Other": "X-Mailer"
},
"start": 122,
"end": 170
},
{
"name": {
"Other": "X-Priority"
},
"start": 181,
"end": 192
},
{
"name": {
"Rfc": "date"
},
"start": 197,
"end": 231
},
{
"name": {
"Rfc": "to"
},
"start": 234,
"end": 288
},
{
"name": {
"Rfc": "from"
},
"start": 293,
"end": 330
},
{
"name": {
"Rfc": "subject"
},
"start": 338,
"end": 383
},
{
"name": {
"Rfc": "mime_version"
},
"start": 396,
"end": 402
},
{
"name": {
"Rfc": "content_type"
},
"start": 415,
"end": 520
}
],
"html_body": [
2
],
"text_body": [
{
"header": {
"content_transfer_encoding": "quoted-printable",
"content_type": {
"c_type": "text",
"c_subtype": "plain",
"attributes": {
"charset": "iso-8859-1"
}
}
},
"contents": "blueball.png\n\nDie Hasen und die Frösche\n\nDie Hasen klagten einst über ihre mißliche Lage; \"wir leben\", sprach ein Redner, \"in steter Furcht vor Menschen und Tieren, eine Beute der Hunde, der Adler, ja fast aller Raubtiere! Unsere stete Angst ist ärger als der Tod selbst. Auf, laßt uns ein für allemal sterben.\" \n\nIn einem nahen Teich wollten sie sich nun ersäufen; sie eilten ihm zu; allein das außerordentliche Getöse und ihre wunderbare Gestalt erschreckte eine Menge Frösche, die am Ufer saßen, so sehr, daß sie aufs schnellste untertauchten. \n\n\"Halt\", rief nun eben dieser Sprecher, \"wir wollen das Ersäufen noch ein wenig aufschieben, denn auch uns fürchten, wie ihr seht, einige Tiere, welche also wohl noch unglücklicher sein müssen als wir.\" \n\nredball.png"
}
1
],
"attachments": [
3,
4
],
"parts": [
{
"Binary": {
"header": {
"content_disposition": {
"c_type": "inline",
"Multipart": {
"content_type": {
"ContentType": {
"c_type": "multipart",
"c_subtype": "alternative",
"attributes": {
"filename": "blueball.png"
"boundary": "=====================_715157141==_.ALT"
}
}
}
}
},
{
"Text": {
"headers": {
"content_type": {
"ContentType": {
"c_type": "text",
"c_subtype": "plain",
"attributes": {
"charset": "iso-8859-1"
}
}
},
"content_id": "4.2.0.58.20000519003143.00a8d550@pop.example.com.0",
"content_transfer_encoding": "base64",
"content_transfer_encoding": {
"Text": "quoted-printable"
}
},
"body": "blueball.png\n\nDie Hasen und die Frösche\n\nDie Hasen klagten einst über ihre mißliche Lage; \"wir leben\", sprach ein Redner, \"in steter Furcht vor Menschen und Tieren, eine Beute der Hunde, der Adler, ja fast aller Raubtiere! Unsere stete Angst ist ärger als der Tod selbst. Auf, laßt uns ein für allemal sterben.\" \n\nIn einem nahen Teich wollten sie sich nun ersäufen; sie eilten ihm zu; allein das außerordentliche Getöse und ihre wunderbare Gestalt erschreckte eine Menge Frösche, die am Ufer saßen, so sehr, daß sie aufs schnellste untertauchten. \n\n\"Halt\", rief nun eben dieser Sprecher, \"wir wollen das Ersäufen noch ein wenig aufschieben, denn auch uns fürchten, wie ihr seht, einige Tiere, welche also wohl noch unglücklicher sein müssen als wir.\" \n\nredball.png"
}
},
{
"Html": {
"headers": {
"content_type": {
"c_type": "image",
"c_subtype": "png",
"attributes": {
"name": "blueball.png"
"ContentType": {
"c_type": "text",
"c_subtype": "html",
"attributes": {
"charset": "iso-8859-1"
}
}
},
"content_transfer_encoding": {
"Text": "quoted-printable"
}
},
"body": "<html>\n<img src=\"cid:4.2.0.58.20000519003143.00a8d550@pop.example.com.0\" width=27 height=27 alt=\"blueball.png\"><br>\n<br>\n<font face=\"Arial, Helvetica\" size=5 color=\"#0000FF\"><b>Die Hasen und die\nFrösche<br>\n<br>\n</font></b><font face=\"Arial, Helvetica\">Die Hasen klagten einst über\nihre mißliche Lage; &quot;wir leben&quot;, sprach ein Redner, &quot;in\nsteter Furcht vor Menschen und Tieren, eine Beute der Hunde, der Adler,\nja fast aller Raubtiere! Unsere stete Angst ist ärger als der Tod selbst.\nAuf, laßt uns ein für allemal sterben.&quot; <br>\n<br>\nIn einem nahen Teich wollten sie sich nun ersäufen; sie eilten ihm zu;\nallein das außerordentliche Getöse und ihre wunderbare Gestalt\nerschreckte eine Menge Frösche, die am Ufer saßen, so sehr, daß sie aufs\nschnellste untertauchten. <br>\n<br>\n&quot;Halt&quot;, rief nun eben dieser Sprecher, &quot;wir wollen das\nErsäufen noch ein wenig aufschieben, denn auch uns fürchten, wie ihr\nseht, einige Tiere, welche also wohl noch unglücklicher sein müssen als\nwir.&quot; <br>\n<br>\n<img src=\"cid:4.2.0.58.20000519003143.00a8d550@pop.example.com.1\" width=27 height=27 alt=\"redball.png\"></font></html>\n"
}
},
{
"Binary": {
"headers": {
"content_transfer_encoding": {
"Text": "base64"
},
"content_disposition": {
"ContentType": {
"c_type": "inline",
"attributes": {
"filename": "blueball.png"
}
}
},
"content_id": {
"Text": "4.2.0.58.20000519003143.00a8d550@pop.example.com.0"
},
"content_type": {
"ContentType": {
"c_type": "image",
"c_subtype": "png",
"attributes": {
"name": "blueball.png"
}
}
}
},
"contents": [
"body": [
137,
80,
78,
@@ -1567,24 +1688,32 @@ IFl2ZXMgUGlndWV0NnM7vAAAAABJRU5ErkJggg==
},
{
"Binary": {
"header": {
"content_disposition": {
"c_type": "inline",
"attributes": {
"filename": "redball.png"
"headers": {
"content_type": {
"ContentType": {
"c_type": "image",
"c_subtype": "png",
"attributes": {
"name": "redball.png"
}
}
},
"content_id": "4.2.0.58.20000519003143.00a8d550@pop.example.com.1",
"content_transfer_encoding": "base64",
"content_type": {
"c_type": "image",
"c_subtype": "png",
"attributes": {
"name": "redball.png"
"content_id": {
"Text": "4.2.0.58.20000519003143.00a8d550@pop.example.com.1"
},
"content_transfer_encoding": {
"Text": "base64"
},
"content_disposition": {
"ContentType": {
"c_type": "inline",
"attributes": {
"filename": "redball.png"
}
}
}
},
"contents": [
"body": [
137,
80,
78,
@@ -3041,5 +3170,31 @@ IFl2ZXMgUGlndWV0NnM7vAAAAABJRU5ErkJggg==
]
}
}
]
],
"structure": {
"List": [
{
"MultiPart": [
0,
[
{
"Part": 1
},
{
"Part": 2
}
]
]
},
{
"Part": 3
},
{
"Part": 4
}
]
},
"offset_header": 0,
"offset_body": 522,
"offset_end": 7391
}
+254 -89
View File
@@ -145,17 +145,18 @@ IFl2ZXMgUGlndWV0NnM7vAAAAABJRU5ErkJggg==
---- EXPECTED STRUCTURE ----
{
"header": {
"date": {
"year": 2000,
"month": 5,
"day": 17,
"hour": 19,
"minute": 42,
"second": 10,
"tz_before_gmt": true,
"tz_hour": 4,
"tz_minute": 0
"headers_rfc": {
"subject": {
"Text": "Test message from Microsoft Outlook 00"
},
"to": {
"Address": {
"name": "Joe Blow",
"address": "jblow@example.com"
}
},
"message_id": {
"Text": "NDBBIAKOPKHFGPLCODIGGEKFCHAA.doug@example.com"
},
"from": {
"Address": {
@@ -163,90 +164,222 @@ IFl2ZXMgUGlndWV0NnM7vAAAAABJRU5ErkJggg==
"address": "doug@example.com"
}
},
"message_id": "NDBBIAKOPKHFGPLCODIGGEKFCHAA.doug@example.com",
"mime_version": "1.0",
"subject": "Test message from Microsoft Outlook 00",
"to": {
"Address": {
"name": "Joe Blow",
"address": "jblow@example.com"
}
"mime_version": {
"Text": "1.0"
},
"content_type": {
"c_type": "multipart",
"c_subtype": "mixed",
"attributes": {
"boundary": "----=_NextPart_000_0008_01BFC037.FDD8EE90"
"ContentType": {
"c_type": "multipart",
"c_subtype": "mixed",
"attributes": {
"boundary": "----=_NextPart_000_0008_01BFC037.FDD8EE90"
}
}
},
"others": {
"X-MSMail-Priority": [
"Normal"
],
"X-Mailer": [
"Microsoft Outlook IMO, Build 9.0.2416 (9.0.2910.0)"
],
"Importance": [
"Normal"
],
"X-MimeOLE": [
"Produced By Microsoft MimeOLE V5.00.2314.1300"
],
"X-Priority": [
"3 (Normal)"
]
"date": {
"DateTime": {
"year": 2000,
"month": 5,
"day": 17,
"hour": 19,
"minute": 42,
"second": 10,
"tz_before_gmt": true,
"tz_hour": 4,
"tz_minute": 0
}
}
},
"html_body": [
{
"header": {
"content_transfer_encoding": "quoted-printable",
"content_type": {
"c_type": "text",
"c_subtype": "html",
"attributes": {
"charset": "iso-8859-1"
}
}
},
"contents": "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.0 Transitional//EN\">\n<HTML><HEAD>\n<META content=\"text/html; charset=iso-8859-1\" http-equiv=Content-Type>\n<META content=\"MSHTML 5.00.2314.1000\" name=GENERATOR></HEAD>\n<BODY>\n<DIV><BR><FONT face=Arial size=2>The Hare and the Tortoise <BR>&nbsp;<BR>A HARE \none day ridiculed the short feet and slow pace of the Tortoise, who replied, \nlaughing:&nbsp; \"Though you be swift as the wind, I will beat you in a \nrace.\"&nbsp; The Hare, believing her assertion to be simply impossible, assented \nto the proposal; and they agreed that the Fox should choose the course and fix \nthe goal.&nbsp; On the day appointed for the race the two started \ntogether.&nbsp; The Tortoise never for a moment stopped, but went on with a slow \nbut steady pace straight to the end of the course.&nbsp; The Hare, lying down by \nthe wayside, fell fast asleep.&nbsp; At last waking up, and moving as fast as he \ncould, he saw the Tortoise had reached the goal, and was comfortably dozing \nafter her fatigue.&nbsp; <BR>&nbsp;<BR>Slow but steady wins the race.&nbsp; \n<BR></FONT></DIV></BODY></HTML>\n"
"headers_other": {
"X-Priority": {
"Text": "3 (Normal)"
},
"X-MSMail-Priority": {
"Text": "Normal"
},
"Importance": {
"Text": "Normal"
},
"X-MimeOLE": {
"Text": "Produced By Microsoft MimeOLE V5.00.2314.1300"
},
"X-Mailer": {
"Text": "Microsoft Outlook IMO, Build 9.0.2416 (9.0.2910.0)"
}
},
"headers_offsets": [
{
"name": {
"Rfc": "from"
},
"start": 5,
"end": 40
},
{
"name": {
"Rfc": "to"
},
"start": 43,
"end": 76
},
{
"name": {
"Rfc": "subject"
},
"start": 84,
"end": 125
},
{
"name": {
"Rfc": "date"
},
"start": 130,
"end": 164
},
{
"name": {
"Rfc": "message_id"
},
"start": 175,
"end": 225
},
{
"name": {
"Rfc": "mime_version"
},
"start": 238,
"end": 244
},
{
"name": {
"Rfc": "content_type"
},
"start": 257,
"end": 331
},
{
"name": {
"Other": "X-Priority"
},
"start": 342,
"end": 355
},
{
"name": {
"Other": "X-MSMail-Priority"
},
"start": 373,
"end": 382
},
{
"name": {
"Other": "X-Mailer"
},
"start": 391,
"end": 444
},
{
"name": {
"Other": "Importance"
},
"start": 455,
"end": 464
},
{
"name": {
"Other": "X-MimeOLE"
},
"start": 474,
"end": 522
}
],
"html_body": [
2
],
"text_body": [
{
"header": {
"content_transfer_encoding": "quoted-printable",
"content_type": {
"c_type": "text",
"c_subtype": "plain",
"attributes": {
"charset": "iso-8859-1"
}
}
},
"contents": "\nThe Hare and the Tortoise \n \nA HARE one day ridiculed the short feet and slow pace of the Tortoise, who replied, laughing: \"Though you be swift as the wind, I will beat you in a race.\" The Hare, believing her assertion to be simply impossible, assented to the proposal; and they agreed that the Fox should choose the course and fix the goal. On the day appointed for the race the two started together. The Tortoise never for a moment stopped, but went on with a slow but steady pace straight to the end of the course. The Hare, lying down by the wayside, fell fast asleep. At last waking up, and moving as fast as he could, he saw the Tortoise had reached the goal, and was comfortably dozing after her fatigue. \n \nSlow but steady wins the race. \n\n"
}
1
],
"attachments": [
3,
4
],
"parts": [
{
"Binary": {
"header": {
"content_disposition": {
"c_type": "attachment",
"Multipart": {
"content_type": {
"ContentType": {
"c_type": "multipart",
"c_subtype": "alternative",
"attributes": {
"filename": "greenball.png"
"boundary": "----=_NextPart_001_0009_01BFC037.FDD8EE90"
}
}
}
}
},
{
"Text": {
"headers": {
"content_type": {
"ContentType": {
"c_type": "text",
"c_subtype": "plain",
"attributes": {
"charset": "iso-8859-1"
}
}
},
"content_transfer_encoding": "base64",
"content_transfer_encoding": {
"Text": "quoted-printable"
}
},
"body": "\nThe Hare and the Tortoise \n \nA HARE one day ridiculed the short feet and slow pace of the Tortoise, who replied, laughing: \"Though you be swift as the wind, I will beat you in a race.\" The Hare, believing her assertion to be simply impossible, assented to the proposal; and they agreed that the Fox should choose the course and fix the goal. On the day appointed for the race the two started together. The Tortoise never for a moment stopped, but went on with a slow but steady pace straight to the end of the course. The Hare, lying down by the wayside, fell fast asleep. At last waking up, and moving as fast as he could, he saw the Tortoise had reached the goal, and was comfortably dozing after her fatigue. \n \nSlow but steady wins the race. \n\n"
}
},
{
"Html": {
"headers": {
"content_type": {
"c_type": "image",
"c_subtype": "png",
"attributes": {
"name": "greenball.png"
"ContentType": {
"c_type": "text",
"c_subtype": "html",
"attributes": {
"charset": "iso-8859-1"
}
}
},
"content_transfer_encoding": {
"Text": "quoted-printable"
}
},
"body": "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.0 Transitional//EN\">\n<HTML><HEAD>\n<META content=\"text/html; charset=iso-8859-1\" http-equiv=Content-Type>\n<META content=\"MSHTML 5.00.2314.1000\" name=GENERATOR></HEAD>\n<BODY>\n<DIV><BR><FONT face=Arial size=2>The Hare and the Tortoise <BR>&nbsp;<BR>A HARE \none day ridiculed the short feet and slow pace of the Tortoise, who replied, \nlaughing:&nbsp; \"Though you be swift as the wind, I will beat you in a \nrace.\"&nbsp; The Hare, believing her assertion to be simply impossible, assented \nto the proposal; and they agreed that the Fox should choose the course and fix \nthe goal.&nbsp; On the day appointed for the race the two started \ntogether.&nbsp; The Tortoise never for a moment stopped, but went on with a slow \nbut steady pace straight to the end of the course.&nbsp; The Hare, lying down by \nthe wayside, fell fast asleep.&nbsp; At last waking up, and moving as fast as he \ncould, he saw the Tortoise had reached the goal, and was comfortably dozing \nafter her fatigue.&nbsp; <BR>&nbsp;<BR>Slow but steady wins the race.&nbsp; \n<BR></FONT></DIV></BODY></HTML>\n"
}
},
{
"Binary": {
"headers": {
"content_disposition": {
"ContentType": {
"c_type": "attachment",
"attributes": {
"filename": "greenball.png"
}
}
},
"content_transfer_encoding": {
"Text": "base64"
},
"content_type": {
"ContentType": {
"c_type": "image",
"c_subtype": "png",
"attributes": {
"name": "greenball.png"
}
}
}
},
"contents": [
"body": [
137,
80,
78,
@@ -1550,23 +1683,29 @@ IFl2ZXMgUGlndWV0NnM7vAAAAABJRU5ErkJggg==
},
{
"Binary": {
"header": {
"content_disposition": {
"c_type": "attachment",
"attributes": {
"filename": "redball.png"
"headers": {
"content_type": {
"ContentType": {
"c_type": "image",
"c_subtype": "png",
"attributes": {
"name": "redball.png"
}
}
},
"content_transfer_encoding": "base64",
"content_type": {
"c_type": "image",
"c_subtype": "png",
"attributes": {
"name": "redball.png"
"content_disposition": {
"ContentType": {
"c_type": "attachment",
"attributes": {
"filename": "redball.png"
}
}
},
"content_transfer_encoding": {
"Text": "base64"
}
},
"contents": [
"body": [
137,
80,
78,
@@ -3023,5 +3162,31 @@ IFl2ZXMgUGlndWV0NnM7vAAAAABJRU5ErkJggg==
]
}
}
]
],
"structure": {
"List": [
{
"MultiPart": [
0,
[
{
"Part": 1
},
{
"Part": 2
}
]
]
},
{
"Part": 3
},
{
"Part": 4
}
]
},
"offset_header": 0,
"offset_body": 524,
"offset_end": 7240
}
+159 -45
View File
@@ -32,17 +32,37 @@ welche also wohl noch ungl
---- EXPECTED STRUCTURE ----
{
"header": {
"headers_rfc": {
"content_type": {
"ContentType": {
"c_type": "text",
"c_subtype": "plain",
"attributes": {
"charset": "iso-8859-1"
}
}
},
"date": {
"year": 2000,
"month": 5,
"day": 17,
"hour": 19,
"minute": 8,
"second": 29,
"tz_before_gmt": true,
"tz_hour": 4,
"tz_minute": 0
"DateTime": {
"year": 2000,
"month": 5,
"day": 17,
"hour": 19,
"minute": 8,
"second": 29,
"tz_before_gmt": true,
"tz_hour": 4,
"tz_minute": 0
}
},
"subject": {
"Text": "Die Hasen und die Fr�sche (Microsoft Outlook 00)"
},
"to": {
"Address": {
"name": "J�rgen Schm�rgen",
"address": "schmuergen@example.com"
}
},
"from": {
"Address": {
@@ -50,49 +70,143 @@ welche also wohl noch ungl
"address": "doug@example.com"
}
},
"message_id": "NDBBIAKOPKHFGPLCODIGIEKBCHAA.doug@example.com",
"mime_version": "1.0",
"subject": "Die Hasen und die Fr�sche (Microsoft Outlook 00)",
"to": {
"Address": {
"name": "J�rgen Schm�rgen",
"address": "schmuergen@example.com"
}
"message_id": {
"Text": "NDBBIAKOPKHFGPLCODIGIEKBCHAA.doug@example.com"
},
"content_transfer_encoding": "8bit",
"content_type": {
"c_type": "text",
"c_subtype": "plain",
"attributes": {
"charset": "iso-8859-1"
}
"content_transfer_encoding": {
"Text": "8bit"
},
"others": {
"X-Mailer": [
"Microsoft Outlook IMO, Build 9.0.2416 (9.0.2910.0)"
],
"X-MimeOLE": [
"Produced By Microsoft MimeOLE V5.00.2314.1300"
],
"Importance": [
"Normal"
],
"X-MSMail-Priority": [
"Normal"
],
"X-Priority": [
"3 (Normal)"
]
"mime_version": {
"Text": "1.0"
}
},
"html_body": [
"headers_other": {
"X-MimeOLE": {
"Text": "Produced By Microsoft MimeOLE V5.00.2314.1300"
},
"X-Priority": {
"Text": "3 (Normal)"
},
"Importance": {
"Text": "Normal"
},
"X-MSMail-Priority": {
"Text": "Normal"
},
"X-Mailer": {
"Text": "Microsoft Outlook IMO, Build 9.0.2416 (9.0.2910.0)"
}
},
"headers_offsets": [
{
"contents": "<html><body>Die Hasen und die Frösche<br/><br/>Die Hasen klagten einst über ihre mißliche Lage; \"wir leben\", sprach ein<br/>Redner, \"in steter Furcht vor Menschen und Tieren, eine Beute der Hunde, der<br/>Adler, ja fast aller Raubtiere! Unsere stete Angst ist ärger als der Tod<br/>selbst. Auf, laßt uns ein für allemal sterben.\"<br/><br/>In einem nahen Teich wollten sie sich nun ersäufen; sie eilten ihm zu;<br/>allein das außerordentliche Getöse und ihre wunderbare Gestalt erschreckte<br/>eine Menge Frösche, die am Ufer saßen, so sehr, daß sie aufs schnellste<br/>untertauchten.<br/><br/>\"Halt\", rief nun eben dieser Sprecher, \"wir wollen das Ersäufen noch ein<br/>wenig aufschieben, denn auch uns fürchten, wie ihr seht, einige Tiere,<br/>welche also wohl noch unglücklicher sein müssen als wir.\"<br/><br/></body></html>"
"name": {
"Rfc": "from"
},
"start": 5,
"end": 40
},
{
"name": {
"Rfc": "to"
},
"start": 43,
"end": 89
},
{
"name": {
"Rfc": "subject"
},
"start": 97,
"end": 148
},
{
"name": {
"Rfc": "date"
},
"start": 153,
"end": 187
},
{
"name": {
"Rfc": "message_id"
},
"start": 198,
"end": 248
},
{
"name": {
"Rfc": "mime_version"
},
"start": 261,
"end": 267
},
{
"name": {
"Rfc": "content_type"
},
"start": 280,
"end": 317
},
{
"name": {
"Rfc": "content_transfer_encoding"
},
"start": 343,
"end": 350
},
{
"name": {
"Other": "X-Priority"
},
"start": 361,
"end": 374
},
{
"name": {
"Other": "X-MSMail-Priority"
},
"start": 392,
"end": 401
},
{
"name": {
"Other": "X-Mailer"
},
"start": 410,
"end": 463
},
{
"name": {
"Other": "Importance"
},
"start": 474,
"end": 483
},
{
"name": {
"Other": "X-MimeOLE"
},
"start": 493,
"end": 541
}
],
"html_body": [
0
],
"text_body": [
0
],
"parts": [
{
"contents": "Die Hasen und die Frösche\r\n\r\nDie Hasen klagten einst über ihre mißliche Lage; \"wir leben\", sprach ein\r\nRedner, \"in steter Furcht vor Menschen und Tieren, eine Beute der Hunde, der\r\nAdler, ja fast aller Raubtiere! Unsere stete Angst ist ärger als der Tod\r\nselbst. Auf, laßt uns ein für allemal sterben.\"\r\n\r\nIn einem nahen Teich wollten sie sich nun ersäufen; sie eilten ihm zu;\r\nallein das außerordentliche Getöse und ihre wunderbare Gestalt erschreckte\r\neine Menge Frösche, die am Ufer saßen, so sehr, daß sie aufs schnellste\r\nuntertauchten.\r\n\r\n\"Halt\", rief nun eben dieser Sprecher, \"wir wollen das Ersäufen noch ein\r\nwenig aufschieben, denn auch uns fürchten, wie ihr seht, einige Tiere,\r\nwelche also wohl noch unglücklicher sein müssen als wir.\"\r\n\r\n"
"Text": {
"body": "Die Hasen und die Frösche\r\n\r\nDie Hasen klagten einst über ihre mißliche Lage; \"wir leben\", sprach ein\r\nRedner, \"in steter Furcht vor Menschen und Tieren, eine Beute der Hunde, der\r\nAdler, ja fast aller Raubtiere! Unsere stete Angst ist ärger als der Tod\r\nselbst. Auf, laßt uns ein für allemal sterben.\"\r\n\r\nIn einem nahen Teich wollten sie sich nun ersäufen; sie eilten ihm zu;\r\nallein das außerordentliche Getöse und ihre wunderbare Gestalt erschreckte\r\neine Menge Frösche, die am Ufer saßen, so sehr, daß sie aufs schnellste\r\nuntertauchten.\r\n\r\n\"Halt\", rief nun eben dieser Sprecher, \"wir wollen das Ersäufen noch ein\r\nwenig aufschieben, denn auch uns fürchten, wie ihr seht, einige Tiere,\r\nwelche also wohl noch unglücklicher sein müssen als wir.\"\r\n\r\n"
}
}
]
],
"structure": {
"Part": 0
},
"offset_header": 0,
"offset_body": 543,
"offset_end": 1295
}
+291 -96
View File
@@ -189,103 +189,250 @@ IFl2ZXMgUGlndWV0NnM7vAAAAABJRU5ErkJggg==
---- EXPECTED STRUCTURE ----
{
"header": {
"date": {
"year": 2000,
"month": 5,
"day": 17,
"hour": 19,
"minute": 47,
"second": 24,
"tz_before_gmt": true,
"tz_hour": 4,
"tz_minute": 0
},
"headers_rfc": {
"from": {
"Address": {
"name": "Doug Sauder",
"address": "doug@example.com"
}
},
"message_id": "NDBBIAKOPKHFGPLCODIGOEKFCHAA.doug@example.com",
"mime_version": "1.0",
"subject": "Test message from Microsoft Outlook 00",
"message_id": {
"Text": "NDBBIAKOPKHFGPLCODIGOEKFCHAA.doug@example.com"
},
"subject": {
"Text": "Test message from Microsoft Outlook 00"
},
"mime_version": {
"Text": "1.0"
},
"to": {
"Address": {
"name": "Joe Blow",
"address": "jblow@example.com"
}
},
"content_type": {
"c_type": "multipart",
"c_subtype": "mixed",
"attributes": {
"boundary": "----=_NextPart_000_0010_01BFC038.B91BC650"
"date": {
"DateTime": {
"year": 2000,
"month": 5,
"day": 17,
"hour": 19,
"minute": 47,
"second": 24,
"tz_before_gmt": true,
"tz_hour": 4,
"tz_minute": 0
}
},
"others": {
"X-Mailer": [
"Microsoft Outlook IMO, Build 9.0.2416 (9.0.2910.0)"
],
"X-MSMail-Priority": [
"Normal"
],
"X-Priority": [
"3 (Normal)"
],
"Importance": [
"Normal"
],
"X-MimeOLE": [
"Produced By Microsoft MimeOLE V5.00.2314.1300"
]
"content_type": {
"ContentType": {
"c_type": "multipart",
"c_subtype": "mixed",
"attributes": {
"boundary": "----=_NextPart_000_0010_01BFC038.B91BC650"
}
}
}
},
"html_body": [
{
"header": {
"content_transfer_encoding": "quoted-printable",
"content_type": {
"c_type": "text",
"c_subtype": "html",
"attributes": {
"charset": "iso-8859-1"
}
}
},
"contents": "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.0 Transitional//EN\">\n<HTML><HEAD>\n<META content=\"text/html; charset=iso-8859-1\" http-equiv=Content-Type>\n<META content=\"MSHTML 5.00.2314.1000\" name=GENERATOR></HEAD>\n<BODY>\n<DIV><FONT face=Arial size=2><IMG align=baseline alt=\"blue ball\" border=0 \nhspace=0 src=\"cid:938014623@17052000-0f9b\"></FONT></DIV>\n<DIV><FONT face=Arial size=2><BR>The Hare and the Tortoise <BR>&nbsp;<BR>A HARE \none day ridiculed the short feet and slow pace of the Tortoise, who replied, \nlaughing:&nbsp; \"Though you be swift as the wind, I will beat you in a \nrace.\"&nbsp; The Hare, believing her assertion to be simply impossible, assented \nto the proposal; and they agreed that the Fox should choose the course and fix \nthe goal.&nbsp; On the day appointed for the race the two started \ntogether.&nbsp; The Tortoise never for a moment stopped, but went on with a slow \nbut steady pace straight to the end of the course.&nbsp; The Hare, lying down by \nthe wayside, fell fast asleep.&nbsp; At last waking up, and moving as fast as he \ncould, he saw the Tortoise had reached the goal, and was comfortably dozing \nafter her fatigue.&nbsp; <BR>&nbsp;<BR>Slow but steady wins the race.&nbsp; \n</FONT></DIV>\n<DIV><FONT face=Arial size=2><BR>&nbsp;</DIV></FONT></BODY></HTML>\n"
"headers_other": {
"Importance": {
"Text": "Normal"
},
"X-MimeOLE": {
"Text": "Produced By Microsoft MimeOLE V5.00.2314.1300"
},
"X-MSMail-Priority": {
"Text": "Normal"
},
"X-Mailer": {
"Text": "Microsoft Outlook IMO, Build 9.0.2416 (9.0.2910.0)"
},
"X-Priority": {
"Text": "3 (Normal)"
}
},
"headers_offsets": [
{
"name": {
"Rfc": "from"
},
"start": 5,
"end": 40
},
{
"name": {
"Rfc": "to"
},
"start": 43,
"end": 76
},
{
"name": {
"Rfc": "subject"
},
"start": 84,
"end": 125
},
{
"name": {
"Rfc": "date"
},
"start": 130,
"end": 164
},
{
"name": {
"Rfc": "message_id"
},
"start": 175,
"end": 225
},
{
"name": {
"Rfc": "mime_version"
},
"start": 238,
"end": 244
},
{
"name": {
"Rfc": "content_type"
},
"start": 257,
"end": 331
},
{
"name": {
"Other": "X-Priority"
},
"start": 342,
"end": 355
},
{
"name": {
"Other": "X-MSMail-Priority"
},
"start": 373,
"end": 382
},
{
"name": {
"Other": "X-Mailer"
},
"start": 391,
"end": 444
},
{
"name": {
"Other": "Importance"
},
"start": 455,
"end": 464
},
{
"name": {
"Other": "X-MimeOLE"
},
"start": 474,
"end": 522
}
],
"html_body": [
3
],
"text_body": [
{
"header": {
"content_transfer_encoding": "quoted-printable",
"content_type": {
"c_type": "text",
"c_subtype": "plain",
"attributes": {
"charset": "iso-8859-1"
}
}
},
"contents": "\n\nThe Hare and the Tortoise \n \nA HARE one day ridiculed the short feet and slow pace of the Tortoise, who replied, laughing: \"Though you be swift as the wind, I will beat you in a race.\" The Hare, believing her assertion to be simply impossible, assented to the proposal; and they agreed that the Fox should choose the course and fix the goal. On the day appointed for the race the two started together. The Tortoise never for a moment stopped, but went on with a slow but steady pace straight to the end of the course. The Hare, lying down by the wayside, fell fast asleep. At last waking up, and moving as fast as he could, he saw the Tortoise had reached the goal, and was comfortably dozing after her fatigue. \n \nSlow but steady wins the race. \n\n\n"
}
2
],
"attachments": [
4,
5,
6
],
"parts": [
{
"Binary": {
"header": {
"content_id": "938014623@17052000-0f9b",
"content_transfer_encoding": "base64",
"content_type": {
"c_type": "image",
"c_subtype": "png",
"Multipart": {
"content_type": {
"ContentType": {
"c_type": "multipart",
"c_subtype": "related",
"attributes": {
"name": "blueball.png"
"boundary": "----=_NextPart_001_0011_01BFC038.B91BC650"
}
}
}
}
},
{
"Multipart": {
"content_type": {
"ContentType": {
"c_type": "multipart",
"c_subtype": "alternative",
"attributes": {
"boundary": "----=_NextPart_002_0012_01BFC038.B91BC650"
}
}
}
}
},
{
"Text": {
"headers": {
"content_transfer_encoding": {
"Text": "quoted-printable"
},
"content_type": {
"ContentType": {
"c_type": "text",
"c_subtype": "plain",
"attributes": {
"charset": "iso-8859-1"
}
}
}
},
"contents": [
"body": "\n\nThe Hare and the Tortoise \n \nA HARE one day ridiculed the short feet and slow pace of the Tortoise, who replied, laughing: \"Though you be swift as the wind, I will beat you in a race.\" The Hare, believing her assertion to be simply impossible, assented to the proposal; and they agreed that the Fox should choose the course and fix the goal. On the day appointed for the race the two started together. The Tortoise never for a moment stopped, but went on with a slow but steady pace straight to the end of the course. The Hare, lying down by the wayside, fell fast asleep. At last waking up, and moving as fast as he could, he saw the Tortoise had reached the goal, and was comfortably dozing after her fatigue. \n \nSlow but steady wins the race. \n\n\n"
}
},
{
"Html": {
"headers": {
"content_transfer_encoding": {
"Text": "quoted-printable"
},
"content_type": {
"ContentType": {
"c_type": "text",
"c_subtype": "html",
"attributes": {
"charset": "iso-8859-1"
}
}
}
},
"body": "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.0 Transitional//EN\">\n<HTML><HEAD>\n<META content=\"text/html; charset=iso-8859-1\" http-equiv=Content-Type>\n<META content=\"MSHTML 5.00.2314.1000\" name=GENERATOR></HEAD>\n<BODY>\n<DIV><FONT face=Arial size=2><IMG align=baseline alt=\"blue ball\" border=0 \nhspace=0 src=\"cid:938014623@17052000-0f9b\"></FONT></DIV>\n<DIV><FONT face=Arial size=2><BR>The Hare and the Tortoise <BR>&nbsp;<BR>A HARE \none day ridiculed the short feet and slow pace of the Tortoise, who replied, \nlaughing:&nbsp; \"Though you be swift as the wind, I will beat you in a \nrace.\"&nbsp; The Hare, believing her assertion to be simply impossible, assented \nto the proposal; and they agreed that the Fox should choose the course and fix \nthe goal.&nbsp; On the day appointed for the race the two started \ntogether.&nbsp; The Tortoise never for a moment stopped, but went on with a slow \nbut steady pace straight to the end of the course.&nbsp; The Hare, lying down by \nthe wayside, fell fast asleep.&nbsp; At last waking up, and moving as fast as he \ncould, he saw the Tortoise had reached the goal, and was comfortably dozing \nafter her fatigue.&nbsp; <BR>&nbsp;<BR>Slow but steady wins the race.&nbsp; \n</FONT></DIV>\n<DIV><FONT face=Arial size=2><BR>&nbsp;</DIV></FONT></BODY></HTML>\n"
}
},
{
"Binary": {
"headers": {
"content_id": {
"Text": "938014623@17052000-0f9b"
},
"content_transfer_encoding": {
"Text": "base64"
},
"content_type": {
"ContentType": {
"c_type": "image",
"c_subtype": "png",
"attributes": {
"name": "blueball.png"
}
}
}
},
"body": [
137,
80,
78,
@@ -1616,23 +1763,29 @@ IFl2ZXMgUGlndWV0NnM7vAAAAABJRU5ErkJggg==
},
{
"Binary": {
"header": {
"content_disposition": {
"c_type": "attachment",
"attributes": {
"filename": "greenball.png"
"headers": {
"content_type": {
"ContentType": {
"c_type": "image",
"c_subtype": "png",
"attributes": {
"name": "greenball.png"
}
}
},
"content_transfer_encoding": "base64",
"content_type": {
"c_type": "image",
"c_subtype": "png",
"attributes": {
"name": "greenball.png"
"content_disposition": {
"ContentType": {
"c_type": "attachment",
"attributes": {
"filename": "greenball.png"
}
}
},
"content_transfer_encoding": {
"Text": "base64"
}
},
"contents": [
"body": [
137,
80,
78,
@@ -2936,23 +3089,29 @@ IFl2ZXMgUGlndWV0NnM7vAAAAABJRU5ErkJggg==
},
{
"Binary": {
"header": {
"content_disposition": {
"c_type": "attachment",
"attributes": {
"filename": "redball.png"
"headers": {
"content_type": {
"ContentType": {
"c_type": "image",
"c_subtype": "png",
"attributes": {
"name": "redball.png"
}
}
},
"content_transfer_encoding": "base64",
"content_type": {
"c_type": "image",
"c_subtype": "png",
"attributes": {
"name": "redball.png"
"content_transfer_encoding": {
"Text": "base64"
},
"content_disposition": {
"ContentType": {
"c_type": "attachment",
"attributes": {
"filename": "redball.png"
}
}
}
},
"contents": [
"body": [
137,
80,
78,
@@ -4409,5 +4568,41 @@ IFl2ZXMgUGlndWV0NnM7vAAAAABJRU5ErkJggg==
]
}
}
]
],
"structure": {
"List": [
{
"MultiPart": [
0,
[
{
"MultiPart": [
1,
[
{
"Part": 2
},
{
"Part": 3
}
]
]
},
{
"Part": 4
}
]
]
},
{
"Part": 5
},
{
"Part": 6
}
]
},
"offset_header": 0,
"offset_body": 524,
"offset_end": 9625
}
+158 -44
View File
@@ -31,17 +31,21 @@ IiANCg==
---- EXPECTED STRUCTURE ----
{
"header": {
"date": {
"year": 2000,
"month": 5,
"day": 17,
"hour": 19,
"minute": 11,
"second": 50,
"tz_before_gmt": true,
"tz_hour": 4,
"tz_minute": 0
"headers_rfc": {
"mime_version": {
"Text": "1.0"
},
"to": {
"Address": {
"name": "J�rgen Schm�rgen",
"address": "schmuergen@example.com"
}
},
"message_id": {
"Text": "NDBBIAKOPKHFGPLCODIGAEKCCHAA.doug@example.com"
},
"content_transfer_encoding": {
"Text": "base64"
},
"from": {
"Address": {
@@ -49,49 +53,159 @@ IiANCg==
"address": "doug@example.com"
}
},
"message_id": "NDBBIAKOPKHFGPLCODIGAEKCCHAA.doug@example.com",
"mime_version": "1.0",
"subject": "Die Hasen und die Fr�sche (Microsoft Outlook 00)",
"to": {
"Address": {
"name": "J�rgen Schm�rgen",
"address": "schmuergen@example.com"
"subject": {
"Text": "Die Hasen und die Fr�sche (Microsoft Outlook 00)"
},
"date": {
"DateTime": {
"year": 2000,
"month": 5,
"day": 17,
"hour": 19,
"minute": 11,
"second": 50,
"tz_before_gmt": true,
"tz_hour": 4,
"tz_minute": 0
}
},
"content_transfer_encoding": "base64",
"content_type": {
"c_type": "text",
"c_subtype": "plain",
"attributes": {
"charset": "iso-8859-1"
"ContentType": {
"c_type": "text",
"c_subtype": "plain",
"attributes": {
"charset": "iso-8859-1"
}
}
},
"others": {
"X-Mailer": [
"Microsoft Outlook IMO, Build 9.0.2416 (9.0.2910.0)"
],
"X-MSMail-Priority": [
"Normal"
],
"X-MimeOLE": [
"Produced By Microsoft MimeOLE V5.00.2314.1300"
],
"Importance": [
"Normal"
],
"X-Priority": [
"3 (Normal)"
]
}
},
"html_body": [
"headers_other": {
"X-Priority": {
"Text": "3 (Normal)"
},
"X-MSMail-Priority": {
"Text": "Normal"
},
"X-Mailer": {
"Text": "Microsoft Outlook IMO, Build 9.0.2416 (9.0.2910.0)"
},
"Importance": {
"Text": "Normal"
},
"X-MimeOLE": {
"Text": "Produced By Microsoft MimeOLE V5.00.2314.1300"
}
},
"headers_offsets": [
{
"contents": "<html><body>Die Hasen und die Frösche<br/><br/>Die Hasen klagten einst über ihre mißliche Lage; \"wir leben\", sprach ein Redner, \"in steter Furcht vor Menschen und Tieren, eine Beute der Hunde, der Adler, ja fast aller Raubtiere! Unsere stete Angst ist ärger als der Tod selbst. Auf, laßt uns ein für allemal sterben.\" <br/><br/>In einem nahen Teich wollten sie sich nun ersäufen; sie eilten ihm zu; allein das außerordentliche Getöse und ihre wunderbare Gestalt erschreckte eine Menge Frösche, die am Ufer saßen, so sehr, daß sie aufs schnellste untertauchten. <br/><br/>\"Halt\", rief nun eben dieser Sprecher, \"wir wollen das Ersäufen noch ein wenig aufschieben, denn auch uns fürchten, wie ihr seht, einige Tiere, welche also wohl noch unglücklicher sein müssen als wir.\" <br/></body></html>"
"name": {
"Rfc": "from"
},
"start": 5,
"end": 40
},
{
"name": {
"Rfc": "to"
},
"start": 43,
"end": 89
},
{
"name": {
"Rfc": "subject"
},
"start": 97,
"end": 148
},
{
"name": {
"Rfc": "date"
},
"start": 153,
"end": 187
},
{
"name": {
"Rfc": "message_id"
},
"start": 198,
"end": 248
},
{
"name": {
"Rfc": "mime_version"
},
"start": 261,
"end": 267
},
{
"name": {
"Rfc": "content_type"
},
"start": 280,
"end": 317
},
{
"name": {
"Rfc": "content_transfer_encoding"
},
"start": 343,
"end": 352
},
{
"name": {
"Other": "X-Priority"
},
"start": 363,
"end": 376
},
{
"name": {
"Other": "X-MSMail-Priority"
},
"start": 394,
"end": 403
},
{
"name": {
"Other": "X-Mailer"
},
"start": 412,
"end": 465
},
{
"name": {
"Other": "Importance"
},
"start": 476,
"end": 485
},
{
"name": {
"Other": "X-MimeOLE"
},
"start": 495,
"end": 543
}
],
"html_body": [
0
],
"text_body": [
0
],
"parts": [
{
"contents": "Die Hasen und die Frösche\r\n\r\nDie Hasen klagten einst über ihre mißliche Lage; \"wir leben\", sprach ein Redner, \"in steter Furcht vor Menschen und Tieren, eine Beute der Hunde, der Adler, ja fast aller Raubtiere! Unsere stete Angst ist ärger als der Tod selbst. Auf, laßt uns ein für allemal sterben.\" \r\n\r\nIn einem nahen Teich wollten sie sich nun ersäufen; sie eilten ihm zu; allein das außerordentliche Getöse und ihre wunderbare Gestalt erschreckte eine Menge Frösche, die am Ufer saßen, so sehr, daß sie aufs schnellste untertauchten. \r\n\r\n\"Halt\", rief nun eben dieser Sprecher, \"wir wollen das Ersäufen noch ein wenig aufschieben, denn auch uns fürchten, wie ihr seht, einige Tiere, welche also wohl noch unglücklicher sein müssen als wir.\" \r\n"
"Text": {
"body": "Die Hasen und die Frösche\r\n\r\nDie Hasen klagten einst über ihre mißliche Lage; \"wir leben\", sprach ein Redner, \"in steter Furcht vor Menschen und Tieren, eine Beute der Hunde, der Adler, ja fast aller Raubtiere! Unsere stete Angst ist ärger als der Tod selbst. Auf, laßt uns ein für allemal sterben.\" \r\n\r\nIn einem nahen Teich wollten sie sich nun ersäufen; sie eilten ihm zu; allein das außerordentliche Getöse und ihre wunderbare Gestalt erschreckte eine Menge Frösche, die am Ufer saßen, so sehr, daß sie aufs schnellste untertauchten. \r\n\r\n\"Halt\", rief nun eben dieser Sprecher, \"wir wollen das Ersäufen noch ein wenig aufschieben, denn auch uns fürchten, wie ihr seht, einige Tiere, welche also wohl noch unglücklicher sein müssen als wir.\" \r\n"
}
}
]
],
"structure": {
"Part": 0
},
"offset_header": 0,
"offset_body": 545,
"offset_end": 1571
}
+200 -80
View File
@@ -109,17 +109,15 @@ In einem nahen Teich wollten sie sich nun ers=E4ufen; sie eilten ihm zu;=
---- EXPECTED STRUCTURE ----
{
"header": {
"date": {
"year": 2000,
"month": 5,
"day": 19,
"hour": 0,
"minute": 56,
"second": 13,
"tz_before_gmt": true,
"tz_hour": 4,
"tz_minute": 0
"headers_rfc": {
"to": {
"Address": {
"name": "Jürgen Schmürgen",
"address": "jschmuergen@example.com"
}
},
"subject": {
"Text": "Die Hasen und die Frösche"
},
"from": {
"Address": {
@@ -127,71 +125,164 @@ In einem nahen Teich wollten sie sich nun ers=E4ufen; sie eilten ihm zu;=
"address": "dwsauder@example.com"
}
},
"message_id": "4.2.0.58.20000519005505.00a853a0@pop.example.com",
"mime_version": "1.0",
"subject": "Die Hasen und die Frösche",
"to": {
"Address": {
"name": "Jürgen Schmürgen",
"address": "jschmuergen@example.com"
"date": {
"DateTime": {
"year": 2000,
"month": 5,
"day": 19,
"hour": 0,
"minute": 56,
"second": 13,
"tz_before_gmt": true,
"tz_hour": 4,
"tz_minute": 0
}
},
"mime_version": {
"Text": "1.0"
},
"content_type": {
"c_type": "multipart",
"c_subtype": "mixed",
"attributes": {
"boundary": "=====================_716541962==_"
"ContentType": {
"c_type": "multipart",
"c_subtype": "mixed",
"attributes": {
"boundary": "=====================_716541962==_"
}
}
},
"others": {
"X-Sender": [
"dwsauder@pop.example.com (Unverified)"
],
"X-Mailer": [
"QUALCOMM Windows Eudora Pro Version 4.2.0.58"
]
"message_id": {
"Text": "4.2.0.58.20000519005505.00a853a0@pop.example.com"
}
},
"html_body": [
{
"contents": "<html><body>Die Hasen und die Frösche<br/><br/>Die Hasen klagten einst über ihre mißliche Lage; \"wir leben\", sprach ein Redner, \"in steter Furcht vor Menschen und Tieren, eine Beute der Hunde, der Adler, ja fast aller Raubtiere! Unsere stete Angst ist ärger als der Tod selbst. Auf, laßt uns ein für allemal sterben.\" <br/><br/>In einem nahen Teich wollten sie sich nun ersäufen; sie eilten ihm zu; allein das außerordentliche Getöse und ihre wunderbare Gestalt erschreckte eine Menge Frösche, die am Ufer saßen, so sehr, daß sie aufs schnellste untertauchten. <br/><br/>\"Halt\", rief nun eben dieser Sprecher, \"wir wollen das Ersäufen noch ein wenig aufschieben, denn auch uns fürchten, wie ihr seht, einige Tiere, welche also wohl noch unglücklicher sein müssen als wir.\" <br/><br/></body></html>"
"headers_other": {
"X-Sender": {
"Text": "dwsauder@pop.example.com (Unverified)"
},
"X-Mailer": {
"Text": "QUALCOMM Windows Eudora Pro Version 4.2.0.58"
}
},
"headers_offsets": [
{
"name": {
"Rfc": "message_id"
},
"start": 11,
"end": 64
},
{
"name": {
"Other": "X-Sender"
},
"start": 73,
"end": 113
},
{
"name": {
"Other": "X-Mailer"
},
"start": 122,
"end": 170
},
{
"name": {
"Rfc": "date"
},
"start": 175,
"end": 209
},
{
"name": {
"Rfc": "to"
},
"start": 212,
"end": 295
},
{
"name": {
"Rfc": "from"
},
"start": 300,
"end": 337
},
{
"name": {
"Rfc": "subject"
},
"start": 345,
"end": 390
},
{
"name": {
"Rfc": "mime_version"
},
"start": 403,
"end": 409
},
{
"name": {
"Rfc": "content_type"
},
"start": 422,
"end": 489
}
],
"html_body": [
0
],
"text_body": [
{
"header": {
"content_transfer_encoding": "quoted-printable",
"content_type": {
"c_type": "text",
"c_subtype": "plain",
"attributes": {
"charset": "iso-8859-1"
}
}
},
"contents": "Die Hasen und die Frösche\n\nDie Hasen klagten einst über ihre mißliche Lage; \"wir leben\", sprach ein Redner, \"in steter Furcht vor Menschen und Tieren, eine Beute der Hunde, der Adler, ja fast aller Raubtiere! Unsere stete Angst ist ärger als der Tod selbst. Auf, laßt uns ein für allemal sterben.\" \n\nIn einem nahen Teich wollten sie sich nun ersäufen; sie eilten ihm zu; allein das außerordentliche Getöse und ihre wunderbare Gestalt erschreckte eine Menge Frösche, die am Ufer saßen, so sehr, daß sie aufs schnellste untertauchten. \n\n\"Halt\", rief nun eben dieser Sprecher, \"wir wollen das Ersäufen noch ein wenig aufschieben, denn auch uns fürchten, wie ihr seht, einige Tiere, welche also wohl noch unglücklicher sein müssen als wir.\" \n\n"
}
0
],
"attachments": [
1,
2,
3
],
"parts": [
{
"Binary": {
"header": {
"content_disposition": {
"c_type": "attachment",
"attributes": {
"filename": "blueball.png"
}
"Text": {
"headers": {
"content_transfer_encoding": {
"Text": "quoted-printable"
},
"content_transfer_encoding": "base64",
"content_type": {
"c_type": "image",
"c_subtype": "png",
"attributes": {
"name": "blueball.png"
"ContentType": {
"c_type": "text",
"c_subtype": "plain",
"attributes": {
"charset": "iso-8859-1"
}
}
}
},
"contents": [
"body": "Die Hasen und die Frösche\n\nDie Hasen klagten einst über ihre mißliche Lage; \"wir leben\", sprach ein Redner, \"in steter Furcht vor Menschen und Tieren, eine Beute der Hunde, der Adler, ja fast aller Raubtiere! Unsere stete Angst ist ärger als der Tod selbst. Auf, laßt uns ein für allemal sterben.\" \n\nIn einem nahen Teich wollten sie sich nun ersäufen; sie eilten ihm zu; allein das außerordentliche Getöse und ihre wunderbare Gestalt erschreckte eine Menge Frösche, die am Ufer saßen, so sehr, daß sie aufs schnellste untertauchten. \n\n\"Halt\", rief nun eben dieser Sprecher, \"wir wollen das Ersäufen noch ein wenig aufschieben, denn auch uns fürchten, wie ihr seht, einige Tiere, welche also wohl noch unglücklicher sein müssen als wir.\" \n\n"
}
},
{
"Binary": {
"headers": {
"content_type": {
"ContentType": {
"c_type": "image",
"c_subtype": "png",
"attributes": {
"name": "blueball.png"
}
}
},
"content_transfer_encoding": {
"Text": "base64"
},
"content_disposition": {
"ContentType": {
"c_type": "attachment",
"attributes": {
"filename": "blueball.png"
}
}
}
},
"body": [
137,
80,
78,
@@ -1522,44 +1613,73 @@ In einem nahen Teich wollten sie sich nun ers=E4ufen; sie eilten ihm zu;=
},
{
"Text": {
"header": {
"headers": {
"content_disposition": {
"c_type": "attachment",
"attributes": {
"filename": "farmerandstork.txt"
"ContentType": {
"c_type": "attachment",
"attributes": {
"filename": "farmerandstork.txt"
}
}
},
"content_type": {
"c_type": "text",
"c_subtype": "plain",
"attributes": {
"charset": "us-ascii"
"ContentType": {
"c_type": "text",
"c_subtype": "plain",
"attributes": {
"charset": "us-ascii"
}
}
}
},
"contents": "\r\nThe Farmer and the Stork \r\n \r\nA FARMER placed nets on his newly-sown plowlands and caught a\r\nnumber of Cranes, which came to pick up his seed. With them he\r\ntrapped a Stork that had fractured his leg in the net and was\r\nearnestly beseeching the Farmer to spare his life. \"Pray save\r\nme, Master,\" he said, \"and let me go free this once. My broken\r\nlimb should excite your pity. Besides, I am no Crane, I am a\r\nStork, a bird of excellent character; and see how I love and\r\nslave for my father and mother. Look too, at my feathers--\r\nthey are not the least like those of a Crane.\" The Farmer \r\nlaughed aloud and said, \"It may be all as you say, I only know \r\nthis: I have taken you with these robbers, the Cranes, and you \r\nmust die in their company.\" \r\n \r\nBirds of a feather flock together. \r\n\r"
"body": "\r\nThe Farmer and the Stork \r\n \r\nA FARMER placed nets on his newly-sown plowlands and caught a\r\nnumber of Cranes, which came to pick up his seed. With them he\r\ntrapped a Stork that had fractured his leg in the net and was\r\nearnestly beseeching the Farmer to spare his life. \"Pray save\r\nme, Master,\" he said, \"and let me go free this once. My broken\r\nlimb should excite your pity. Besides, I am no Crane, I am a\r\nStork, a bird of excellent character; and see how I love and\r\nslave for my father and mother. Look too, at my feathers--\r\nthey are not the least like those of a Crane.\" The Farmer \r\nlaughed aloud and said, \"It may be all as you say, I only know \r\nthis: I have taken you with these robbers, the Cranes, and you \r\nmust die in their company.\" \r\n \r\nBirds of a feather flock together. \r\n\r"
}
},
{
"Text": {
"header": {
"content_disposition": {
"c_type": "attachment",
"attributes": {
"filename": "HasenundFr�sche.txt"
"headers": {
"content_transfer_encoding": {
"Text": "quoted-printable"
},
"content_type": {
"ContentType": {
"c_type": "text",
"c_subtype": "plain",
"attributes": {
"charset": "iso-8859-1"
}
}
},
"content_transfer_encoding": "quoted-printable",
"content_type": {
"c_type": "text",
"c_subtype": "plain",
"attributes": {
"charset": "iso-8859-1"
"content_disposition": {
"ContentType": {
"c_type": "attachment",
"attributes": {
"filename": "HasenundFr�sche.txt"
}
}
}
},
"contents": "Die Hasen und die Frösche\n\nDie Hasen klagten einst über ihre mißliche Lage; \"wir leben\", sprach ein Redner, \"in steter Furcht vor Menschen und Tieren, eine Beute der Hunde, der Adler, ja fast aller Raubtiere! Unsere stete Angst ist ärger als der Tod selbst. Auf, laßt uns ein für allemal sterben.\" \n\nIn einem nahen Teich wollten sie sich nun ersäufen; sie eilten ihm zu; allein das außerordentliche Getöse und ihre wunderbare Gestalt erschreckte eine Menge Frösche, die am Ufer saßen, so sehr, daß sie aufs schnellste untertauchten. \n\n\"Halt\", rief nun eben dieser Sprecher, \"wir wollen das Ersäufen noch ein wenig aufschieben, denn auch uns fürchten, wie ihr seht, einige Tiere, welche also wohl noch unglücklicher sein müssen als wir.\" \n\n"
"body": "Die Hasen und die Frösche\n\nDie Hasen klagten einst über ihre mißliche Lage; \"wir leben\", sprach ein Redner, \"in steter Furcht vor Menschen und Tieren, eine Beute der Hunde, der Adler, ja fast aller Raubtiere! Unsere stete Angst ist ärger als der Tod selbst. Auf, laßt uns ein für allemal sterben.\" \n\nIn einem nahen Teich wollten sie sich nun ersäufen; sie eilten ihm zu; allein das außerordentliche Getöse und ihre wunderbare Gestalt erschreckte eine Menge Frösche, die am Ufer saßen, so sehr, daß sie aufs schnellste untertauchten. \n\n\"Halt\", rief nun eben dieser Sprecher, \"wir wollen das Ersäufen noch ein wenig aufschieben, denn auch uns fürchten, wie ihr seht, einige Tiere, welche also wohl noch unglücklicher sein müssen als wir.\" \n\n"
}
}
]
],
"structure": {
"List": [
{
"Part": 0
},
{
"Part": 1
},
{
"Part": 2
},
{
"Part": 3
}
]
},
"offset_header": 0,
"offset_body": 491,
"offset_end": 5433
}
+192 -69
View File
@@ -110,17 +110,22 @@ IFl2ZXMgUGlndWV0NnM7vAAAAABJRU5ErkJggg==
---- EXPECTED STRUCTURE ----
{
"header": {
"date": {
"year": 2000,
"month": 5,
"day": 19,
"hour": 0,
"minute": 37,
"second": 39,
"tz_before_gmt": true,
"tz_hour": 4,
"tz_minute": 0
"headers_rfc": {
"message_id": {
"Text": "4.2.0.58.20000519003735.00a8d7e0@pop.example.com"
},
"mime_version": {
"Text": "1.0"
},
"content_type": {
"ContentType": {
"c_type": "multipart",
"c_subtype": "related",
"attributes": {
"type": "text/html",
"boundary": "=====================_715429112==_.REL"
}
}
},
"from": {
"Address": {
@@ -128,76 +133,170 @@ IFl2ZXMgUGlndWV0NnM7vAAAAABJRU5ErkJggg==
"address": "dwsauder@example.com"
}
},
"message_id": "4.2.0.58.20000519003735.00a8d7e0@pop.example.com",
"mime_version": "1.0",
"subject": "Die Hasen und die Frösche",
"to": {
"Address": {
"name": "Heinz Müller",
"address": "mueller@example.com"
}
},
"content_type": {
"c_type": "multipart",
"c_subtype": "related",
"attributes": {
"type": "text/html",
"boundary": "=====================_715429112==_.REL"
"date": {
"DateTime": {
"year": 2000,
"month": 5,
"day": 19,
"hour": 0,
"minute": 37,
"second": 39,
"tz_before_gmt": true,
"tz_hour": 4,
"tz_minute": 0
}
},
"others": {
"X-Priority": [
"2 (High)"
],
"X-Mailer": [
"QUALCOMM Windows Eudora Pro Version 4.2.0.58"
],
"X-Sender": [
"dwsauder@pop.example.com (Unverified)"
]
"subject": {
"Text": "Die Hasen und die Frösche"
}
},
"html_body": [
{
"header": {
"content_transfer_encoding": "quoted-printable",
"content_type": {
"c_type": "text",
"c_subtype": "html",
"attributes": {
"charset": "iso-8859-1"
}
}
},
"contents": "<html>\n<img src=\"cid:4.2.0.58.20000519003735.00a8d7e0@pop.example.com.2\" width=27 height=27 alt=\"2aa48eb6.png\"><br>\n<br>\n<font face=\"Arial, Helvetica\" size=5 color=\"#0000FF\"><b>Die Hasen und die\nFrösche<br>\n<br>\n</font></b><font face=\"Arial, Helvetica\">Die Hasen klagten einst über\nihre mißliche Lage; &quot;wir leben&quot;, sprach ein Redner, &quot;in\nsteter Furcht vor Menschen und Tieren, eine Beute der Hunde, der Adler,\nja fast aller Raubtiere! Unsere stete Angst ist ärger als der Tod selbst.\nAuf, laßt uns ein für allemal sterben.&quot; <br>\n<br>\nIn einem nahen Teich wollten sie sich nun ersäufen; sie eilten ihm zu;\nallein das außerordentliche Getöse und ihre wunderbare Gestalt\nerschreckte eine Menge Frösche, die am Ufer saßen, so sehr, daß sie aufs\nschnellste untertauchten. <br>\n<br>\n&quot;Halt&quot;, rief nun eben dieser Sprecher, &quot;wir wollen das\nErsäufen noch ein wenig aufschieben, denn auch uns fürchten, wie ihr\nseht, einige Tiere, welche also wohl noch unglücklicher sein müssen als\nwir.&quot; <br>\n<br>\n<img src=\"cid:4.2.0.58.20000519003735.00a8d7e0@pop.example.com.3\" width=27 height=27 alt=\"2aa48ec0.png\"></font></html>\n"
"headers_other": {
"X-Sender": {
"Text": "dwsauder@pop.example.com (Unverified)"
},
"X-Priority": {
"Text": "2 (High)"
},
"X-Mailer": {
"Text": "QUALCOMM Windows Eudora Pro Version 4.2.0.58"
}
},
"headers_offsets": [
{
"name": {
"Rfc": "message_id"
},
"start": 11,
"end": 64
},
{
"name": {
"Other": "X-Sender"
},
"start": 73,
"end": 113
},
{
"name": {
"Other": "X-Mailer"
},
"start": 122,
"end": 170
},
{
"name": {
"Other": "X-Priority"
},
"start": 181,
"end": 192
},
{
"name": {
"Rfc": "date"
},
"start": 197,
"end": 231
},
{
"name": {
"Rfc": "to"
},
"start": 234,
"end": 288
},
{
"name": {
"Rfc": "from"
},
"start": 293,
"end": 330
},
{
"name": {
"Rfc": "subject"
},
"start": 338,
"end": 383
},
{
"name": {
"Rfc": "mime_version"
},
"start": 396,
"end": 402
},
{
"name": {
"Rfc": "content_type"
},
"start": 415,
"end": 508
}
],
"html_body": [
0
],
"text_body": [
{
"contents": "\n\nDie Hasen und die Frösche\n\nDie Hasen klagten einst über ihre mißliche Lage; \"wir leben\", sprach ein Redner, \"in steter Furcht vor Menschen und Tieren, eine Beute der Hunde, der Adler, ja fast aller Raubtiere! Unsere stete Angst ist ärger als der Tod selbst. Auf, laßt uns ein für allemal sterben.\"\n\nIn einem nahen Teich wollten sie sich nun ersäufen; sie eilten ihm zu; allein das außerordentliche Getöse und ihre wunderbare Gestalt erschreckte eine Menge Frösche, die am Ufer saßen, so sehr, daß sie aufs schnellste untertauchten.\n\n\"Halt\", rief nun eben dieser Sprecher, \"wir wollen das Ersäufen noch ein wenig aufschieben, denn auch uns fürchten, wie ihr seht, einige Tiere, welche also wohl noch unglücklicher sein müssen als wir.\"\n\n"
}
0
],
"attachments": [
1,
2
],
"parts": [
{
"Html": {
"headers": {
"content_type": {
"ContentType": {
"c_type": "text",
"c_subtype": "html",
"attributes": {
"charset": "iso-8859-1"
}
}
},
"content_transfer_encoding": {
"Text": "quoted-printable"
}
},
"body": "<html>\n<img src=\"cid:4.2.0.58.20000519003735.00a8d7e0@pop.example.com.2\" width=27 height=27 alt=\"2aa48eb6.png\"><br>\n<br>\n<font face=\"Arial, Helvetica\" size=5 color=\"#0000FF\"><b>Die Hasen und die\nFrösche<br>\n<br>\n</font></b><font face=\"Arial, Helvetica\">Die Hasen klagten einst über\nihre mißliche Lage; &quot;wir leben&quot;, sprach ein Redner, &quot;in\nsteter Furcht vor Menschen und Tieren, eine Beute der Hunde, der Adler,\nja fast aller Raubtiere! Unsere stete Angst ist ärger als der Tod selbst.\nAuf, laßt uns ein für allemal sterben.&quot; <br>\n<br>\nIn einem nahen Teich wollten sie sich nun ersäufen; sie eilten ihm zu;\nallein das außerordentliche Getöse und ihre wunderbare Gestalt\nerschreckte eine Menge Frösche, die am Ufer saßen, so sehr, daß sie aufs\nschnellste untertauchten. <br>\n<br>\n&quot;Halt&quot;, rief nun eben dieser Sprecher, &quot;wir wollen das\nErsäufen noch ein wenig aufschieben, denn auch uns fürchten, wie ihr\nseht, einige Tiere, welche also wohl noch unglücklicher sein müssen als\nwir.&quot; <br>\n<br>\n<img src=\"cid:4.2.0.58.20000519003735.00a8d7e0@pop.example.com.3\" width=27 height=27 alt=\"2aa48ec0.png\"></font></html>\n"
}
},
{
"Binary": {
"header": {
"headers": {
"content_id": {
"Text": "4.2.0.58.20000519003735.00a8d7e0@pop.example.com.2"
},
"content_transfer_encoding": {
"Text": "base64"
},
"content_disposition": {
"c_type": "inline",
"attributes": {
"filename": "2aa48eb6.png"
"ContentType": {
"c_type": "inline",
"attributes": {
"filename": "2aa48eb6.png"
}
}
},
"content_id": "4.2.0.58.20000519003735.00a8d7e0@pop.example.com.2",
"content_transfer_encoding": "base64",
"content_type": {
"c_type": "image",
"c_subtype": "png",
"attributes": {
"name": "2aa48eb6.png"
"ContentType": {
"c_type": "image",
"c_subtype": "png",
"attributes": {
"name": "2aa48eb6.png"
}
}
}
},
"contents": [
"body": [
137,
80,
78,
@@ -1528,24 +1627,32 @@ IFl2ZXMgUGlndWV0NnM7vAAAAABJRU5ErkJggg==
},
{
"Binary": {
"header": {
"headers": {
"content_disposition": {
"c_type": "inline",
"attributes": {
"filename": "2aa48ec0.png"
"ContentType": {
"c_type": "inline",
"attributes": {
"filename": "2aa48ec0.png"
}
}
},
"content_id": "4.2.0.58.20000519003735.00a8d7e0@pop.example.com.3",
"content_transfer_encoding": "base64",
"content_transfer_encoding": {
"Text": "base64"
},
"content_id": {
"Text": "4.2.0.58.20000519003735.00a8d7e0@pop.example.com.3"
},
"content_type": {
"c_type": "image",
"c_subtype": "png",
"attributes": {
"name": "2aa48ec0.png"
"ContentType": {
"c_type": "image",
"c_subtype": "png",
"attributes": {
"name": "2aa48ec0.png"
}
}
}
},
"contents": [
"body": [
137,
80,
78,
@@ -3002,5 +3109,21 @@ IFl2ZXMgUGlndWV0NnM7vAAAAABJRU5ErkJggg==
]
}
}
]
],
"structure": {
"List": [
{
"Part": 0
},
{
"Part": 1
},
{
"Part": 2
}
]
},
"offset_header": 0,
"offset_body": 510,
"offset_end": 6227
}
+261 -97
View File
@@ -172,17 +172,9 @@ bGlwMmdpZiB2LjAuNiBieSBZdmVzIFBpZ3VldDZzO7wAAAAASUVORK5CYII=
---- EXPECTED STRUCTURE ----
{
"header": {
"date": {
"year": 2000,
"month": 5,
"day": 19,
"hour": 0,
"minute": 38,
"second": 13,
"tz_before_gmt": true,
"tz_hour": 4,
"tz_minute": 0
"headers_rfc": {
"message_id": {
"Text": "4.2.0.58.20000519003809.00a85140@pop.example.com"
},
"from": {
"Address": {
@@ -190,75 +182,198 @@ bGlwMmdpZiB2LjAuNiBieSBZdmVzIFBpZ3VldDZzO7wAAAAASUVORK5CYII=
"address": "dwsauder@example.com"
}
},
"message_id": "4.2.0.58.20000519003809.00a85140@pop.example.com",
"mime_version": "1.0",
"subject": "Die Hasen und die Frösche",
"mime_version": {
"Text": "1.0"
},
"content_type": {
"ContentType": {
"c_type": "multipart",
"c_subtype": "mixed",
"attributes": {
"boundary": "=====================_715462801==_"
}
}
},
"subject": {
"Text": "Die Hasen und die Frösche"
},
"to": {
"Address": {
"name": "Heinz Müller",
"address": "mueller@example.com"
}
},
"content_type": {
"c_type": "multipart",
"c_subtype": "mixed",
"attributes": {
"boundary": "=====================_715462801==_"
"date": {
"DateTime": {
"year": 2000,
"month": 5,
"day": 19,
"hour": 0,
"minute": 38,
"second": 13,
"tz_before_gmt": true,
"tz_hour": 4,
"tz_minute": 0
}
},
"others": {
"X-Sender": [
"dwsauder@pop.example.com (Unverified)"
],
"X-Priority": [
"2 (High)"
],
"X-Mailer": [
"QUALCOMM Windows Eudora Pro Version 4.2.0.58"
]
}
},
"html_body": [
{
"header": {
"content_transfer_encoding": "quoted-printable",
"content_type": {
"c_type": "text",
"c_subtype": "html",
"attributes": {
"charset": "iso-8859-1"
}
}
},
"contents": "<html>\n<font face=\"Arial, Helvetica\" size=5 color=\"#0000FF\"><b>Die Hasen und die\nFrösche<br>\n<br>\n</font></b><font face=\"Arial, Helvetica\">Die Hasen klagten einst über\nihre mißliche Lage; &quot;wir leben&quot;, sprach ein Redner, &quot;in\nsteter Furcht vor Menschen und Tieren, eine Beute der Hunde, der Adler,\nja fast aller Raubtiere! Unsere stete Angst ist ärger als der Tod selbst.\nAuf, laßt uns ein für allemal sterben.&quot; <br>\n<br>\nIn einem nahen Teich wollten sie sich nun ersäufen; sie eilten ihm zu;\nallein das außerordentliche Getöse und ihre wunderbare Gestalt\nerschreckte eine Menge Frösche, die am Ufer saßen, so sehr, daß sie aufs\nschnellste untertauchten. <br>\n<br>\n&quot;Halt&quot;, rief nun eben dieser Sprecher, &quot;wir wollen das\nErsäufen noch ein wenig aufschieben, denn auch uns fürchten, wie ihr\nseht, einige Tiere, welche also wohl noch unglücklicher sein müssen als\nwir.&quot; <br>\n<br>\n</font><img src=\"cid:4.2.0.58.20000519003809.00a85140@pop.example.com.2\" width=27 height=27 alt=\"2aa51367.png\"><img src=\"cid:4.2.0.58.20000519003809.00a85140@pop.example.com.3\" width=27 height=27 alt=\"2aa51371.png\"></html>\n"
"headers_other": {
"X-Sender": {
"Text": "dwsauder@pop.example.com (Unverified)"
},
"X-Mailer": {
"Text": "QUALCOMM Windows Eudora Pro Version 4.2.0.58"
},
"X-Priority": {
"Text": "2 (High)"
}
},
"headers_offsets": [
{
"name": {
"Rfc": "message_id"
},
"start": 11,
"end": 64
},
{
"name": {
"Other": "X-Sender"
},
"start": 73,
"end": 113
},
{
"name": {
"Other": "X-Mailer"
},
"start": 122,
"end": 170
},
{
"name": {
"Other": "X-Priority"
},
"start": 181,
"end": 192
},
{
"name": {
"Rfc": "date"
},
"start": 197,
"end": 231
},
{
"name": {
"Rfc": "to"
},
"start": 234,
"end": 288
},
{
"name": {
"Rfc": "from"
},
"start": 293,
"end": 330
},
{
"name": {
"Rfc": "subject"
},
"start": 338,
"end": 383
},
{
"name": {
"Rfc": "mime_version"
},
"start": 396,
"end": 402
},
{
"name": {
"Rfc": "content_type"
},
"start": 415,
"end": 482
}
],
"html_body": [
1
],
"text_body": [
{
"contents": "Die Hasen und die Frösche\n\nDie Hasen klagten einst über ihre mißliche Lage; \"wir leben\", sprach ein Redner, \"in steter Furcht vor Menschen und Tieren, eine Beute der Hunde, der Adler, ja fast aller Raubtiere! Unsere stete Angst ist ärger als der Tod selbst. Auf, laßt uns ein für allemal sterben.\"\n\nIn einem nahen Teich wollten sie sich nun ersäufen; sie eilten ihm zu; allein das außerordentliche Getöse und ihre wunderbare Gestalt erschreckte eine Menge Frösche, die am Ufer saßen, so sehr, daß sie aufs schnellste untertauchten.\n\n\"Halt\", rief nun eben dieser Sprecher, \"wir wollen das Ersäufen noch ein wenig aufschieben, denn auch uns fürchten, wie ihr seht, einige Tiere, welche also wohl noch unglücklicher sein müssen als wir.\"\n\n"
}
1
],
"attachments": [
2,
3,
4,
5
],
"parts": [
{
"Binary": {
"header": {
"content_disposition": {
"c_type": "inline",
"Multipart": {
"content_type": {
"ContentType": {
"c_type": "multipart",
"c_subtype": "related",
"attributes": {
"filename": "2aa51367.png"
}
},
"content_id": "4.2.0.58.20000519003809.00a85140@pop.example.com.2",
"content_transfer_encoding": "base64",
"content_type": {
"c_type": "image",
"c_subtype": "png",
"attributes": {
"name": "2aa51367.png"
"type": "text/html",
"boundary": "=====================_715462801==_.REL"
}
}
}
}
},
{
"Html": {
"headers": {
"content_type": {
"ContentType": {
"c_type": "text",
"c_subtype": "html",
"attributes": {
"charset": "iso-8859-1"
}
}
},
"content_transfer_encoding": {
"Text": "quoted-printable"
}
},
"contents": [
"body": "<html>\n<font face=\"Arial, Helvetica\" size=5 color=\"#0000FF\"><b>Die Hasen und die\nFrösche<br>\n<br>\n</font></b><font face=\"Arial, Helvetica\">Die Hasen klagten einst über\nihre mißliche Lage; &quot;wir leben&quot;, sprach ein Redner, &quot;in\nsteter Furcht vor Menschen und Tieren, eine Beute der Hunde, der Adler,\nja fast aller Raubtiere! Unsere stete Angst ist ärger als der Tod selbst.\nAuf, laßt uns ein für allemal sterben.&quot; <br>\n<br>\nIn einem nahen Teich wollten sie sich nun ersäufen; sie eilten ihm zu;\nallein das außerordentliche Getöse und ihre wunderbare Gestalt\nerschreckte eine Menge Frösche, die am Ufer saßen, so sehr, daß sie aufs\nschnellste untertauchten. <br>\n<br>\n&quot;Halt&quot;, rief nun eben dieser Sprecher, &quot;wir wollen das\nErsäufen noch ein wenig aufschieben, denn auch uns fürchten, wie ihr\nseht, einige Tiere, welche also wohl noch unglücklicher sein müssen als\nwir.&quot; <br>\n<br>\n</font><img src=\"cid:4.2.0.58.20000519003809.00a85140@pop.example.com.2\" width=27 height=27 alt=\"2aa51367.png\"><img src=\"cid:4.2.0.58.20000519003809.00a85140@pop.example.com.3\" width=27 height=27 alt=\"2aa51371.png\"></html>\n"
}
},
{
"Binary": {
"headers": {
"content_type": {
"ContentType": {
"c_type": "image",
"c_subtype": "png",
"attributes": {
"name": "2aa51367.png"
}
}
},
"content_transfer_encoding": {
"Text": "base64"
},
"content_disposition": {
"ContentType": {
"c_type": "inline",
"attributes": {
"filename": "2aa51367.png"
}
}
},
"content_id": {
"Text": "4.2.0.58.20000519003809.00a85140@pop.example.com.2"
}
},
"body": [
137,
80,
78,
@@ -1589,24 +1704,32 @@ bGlwMmdpZiB2LjAuNiBieSBZdmVzIFBpZ3VldDZzO7wAAAAASUVORK5CYII=
},
{
"Binary": {
"header": {
"content_disposition": {
"c_type": "inline",
"attributes": {
"filename": "2aa51371.png"
"headers": {
"content_type": {
"ContentType": {
"c_type": "image",
"c_subtype": "png",
"attributes": {
"name": "2aa51371.png"
}
}
},
"content_id": "4.2.0.58.20000519003809.00a85140@pop.example.com.3",
"content_transfer_encoding": "base64",
"content_type": {
"c_type": "image",
"c_subtype": "png",
"attributes": {
"name": "2aa51371.png"
"content_id": {
"Text": "4.2.0.58.20000519003809.00a85140@pop.example.com.3"
},
"content_transfer_encoding": {
"Text": "base64"
},
"content_disposition": {
"ContentType": {
"c_type": "inline",
"attributes": {
"filename": "2aa51371.png"
}
}
}
},
"contents": [
"body": [
137,
80,
78,
@@ -3065,23 +3188,29 @@ bGlwMmdpZiB2LjAuNiBieSBZdmVzIFBpZ3VldDZzO7wAAAAASUVORK5CYII=
},
{
"Binary": {
"header": {
"content_disposition": {
"c_type": "attachment",
"attributes": {
"filename": "blueball.png"
"headers": {
"content_type": {
"ContentType": {
"c_type": "image",
"c_subtype": "png",
"attributes": {
"name": "blueball.png"
}
}
},
"content_transfer_encoding": "base64",
"content_type": {
"c_type": "image",
"c_subtype": "png",
"attributes": {
"name": "blueball.png"
"content_transfer_encoding": {
"Text": "base64"
},
"content_disposition": {
"ContentType": {
"c_type": "attachment",
"attributes": {
"filename": "blueball.png"
}
}
}
},
"contents": [
"body": [
137,
80,
78,
@@ -4412,23 +4541,29 @@ bGlwMmdpZiB2LjAuNiBieSBZdmVzIFBpZ3VldDZzO7wAAAAASUVORK5CYII=
},
{
"Binary": {
"header": {
"headers": {
"content_disposition": {
"c_type": "attachment",
"attributes": {
"filename": "greenball.png"
"ContentType": {
"c_type": "attachment",
"attributes": {
"filename": "greenball.png"
}
}
},
"content_transfer_encoding": "base64",
"content_type": {
"c_type": "image",
"c_subtype": "png",
"attributes": {
"name": "greenball.png"
"ContentType": {
"c_type": "image",
"c_subtype": "png",
"attributes": {
"name": "greenball.png"
}
}
},
"content_transfer_encoding": {
"Text": "base64"
}
},
"contents": [
"body": [
137,
80,
78,
@@ -5730,5 +5865,34 @@ bGlwMmdpZiB2LjAuNiBieSBZdmVzIFBpZ3VldDZzO7wAAAAASUVORK5CYII=
]
}
}
]
],
"structure": {
"List": [
{
"MultiPart": [
0,
[
{
"Part": 1
},
{
"Part": 2
},
{
"Part": 3
}
]
]
},
{
"Part": 4
},
{
"Part": 5
}
]
},
"offset_header": 0,
"offset_body": 484,
"offset_end": 10334
}
+185 -75
View File
@@ -85,17 +85,37 @@ Birds of a feather flock together.
---- EXPECTED STRUCTURE ----
{
"header": {
"headers_rfc": {
"content_type": {
"ContentType": {
"c_type": "multipart",
"c_subtype": "mixed",
"attributes": {
"boundary": "=====================_716740438==_"
}
}
},
"to": {
"Address": {
"name": "Heinz Müller",
"address": "mueller@example.com"
}
},
"message_id": {
"Text": "4.2.0.58.20000519005818.00a86aa0@pop.example.com"
},
"date": {
"year": 2000,
"month": 5,
"day": 19,
"hour": 0,
"minute": 59,
"second": 31,
"tz_before_gmt": true,
"tz_hour": 4,
"tz_minute": 0
"DateTime": {
"year": 2000,
"month": 5,
"day": 19,
"hour": 0,
"minute": 59,
"second": 31,
"tz_before_gmt": true,
"tz_hour": 4,
"tz_minute": 0
}
},
"from": {
"Address": {
@@ -103,94 +123,184 @@ Birds of a feather flock together.
"address": "dwsauder@example.com"
}
},
"message_id": "4.2.0.58.20000519005818.00a86aa0@pop.example.com",
"mime_version": "1.0",
"subject": "Die Hasen und die Frösche",
"to": {
"Address": {
"name": "Heinz Müller",
"address": "mueller@example.com"
}
"subject": {
"Text": "Die Hasen und die Frösche"
},
"content_type": {
"c_type": "multipart",
"c_subtype": "mixed",
"attributes": {
"boundary": "=====================_716740438==_"
}
},
"others": {
"X-Sender": [
"dwsauder@pop.example.com (Unverified)"
],
"X-Mailer": [
"QUALCOMM Windows Eudora Pro Version 4.2.0.58"
]
"mime_version": {
"Text": "1.0"
}
},
"html_body": [
{
"contents": "<html><body>Die Hasen und die Frösche<br/><br/>Die Hasen klagten einst über ihre mißliche Lage; \"wir leben\", sprach ein Redner, \"in steter Furcht vor Menschen und Tieren, eine Beute der Hunde, der Adler, ja fast aller Raubtiere! Unsere stete Angst ist ärger als der Tod selbst. Auf, laßt uns ein für allemal sterben.\" <br/><br/>In einem nahen Teich wollten sie sich nun ersäufen; sie eilten ihm zu; allein das außerordentliche Getöse und ihre wunderbare Gestalt erschreckte eine Menge Frösche, die am Ufer saßen, so sehr, daß sie aufs schnellste untertauchten. <br/><br/>\"Halt\", rief nun eben dieser Sprecher, \"wir wollen das Ersäufen noch ein wenig aufschieben, denn auch uns fürchten, wie ihr seht, einige Tiere, welche also wohl noch unglücklicher sein müssen als wir.\" <br/><br/></body></html>"
"headers_other": {
"X-Sender": {
"Text": "dwsauder@pop.example.com (Unverified)"
},
"X-Mailer": {
"Text": "QUALCOMM Windows Eudora Pro Version 4.2.0.58"
}
},
"headers_offsets": [
{
"name": {
"Rfc": "message_id"
},
"start": 11,
"end": 64
},
{
"name": {
"Other": "X-Sender"
},
"start": 73,
"end": 113
},
{
"name": {
"Other": "X-Mailer"
},
"start": 122,
"end": 170
},
{
"name": {
"Rfc": "date"
},
"start": 175,
"end": 209
},
{
"name": {
"Rfc": "to"
},
"start": 212,
"end": 266
},
{
"name": {
"Rfc": "from"
},
"start": 271,
"end": 308
},
{
"name": {
"Rfc": "subject"
},
"start": 316,
"end": 361
},
{
"name": {
"Rfc": "mime_version"
},
"start": 374,
"end": 380
},
{
"name": {
"Rfc": "content_type"
},
"start": 393,
"end": 460
}
],
"html_body": [
0
],
"text_body": [
{
"header": {
"content_transfer_encoding": "quoted-printable",
"content_type": {
"c_type": "text",
"c_subtype": "plain",
"attributes": {
"charset": "iso-8859-1"
}
}
},
"contents": "Die Hasen und die Frösche\n\nDie Hasen klagten einst über ihre mißliche Lage; \"wir leben\", sprach ein Redner, \"in steter Furcht vor Menschen und Tieren, eine Beute der Hunde, der Adler, ja fast aller Raubtiere! Unsere stete Angst ist ärger als der Tod selbst. Auf, laßt uns ein für allemal sterben.\" \n\nIn einem nahen Teich wollten sie sich nun ersäufen; sie eilten ihm zu; allein das außerordentliche Getöse und ihre wunderbare Gestalt erschreckte eine Menge Frösche, die am Ufer saßen, so sehr, daß sie aufs schnellste untertauchten. \n\n\"Halt\", rief nun eben dieser Sprecher, \"wir wollen das Ersäufen noch ein wenig aufschieben, denn auch uns fürchten, wie ihr seht, einige Tiere, welche also wohl noch unglücklicher sein müssen als wir.\" \n\n"
}
0
],
"attachments": [
1,
2
],
"parts": [
{
"Text": {
"header": {
"content_disposition": {
"c_type": "attachment",
"attributes": {
"filename": "HasenundFr�sche.txt"
"headers": {
"content_type": {
"ContentType": {
"c_type": "text",
"c_subtype": "plain",
"attributes": {
"charset": "iso-8859-1"
}
}
},
"content_transfer_encoding": "x-uuencode",
"content_type": {
"c_type": "text",
"c_subtype": "plain",
"attributes": {
"x-mac-creator": "74747874",
"name": "HasenundFr�sche.txt",
"x-mac-type": "54455854"
}
"content_transfer_encoding": {
"Text": "quoted-printable"
}
},
"contents": "\r\nbegin 600 HasenundFr�sche.txt\r\nM1&EE($AA<V5N('5N9\"!D:64@1G+V<V-H90T*#0I$:64@2&%S96X@:VQA9W1E\r\nM;B!E:6YS=\"#\\8F5R(&EH<F4@;6G?;&EC:&4@3&%G93L@(G=I<B!L96)E;B(L\r\nM('-P<F%C:\"!E:6X@4F5D;F5R+\"`B:6X@<W1E=&5R($9U<F-H=\"!V;W(@365N\r\nM<V-H96X@=6YD(%1I97)E;BP@96EN92!\"975T92!D97(@2'5N9&4L(&1E<B!!\r\nM9&QE<BP@:F$@9F%S=\"!A;&QE<B!2875B=&EE<F4A(%5N<V5R92!S=&5T92!!\r\nM;F=S=\"!I<W0@Y')G97(@86QS(&1E<B!4;V0@<V5L8G-T+B!!=68L(&QAWW0@\r\nM=6YS(&5I;B!F_'(@86QL96UA;\"!S=&5R8F5N+B(@#0H-\"DEN(&5I;F5M(&YA\r\nM:&5N(%1E:6-H('=O;&QT96X@<VEE('-I8V@@;G5N(&5R<^1U9F5N.R!S:64@\r\nM96EL=&5N(&EH;2!Z=3L@86QL96EN(&1A<R!A==]E<F]R9&5N=&QI8VAE($=E\r\nM=/9S92!U;F0@:6AR92!W=6YD97)B87)E($=E<W1A;'0@97)S8VAR96-K=&4@\r\nM96EN92!-96YG92!&<O9S8VAE+\"!D:64@86T@569E<B!S8=]E;BP@<V\\@<V5H\r\nM<BP@9&'?('-I92!A=69S('-C:&YE;&QS=&4@=6YT97)T875C:'1E;BX@#0H-\r\nM\"B)(86QT(BP@<FEE9B!N=6X@96)E;B!D:65S97(@4W!R96-H97(L(\")W:7(@\r\nM=V]L;&5N(&1A<R!%<G/D=69E;B!N;V-H(&5I;B!W96YI9R!A=69S8VAI96)E\r\nM;BP@9&5N;B!A=6-H('5N<R!F_')C:'1E;BP@=VEE(&EH<B!S96AT+\"!E:6YI\r\nM9V4@5&EE<F4L('=E;&-H92!A;'-O('=O:&P@;F]C:\"!U;F=L_&-K;&EC:&5R\r\n;('-E:6X@;?QS<V5N(&%L<R!W:7(N(B`-\"@T*\r\n`\r\nend\r\n\r"
"body": "Die Hasen und die Frösche\n\nDie Hasen klagten einst über ihre mißliche Lage; \"wir leben\", sprach ein Redner, \"in steter Furcht vor Menschen und Tieren, eine Beute der Hunde, der Adler, ja fast aller Raubtiere! Unsere stete Angst ist ärger als der Tod selbst. Auf, laßt uns ein für allemal sterben.\" \n\nIn einem nahen Teich wollten sie sich nun ersäufen; sie eilten ihm zu; allein das außerordentliche Getöse und ihre wunderbare Gestalt erschreckte eine Menge Frösche, die am Ufer saßen, so sehr, daß sie aufs schnellste untertauchten. \n\n\"Halt\", rief nun eben dieser Sprecher, \"wir wollen das Ersäufen noch ein wenig aufschieben, denn auch uns fürchten, wie ihr seht, einige Tiere, welche also wohl noch unglücklicher sein müssen als wir.\" \n\n"
}
},
{
"Text": {
"header": {
"content_disposition": {
"c_type": "attachment",
"attributes": {
"filename": "farmerandstork.txt"
}
"headers": {
"content_transfer_encoding": {
"Text": "x-uuencode"
},
"content_type": {
"c_type": "text",
"c_subtype": "plain",
"attributes": {
"charset": "us-ascii"
"ContentType": {
"c_type": "text",
"c_subtype": "plain",
"attributes": {
"name": "HasenundFr�sche.txt",
"x-mac-type": "54455854",
"x-mac-creator": "74747874"
}
}
},
"content_disposition": {
"ContentType": {
"c_type": "attachment",
"attributes": {
"filename": "HasenundFr�sche.txt"
}
}
}
},
"contents": "\r\nThe Farmer and the Stork \r\n \r\nA FARMER placed nets on his newly-sown plowlands and caught a\r\nnumber of Cranes, which came to pick up his seed. With them he\r\ntrapped a Stork that had fractured his leg in the net and was\r\nearnestly beseeching the Farmer to spare his life. \"Pray save\r\nme, Master,\" he said, \"and let me go free this once. My broken\r\nlimb should excite your pity. Besides, I am no Crane, I am a\r\nStork, a bird of excellent character; and see how I love and\r\nslave for my father and mother. Look too, at my feathers--\r\nthey are not the least like those of a Crane.\" The Farmer \r\nlaughed aloud and said, \"It may be all as you say, I only know \r\nthis: I have taken you with these robbers, the Cranes, and you \r\nmust die in their company.\" \r\n \r\nBirds of a feather flock together. \r\n\r"
"body": "\r\nbegin 600 HasenundFr�sche.txt\r\nM1&EE($AA<V5N('5N9\"!D:64@1G+V<V-H90T*#0I$:64@2&%S96X@:VQA9W1E\r\nM;B!E:6YS=\"#\\8F5R(&EH<F4@;6G?;&EC:&4@3&%G93L@(G=I<B!L96)E;B(L\r\nM('-P<F%C:\"!E:6X@4F5D;F5R+\"`B:6X@<W1E=&5R($9U<F-H=\"!V;W(@365N\r\nM<V-H96X@=6YD(%1I97)E;BP@96EN92!\"975T92!D97(@2'5N9&4L(&1E<B!!\r\nM9&QE<BP@:F$@9F%S=\"!A;&QE<B!2875B=&EE<F4A(%5N<V5R92!S=&5T92!!\r\nM;F=S=\"!I<W0@Y')G97(@86QS(&1E<B!4;V0@<V5L8G-T+B!!=68L(&QAWW0@\r\nM=6YS(&5I;B!F_'(@86QL96UA;\"!S=&5R8F5N+B(@#0H-\"DEN(&5I;F5M(&YA\r\nM:&5N(%1E:6-H('=O;&QT96X@<VEE('-I8V@@;G5N(&5R<^1U9F5N.R!S:64@\r\nM96EL=&5N(&EH;2!Z=3L@86QL96EN(&1A<R!A==]E<F]R9&5N=&QI8VAE($=E\r\nM=/9S92!U;F0@:6AR92!W=6YD97)B87)E($=E<W1A;'0@97)S8VAR96-K=&4@\r\nM96EN92!-96YG92!&<O9S8VAE+\"!D:64@86T@569E<B!S8=]E;BP@<V\\@<V5H\r\nM<BP@9&'?('-I92!A=69S('-C:&YE;&QS=&4@=6YT97)T875C:'1E;BX@#0H-\r\nM\"B)(86QT(BP@<FEE9B!N=6X@96)E;B!D:65S97(@4W!R96-H97(L(\")W:7(@\r\nM=V]L;&5N(&1A<R!%<G/D=69E;B!N;V-H(&5I;B!W96YI9R!A=69S8VAI96)E\r\nM;BP@9&5N;B!A=6-H('5N<R!F_')C:'1E;BP@=VEE(&EH<B!S96AT+\"!E:6YI\r\nM9V4@5&EE<F4L('=E;&-H92!A;'-O('=O:&P@;F]C:\"!U;F=L_&-K;&EC:&5R\r\n;('-E:6X@;?QS<V5N(&%L<R!W:7(N(B`-\"@T*\r\n`\r\nend\r\n\r"
}
},
{
"Text": {
"headers": {
"content_type": {
"ContentType": {
"c_type": "text",
"c_subtype": "plain",
"attributes": {
"charset": "us-ascii"
}
}
},
"content_disposition": {
"ContentType": {
"c_type": "attachment",
"attributes": {
"filename": "farmerandstork.txt"
}
}
}
},
"body": "\r\nThe Farmer and the Stork \r\n \r\nA FARMER placed nets on his newly-sown plowlands and caught a\r\nnumber of Cranes, which came to pick up his seed. With them he\r\ntrapped a Stork that had fractured his leg in the net and was\r\nearnestly beseeching the Farmer to spare his life. \"Pray save\r\nme, Master,\" he said, \"and let me go free this once. My broken\r\nlimb should excite your pity. Besides, I am no Crane, I am a\r\nStork, a bird of excellent character; and see how I love and\r\nslave for my father and mother. Look too, at my feathers--\r\nthey are not the least like those of a Crane.\" The Farmer \r\nlaughed aloud and said, \"It may be all as you say, I only know \r\nthis: I have taken you with these robbers, the Cranes, and you \r\nmust die in their company.\" \r\n \r\nBirds of a feather flock together. \r\n\r"
}
}
]
],
"structure": {
"List": [
{
"Part": 0
},
{
"Part": 1
},
{
"Part": 2
}
]
},
"offset_header": 0,
"offset_body": 462,
"offset_end": 3739
}
+154 -40
View File
@@ -32,17 +32,15 @@ Tiere, welche also wohl noch ungl=FCcklicher sein m=FCssen als wir."=20
---- EXPECTED STRUCTURE ----
{
"header": {
"date": {
"year": 2000,
"month": 5,
"day": 17,
"hour": 19,
"minute": 10,
"second": 31,
"tz_before_gmt": true,
"tz_hour": 4,
"tz_minute": 0
"headers_rfc": {
"content_type": {
"ContentType": {
"c_type": "text",
"c_subtype": "plain",
"attributes": {
"charset": "iso-8859-1"
}
}
},
"from": {
"Address": {
@@ -50,49 +48,165 @@ Tiere, welche also wohl noch ungl=FCcklicher sein m=FCssen als wir."=20
"address": "doug@example.com"
}
},
"message_id": "NDBBIAKOPKHFGPLCODIGMEKBCHAA.doug@example.com",
"mime_version": "1.0",
"subject": "Die Hasen und die Fr�sche (Microsoft Outlook 00)",
"to": {
"Address": {
"name": "J�rgen Schm�rgen",
"address": "schmuergen@example.com"
}
},
"content_transfer_encoding": "quoted-printable",
"content_type": {
"c_type": "text",
"c_subtype": "plain",
"attributes": {
"charset": "iso-8859-1"
"message_id": {
"Text": "NDBBIAKOPKHFGPLCODIGMEKBCHAA.doug@example.com"
},
"mime_version": {
"Text": "1.0"
},
"date": {
"DateTime": {
"year": 2000,
"month": 5,
"day": 17,
"hour": 19,
"minute": 10,
"second": 31,
"tz_before_gmt": true,
"tz_hour": 4,
"tz_minute": 0
}
},
"others": {
"X-MimeOLE": [
"Produced By Microsoft MimeOLE V5.00.2314.1300"
],
"X-Mailer": [
"Microsoft Outlook IMO, Build 9.0.2416 (9.0.2910.0)"
],
"Importance": [
"Normal"
],
"X-MSMail-Priority": [
"Normal"
],
"X-Priority": [
"3 (Normal)"
]
"content_transfer_encoding": {
"Text": "quoted-printable"
},
"subject": {
"Text": "Die Hasen und die Fr�sche (Microsoft Outlook 00)"
}
},
"html_body": [
"headers_other": {
"Importance": {
"Text": "Normal"
},
"X-MSMail-Priority": {
"Text": "Normal"
},
"X-Mailer": {
"Text": "Microsoft Outlook IMO, Build 9.0.2416 (9.0.2910.0)"
},
"X-Priority": {
"Text": "3 (Normal)"
},
"X-MimeOLE": {
"Text": "Produced By Microsoft MimeOLE V5.00.2314.1300"
}
},
"headers_offsets": [
{
"contents": "<html><body>Die Hasen und die Frösche<br/><br/>Die Hasen klagten einst über ihre mißliche Lage; \"wir leben\", sprach ein Redner, \"in steter Furcht vor Menschen und Tieren, eine Beute der Hunde, der Adler, ja fast aller Raubtiere! Unsere stete Angst ist ärger als der Tod selbst. Auf, laßt uns ein für allemal sterben.\" <br/><br/>In einem nahen Teich wollten sie sich nun ersäufen; sie eilten ihm zu; allein das außerordentliche Getöse und ihre wunderbare Gestalt erschreckte eine Menge Frösche, die am Ufer saßen, so sehr, daß sie aufs schnellste untertauchten. <br/><br/>\"Halt\", rief nun eben dieser Sprecher, \"wir wollen das Ersäufen noch ein wenig aufschieben, denn auch uns fürchten, wie ihr seht, einige Tiere, welche also wohl noch unglücklicher sein müssen als wir.\" <br/><br/></body></html>"
"name": {
"Rfc": "from"
},
"start": 5,
"end": 40
},
{
"name": {
"Rfc": "to"
},
"start": 43,
"end": 89
},
{
"name": {
"Rfc": "subject"
},
"start": 97,
"end": 148
},
{
"name": {
"Rfc": "date"
},
"start": 153,
"end": 187
},
{
"name": {
"Rfc": "message_id"
},
"start": 198,
"end": 248
},
{
"name": {
"Rfc": "mime_version"
},
"start": 261,
"end": 267
},
{
"name": {
"Rfc": "content_type"
},
"start": 280,
"end": 317
},
{
"name": {
"Rfc": "content_transfer_encoding"
},
"start": 343,
"end": 362
},
{
"name": {
"Other": "X-Priority"
},
"start": 373,
"end": 386
},
{
"name": {
"Other": "X-MSMail-Priority"
},
"start": 404,
"end": 413
},
{
"name": {
"Other": "X-Mailer"
},
"start": 422,
"end": 475
},
{
"name": {
"Other": "Importance"
},
"start": 486,
"end": 495
},
{
"name": {
"Other": "X-MimeOLE"
},
"start": 505,
"end": 553
}
],
"html_body": [
0
],
"text_body": [
0
],
"parts": [
{
"contents": "Die Hasen und die Frösche\n\nDie Hasen klagten einst über ihre mißliche Lage; \"wir leben\", sprach ein Redner, \"in steter Furcht vor Menschen und Tieren, eine Beute der Hunde, der Adler, ja fast aller Raubtiere! Unsere stete Angst ist ärger als der Tod selbst. Auf, laßt uns ein für allemal sterben.\" \n\nIn einem nahen Teich wollten sie sich nun ersäufen; sie eilten ihm zu; allein das außerordentliche Getöse und ihre wunderbare Gestalt erschreckte eine Menge Frösche, die am Ufer saßen, so sehr, daß sie aufs schnellste untertauchten. \n\n\"Halt\", rief nun eben dieser Sprecher, \"wir wollen das Ersäufen noch ein wenig aufschieben, denn auch uns fürchten, wie ihr seht, einige Tiere, welche also wohl noch unglücklicher sein müssen als wir.\" \n\n"
"Text": {
"body": "Die Hasen und die Frösche\n\nDie Hasen klagten einst über ihre mißliche Lage; \"wir leben\", sprach ein Redner, \"in steter Furcht vor Menschen und Tieren, eine Beute der Hunde, der Adler, ja fast aller Raubtiere! Unsere stete Angst ist ärger als der Tod selbst. Auf, laßt uns ein für allemal sterben.\" \n\nIn einem nahen Teich wollten sie sich nun ersäufen; sie eilten ihm zu; allein das außerordentliche Getöse und ihre wunderbare Gestalt erschreckte eine Menge Frösche, die am Ufer saßen, so sehr, daß sie aufs schnellste untertauchten. \n\n\"Halt\", rief nun eben dieser Sprecher, \"wir wollen das Ersäufen noch ein wenig aufschieben, denn auch uns fürchten, wie ihr seht, einige Tiere, welche also wohl noch unglücklicher sein müssen als wir.\" \n\n"
}
}
]
],
"structure": {
"Part": 0
},
"offset_header": 0,
"offset_body": 555,
"offset_end": 1364
}
+248 -83
View File
@@ -157,103 +157,236 @@ IFl2ZXMgUGlndWV0NnM7vAAAAABJRU5ErkJggg==
---- EXPECTED STRUCTURE ----
{
"header": {
"headers_rfc": {
"date": {
"year": 2000,
"month": 5,
"day": 17,
"hour": 19,
"minute": 44,
"second": 45,
"tz_before_gmt": true,
"tz_hour": 4,
"tz_minute": 0
},
"from": {
"Address": {
"name": "Doug Sauder",
"address": "doug@example.com"
"DateTime": {
"year": 2000,
"month": 5,
"day": 17,
"hour": 19,
"minute": 44,
"second": 45,
"tz_before_gmt": true,
"tz_hour": 4,
"tz_minute": 0
}
},
"message_id": "NDBBIAKOPKHFGPLCODIGKEKFCHAA.doug@example.com",
"mime_version": "1.0",
"subject": "Test message from Microsoft Outlook 00",
"message_id": {
"Text": "NDBBIAKOPKHFGPLCODIGKEKFCHAA.doug@example.com"
},
"content_type": {
"ContentType": {
"c_type": "multipart",
"c_subtype": "related",
"attributes": {
"boundary": "----=_NextPart_000_000C_01BFC038.5A5C8E60"
}
}
},
"subject": {
"Text": "Test message from Microsoft Outlook 00"
},
"mime_version": {
"Text": "1.0"
},
"to": {
"Address": {
"name": "Joe Blow",
"address": "jblow@example.com"
}
},
"content_type": {
"c_type": "multipart",
"c_subtype": "related",
"attributes": {
"boundary": "----=_NextPart_000_000C_01BFC038.5A5C8E60"
"from": {
"Address": {
"name": "Doug Sauder",
"address": "doug@example.com"
}
},
"others": {
"X-Mailer": [
"Microsoft Outlook IMO, Build 9.0.2416 (9.0.2910.0)"
],
"X-MSMail-Priority": [
"Normal"
],
"X-MimeOLE": [
"Produced By Microsoft MimeOLE V5.00.2314.1300"
],
"X-Priority": [
"3 (Normal)"
],
"Importance": [
"Normal"
]
}
},
"html_body": [
{
"header": {
"content_transfer_encoding": "quoted-printable",
"content_type": {
"c_type": "text",
"c_subtype": "html",
"attributes": {
"charset": "iso-8859-1"
}
}
},
"contents": "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.0 Transitional//EN\">\n<HTML><HEAD>\n<META content=\"text/html; charset=iso-8859-1\" http-equiv=Content-Type>\n<META content=\"MSHTML 5.00.2314.1000\" name=GENERATOR></HEAD>\n<BODY>\n<DIV><FONT face=Arial size=2><BR>The Hare and the Tortoise <BR>&nbsp;<BR>A HARE \none day ridiculed the short feet and slow pace of the Tortoise, who replied, \nlaughing:&nbsp; \"Though you be swift as the wind, I will beat you in a \nrace.\"&nbsp; The Hare, believing her assertion to be simply impossible, assented \nto the proposal; and they agreed that the Fox should choose the course and fix \nthe goal.&nbsp; On the day appointed for the race the two started \ntogether.&nbsp; The Tortoise never for a moment stopped, but went on with a slow \nbut steady pace straight to the end of the course.&nbsp; The Hare, lying down by \nthe wayside, fell fast asleep.&nbsp; At last waking up, and moving as fast as he \ncould, he saw the Tortoise had reached the goal, and was comfortably dozing \nafter her fatigue.&nbsp;&nbsp;</FONT></DIV>\n<DIV><FONT face=Arial size=2></FONT>&nbsp;</DIV>\n<DIV><FONT face=Arial size=2><IMG align=baseline alt=\"blue ball\" border=0 \nhspace=0 src=\"cid:823504223@17052000-0f8d\"><BR>&nbsp;<BR>Slow but steady wins \nthe race.&nbsp; </FONT></DIV>\n<DIV>&nbsp;</DIV>\n<DIV><FONT face=Arial size=2><IMG align=baseline alt=\"red ball\" border=0 \nhspace=0 src=\"cid:823504223@17052000-0f94\"><BR></DIV></FONT></BODY></HTML>\n"
"headers_other": {
"Importance": {
"Text": "Normal"
},
"X-MSMail-Priority": {
"Text": "Normal"
},
"X-Priority": {
"Text": "3 (Normal)"
},
"X-Mailer": {
"Text": "Microsoft Outlook IMO, Build 9.0.2416 (9.0.2910.0)"
},
"X-MimeOLE": {
"Text": "Produced By Microsoft MimeOLE V5.00.2314.1300"
}
},
"headers_offsets": [
{
"name": {
"Rfc": "from"
},
"start": 5,
"end": 40
},
{
"name": {
"Rfc": "to"
},
"start": 43,
"end": 76
},
{
"name": {
"Rfc": "subject"
},
"start": 84,
"end": 125
},
{
"name": {
"Rfc": "date"
},
"start": 130,
"end": 164
},
{
"name": {
"Rfc": "message_id"
},
"start": 175,
"end": 225
},
{
"name": {
"Rfc": "mime_version"
},
"start": 238,
"end": 244
},
{
"name": {
"Rfc": "content_type"
},
"start": 257,
"end": 333
},
{
"name": {
"Other": "X-Priority"
},
"start": 344,
"end": 357
},
{
"name": {
"Other": "X-MSMail-Priority"
},
"start": 375,
"end": 384
},
{
"name": {
"Other": "X-Mailer"
},
"start": 393,
"end": 446
},
{
"name": {
"Other": "Importance"
},
"start": 457,
"end": 466
},
{
"name": {
"Other": "X-MimeOLE"
},
"start": 476,
"end": 524
}
],
"html_body": [
2
],
"text_body": [
{
"header": {
"content_transfer_encoding": "quoted-printable",
"content_type": {
"c_type": "text",
"c_subtype": "plain",
"attributes": {
"charset": "iso-8859-1"
}
}
},
"contents": "\nThe Hare and the Tortoise \n \nA HARE one day ridiculed the short feet and slow pace of the Tortoise, who replied, laughing: \"Though you be swift as the wind, I will beat you in a race.\" The Hare, believing her assertion to be simply impossible, assented to the proposal; and they agreed that the Fox should choose the course and fix the goal. On the day appointed for the race the two started together. The Tortoise never for a moment stopped, but went on with a slow but steady pace straight to the end of the course. The Hare, lying down by the wayside, fell fast asleep. At last waking up, and moving as fast as he could, he saw the Tortoise had reached the goal, and was comfortably dozing after her fatigue. \n\n\n \nSlow but steady wins the race. \n\n\n\n"
}
1
],
"attachments": [
3,
4
],
"parts": [
{
"Multipart": {
"content_type": {
"ContentType": {
"c_type": "multipart",
"c_subtype": "alternative",
"attributes": {
"boundary": "----=_NextPart_001_000D_01BFC038.5A5C8E60"
}
}
}
}
},
{
"Text": {
"headers": {
"content_type": {
"ContentType": {
"c_type": "text",
"c_subtype": "plain",
"attributes": {
"charset": "iso-8859-1"
}
}
},
"content_transfer_encoding": {
"Text": "quoted-printable"
}
},
"body": "\nThe Hare and the Tortoise \n \nA HARE one day ridiculed the short feet and slow pace of the Tortoise, who replied, laughing: \"Though you be swift as the wind, I will beat you in a race.\" The Hare, believing her assertion to be simply impossible, assented to the proposal; and they agreed that the Fox should choose the course and fix the goal. On the day appointed for the race the two started together. The Tortoise never for a moment stopped, but went on with a slow but steady pace straight to the end of the course. The Hare, lying down by the wayside, fell fast asleep. At last waking up, and moving as fast as he could, he saw the Tortoise had reached the goal, and was comfortably dozing after her fatigue. \n\n\n \nSlow but steady wins the race. \n\n\n\n"
}
},
{
"Html": {
"headers": {
"content_type": {
"ContentType": {
"c_type": "text",
"c_subtype": "html",
"attributes": {
"charset": "iso-8859-1"
}
}
},
"content_transfer_encoding": {
"Text": "quoted-printable"
}
},
"body": "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.0 Transitional//EN\">\n<HTML><HEAD>\n<META content=\"text/html; charset=iso-8859-1\" http-equiv=Content-Type>\n<META content=\"MSHTML 5.00.2314.1000\" name=GENERATOR></HEAD>\n<BODY>\n<DIV><FONT face=Arial size=2><BR>The Hare and the Tortoise <BR>&nbsp;<BR>A HARE \none day ridiculed the short feet and slow pace of the Tortoise, who replied, \nlaughing:&nbsp; \"Though you be swift as the wind, I will beat you in a \nrace.\"&nbsp; The Hare, believing her assertion to be simply impossible, assented \nto the proposal; and they agreed that the Fox should choose the course and fix \nthe goal.&nbsp; On the day appointed for the race the two started \ntogether.&nbsp; The Tortoise never for a moment stopped, but went on with a slow \nbut steady pace straight to the end of the course.&nbsp; The Hare, lying down by \nthe wayside, fell fast asleep.&nbsp; At last waking up, and moving as fast as he \ncould, he saw the Tortoise had reached the goal, and was comfortably dozing \nafter her fatigue.&nbsp;&nbsp;</FONT></DIV>\n<DIV><FONT face=Arial size=2></FONT>&nbsp;</DIV>\n<DIV><FONT face=Arial size=2><IMG align=baseline alt=\"blue ball\" border=0 \nhspace=0 src=\"cid:823504223@17052000-0f8d\"><BR>&nbsp;<BR>Slow but steady wins \nthe race.&nbsp; </FONT></DIV>\n<DIV>&nbsp;</DIV>\n<DIV><FONT face=Arial size=2><IMG align=baseline alt=\"red ball\" border=0 \nhspace=0 src=\"cid:823504223@17052000-0f94\"><BR></DIV></FONT></BODY></HTML>\n"
}
},
{
"Binary": {
"header": {
"content_id": "823504223@17052000-0f8d",
"content_transfer_encoding": "base64",
"headers": {
"content_id": {
"Text": "823504223@17052000-0f8d"
},
"content_transfer_encoding": {
"Text": "base64"
},
"content_type": {
"c_type": "image",
"c_subtype": "png",
"attributes": {
"name": "blueball.png"
"ContentType": {
"c_type": "image",
"c_subtype": "png",
"attributes": {
"name": "blueball.png"
}
}
}
},
"contents": [
"body": [
137,
80,
78,
@@ -1584,18 +1717,24 @@ IFl2ZXMgUGlndWV0NnM7vAAAAABJRU5ErkJggg==
},
{
"Binary": {
"header": {
"content_id": "823504223@17052000-0f94",
"content_transfer_encoding": "base64",
"headers": {
"content_type": {
"c_type": "image",
"c_subtype": "png",
"attributes": {
"name": "redball.png"
"ContentType": {
"c_type": "image",
"c_subtype": "png",
"attributes": {
"name": "redball.png"
}
}
},
"content_transfer_encoding": {
"Text": "base64"
},
"content_id": {
"Text": "823504223@17052000-0f94"
}
},
"contents": [
"body": [
137,
80,
78,
@@ -3052,5 +3191,31 @@ IFl2ZXMgUGlndWV0NnM7vAAAAABJRU5ErkJggg==
]
}
}
]
],
"structure": {
"List": [
{
"MultiPart": [
0,
[
{
"Part": 1
},
{
"Part": 2
}
]
]
},
{
"Part": 3
},
{
"Part": 4
}
]
},
"offset_header": 0,
"offset_body": 526,
"offset_end": 7631
}
+133 -33
View File
@@ -28,17 +28,9 @@ Slow but steady wins the race.
---- EXPECTED STRUCTURE ----
{
"header": {
"date": {
"year": 2000,
"month": 5,
"day": 17,
"hour": 23,
"minute": 26,
"second": 16,
"tz_before_gmt": true,
"tz_hour": 4,
"tz_minute": 0
"headers_rfc": {
"subject": {
"Text": "Test message from Netscape Communicator 4.7"
},
"from": {
"Address": {
@@ -46,43 +38,151 @@ Slow but steady wins the race.
"address": "dwsauder@example.com"
}
},
"message_id": "392362D8.B650789F@example.com",
"mime_version": "1.0",
"subject": "Test message from Netscape Communicator 4.7",
"date": {
"DateTime": {
"year": 2000,
"month": 5,
"day": 17,
"hour": 23,
"minute": 26,
"second": 16,
"tz_before_gmt": true,
"tz_hour": 4,
"tz_minute": 0
}
},
"content_transfer_encoding": {
"Text": "7bit"
},
"mime_version": {
"Text": "1.0"
},
"to": {
"Address": {
"name": "Joe Blow",
"address": "blow@example.com"
}
},
"content_transfer_encoding": "7bit",
"content_type": {
"c_type": "text",
"c_subtype": "plain",
"attributes": {
"charset": "us-ascii"
"ContentType": {
"c_type": "text",
"c_subtype": "plain",
"attributes": {
"charset": "us-ascii"
}
}
},
"others": {
"X-Mailer": [
"Mozilla 4.7 [en] (WinNT; I)"
],
"X-Accept-Language": [
"en"
],
"X-Priority": [
"1 (Highest)"
]
"message_id": {
"Text": "392362D8.B650789F@example.com"
}
},
"html_body": [
"headers_other": {
"X-Priority": {
"Text": "1 (Highest)"
},
"X-Accept-Language": {
"Text": "en"
},
"X-Mailer": {
"Text": "Mozilla 4.7 [en] (WinNT; I)"
}
},
"headers_offsets": [
{
"contents": "<html><body><br/>The Hare and the Tortoise <br/> <br/>A HARE one day ridiculed the short feet and slow pace of the Tortoise,<br/>who replied, laughing: \"Though you be swift as the wind, I will beat<br/>you in a race.\" The Hare, believing her assertion to be simply<br/>impossible, assented to the proposal; and they agreed that the Fox<br/>should choose the course and fix the goal. On the day appointed for the<br/>race the two started together. The Tortoise never for a moment stopped,<br/>but went on with a slow but steady pace straight to the end of the<br/>course. The Hare, lying down by the wayside, fell fast asleep. At last<br/>waking up, and moving as fast as he could, he saw the Tortoise had<br/>reached the goal, and was comfortably dozing after her fatigue. <br/> <br/>Slow but steady wins the race.<br/></body></html>"
"name": {
"Rfc": "message_id"
},
"start": 11,
"end": 45
},
{
"name": {
"Rfc": "date"
},
"start": 50,
"end": 84
},
{
"name": {
"Rfc": "from"
},
"start": 89,
"end": 126
},
{
"name": {
"Other": "X-Mailer"
},
"start": 135,
"end": 165
},
{
"name": {
"Other": "X-Accept-Language"
},
"start": 183,
"end": 188
},
{
"name": {
"Rfc": "mime_version"
},
"start": 201,
"end": 207
},
{
"name": {
"Rfc": "to"
},
"start": 210,
"end": 240
},
{
"name": {
"Rfc": "subject"
},
"start": 248,
"end": 294
},
{
"name": {
"Other": "X-Priority"
},
"start": 305,
"end": 319
},
{
"name": {
"Rfc": "content_type"
},
"start": 332,
"end": 363
},
{
"name": {
"Rfc": "content_transfer_encoding"
},
"start": 389,
"end": 396
}
],
"html_body": [
0
],
"text_body": [
0
],
"parts": [
{
"contents": "\r\nThe Hare and the Tortoise \r\n \r\nA HARE one day ridiculed the short feet and slow pace of the Tortoise,\r\nwho replied, laughing: \"Though you be swift as the wind, I will beat\r\nyou in a race.\" The Hare, believing her assertion to be simply\r\nimpossible, assented to the proposal; and they agreed that the Fox\r\nshould choose the course and fix the goal. On the day appointed for the\r\nrace the two started together. The Tortoise never for a moment stopped,\r\nbut went on with a slow but steady pace straight to the end of the\r\ncourse. The Hare, lying down by the wayside, fell fast asleep. At last\r\nwaking up, and moving as fast as he could, he saw the Tortoise had\r\nreached the goal, and was comfortably dozing after her fatigue. \r\n \r\nSlow but steady wins the race.\r\n"
"Text": {
"body": "\r\nThe Hare and the Tortoise \r\n \r\nA HARE one day ridiculed the short feet and slow pace of the Tortoise,\r\nwho replied, laughing: \"Though you be swift as the wind, I will beat\r\nyou in a race.\" The Hare, believing her assertion to be simply\r\nimpossible, assented to the proposal; and they agreed that the Fox\r\nshould choose the course and fix the goal. On the day appointed for the\r\nrace the two started together. The Tortoise never for a moment stopped,\r\nbut went on with a slow but steady pace straight to the end of the\r\ncourse. The Hare, lying down by the wayside, fell fast asleep. At last\r\nwaking up, and moving as fast as he could, he saw the Tortoise had\r\nreached the goal, and was comfortably dozing after her fatigue. \r\n \r\nSlow but steady wins the race.\r\n"
}
}
]
],
"structure": {
"Part": 0
},
"offset_header": 0,
"offset_body": 400,
"offset_end": 1167
}
+207 -85
View File
@@ -112,93 +112,184 @@ Slow but steady wins the race.
---- EXPECTED STRUCTURE ----
{
"header": {
"date": {
"year": 2000,
"month": 5,
"day": 17,
"hour": 23,
"minute": 28,
"second": 27,
"tz_before_gmt": true,
"tz_hour": 4,
"tz_minute": 0
},
"headers_rfc": {
"from": {
"Address": {
"name": "Doug Sauder",
"address": "dwsauder@example.com"
}
},
"message_id": "3923635B.85C58444@example.com",
"mime_version": "1.0",
"subject": "Test message from Netscape Communicator 4.7",
"message_id": {
"Text": "3923635B.85C58444@example.com"
},
"content_type": {
"ContentType": {
"c_type": "multipart",
"c_subtype": "mixed",
"attributes": {
"boundary": "------------0BBC657DDC74A0B8454627FD"
}
}
},
"to": {
"Address": {
"name": "Joe Blow",
"address": "blow@example.com"
}
},
"content_type": {
"c_type": "multipart",
"c_subtype": "mixed",
"attributes": {
"boundary": "------------0BBC657DDC74A0B8454627FD"
}
"subject": {
"Text": "Test message from Netscape Communicator 4.7"
},
"others": {
"X-Mailer": [
"Mozilla 4.7 [en] (WinNT; I)"
],
"X-Accept-Language": [
"en"
]
"mime_version": {
"Text": "1.0"
},
"date": {
"DateTime": {
"year": 2000,
"month": 5,
"day": 17,
"hour": 23,
"minute": 28,
"second": 27,
"tz_before_gmt": true,
"tz_hour": 4,
"tz_minute": 0
}
}
},
"html_body": [
{
"contents": "<html><body><br/>The Hare and the Tortoise <br/> <br/>A HARE one day ridiculed the short feet and slow pace of the Tortoise,<br/>who replied, laughing: \"Though you be swift as the wind, I will beat<br/>you in a race.\" The Hare, believing her assertion to be simply<br/>impossible, assented to the proposal; and they agreed that the Fox<br/>should choose the course and fix the goal. On the day appointed for the<br/>race the two started together. The Tortoise never for a moment stopped,<br/>but went on with a slow but steady pace straight to the end of the<br/>course. The Hare, lying down by the wayside, fell fast asleep. At last<br/>waking up, and moving as fast as he could, he saw the Tortoise had<br/>reached the goal, and was comfortably dozing after her fatigue. <br/> <br/>Slow but steady wins the race.</body></html>"
"headers_other": {
"X-Accept-Language": {
"Text": "en"
},
"X-Mailer": {
"Text": "Mozilla 4.7 [en] (WinNT; I)"
}
},
"headers_offsets": [
{
"name": {
"Rfc": "message_id"
},
"start": 11,
"end": 45
},
{
"name": {
"Rfc": "date"
},
"start": 50,
"end": 84
},
{
"name": {
"Rfc": "from"
},
"start": 89,
"end": 126
},
{
"name": {
"Other": "X-Mailer"
},
"start": 135,
"end": 165
},
{
"name": {
"Other": "X-Accept-Language"
},
"start": 183,
"end": 188
},
{
"name": {
"Rfc": "mime_version"
},
"start": 201,
"end": 207
},
{
"name": {
"Rfc": "to"
},
"start": 210,
"end": 240
},
{
"name": {
"Rfc": "subject"
},
"start": 248,
"end": 294
},
{
"name": {
"Rfc": "content_type"
},
"start": 307,
"end": 376
}
],
"html_body": [
0,
1
1,
2
],
"text_body": [
{
"header": {
"content_transfer_encoding": "7bit",
"content_type": {
"c_type": "text",
"c_subtype": "plain",
"attributes": {
"charset": "us-ascii"
}
}
},
"contents": "\r\nThe Hare and the Tortoise \r\n \r\nA HARE one day ridiculed the short feet and slow pace of the Tortoise,\r\nwho replied, laughing: \"Though you be swift as the wind, I will beat\r\nyou in a race.\" The Hare, believing her assertion to be simply\r\nimpossible, assented to the proposal; and they agreed that the Fox\r\nshould choose the course and fix the goal. On the day appointed for the\r\nrace the two started together. The Tortoise never for a moment stopped,\r\nbut went on with a slow but steady pace straight to the end of the\r\ncourse. The Hare, lying down by the wayside, fell fast asleep. At last\r\nwaking up, and moving as fast as he could, he saw the Tortoise had\r\nreached the goal, and was comfortably dozing after her fatigue. \r\n \r\nSlow but steady wins the race.\r"
},
0,
1
1,
2
],
"attachments": [
1,
2,
3
],
"parts": [
{
"InlineBinary": {
"header": {
"content_disposition": {
"c_type": "inline",
"attributes": {
"filename": "blueball.png"
}
"Text": {
"headers": {
"content_transfer_encoding": {
"Text": "7bit"
},
"content_transfer_encoding": "base64",
"content_type": {
"c_type": "image",
"c_subtype": "png",
"attributes": {
"name": "blueball.png"
"ContentType": {
"c_type": "text",
"c_subtype": "plain",
"attributes": {
"charset": "us-ascii"
}
}
}
},
"contents": [
"body": "\r\nThe Hare and the Tortoise \r\n \r\nA HARE one day ridiculed the short feet and slow pace of the Tortoise,\r\nwho replied, laughing: \"Though you be swift as the wind, I will beat\r\nyou in a race.\" The Hare, believing her assertion to be simply\r\nimpossible, assented to the proposal; and they agreed that the Fox\r\nshould choose the course and fix the goal. On the day appointed for the\r\nrace the two started together. The Tortoise never for a moment stopped,\r\nbut went on with a slow but steady pace straight to the end of the\r\ncourse. The Hare, lying down by the wayside, fell fast asleep. At last\r\nwaking up, and moving as fast as he could, he saw the Tortoise had\r\nreached the goal, and was comfortably dozing after her fatigue. \r\n \r\nSlow but steady wins the race.\r"
}
},
{
"InlineBinary": {
"headers": {
"content_disposition": {
"ContentType": {
"c_type": "inline",
"attributes": {
"filename": "blueball.png"
}
}
},
"content_type": {
"ContentType": {
"c_type": "image",
"c_subtype": "png",
"attributes": {
"name": "blueball.png"
}
}
},
"content_transfer_encoding": {
"Text": "base64"
}
},
"body": [
137,
80,
78,
@@ -1529,23 +1620,29 @@ Slow but steady wins the race.
},
{
"InlineBinary": {
"header": {
"content_disposition": {
"c_type": "inline",
"attributes": {
"filename": "greenball.png"
"headers": {
"content_type": {
"ContentType": {
"c_type": "image",
"c_subtype": "png",
"attributes": {
"name": "greenball.png"
}
}
},
"content_transfer_encoding": "base64",
"content_type": {
"c_type": "image",
"c_subtype": "png",
"attributes": {
"name": "greenball.png"
"content_disposition": {
"ContentType": {
"c_type": "inline",
"attributes": {
"filename": "greenball.png"
}
}
},
"content_transfer_encoding": {
"Text": "base64"
}
},
"contents": [
"body": [
137,
80,
78,
@@ -2849,25 +2946,50 @@ Slow but steady wins the race.
},
{
"Text": {
"header": {
"content_disposition": {
"c_type": "inline",
"attributes": {
"filename": "hareandtoroise.txt"
"headers": {
"content_transfer_encoding": {
"Text": "7bit"
},
"content_type": {
"ContentType": {
"c_type": "text",
"c_subtype": "plain",
"attributes": {
"charset": "us-ascii",
"name": "hareandtoroise.txt"
}
}
},
"content_transfer_encoding": "7bit",
"content_type": {
"c_type": "text",
"c_subtype": "plain",
"attributes": {
"name": "hareandtoroise.txt",
"charset": "us-ascii"
"content_disposition": {
"ContentType": {
"c_type": "inline",
"attributes": {
"filename": "hareandtoroise.txt"
}
}
}
},
"contents": "\r\nThe Hare and the Tortoise \r\n \r\nA HARE one day ridiculed the short feet and slow pace of the Tortoise, who replied, laughing: \"Though you be swift as the wind, I will beat you in a race.\" The Hare, believing her assertion to be simply impossible, assented to the proposal; and they agreed that the Fox should choose the course and fix the goal. On the day appointed for the race the two started together. The Tortoise never for a moment stopped, but went on with a slow but steady pace straight to the end of the course. The Hare, lying down by the wayside, fell fast asleep. At last waking up, and moving as fast as he could, he saw the Tortoise had reached the goal, and was comfortably dozing after her fatigue. \r\n \r\nSlow but steady wins the race. \r\n\r"
"body": "\r\nThe Hare and the Tortoise \r\n \r\nA HARE one day ridiculed the short feet and slow pace of the Tortoise, who replied, laughing: \"Though you be swift as the wind, I will beat you in a race.\" The Hare, believing her assertion to be simply impossible, assented to the proposal; and they agreed that the Fox should choose the course and fix the goal. On the day appointed for the race the two started together. The Tortoise never for a moment stopped, but went on with a slow but steady pace straight to the end of the course. The Hare, lying down by the wayside, fell fast asleep. At last waking up, and moving as fast as he could, he saw the Tortoise had reached the goal, and was comfortably dozing after her fatigue. \r\n \r\nSlow but steady wins the race. \r\n\r"
}
}
]
],
"structure": {
"List": [
{
"Part": 0
},
{
"Part": 1
},
{
"Part": 2
},
{
"Part": 3
}
]
},
"offset_header": 0,
"offset_body": 378,
"offset_end": 6290
}
+171 -67
View File
@@ -97,82 +97,160 @@ Z3VldDZzO7wAAAAASUVORK5CYII=
---- EXPECTED STRUCTURE ----
{
"header": {
"date": {
"year": 2000,
"month": 5,
"day": 19,
"hour": 9,
"minute": 55,
"second": 48,
"tz_before_gmt": true,
"tz_hour": 4,
"tz_minute": 0
},
"headers_rfc": {
"from": {
"Address": {
"name": "Doug Sauder",
"address": "doug@penguin.example.com"
}
},
"message_id": "Pine.LNX.4.21.0005190951410.8452-102000@penguin.example.com",
"mime_version": "1.0",
"subject": "Test message from PINE",
"subject": {
"Text": "Test message from PINE"
},
"message_id": {
"Text": "Pine.LNX.4.21.0005190951410.8452-102000@penguin.example.com"
},
"mime_version": {
"Text": "1.0"
},
"content_type": {
"ContentType": {
"c_type": "multipart",
"c_subtype": "mixed",
"attributes": {
"boundary": "-1463757054-952513540-958744548=:8452"
}
}
},
"date": {
"DateTime": {
"year": 2000,
"month": 5,
"day": 19,
"hour": 9,
"minute": 55,
"second": 48,
"tz_before_gmt": true,
"tz_hour": 4,
"tz_minute": 0
}
},
"to": {
"Address": {
"name": "Joe Blow",
"address": "blow@example.com"
}
},
"content_type": {
"c_type": "multipart",
"c_subtype": "mixed",
"attributes": {
"boundary": "-1463757054-952513540-958744548=:8452"
}
}
},
"html_body": [
"headers_offsets": [
{
"contents": "<html><body>This is a test message from PINE MUA.<br/><br/></body></html>"
"name": {
"Rfc": "date"
},
"start": 5,
"end": 45
},
{
"name": {
"Rfc": "from"
},
"start": 50,
"end": 91
},
{
"name": {
"Rfc": "to"
},
"start": 94,
"end": 124
},
{
"name": {
"Rfc": "subject"
},
"start": 132,
"end": 157
},
{
"name": {
"Rfc": "message_id"
},
"start": 168,
"end": 232
},
{
"name": {
"Rfc": "mime_version"
},
"start": 245,
"end": 251
},
{
"name": {
"Rfc": "content_type"
},
"start": 264,
"end": 332
}
],
"html_body": [
0
],
"text_body": [
{
"header": {
"content_type": {
"c_type": "text",
"c_subtype": "plain",
"attributes": {
"charset": "US-ASCII"
}
}
},
"contents": "This is a test message from PINE MUA.\r\n\r\n\r"
}
0
],
"attachments": [
1,
2
],
"parts": [
{
"Binary": {
"header": {
"content_description": "A PNG graphic file",
"content_disposition": {
"c_type": "attachment",
"attributes": {
"filename": "redball.png"
}
},
"content_id": "Pine.LNX.4.21.0005190955480.8452@penguin.example.com",
"content_transfer_encoding": "BASE64",
"Text": {
"headers": {
"content_type": {
"c_type": "application",
"c_subtype": "octet-stream",
"attributes": {
"name": "redball.png"
"ContentType": {
"c_type": "text",
"c_subtype": "plain",
"attributes": {
"charset": "US-ASCII"
}
}
}
},
"contents": [
"body": "This is a test message from PINE MUA.\r\n\r\n\r"
}
},
{
"Binary": {
"headers": {
"content_type": {
"ContentType": {
"c_type": "application",
"c_subtype": "octet-stream",
"attributes": {
"name": "redball.png"
}
}
},
"content_disposition": {
"ContentType": {
"c_type": "attachment",
"attributes": {
"filename": "redball.png"
}
}
},
"content_transfer_encoding": {
"Text": "BASE64"
},
"content_id": {
"Text": "Pine.LNX.4.21.0005190955480.8452@penguin.example.com"
},
"content_description": {
"Text": "A PNG graphic file"
}
},
"body": [
137,
80,
78,
@@ -1631,25 +1709,35 @@ Z3VldDZzO7wAAAAASUVORK5CYII=
},
{
"Binary": {
"header": {
"content_description": "A PNG graphic file",
"content_disposition": {
"c_type": "attachment",
"attributes": {
"filename": "blueball.png"
"headers": {
"content_type": {
"ContentType": {
"c_type": "application",
"c_subtype": "octet-stream",
"attributes": {
"name": "blueball.png"
}
}
},
"content_id": "Pine.LNX.4.21.0005190955481.8452@penguin.example.com",
"content_transfer_encoding": "BASE64",
"content_type": {
"c_type": "application",
"c_subtype": "octet-stream",
"attributes": {
"name": "blueball.png"
"content_id": {
"Text": "Pine.LNX.4.21.0005190955481.8452@penguin.example.com"
},
"content_transfer_encoding": {
"Text": "BASE64"
},
"content_description": {
"Text": "A PNG graphic file"
},
"content_disposition": {
"ContentType": {
"c_type": "attachment",
"attributes": {
"filename": "blueball.png"
}
}
}
},
"contents": [
"body": [
137,
80,
78,
@@ -2978,5 +3066,21 @@ Z3VldDZzO7wAAAAASUVORK5CYII=
]
}
}
]
],
"structure": {
"List": [
{
"Part": 0
},
{
"Part": 1
},
{
"Part": 2
}
]
},
"offset_header": 0,
"offset_body": 336,
"offset_end": 5169
}
+222 -78
View File
@@ -134,17 +134,28 @@ eSBZdmVzIFBpZ3VldDZzO7wAAAAASUVORK5CYII=
---- EXPECTED STRUCTURE ----
{
"header": {
"headers_rfc": {
"content_type": {
"ContentType": {
"c_type": "multipart",
"c_subtype": "mixed",
"attributes": {
"boundary": "------------C78F594988075E36AE03C243"
}
}
},
"date": {
"year": 2000,
"month": 5,
"day": 17,
"hour": 23,
"minute": 8,
"second": 29,
"tz_before_gmt": true,
"tz_hour": 4,
"tz_minute": 0
"DateTime": {
"year": 2000,
"month": 5,
"day": 17,
"hour": 23,
"minute": 8,
"second": 29,
"tz_before_gmt": true,
"tz_hour": 4,
"tz_minute": 0
}
},
"from": {
"Address": {
@@ -152,85 +163,186 @@ eSBZdmVzIFBpZ3VldDZzO7wAAAAASUVORK5CYII=
"address": "dwsauder@example.com"
}
},
"message_id": "39235EAD.E48E2160@example.com",
"mime_version": "1.0",
"subject": "Test message from Netscape Communicator 4.7",
"to": {
"Address": {
"name": "Joe Blow",
"address": "blow@example.com"
}
},
"content_type": {
"c_type": "multipart",
"c_subtype": "mixed",
"attributes": {
"boundary": "------------C78F594988075E36AE03C243"
}
"subject": {
"Text": "Test message from Netscape Communicator 4.7"
},
"others": {
"X-Accept-Language": [
"en"
],
"X-Mailer": [
"Mozilla 4.7 [en] (WinNT; I)"
]
"mime_version": {
"Text": "1.0"
},
"message_id": {
"Text": "39235EAD.E48E2160@example.com"
}
},
"html_body": [
{
"header": {
"content_transfer_encoding": "7bit",
"content_type": {
"c_type": "text",
"c_subtype": "html",
"attributes": {
"charset": "us-ascii"
}
}
},
"contents": "<!doctype html public \"-//w3c//dtd html 4.0 transitional//en\">\r\n<html>\r\n<b>Die Hasen und die Fr&ouml;sche</b>\r\n<p>Die Hasen klagten einst &uuml;ber ihre mi&szlig;liche Lage; \"wir leben\",\r\nsprach ein Redner, \"in steter Furcht vor Menschen und Tieren, eine Beute\r\nder Hunde, der Adler, ja fast aller Raubtiere! Unsere stete Angst ist &auml;rger\r\nals der Tod selbst. Auf, la&szlig;t uns ein f&uuml;r allemal sterben.\"\r\n<p>In einem nahen Teich wollten sie sich nun ers&auml;ufen; sie eilten\r\nihm zu; allein das au&szlig;erordentliche Get&ouml;se und ihre wunderbare\r\nGestalt erschreckte eine Menge Fr&ouml;sche, die am Ufer sa&szlig;en, so\r\nsehr, da&szlig; sie aufs schnellste untertauchten.\r\n<p>\"Halt\", rief nun eben dieser Sprecher, \"wir wollen das Ers&auml;ufen\r\nnoch ein wenig aufschieben, denn auch uns f&uuml;rchten, wie ihr seht,\r\neinige Tiere, welche also wohl noch ungl&uuml;cklicher sein m&uuml;ssen\r\nals wir.\"\r\n<br>&nbsp;\r\n<br>&nbsp;</html>\r\n\r"
"headers_other": {
"X-Mailer": {
"Text": "Mozilla 4.7 [en] (WinNT; I)"
},
0,
1
"X-Accept-Language": {
"Text": "en"
}
},
"headers_offsets": [
{
"name": {
"Rfc": "message_id"
},
"start": 11,
"end": 45
},
{
"name": {
"Rfc": "date"
},
"start": 50,
"end": 84
},
{
"name": {
"Rfc": "from"
},
"start": 89,
"end": 126
},
{
"name": {
"Other": "X-Mailer"
},
"start": 135,
"end": 165
},
{
"name": {
"Other": "X-Accept-Language"
},
"start": 183,
"end": 188
},
{
"name": {
"Rfc": "mime_version"
},
"start": 201,
"end": 207
},
{
"name": {
"Rfc": "to"
},
"start": 210,
"end": 240
},
{
"name": {
"Rfc": "subject"
},
"start": 248,
"end": 294
},
{
"name": {
"Rfc": "content_type"
},
"start": 307,
"end": 376
}
],
"html_body": [
2,
3,
4
],
"text_body": [
{
"header": {
"content_transfer_encoding": "quoted-printable",
"content_type": {
"c_type": "text",
"c_subtype": "plain",
"attributes": {
"charset": "iso-8859-1"
}
}
},
"contents": "Die Hasen und die Frösche\n\nDie Hasen klagten einst über ihre mißliche Lage; \"wir leben\", sprach ein\nRedner, \"in steter Furcht vor Menschen und Tieren, eine Beute der Hunde,\nder Adler, ja fast aller Raubtiere! Unsere stete Angst ist ärger als der\nTod selbst. Auf, laßt uns ein für allemal sterben.\"\n\nIn einem nahen Teich wollten sie sich nun ersäufen; sie eilten ihm zu;\nallein das außerordentliche Getöse und ihre wunderbare Gestalt\nerschreckte eine Menge Frösche, die am Ufer saßen, so sehr, daß sie aufs\nschnellste untertauchten.\n\n\"Halt\", rief nun eben dieser Sprecher, \"wir wollen das Ersäufen noch ein\nwenig aufschieben, denn auch uns fürchten, wie ihr seht, einige Tiere,\nwelche also wohl noch unglücklicher sein müssen als wir.\"\n\n\n"
},
0,
1
1,
3,
4
],
"attachments": [
3,
4
],
"parts": [
{
"InlineBinary": {
"header": {
"content_disposition": {
"c_type": "inline",
"Multipart": {
"content_type": {
"ContentType": {
"c_type": "multipart",
"c_subtype": "alternative",
"attributes": {
"filename": "greenball.png"
"boundary": "------------D74AE2393FB01D1B284AE257"
}
}
}
}
},
{
"Text": {
"headers": {
"content_transfer_encoding": {
"Text": "quoted-printable"
},
"content_transfer_encoding": "base64",
"content_type": {
"c_type": "image",
"c_subtype": "png",
"attributes": {
"name": "greenball.png"
"ContentType": {
"c_type": "text",
"c_subtype": "plain",
"attributes": {
"charset": "iso-8859-1"
}
}
}
},
"contents": [
"body": "Die Hasen und die Frösche\n\nDie Hasen klagten einst über ihre mißliche Lage; \"wir leben\", sprach ein\nRedner, \"in steter Furcht vor Menschen und Tieren, eine Beute der Hunde,\nder Adler, ja fast aller Raubtiere! Unsere stete Angst ist ärger als der\nTod selbst. Auf, laßt uns ein für allemal sterben.\"\n\nIn einem nahen Teich wollten sie sich nun ersäufen; sie eilten ihm zu;\nallein das außerordentliche Getöse und ihre wunderbare Gestalt\nerschreckte eine Menge Frösche, die am Ufer saßen, so sehr, daß sie aufs\nschnellste untertauchten.\n\n\"Halt\", rief nun eben dieser Sprecher, \"wir wollen das Ersäufen noch ein\nwenig aufschieben, denn auch uns fürchten, wie ihr seht, einige Tiere,\nwelche also wohl noch unglücklicher sein müssen als wir.\"\n\n\n"
}
},
{
"Html": {
"headers": {
"content_transfer_encoding": {
"Text": "7bit"
},
"content_type": {
"ContentType": {
"c_type": "text",
"c_subtype": "html",
"attributes": {
"charset": "us-ascii"
}
}
}
},
"body": "<!doctype html public \"-//w3c//dtd html 4.0 transitional//en\">\r\n<html>\r\n<b>Die Hasen und die Fr&ouml;sche</b>\r\n<p>Die Hasen klagten einst &uuml;ber ihre mi&szlig;liche Lage; \"wir leben\",\r\nsprach ein Redner, \"in steter Furcht vor Menschen und Tieren, eine Beute\r\nder Hunde, der Adler, ja fast aller Raubtiere! Unsere stete Angst ist &auml;rger\r\nals der Tod selbst. Auf, la&szlig;t uns ein f&uuml;r allemal sterben.\"\r\n<p>In einem nahen Teich wollten sie sich nun ers&auml;ufen; sie eilten\r\nihm zu; allein das au&szlig;erordentliche Get&ouml;se und ihre wunderbare\r\nGestalt erschreckte eine Menge Fr&ouml;sche, die am Ufer sa&szlig;en, so\r\nsehr, da&szlig; sie aufs schnellste untertauchten.\r\n<p>\"Halt\", rief nun eben dieser Sprecher, \"wir wollen das Ers&auml;ufen\r\nnoch ein wenig aufschieben, denn auch uns f&uuml;rchten, wie ihr seht,\r\neinige Tiere, welche also wohl noch ungl&uuml;cklicher sein m&uuml;ssen\r\nals wir.\"\r\n<br>&nbsp;\r\n<br>&nbsp;</html>\r\n\r"
}
},
{
"InlineBinary": {
"headers": {
"content_disposition": {
"ContentType": {
"c_type": "inline",
"attributes": {
"filename": "greenball.png"
}
}
},
"content_type": {
"ContentType": {
"c_type": "image",
"c_subtype": "png",
"attributes": {
"name": "greenball.png"
}
}
},
"content_transfer_encoding": {
"Text": "base64"
}
},
"body": [
137,
80,
78,
@@ -1534,23 +1646,29 @@ eSBZdmVzIFBpZ3VldDZzO7wAAAAASUVORK5CYII=
},
{
"InlineBinary": {
"header": {
"headers": {
"content_transfer_encoding": {
"Text": "base64"
},
"content_disposition": {
"c_type": "inline",
"attributes": {
"filename": "blueball.png"
"ContentType": {
"c_type": "inline",
"attributes": {
"filename": "blueball.png"
}
}
},
"content_transfer_encoding": "base64",
"content_type": {
"c_type": "image",
"c_subtype": "png",
"attributes": {
"name": "blueball.png"
"ContentType": {
"c_type": "image",
"c_subtype": "png",
"attributes": {
"name": "blueball.png"
}
}
}
},
"contents": [
"body": [
137,
80,
78,
@@ -2879,5 +2997,31 @@ eSBZdmVzIFBpZ3VldDZzO7wAAAAASUVORK5CYII=
]
}
}
]
],
"structure": {
"List": [
{
"MultiPart": [
0,
[
{
"Part": 1
},
{
"Part": 2
}
]
]
},
{
"Part": 3
},
{
"Part": 4
}
]
},
"offset_header": 0,
"offset_body": 378,
"offset_end": 6606
}
+138 -38
View File
@@ -34,61 +34,161 @@ welche also wohl noch ungl=FCcklicher sein m=FCssen als wir."
---- EXPECTED STRUCTURE ----
{
"header": {
"date": {
"year": 2000,
"month": 5,
"day": 17,
"hour": 23,
"minute": 30,
"second": 41,
"tz_before_gmt": true,
"tz_hour": 4,
"tz_minute": 0
"headers_rfc": {
"message_id": {
"Text": "392363E1.2AC47AB3@example.com"
},
"from": {
"Address": {
"name": "Doug Sauder",
"address": "dwsauder@example.com"
"content_type": {
"ContentType": {
"c_type": "text",
"c_subtype": "plain",
"attributes": {
"charset": "UTF-8"
}
}
},
"message_id": "392363E1.2AC47AB3@example.com",
"mime_version": "1.0",
"subject": "Test message from Netscape Communicator 4.7",
"to": {
"Address": {
"name": "Joe Blow",
"address": "blow@example.com"
}
},
"content_transfer_encoding": "quoted-printable",
"content_type": {
"c_type": "text",
"c_subtype": "plain",
"attributes": {
"charset": "UTF-8"
"date": {
"DateTime": {
"year": 2000,
"month": 5,
"day": 17,
"hour": 23,
"minute": 30,
"second": 41,
"tz_before_gmt": true,
"tz_hour": 4,
"tz_minute": 0
}
},
"others": {
"X-Mailer": [
"Mozilla 4.7 [en] (WinNT; I)"
],
"X-Accept-Language": [
"en"
],
"X-Priority": [
"5 (Lowest)"
]
"subject": {
"Text": "Test message from Netscape Communicator 4.7"
},
"mime_version": {
"Text": "1.0"
},
"content_transfer_encoding": {
"Text": "quoted-printable"
},
"from": {
"Address": {
"name": "Doug Sauder",
"address": "dwsauder@example.com"
}
}
},
"html_body": [
"headers_other": {
"X-Accept-Language": {
"Text": "en"
},
"X-Priority": {
"Text": "5 (Lowest)"
},
"X-Mailer": {
"Text": "Mozilla 4.7 [en] (WinNT; I)"
}
},
"headers_offsets": [
{
"contents": "<html><body>Die Hasen und die Fr�sche<br/><br/>Die Hasen klagten einst �ber ihre mi�liche Lage; \"wir leben\", sprach ein<br/>Redner, \"in steter Furcht vor Menschen und Tieren, eine Beute der Hunde,<br/>der Adler, ja fast aller Raubtiere! Unsere stete Angst ist �rger als der<br/>Tod selbst. Auf, la�t uns ein f�r allemal sterben.\" <br/><br/>In einem nahen Teich wollten sie sich nun ers�ufen; sie eilten ihm zu;<br/>allein das au�erordentliche Get�se und ihre wunderbare Gestalt<br/>erschreckte eine Menge Fr�sche, die am Ufer sa�en, so sehr, da� sie aufs<br/>schnellste untertauchten. <br/><br/>\"Halt\", rief nun eben dieser Sprecher, \"wir wollen das Ers�ufen noch ein<br/>wenig aufschieben, denn auch uns f�rchten, wie ihr seht, einige Tiere,<br/>welche also wohl noch ungl�cklicher sein m�ssen als wir.\"<br/></body></html>"
"name": {
"Rfc": "message_id"
},
"start": 11,
"end": 45
},
{
"name": {
"Rfc": "date"
},
"start": 50,
"end": 84
},
{
"name": {
"Rfc": "from"
},
"start": 89,
"end": 126
},
{
"name": {
"Other": "X-Mailer"
},
"start": 135,
"end": 165
},
{
"name": {
"Other": "X-Accept-Language"
},
"start": 183,
"end": 188
},
{
"name": {
"Rfc": "mime_version"
},
"start": 201,
"end": 207
},
{
"name": {
"Rfc": "to"
},
"start": 210,
"end": 240
},
{
"name": {
"Rfc": "subject"
},
"start": 248,
"end": 294
},
{
"name": {
"Other": "X-Priority"
},
"start": 305,
"end": 318
},
{
"name": {
"Rfc": "content_type"
},
"start": 331,
"end": 359
},
{
"name": {
"Rfc": "content_transfer_encoding"
},
"start": 385,
"end": 404
}
],
"html_body": [
0
],
"text_body": [
0
],
"parts": [
{
"contents": "Die Hasen und die Fr�sche\n\nDie Hasen klagten einst �ber ihre mi�liche Lage; \"wir leben\", sprach ein\nRedner, \"in steter Furcht vor Menschen und Tieren, eine Beute der Hunde,\nder Adler, ja fast aller Raubtiere! Unsere stete Angst ist �rger als der\nTod selbst. Auf, la�t uns ein f�r allemal sterben.\" \n\nIn einem nahen Teich wollten sie sich nun ers�ufen; sie eilten ihm zu;\nallein das au�erordentliche Get�se und ihre wunderbare Gestalt\nerschreckte eine Menge Fr�sche, die am Ufer sa�en, so sehr, da� sie aufs\nschnellste untertauchten. \n\n\"Halt\", rief nun eben dieser Sprecher, \"wir wollen das Ers�ufen noch ein\nwenig aufschieben, denn auch uns f�rchten, wie ihr seht, einige Tiere,\nwelche also wohl noch ungl�cklicher sein m�ssen als wir.\"\n"
"Text": {
"body": "Die Hasen und die Fr�sche\n\nDie Hasen klagten einst �ber ihre mi�liche Lage; \"wir leben\", sprach ein\nRedner, \"in steter Furcht vor Menschen und Tieren, eine Beute der Hunde,\nder Adler, ja fast aller Raubtiere! Unsere stete Angst ist �rger als der\nTod selbst. Auf, la�t uns ein f�r allemal sterben.\" \n\nIn einem nahen Teich wollten sie sich nun ers�ufen; sie eilten ihm zu;\nallein das au�erordentliche Get�se und ihre wunderbare Gestalt\nerschreckte eine Menge Fr�sche, die am Ufer sa�en, so sehr, da� sie aufs\nschnellste untertauchten. \n\n\"Halt\", rief nun eben dieser Sprecher, \"wir wollen das Ers�ufen noch ein\nwenig aufschieben, denn auch uns f�rchten, wie ihr seht, einige Tiere,\nwelche also wohl noch ungl�cklicher sein m�ssen als wir.\"\n"
}
}
]
],
"structure": {
"Part": 0
},
"offset_header": 0,
"offset_body": 406,
"offset_end": 1208
}
+124 -31
View File
@@ -27,17 +27,19 @@ welche also wohl noch ungl+uKs-licher sein m+vLM-en als wir."
---- EXPECTED STRUCTURE ----
{
"header": {
"headers_rfc": {
"date": {
"year": 2000,
"month": 5,
"day": 17,
"hour": 23,
"minute": 33,
"second": 43,
"tz_before_gmt": true,
"tz_hour": 4,
"tz_minute": 0
"DateTime": {
"year": 2000,
"month": 5,
"day": 17,
"hour": 23,
"minute": 33,
"second": 43,
"tz_before_gmt": true,
"tz_hour": 4,
"tz_minute": 0
}
},
"from": {
"Address": {
@@ -45,40 +47,131 @@ welche also wohl noch ungl+uKs-licher sein m+vLM-en als wir."
"address": "dwsauder@example.com"
}
},
"message_id": "39236497.12FA2A89@example.com",
"mime_version": "1.0",
"subject": "Die Hasen und die Fr+APY-sche",
"content_type": {
"ContentType": {
"c_type": "text",
"c_subtype": "plain",
"attributes": {
"charset": "UTF-7"
}
}
},
"to": {
"Address": {
"name": "Heinz M+APw-ller",
"address": "mueller@example.com"
}
},
"content_transfer_encoding": "7bit",
"content_type": {
"c_type": "text",
"c_subtype": "plain",
"attributes": {
"charset": "UTF-7"
}
"mime_version": {
"Text": "1.0"
},
"others": {
"X-Accept-Language": [
"en"
],
"X-Mailer": [
"Mozilla 4.7 [en] (WinNT; I)"
]
"subject": {
"Text": "Die Hasen und die Fr+APY-sche"
},
"content_transfer_encoding": {
"Text": "7bit"
},
"message_id": {
"Text": "39236497.12FA2A89@example.com"
}
},
"html_body": [
"headers_other": {
"X-Mailer": {
"Text": "Mozilla 4.7 [en] (WinNT; I)"
},
"X-Accept-Language": {
"Text": "en"
}
},
"headers_offsets": [
{
"contents": "<html><body>Die Hasen und die Fr岣he<br/><br/>Die Hasen klagten einst 롥r ihre miެiche Lage; \"wir leben\", sprach ein<br/>Redner, \"in steter Furcht vor Menschen und Tieren, eine Beute der Hunde,<br/>der Adler, ja fast aller Raubtiere! Unsere stete Angst ist 㱧er als der<br/>Tod selbst. Auf, la޴ uns ein f밠allemal sterben.\" <br/><br/>In einem nahen Teich wollten sie sich nun ers㴦en; sie eilten ihm zu;<br/>allein das auޥrordentliche Get岥 und ihre wunderbare Gestalt<br/>erschreckte eine Menge Fr岣he, die am Ufer saޥn, so sehr, daݠsie aufs<br/>schnellste untertauchten. <br/><br/>\"Halt\", rief nun eben dieser Sprecher, \"wir wollen das Ers㴦en noch ein<br/>wenig aufschieben, denn auch uns f뱣hten, wie ihr seht, einige Tiere,<br/>welche also wohl noch ungl뢫licher sein m벳en als wir.\"<br/></body></html>"
"name": {
"Rfc": "message_id"
},
"start": 11,
"end": 45
},
{
"name": {
"Rfc": "date"
},
"start": 50,
"end": 84
},
{
"name": {
"Rfc": "from"
},
"start": 89,
"end": 126
},
{
"name": {
"Other": "X-Mailer"
},
"start": 135,
"end": 165
},
{
"name": {
"Other": "X-Accept-Language"
},
"start": 183,
"end": 188
},
{
"name": {
"Rfc": "mime_version"
},
"start": 201,
"end": 207
},
{
"name": {
"Rfc": "to"
},
"start": 210,
"end": 253
},
{
"name": {
"Rfc": "subject"
},
"start": 261,
"end": 293
},
{
"name": {
"Rfc": "content_type"
},
"start": 306,
"end": 334
},
{
"name": {
"Rfc": "content_transfer_encoding"
},
"start": 360,
"end": 367
}
],
"html_body": [
0
],
"text_body": [
0
],
"parts": [
{
"contents": "Die Hasen und die Fr岣he\r\n\r\nDie Hasen klagten einst 롥r ihre miެiche Lage; \"wir leben\", sprach ein\r\nRedner, \"in steter Furcht vor Menschen und Tieren, eine Beute der Hunde,\r\nder Adler, ja fast aller Raubtiere! Unsere stete Angst ist 㱧er als der\r\nTod selbst. Auf, la޴ uns ein f밠allemal sterben.\" \r\n\r\nIn einem nahen Teich wollten sie sich nun ers㴦en; sie eilten ihm zu;\r\nallein das auޥrordentliche Get岥 und ihre wunderbare Gestalt\r\nerschreckte eine Menge Fr岣he, die am Ufer saޥn, so sehr, daݠsie aufs\r\nschnellste untertauchten. \r\n\r\n\"Halt\", rief nun eben dieser Sprecher, \"wir wollen das Ers㴦en noch ein\r\nwenig aufschieben, denn auch uns f뱣hten, wie ihr seht, einige Tiere,\r\nwelche also wohl noch ungl뢫licher sein m벳en als wir.\"\r\n"
"Text": {
"body": "Die Hasen und die Fr岣he\r\n\r\nDie Hasen klagten einst 롥r ihre miެiche Lage; \"wir leben\", sprach ein\r\nRedner, \"in steter Furcht vor Menschen und Tieren, eine Beute der Hunde,\r\nder Adler, ja fast aller Raubtiere! Unsere stete Angst ist 㱧er als der\r\nTod selbst. Auf, la޴ uns ein f밠allemal sterben.\" \r\n\r\nIn einem nahen Teich wollten sie sich nun ers㴦en; sie eilten ihm zu;\r\nallein das auޥrordentliche Get岥 und ihre wunderbare Gestalt\r\nerschreckte eine Menge Fr岣he, die am Ufer saޥn, so sehr, daݠsie aufs\r\nschnellste untertauchten. \r\n\r\n\"Halt\", rief nun eben dieser Sprecher, \"wir wollen das Ers㴦en noch ein\r\nwenig aufschieben, denn auch uns f뱣hten, wie ihr seht, einige Tiere,\r\nwelche also wohl noch ungl뢫licher sein m벳en als wir.\"\r\n"
}
}
]
],
"structure": {
"Part": 0
},
"offset_header": 0,
"offset_body": 369,
"offset_end": 1158
}
+290 -102
View File
@@ -213,17 +213,15 @@ YII=
---- EXPECTED STRUCTURE ----
{
"header": {
"date": {
"year": 2000,
"month": 5,
"day": 17,
"hour": 23,
"minute": 13,
"second": 9,
"tz_before_gmt": true,
"tz_hour": 4,
"tz_minute": 0
"headers_rfc": {
"content_type": {
"ContentType": {
"c_type": "multipart",
"c_subtype": "mixed",
"attributes": {
"boundary": "------------A1E83A41894D3755390B838A"
}
}
},
"from": {
"Address": {
@@ -231,83 +229,214 @@ YII=
"address": "dwsauder@example.com"
}
},
"message_id": "39235FC5.276CCE00@example.com",
"mime_version": "1.0",
"subject": "Die Hasen und die Frösche (Netscape Messenger 4.7)",
"mime_version": {
"Text": "1.0"
},
"date": {
"DateTime": {
"year": 2000,
"month": 5,
"day": 17,
"hour": 23,
"minute": 13,
"second": 9,
"tz_before_gmt": true,
"tz_hour": 4,
"tz_minute": 0
}
},
"to": {
"Address": {
"name": "Heinz Müller",
"address": "mueller@example.com"
}
},
"content_type": {
"c_type": "multipart",
"c_subtype": "mixed",
"attributes": {
"boundary": "------------A1E83A41894D3755390B838A"
}
"message_id": {
"Text": "39235FC5.276CCE00@example.com"
},
"others": {
"X-Accept-Language": [
"en"
],
"X-Mailer": [
"Mozilla 4.7 [en] (WinNT; I)"
]
"subject": {
"Text": "Die Hasen und die Frösche (Netscape Messenger 4.7)"
}
},
"html_body": [
{
"header": {
"content_transfer_encoding": "7bit",
"content_type": {
"c_type": "text",
"c_subtype": "html",
"attributes": {
"charset": "us-ascii"
}
}
},
"contents": "<!doctype html public \"-//w3c//dtd html 4.0 transitional//en\">\r\n<html>\r\n<img SRC=\"cid:part1.39235FC5.E71D8178@example.com\" ALT=\"blue ball\" height=27 width=27><b></b>\r\n<p><b>Die Hasen und die Fr&ouml;sche</b>\r\n<p>Die Hasen klagten einst &uuml;ber ihre mi&szlig;liche Lage; \"wir leben\",\r\nsprach ein Redner, \"in steter Furcht vor Menschen und Tieren, eine Beute\r\nder Hunde, der Adler, ja fast aller Raubtiere! Unsere stete Angst ist &auml;rger\r\nals der Tod selbst. Auf, la&szlig;t uns ein f&uuml;r allemal sterben.\"\r\n<p>In einem nahen Teich wollten sie sich nun ers&auml;ufen; sie eilten\r\nihm zu; allein das au&szlig;erordentliche Get&ouml;se und ihre wunderbare\r\nGestalt erschreckte eine Menge Fr&ouml;sche, die am Ufer sa&szlig;en, so\r\nsehr, da&szlig; sie aufs schnellste untertauchten.\r\n<p>\"Halt\", rief nun eben dieser Sprecher, \"wir wollen das Ers&auml;ufen\r\nnoch ein wenig aufschieben, denn auch uns f&uuml;rchten, wie ihr seht,\r\neinige Tiere, welche also wohl noch ungl&uuml;cklicher sein m&uuml;ssen\r\nals wir.\"\r\n<p><img SRC=\"cid:part2.39235FC5.E71D8178@example.com\" height=27 width=27>\r\n<br>&nbsp;\r\n<br>&nbsp;</html>\r\n\r"
"headers_other": {
"X-Accept-Language": {
"Text": "en"
},
2,
3
"X-Mailer": {
"Text": "Mozilla 4.7 [en] (WinNT; I)"
}
},
"headers_offsets": [
{
"name": {
"Rfc": "message_id"
},
"start": 11,
"end": 45
},
{
"name": {
"Rfc": "date"
},
"start": 50,
"end": 84
},
{
"name": {
"Rfc": "from"
},
"start": 89,
"end": 126
},
{
"name": {
"Other": "X-Mailer"
},
"start": 135,
"end": 165
},
{
"name": {
"Other": "X-Accept-Language"
},
"start": 183,
"end": 188
},
{
"name": {
"Rfc": "mime_version"
},
"start": 201,
"end": 207
},
{
"name": {
"Rfc": "to"
},
"start": 210,
"end": 266
},
{
"name": {
"Rfc": "subject"
},
"start": 274,
"end": 346
},
{
"name": {
"Rfc": "content_type"
},
"start": 359,
"end": 428
}
],
"html_body": [
3,
6,
7
],
"text_body": [
{
"header": {
"content_transfer_encoding": "quoted-printable",
"content_type": {
"c_type": "text",
"c_subtype": "plain",
"attributes": {
"charset": "iso-8859-1"
}
}
},
"contents": "[blue ball]\n\nDie Hasen und die Frösche\n\nDie Hasen klagten einst über ihre mißliche Lage; \"wir leben\", sprach ein\nRedner, \"in steter Furcht vor Menschen und Tieren, eine Beute der Hunde,\nder Adler, ja fast aller Raubtiere! Unsere stete Angst ist ärger als der\nTod selbst. Auf, laßt uns ein für allemal sterben.\"\n\nIn einem nahen Teich wollten sie sich nun ersäufen; sie eilten ihm zu;\nallein das außerordentliche Getöse und ihre wunderbare Gestalt\nerschreckte eine Menge Frösche, die am Ufer saßen, so sehr, daß sie aufs\nschnellste untertauchten.\n\n\"Halt\", rief nun eben dieser Sprecher, \"wir wollen das Ersäufen noch ein\nwenig aufschieben, denn auch uns fürchten, wie ihr seht, einige Tiere,\nwelche also wohl noch unglücklicher sein müssen als wir.\"\n\n[Image]\n\n\n"
},
2,
3
1,
6,
7
],
"attachments": [
4,
5,
6,
7
],
"parts": [
{
"Binary": {
"header": {
"content_disposition": {
"c_type": "inline",
"Multipart": {
"content_type": {
"ContentType": {
"c_type": "multipart",
"c_subtype": "alternative",
"attributes": {
"filename": "C:TEMPnsmailEG.png"
"boundary": "------------F03F94BA73D3B9E8C1B94D92"
}
}
}
}
},
{
"Text": {
"headers": {
"content_type": {
"ContentType": {
"c_type": "text",
"c_subtype": "plain",
"attributes": {
"charset": "iso-8859-1"
}
}
},
"content_id": "part1.39235FC5.E71D8178@example.com",
"content_transfer_encoding": "base64",
"content_type": {
"c_type": "image",
"c_subtype": "png"
"content_transfer_encoding": {
"Text": "quoted-printable"
}
},
"contents": [
"body": "[blue ball]\n\nDie Hasen und die Frösche\n\nDie Hasen klagten einst über ihre mißliche Lage; \"wir leben\", sprach ein\nRedner, \"in steter Furcht vor Menschen und Tieren, eine Beute der Hunde,\nder Adler, ja fast aller Raubtiere! Unsere stete Angst ist ärger als der\nTod selbst. Auf, laßt uns ein für allemal sterben.\"\n\nIn einem nahen Teich wollten sie sich nun ersäufen; sie eilten ihm zu;\nallein das außerordentliche Getöse und ihre wunderbare Gestalt\nerschreckte eine Menge Frösche, die am Ufer saßen, so sehr, daß sie aufs\nschnellste untertauchten.\n\n\"Halt\", rief nun eben dieser Sprecher, \"wir wollen das Ersäufen noch ein\nwenig aufschieben, denn auch uns fürchten, wie ihr seht, einige Tiere,\nwelche also wohl noch unglücklicher sein müssen als wir.\"\n\n[Image]\n\n\n"
}
},
{
"Multipart": {
"content_type": {
"ContentType": {
"c_type": "multipart",
"c_subtype": "related",
"attributes": {
"boundary": "------------C02FA3D0A04E95F295FB25EB"
}
}
}
}
},
{
"Html": {
"headers": {
"content_type": {
"ContentType": {
"c_type": "text",
"c_subtype": "html",
"attributes": {
"charset": "us-ascii"
}
}
},
"content_transfer_encoding": {
"Text": "7bit"
}
},
"body": "<!doctype html public \"-//w3c//dtd html 4.0 transitional//en\">\r\n<html>\r\n<img SRC=\"cid:part1.39235FC5.E71D8178@example.com\" ALT=\"blue ball\" height=27 width=27><b></b>\r\n<p><b>Die Hasen und die Fr&ouml;sche</b>\r\n<p>Die Hasen klagten einst &uuml;ber ihre mi&szlig;liche Lage; \"wir leben\",\r\nsprach ein Redner, \"in steter Furcht vor Menschen und Tieren, eine Beute\r\nder Hunde, der Adler, ja fast aller Raubtiere! Unsere stete Angst ist &auml;rger\r\nals der Tod selbst. Auf, la&szlig;t uns ein f&uuml;r allemal sterben.\"\r\n<p>In einem nahen Teich wollten sie sich nun ers&auml;ufen; sie eilten\r\nihm zu; allein das au&szlig;erordentliche Get&ouml;se und ihre wunderbare\r\nGestalt erschreckte eine Menge Fr&ouml;sche, die am Ufer sa&szlig;en, so\r\nsehr, da&szlig; sie aufs schnellste untertauchten.\r\n<p>\"Halt\", rief nun eben dieser Sprecher, \"wir wollen das Ers&auml;ufen\r\nnoch ein wenig aufschieben, denn auch uns f&uuml;rchten, wie ihr seht,\r\neinige Tiere, welche also wohl noch ungl&uuml;cklicher sein m&uuml;ssen\r\nals wir.\"\r\n<p><img SRC=\"cid:part2.39235FC5.E71D8178@example.com\" height=27 width=27>\r\n<br>&nbsp;\r\n<br>&nbsp;</html>\r\n\r"
}
},
{
"Binary": {
"headers": {
"content_id": {
"Text": "part1.39235FC5.E71D8178@example.com"
},
"content_type": {
"ContentType": {
"c_type": "image",
"c_subtype": "png"
}
},
"content_transfer_encoding": {
"Text": "base64"
},
"content_disposition": {
"ContentType": {
"c_type": "inline",
"attributes": {
"filename": "C:TEMPnsmailEG.png"
}
}
}
},
"body": [
137,
80,
78,
@@ -1638,21 +1767,29 @@ YII=
},
{
"Binary": {
"header": {
"content_disposition": {
"c_type": "inline",
"attributes": {
"filename": "C:TEMPnsmail39.png"
"headers": {
"content_type": {
"ContentType": {
"c_type": "image",
"c_subtype": "png"
}
},
"content_id": "part2.39235FC5.E71D8178@example.com",
"content_transfer_encoding": "base64",
"content_type": {
"c_type": "image",
"c_subtype": "png"
"content_disposition": {
"ContentType": {
"c_type": "inline",
"attributes": {
"filename": "C:TEMPnsmail39.png"
}
}
},
"content_id": {
"Text": "part2.39235FC5.E71D8178@example.com"
},
"content_transfer_encoding": {
"Text": "base64"
}
},
"contents": [
"body": [
137,
80,
78,
@@ -3111,23 +3248,29 @@ YII=
},
{
"InlineBinary": {
"header": {
"content_disposition": {
"c_type": "inline",
"attributes": {
"filename": "redball.png"
"headers": {
"content_transfer_encoding": {
"Text": "base64"
},
"content_type": {
"ContentType": {
"c_type": "image",
"c_subtype": "png",
"attributes": {
"name": "redball.png"
}
}
},
"content_transfer_encoding": "base64",
"content_type": {
"c_type": "image",
"c_subtype": "png",
"attributes": {
"name": "redball.png"
"content_disposition": {
"ContentType": {
"c_type": "inline",
"attributes": {
"filename": "redball.png"
}
}
}
},
"contents": [
"body": [
137,
80,
78,
@@ -4586,23 +4729,29 @@ YII=
},
{
"InlineBinary": {
"header": {
"headers": {
"content_disposition": {
"c_type": "inline",
"attributes": {
"filename": "greenball.png"
"ContentType": {
"c_type": "inline",
"attributes": {
"filename": "greenball.png"
}
}
},
"content_transfer_encoding": "base64",
"content_type": {
"c_type": "image",
"c_subtype": "png",
"attributes": {
"name": "greenball.png"
"ContentType": {
"c_type": "image",
"c_subtype": "png",
"attributes": {
"name": "greenball.png"
}
}
},
"content_transfer_encoding": {
"Text": "base64"
}
},
"contents": [
"body": [
137,
80,
78,
@@ -5904,5 +6053,44 @@ YII=
]
}
}
]
],
"structure": {
"List": [
{
"MultiPart": [
0,
[
{
"Part": 1
},
{
"MultiPart": [
2,
[
{
"Part": 3
},
{
"Part": 4
},
{
"Part": 5
}
]
]
}
]
]
},
{
"Part": 6
},
{
"Part": 7
}
]
},
"offset_header": 0,
"offset_body": 430,
"offset_end": 11445
}
+107 -28
View File
@@ -27,50 +27,129 @@ lche also wohl noch ungl=FCcklicher sein m=FCssen als wir."=20
---- EXPECTED STRUCTURE ----
{
"header": {
"date": {
"year": 2000,
"month": 5,
"day": 19,
"hour": 10,
"minute": 18,
"second": 3,
"tz_before_gmt": true,
"tz_hour": 4,
"tz_minute": 0
"headers_rfc": {
"message_id": {
"Text": "Pine.LNX.4.21.0005191014500.8452-100000@penguin.example.com"
},
"from": {
"Address": {
"name": "Doug Sauder",
"address": "doug@penguin.example.com"
"date": {
"DateTime": {
"year": 2000,
"month": 5,
"day": 19,
"hour": 10,
"minute": 18,
"second": 3,
"tz_before_gmt": true,
"tz_hour": 4,
"tz_minute": 0
}
},
"content_transfer_encoding": {
"Text": "QUOTED-PRINTABLE"
},
"subject": {
"Text": "Die Hasen und die Frösche"
},
"content_type": {
"ContentType": {
"c_type": "text",
"c_subtype": "plain",
"attributes": {
"charset": "iso-8859-1"
}
}
},
"message_id": "Pine.LNX.4.21.0005191014500.8452-100000@penguin.example.com",
"mime_version": "1.0",
"subject": "Die Hasen und die Frösche",
"to": {
"Address": {
"name": "Jürgen Schmürgen",
"address": "schmuergen@example.com"
}
},
"content_transfer_encoding": "QUOTED-PRINTABLE",
"content_type": {
"c_type": "text",
"c_subtype": "plain",
"attributes": {
"charset": "iso-8859-1"
"mime_version": {
"Text": "1.0"
},
"from": {
"Address": {
"name": "Doug Sauder",
"address": "doug@penguin.example.com"
}
}
},
"html_body": [
"headers_offsets": [
{
"contents": "<html><body>Die Hasen und die Frösche<br/><br/>Die Hasen klagten einst über ihre mißliche Lage; \"wir leben\", sprach ein Redner, \"in steter Furcht vor Menschen und Tieren, eine Beute der Hunde, der Adler, ja fast aller Raubtiere! Unsere stete Angst ist ärger als der Tod selbst. Auf, laßt uns ein für allemal sterben.\" <br/><br/>In einem nahen Teich wollten sie sich nun ersäufen; sie eilten ihm zu; allein das außerordentliche Getöse und ihre wunderbare Gestalt erschreckte eine Menge Frösche, die am Ufer saßen, so sehr, daß sie aufs schnellste untertauchten. <br/><br/>\"Halt\", rief nun eben dieser Sprecher, \"wir wollen das Ersäufen noch ein wenig aufschieben, denn auch uns fürchten, wie ihr seht, einige Tiere, welche also wohl noch unglücklicher sein müssen als wir.\" <br/><br/><br/></body></html>"
"name": {
"Rfc": "date"
},
"start": 5,
"end": 45
},
{
"name": {
"Rfc": "from"
},
"start": 50,
"end": 91
},
{
"name": {
"Rfc": "to"
},
"start": 94,
"end": 159
},
{
"name": {
"Rfc": "subject"
},
"start": 167,
"end": 214
},
{
"name": {
"Rfc": "message_id"
},
"start": 225,
"end": 289
},
{
"name": {
"Rfc": "mime_version"
},
"start": 302,
"end": 308
},
{
"name": {
"Rfc": "content_type"
},
"start": 321,
"end": 354
},
{
"name": {
"Rfc": "content_transfer_encoding"
},
"start": 380,
"end": 399
}
],
"html_body": [
0
],
"text_body": [
0
],
"parts": [
{
"contents": "Die Hasen und die Frösche\n\nDie Hasen klagten einst über ihre mißliche Lage; \"wir leben\", sprach ein Redner, \"in steter Furcht vor Menschen und Tieren, eine Beute der Hunde, der Adler, ja fast aller Raubtiere! Unsere stete Angst ist ärger als der Tod selbst. Auf, laßt uns ein für allemal sterben.\" \n\nIn einem nahen Teich wollten sie sich nun ersäufen; sie eilten ihm zu; allein das außerordentliche Getöse und ihre wunderbare Gestalt erschreckte eine Menge Frösche, die am Ufer saßen, so sehr, daß sie aufs schnellste untertauchten. \n\n\"Halt\", rief nun eben dieser Sprecher, \"wir wollen das Ersäufen noch ein wenig aufschieben, denn auch uns fürchten, wie ihr seht, einige Tiere, welche also wohl noch unglücklicher sein müssen als wir.\" \n\n\n"
"Text": {
"body": "Die Hasen und die Frösche\n\nDie Hasen klagten einst über ihre mißliche Lage; \"wir leben\", sprach ein Redner, \"in steter Furcht vor Menschen und Tieren, eine Beute der Hunde, der Adler, ja fast aller Raubtiere! Unsere stete Angst ist ärger als der Tod selbst. Auf, laßt uns ein für allemal sterben.\" \n\nIn einem nahen Teich wollten sie sich nun ersäufen; sie eilten ihm zu; allein das außerordentliche Getöse und ihre wunderbare Gestalt erschreckte eine Menge Frösche, die am Ufer saßen, so sehr, daß sie aufs schnellste untertauchten. \n\n\"Halt\", rief nun eben dieser Sprecher, \"wir wollen das Ersäufen noch ein wenig aufschieben, denn auch uns fürchten, wie ihr seht, einige Tiere, welche also wohl noch unglücklicher sein müssen als wir.\" \n\n\n"
}
}
]
],
"structure": {
"Part": 0
},
"offset_header": 0,
"offset_body": 401,
"offset_end": 1212
}
+160 -58
View File
@@ -52,91 +52,180 @@ eSBZdmVzIFBpZ3VldDZzO7wAAAAASUVORK5CYII=
---- EXPECTED STRUCTURE ----
{
"header": {
"date": {
"year": 2000,
"month": 5,
"day": 17,
"hour": 23,
"minute": 42,
"second": 31,
"tz_before_gmt": true,
"tz_hour": 4,
"tz_minute": 0
},
"headers_rfc": {
"from": {
"Address": {
"name": "Doug Sauder",
"address": "dwsauder@example.com"
}
},
"message_id": "392366A7.21929EA7@example.com",
"mime_version": "1.0",
"subject": "Test message from Netscape Communicator 4.7",
"to": {
"Address": {
"name": "Joe Blow",
"address": "blow@example.com"
}
},
"subject": {
"Text": "Test message from Netscape Communicator 4.7"
},
"content_type": {
"c_type": "multipart",
"c_subtype": "mixed",
"attributes": {
"boundary": "------------E7889DDF0F75D34163841C59"
"ContentType": {
"c_type": "multipart",
"c_subtype": "mixed",
"attributes": {
"boundary": "------------E7889DDF0F75D34163841C59"
}
}
},
"others": {
"X-Mailer": [
"Mozilla 4.7 [en] (WinNT; I)"
],
"X-Accept-Language": [
"en"
]
"date": {
"DateTime": {
"year": 2000,
"month": 5,
"day": 17,
"hour": 23,
"minute": 42,
"second": 31,
"tz_before_gmt": true,
"tz_hour": 4,
"tz_minute": 0
}
},
"mime_version": {
"Text": "1.0"
},
"message_id": {
"Text": "392366A7.21929EA7@example.com"
}
},
"html_body": [
{
"contents": "<html><body> </body></html>"
"headers_other": {
"X-Accept-Language": {
"Text": "en"
},
0
"X-Mailer": {
"Text": "Mozilla 4.7 [en] (WinNT; I)"
}
},
"headers_offsets": [
{
"name": {
"Rfc": "message_id"
},
"start": 11,
"end": 45
},
{
"name": {
"Rfc": "date"
},
"start": 50,
"end": 84
},
{
"name": {
"Rfc": "from"
},
"start": 89,
"end": 126
},
{
"name": {
"Other": "X-Mailer"
},
"start": 135,
"end": 165
},
{
"name": {
"Other": "X-Accept-Language"
},
"start": 183,
"end": 188
},
{
"name": {
"Rfc": "mime_version"
},
"start": 201,
"end": 207
},
{
"name": {
"Rfc": "to"
},
"start": 210,
"end": 240
},
{
"name": {
"Rfc": "subject"
},
"start": 248,
"end": 294
},
{
"name": {
"Rfc": "content_type"
},
"start": 307,
"end": 376
}
],
"html_body": [
0,
1
],
"text_body": [
{
"header": {
"content_transfer_encoding": "7bit",
"content_type": {
"c_type": "text",
"c_subtype": "plain",
"attributes": {
"charset": "us-ascii"
}
}
},
"contents": " \r"
},
0
0,
1
],
"attachments": [
1
],
"parts": [
{
"InlineBinary": {
"header": {
"content_disposition": {
"c_type": "inline",
"attributes": {
"filename": "blueball.png"
}
"Text": {
"headers": {
"content_transfer_encoding": {
"Text": "7bit"
},
"content_transfer_encoding": "base64",
"content_type": {
"c_type": "image",
"c_subtype": "png",
"attributes": {
"name": "blueball.png"
"ContentType": {
"c_type": "text",
"c_subtype": "plain",
"attributes": {
"charset": "us-ascii"
}
}
}
},
"contents": [
"body": " \r"
}
},
{
"InlineBinary": {
"headers": {
"content_transfer_encoding": {
"Text": "base64"
},
"content_disposition": {
"ContentType": {
"c_type": "inline",
"attributes": {
"filename": "blueball.png"
}
}
},
"content_type": {
"ContentType": {
"c_type": "image",
"c_subtype": "png",
"attributes": {
"name": "blueball.png"
}
}
}
},
"body": [
137,
80,
78,
@@ -1465,5 +1554,18 @@ eSBZdmVzIFBpZ3VldDZzO7wAAAAASUVORK5CYII=
]
}
}
]
],
"structure": {
"List": [
{
"Part": 0
},
{
"Part": 1
}
]
},
"offset_header": 0,
"offset_body": 378,
"offset_end": 2585
}
+128 -35
View File
@@ -18,17 +18,18 @@ Slow but steady wins the race.
---- EXPECTED STRUCTURE ----
{
"header": {
"date": {
"year": 2000,
"month": 5,
"day": 17,
"hour": 23,
"minute": 24,
"second": 11,
"tz_before_gmt": true,
"tz_hour": 4,
"tz_minute": 0
"headers_rfc": {
"message_id": {
"Text": "3923625B.59F0C3AC@example.com"
},
"content_transfer_encoding": {
"Text": "7bit"
},
"to": {
"Address": {
"name": "Joe Blow",
"address": "blow@example.com"
}
},
"from": {
"Address": {
@@ -36,40 +37,132 @@ Slow but steady wins the race.
"address": "dwsauder@example.com"
}
},
"message_id": "3923625B.59F0C3AC@example.com",
"mime_version": "1.0",
"subject": "Test message from Netscape Communicator 4.7",
"to": {
"Address": {
"name": "Joe Blow",
"address": "blow@example.com"
"subject": {
"Text": "Test message from Netscape Communicator 4.7"
},
"mime_version": {
"Text": "1.0"
},
"date": {
"DateTime": {
"year": 2000,
"month": 5,
"day": 17,
"hour": 23,
"minute": 24,
"second": 11,
"tz_before_gmt": true,
"tz_hour": 4,
"tz_minute": 0
}
},
"content_transfer_encoding": "7bit",
"content_type": {
"c_type": "text",
"c_subtype": "plain",
"attributes": {
"charset": "us-ascii"
"ContentType": {
"c_type": "text",
"c_subtype": "plain",
"attributes": {
"charset": "us-ascii"
}
}
},
"others": {
"X-Mailer": [
"Mozilla 4.7 [en] (WinNT; I)"
],
"X-Accept-Language": [
"en"
]
}
},
"html_body": [
"headers_other": {
"X-Accept-Language": {
"Text": "en"
},
"X-Mailer": {
"Text": "Mozilla 4.7 [en] (WinNT; I)"
}
},
"headers_offsets": [
{
"contents": "<html><body><br/>The Hare and the Tortoise <br/> <br/>A HARE one day ridiculed the short feet and slow pace of the Tortoise, who replied, laughing: \"Though you be swift as the wind, I will beat you in a race.\" The Hare, believing her assertion to be simply impossible, assented to the proposal; and they agreed that the Fox should choose the course and fix the goal. On the day appointed for the race the two started together. The Tortoise never for a moment stopped, but went on with a slow but steady pace straight to the end of the course. The Hare, lying down by the wayside, fell fast asleep. At last waking up, and moving as fast as he could, he saw the Tortoise had reached the goal, and was comfortably dozing after her fatigue. <br/> <br/>Slow but steady wins the race.<br/></body></html>"
"name": {
"Rfc": "message_id"
},
"start": 11,
"end": 45
},
{
"name": {
"Rfc": "date"
},
"start": 50,
"end": 84
},
{
"name": {
"Rfc": "from"
},
"start": 89,
"end": 126
},
{
"name": {
"Other": "X-Mailer"
},
"start": 135,
"end": 165
},
{
"name": {
"Other": "X-Accept-Language"
},
"start": 183,
"end": 188
},
{
"name": {
"Rfc": "mime_version"
},
"start": 201,
"end": 207
},
{
"name": {
"Rfc": "to"
},
"start": 210,
"end": 240
},
{
"name": {
"Rfc": "subject"
},
"start": 248,
"end": 294
},
{
"name": {
"Rfc": "content_type"
},
"start": 307,
"end": 338
},
{
"name": {
"Rfc": "content_transfer_encoding"
},
"start": 364,
"end": 371
}
],
"html_body": [
0
],
"text_body": [
0
],
"parts": [
{
"contents": "\r\nThe Hare and the Tortoise \r\n \r\nA HARE one day ridiculed the short feet and slow pace of the Tortoise, who replied, laughing: \"Though you be swift as the wind, I will beat you in a race.\" The Hare, believing her assertion to be simply impossible, assented to the proposal; and they agreed that the Fox should choose the course and fix the goal. On the day appointed for the race the two started together. The Tortoise never for a moment stopped, but went on with a slow but steady pace straight to the end of the course. The Hare, lying down by the wayside, fell fast asleep. At last waking up, and moving as fast as he could, he saw the Tortoise had reached the goal, and was comfortably dozing after her fatigue. \r\n \r\nSlow but steady wins the race.\r\n"
"Text": {
"body": "\r\nThe Hare and the Tortoise \r\n \r\nA HARE one day ridiculed the short feet and slow pace of the Tortoise, who replied, laughing: \"Though you be swift as the wind, I will beat you in a race.\" The Hare, believing her assertion to be simply impossible, assented to the proposal; and they agreed that the Fox should choose the course and fix the goal. On the day appointed for the race the two started together. The Tortoise never for a moment stopped, but went on with a slow but steady pace straight to the end of the course. The Hare, lying down by the wayside, fell fast asleep. At last waking up, and moving as fast as he could, he saw the Tortoise had reached the goal, and was comfortably dozing after her fatigue. \r\n \r\nSlow but steady wins the race.\r\n"
}
}
]
],
"structure": {
"Part": 0
},
"offset_header": 0,
"offset_body": 375,
"offset_end": 1133
}
+246 -90
View File
@@ -172,91 +172,198 @@ eSBZdmVzIFBpZ3VldDZzO7wAAAAASUVORK5CYII=
---- EXPECTED STRUCTURE ----
{
"header": {
"date": {
"year": 2000,
"month": 5,
"day": 17,
"hour": 23,
"minute": 18,
"second": 27,
"tz_before_gmt": true,
"tz_hour": 4,
"tz_minute": 0
},
"headers_rfc": {
"from": {
"Address": {
"name": "Doug Sauder",
"address": "dwsauder@example.com"
}
},
"message_id": "39236103.FFE674FC@example.com",
"mime_version": "1.0",
"subject": "Test message from Netscape Communicator 4.7",
"content_type": {
"ContentType": {
"c_type": "multipart",
"c_subtype": "mixed",
"attributes": {
"boundary": "------------B7133A01A6B323BF00DBC9A7"
}
}
},
"subject": {
"Text": "Test message from Netscape Communicator 4.7"
},
"message_id": {
"Text": "39236103.FFE674FC@example.com"
},
"mime_version": {
"Text": "1.0"
},
"to": {
"Address": {
"name": "Jürgen Schmürgen",
"address": "schmuergen@example.com"
}
},
"content_type": {
"c_type": "multipart",
"c_subtype": "mixed",
"attributes": {
"boundary": "------------B7133A01A6B323BF00DBC9A7"
"date": {
"DateTime": {
"year": 2000,
"month": 5,
"day": 17,
"hour": 23,
"minute": 18,
"second": 27,
"tz_before_gmt": true,
"tz_hour": 4,
"tz_minute": 0
}
},
"others": {
"X-Accept-Language": [
"en"
],
"X-Mailer": [
"Mozilla 4.7 [en] (WinNT; I)"
]
}
},
"html_body": [
{
"header": {
"content_transfer_encoding": "7bit",
"content_type": {
"c_type": "text",
"c_subtype": "html",
"attributes": {
"charset": "us-ascii"
}
}
},
"contents": "<!doctype html public \"-//w3c//dtd html 4.0 transitional//en\">\r\n<html>\r\n<img SRC=\"cid:part1.39236103.1B697A54@example.com\" ALT=\"blue ball\" height=27 width=27><b></b>\r\n<p><b><font size=+2>Die Hasen und die Fr&ouml;sche</font></b>\r\n<p>Die Hasen klagten einst &uuml;ber ihre mi&szlig;liche Lage; \"wir leben\",\r\nsprach ein Redner, \"in steter Furcht vor Menschen und Tieren, eine Beute\r\nder Hunde, der Adler, ja fast aller Raubtiere! Unsere stete Angst ist &auml;rger\r\nals der Tod selbst. Auf, la&szlig;t uns ein f&uuml;r allemal sterben.\"\r\n<p>In einem nahen Teich wollten sie sich nun ers&auml;ufen; sie eilten\r\nihm zu; allein das au&szlig;erordentliche Get&ouml;se und ihre wunderbare\r\nGestalt erschreckte eine Menge Fr&ouml;sche, die am Ufer sa&szlig;en, so\r\nsehr, da&szlig; sie aufs schnellste untertauchten.\r\n<p>\"Halt\", rief nun eben dieser Sprecher, \"wir wollen das Ers&auml;ufen\r\nnoch ein wenig aufschieben, denn auch uns f&uuml;rchten, wie ihr seht,\r\neinige Tiere, welche also wohl noch ungl&uuml;cklicher sein m&uuml;ssen\r\nals wir.\"\r\n<p><img SRC=\"cid:part2.39236103.1B697A54@example.com\" ALT=\"red ball\" height=27 width=27></html>\r\n\r"
"headers_other": {
"X-Mailer": {
"Text": "Mozilla 4.7 [en] (WinNT; I)"
},
2,
3
"X-Accept-Language": {
"Text": "en"
}
},
"headers_offsets": [
{
"name": {
"Rfc": "message_id"
},
"start": 11,
"end": 45
},
{
"name": {
"Rfc": "date"
},
"start": 50,
"end": 84
},
{
"name": {
"Rfc": "from"
},
"start": 89,
"end": 126
},
{
"name": {
"Other": "X-Mailer"
},
"start": 135,
"end": 165
},
{
"name": {
"Other": "X-Accept-Language"
},
"start": 183,
"end": 188
},
{
"name": {
"Rfc": "mime_version"
},
"start": 201,
"end": 207
},
{
"name": {
"Rfc": "to"
},
"start": 210,
"end": 277
},
{
"name": {
"Rfc": "subject"
},
"start": 285,
"end": 331
},
{
"name": {
"Rfc": "content_type"
},
"start": 344,
"end": 413
}
],
"html_body": [
1,
4,
5
],
"text_body": [
{
"contents": "Die Hasen und die Frösche Die Hasen klagten einst über ihre mißliche Lage; \"wir leben\", sprach ein Redner, \"in steter Furcht vor Menschen und Tieren, eine Beute der Hunde, der Adler, ja fast aller Raubtiere! Unsere stete Angst ist ärger als der Tod selbst. Auf, laßt uns ein für allemal sterben.\" In einem nahen Teich wollten sie sich nun ersäufen; sie eilten ihm zu; allein das außerordentliche Getöse und ihre wunderbare Gestalt erschreckte eine Menge Frösche, die am Ufer saßen, so sehr, daß sie aufs schnellste untertauchten. \"Halt\", rief nun eben dieser Sprecher, \"wir wollen das Ersäufen noch ein wenig aufschieben, denn auch uns fürchten, wie ihr seht, einige Tiere, welche also wohl noch unglücklicher sein müssen als wir.\""
},
2,
3
1,
4,
5
],
"attachments": [
2,
3,
4,
5
],
"parts": [
{
"Binary": {
"header": {
"content_disposition": {
"c_type": "inline",
"Multipart": {
"content_type": {
"ContentType": {
"c_type": "multipart",
"c_subtype": "related",
"attributes": {
"filename": "C:TEMPnsmailV0.png"
"boundary": "------------8E6A06810565BCAB5E1F7D97"
}
}
}
}
},
{
"Html": {
"headers": {
"content_transfer_encoding": {
"Text": "7bit"
},
"content_id": "part1.39236103.1B697A54@example.com",
"content_transfer_encoding": "base64",
"content_type": {
"c_type": "image",
"c_subtype": "png"
"ContentType": {
"c_type": "text",
"c_subtype": "html",
"attributes": {
"charset": "us-ascii"
}
}
}
},
"contents": [
"body": "<!doctype html public \"-//w3c//dtd html 4.0 transitional//en\">\r\n<html>\r\n<img SRC=\"cid:part1.39236103.1B697A54@example.com\" ALT=\"blue ball\" height=27 width=27><b></b>\r\n<p><b><font size=+2>Die Hasen und die Fr&ouml;sche</font></b>\r\n<p>Die Hasen klagten einst &uuml;ber ihre mi&szlig;liche Lage; \"wir leben\",\r\nsprach ein Redner, \"in steter Furcht vor Menschen und Tieren, eine Beute\r\nder Hunde, der Adler, ja fast aller Raubtiere! Unsere stete Angst ist &auml;rger\r\nals der Tod selbst. Auf, la&szlig;t uns ein f&uuml;r allemal sterben.\"\r\n<p>In einem nahen Teich wollten sie sich nun ers&auml;ufen; sie eilten\r\nihm zu; allein das au&szlig;erordentliche Get&ouml;se und ihre wunderbare\r\nGestalt erschreckte eine Menge Fr&ouml;sche, die am Ufer sa&szlig;en, so\r\nsehr, da&szlig; sie aufs schnellste untertauchten.\r\n<p>\"Halt\", rief nun eben dieser Sprecher, \"wir wollen das Ers&auml;ufen\r\nnoch ein wenig aufschieben, denn auch uns f&uuml;rchten, wie ihr seht,\r\neinige Tiere, welche also wohl noch ungl&uuml;cklicher sein m&uuml;ssen\r\nals wir.\"\r\n<p><img SRC=\"cid:part2.39236103.1B697A54@example.com\" ALT=\"red ball\" height=27 width=27></html>\r\n\r"
}
},
{
"Binary": {
"headers": {
"content_disposition": {
"ContentType": {
"c_type": "inline",
"attributes": {
"filename": "C:TEMPnsmailV0.png"
}
}
},
"content_id": {
"Text": "part1.39236103.1B697A54@example.com"
},
"content_transfer_encoding": {
"Text": "base64"
},
"content_type": {
"ContentType": {
"c_type": "image",
"c_subtype": "png"
}
}
},
"body": [
137,
80,
78,
@@ -1587,21 +1694,29 @@ eSBZdmVzIFBpZ3VldDZzO7wAAAAASUVORK5CYII=
},
{
"Binary": {
"header": {
"headers": {
"content_transfer_encoding": {
"Text": "base64"
},
"content_disposition": {
"c_type": "inline",
"attributes": {
"filename": "C:TEMPnsmailNM.png"
"ContentType": {
"c_type": "inline",
"attributes": {
"filename": "C:TEMPnsmailNM.png"
}
}
},
"content_id": "part2.39236103.1B697A54@example.com",
"content_transfer_encoding": "base64",
"content_id": {
"Text": "part2.39236103.1B697A54@example.com"
},
"content_type": {
"c_type": "image",
"c_subtype": "png"
"ContentType": {
"c_type": "image",
"c_subtype": "png"
}
}
},
"contents": [
"body": [
137,
80,
78,
@@ -3060,23 +3175,29 @@ eSBZdmVzIFBpZ3VldDZzO7wAAAAASUVORK5CYII=
},
{
"InlineBinary": {
"header": {
"content_disposition": {
"c_type": "inline",
"attributes": {
"filename": "greenball.png"
"headers": {
"content_transfer_encoding": {
"Text": "base64"
},
"content_type": {
"ContentType": {
"c_type": "image",
"c_subtype": "png",
"attributes": {
"name": "greenball.png"
}
}
},
"content_transfer_encoding": "base64",
"content_type": {
"c_type": "image",
"c_subtype": "png",
"attributes": {
"name": "greenball.png"
"content_disposition": {
"ContentType": {
"c_type": "inline",
"attributes": {
"filename": "greenball.png"
}
}
}
},
"contents": [
"body": [
137,
80,
78,
@@ -4380,23 +4501,29 @@ eSBZdmVzIFBpZ3VldDZzO7wAAAAASUVORK5CYII=
},
{
"InlineBinary": {
"header": {
"headers": {
"content_disposition": {
"c_type": "inline",
"attributes": {
"filename": "blueball.png"
"ContentType": {
"c_type": "inline",
"attributes": {
"filename": "blueball.png"
}
}
},
"content_transfer_encoding": "base64",
"content_type": {
"c_type": "image",
"c_subtype": "png",
"attributes": {
"name": "blueball.png"
"ContentType": {
"c_type": "image",
"c_subtype": "png",
"attributes": {
"name": "blueball.png"
}
}
},
"content_transfer_encoding": {
"Text": "base64"
}
},
"contents": [
"body": [
137,
80,
78,
@@ -5725,5 +5852,34 @@ eSBZdmVzIFBpZ3VldDZzO7wAAAAASUVORK5CYII=
]
}
}
]
],
"structure": {
"List": [
{
"MultiPart": [
0,
[
{
"Part": 1
},
{
"Part": 2
},
{
"Part": 3
}
]
]
},
{
"Part": 4
},
{
"Part": 5
}
]
},
"offset_header": 0,
"offset_body": 415,
"offset_end": 10133
}
+124 -31
View File
@@ -29,17 +29,18 @@ n wenig aufschieben, denn auch uns f=FCrchten, wie ihr seht, einige Tiere=
---- EXPECTED STRUCTURE ----
{
"header": {
"date": {
"year": 2000,
"month": 5,
"day": 17,
"hour": 23,
"minute": 41,
"second": 7,
"tz_before_gmt": true,
"tz_hour": 4,
"tz_minute": 0
"headers_rfc": {
"content_type": {
"ContentType": {
"c_type": "text",
"c_subtype": "plain",
"attributes": {
"charset": "iso-8859-1"
}
}
},
"mime_version": {
"Text": "1.0"
},
"from": {
"Address": {
@@ -47,40 +48,132 @@ n wenig aufschieben, denn auch uns f=FCrchten, wie ihr seht, einige Tiere=
"address": "dwsauder@example.com"
}
},
"message_id": "39236653.CAA8A090@example.com",
"mime_version": "1.0",
"subject": "Die Hasen und die Frösche",
"to": {
"Address": {
"name": "Jürgen Schmürgen",
"address": "schmuergen@example.com"
}
},
"content_transfer_encoding": "quoted-printable",
"content_type": {
"c_type": "text",
"c_subtype": "plain",
"attributes": {
"charset": "iso-8859-1"
"message_id": {
"Text": "39236653.CAA8A090@example.com"
},
"content_transfer_encoding": {
"Text": "quoted-printable"
},
"date": {
"DateTime": {
"year": 2000,
"month": 5,
"day": 17,
"hour": 23,
"minute": 41,
"second": 7,
"tz_before_gmt": true,
"tz_hour": 4,
"tz_minute": 0
}
},
"others": {
"X-Accept-Language": [
"en"
],
"X-Mailer": [
"Mozilla 4.7 [en] (WinNT; I)"
]
"subject": {
"Text": "Die Hasen und die Frösche"
}
},
"html_body": [
"headers_other": {
"X-Mailer": {
"Text": "Mozilla 4.7 [en] (WinNT; I)"
},
"X-Accept-Language": {
"Text": "en"
}
},
"headers_offsets": [
{
"contents": "<html><body>Die Hasen und die Frösche<br/><br/>Die Hasen klagten einst über ihre mißliche Lage; \"wir leben\", sprach ein Redner, \"in steter Furcht vor Menschen und Tieren, eine Beute der Hunde, der Adler, ja fast aller Raubtiere! Unsere stete Angst ist ärger als der Tod selbst. Auf, laßt uns ein für allemal sterben.\" <br/><br/>In einem nahen Teich wollten sie sich nun ersäufen; sie eilten ihm zu; allein das außerordentliche Getöse und ihre wunderbare Gestalt erschreckte eine Menge Frösche, die am Ufer saßen, so sehr, daß sie aufs schnellste untertauchten. <br/><br/>\"Halt\", rief nun eben dieser Sprecher, \"wir wollen das Ersäufen noch ein wenig aufschieben, denn auch uns fürchten, wie ihr seht, einige Tiere, welche also wohl noch unglücklicher sein müssen als wir.\"<br/></body></html>"
"name": {
"Rfc": "message_id"
},
"start": 11,
"end": 45
},
{
"name": {
"Rfc": "date"
},
"start": 50,
"end": 84
},
{
"name": {
"Rfc": "from"
},
"start": 89,
"end": 126
},
{
"name": {
"Other": "X-Mailer"
},
"start": 135,
"end": 165
},
{
"name": {
"Other": "X-Accept-Language"
},
"start": 183,
"end": 188
},
{
"name": {
"Rfc": "mime_version"
},
"start": 201,
"end": 207
},
{
"name": {
"Rfc": "to"
},
"start": 210,
"end": 277
},
{
"name": {
"Rfc": "subject"
},
"start": 285,
"end": 332
},
{
"name": {
"Rfc": "content_type"
},
"start": 345,
"end": 378
},
{
"name": {
"Rfc": "content_transfer_encoding"
},
"start": 404,
"end": 423
}
],
"html_body": [
0
],
"text_body": [
0
],
"parts": [
{
"contents": "Die Hasen und die Frösche\n\nDie Hasen klagten einst über ihre mißliche Lage; \"wir leben\", sprach ein Redner, \"in steter Furcht vor Menschen und Tieren, eine Beute der Hunde, der Adler, ja fast aller Raubtiere! Unsere stete Angst ist ärger als der Tod selbst. Auf, laßt uns ein für allemal sterben.\" \n\nIn einem nahen Teich wollten sie sich nun ersäufen; sie eilten ihm zu; allein das außerordentliche Getöse und ihre wunderbare Gestalt erschreckte eine Menge Frösche, die am Ufer saßen, so sehr, daß sie aufs schnellste untertauchten. \n\n\"Halt\", rief nun eben dieser Sprecher, \"wir wollen das Ersäufen noch ein wenig aufschieben, denn auch uns fürchten, wie ihr seht, einige Tiere, welche also wohl noch unglücklicher sein müssen als wir.\"\n"
"Text": {
"body": "Die Hasen und die Frösche\n\nDie Hasen klagten einst über ihre mißliche Lage; \"wir leben\", sprach ein Redner, \"in steter Furcht vor Menschen und Tieren, eine Beute der Hunde, der Adler, ja fast aller Raubtiere! Unsere stete Angst ist ärger als der Tod selbst. Auf, laßt uns ein für allemal sterben.\" \n\nIn einem nahen Teich wollten sie sich nun ersäufen; sie eilten ihm zu; allein das außerordentliche Getöse und ihre wunderbare Gestalt erschreckte eine Menge Frösche, die am Ufer saßen, so sehr, daß sie aufs schnellste untertauchten. \n\n\"Halt\", rief nun eben dieser Sprecher, \"wir wollen das Ersäufen noch ein wenig aufschieben, denn auch uns fürchten, wie ihr seht, einige Tiere, welche also wohl noch unglücklicher sein müssen als wir.\"\n"
}
}
]
],
"structure": {
"Part": 0
},
"offset_header": 0,
"offset_body": 425,
"offset_end": 1231
}
+140 -50
View File
@@ -58,17 +58,18 @@ vAAAAABJRU5ErkJggg==
---- EXPECTED STRUCTURE ----
{
"header": {
"date": {
"year": 2000,
"month": 5,
"day": 19,
"hour": 10,
"minute": 23,
"second": 16,
"tz_before_gmt": true,
"tz_hour": 4,
"tz_minute": 0
"headers_rfc": {
"content_type": {
"ContentType": {
"c_type": "multipart",
"c_subtype": "mixed",
"attributes": {
"boundary": "-1463757054-170444605-958746196=:8452"
}
}
},
"subject": {
"Text": "PNG graphic"
},
"from": {
"Address": {
@@ -76,64 +77,140 @@ vAAAAABJRU5ErkJggg==
"address": "doug@penguin.example.com"
}
},
"message_id": "Pine.LNX.4.21.0005191019440.8452-101000@penguin.example.com",
"mime_version": "1.0",
"subject": "PNG graphic",
"mime_version": {
"Text": "1.0"
},
"message_id": {
"Text": "Pine.LNX.4.21.0005191019440.8452-101000@penguin.example.com"
},
"to": {
"Address": {
"name": "Heinz Müller",
"address": "mueller@example.com"
}
},
"content_type": {
"c_type": "multipart",
"c_subtype": "mixed",
"attributes": {
"boundary": "-1463757054-170444605-958746196=:8452"
"date": {
"DateTime": {
"year": 2000,
"month": 5,
"day": 19,
"hour": 10,
"minute": 23,
"second": 16,
"tz_before_gmt": true,
"tz_hour": 4,
"tz_minute": 0
}
}
},
"html_body": [
"headers_offsets": [
{
"contents": "<html><body></body></html>"
"name": {
"Rfc": "date"
},
"start": 5,
"end": 45
},
{
"name": {
"Rfc": "from"
},
"start": 50,
"end": 91
},
{
"name": {
"Rfc": "to"
},
"start": 94,
"end": 150
},
{
"name": {
"Rfc": "subject"
},
"start": 158,
"end": 172
},
{
"name": {
"Rfc": "message_id"
},
"start": 183,
"end": 247
},
{
"name": {
"Rfc": "mime_version"
},
"start": 260,
"end": 266
},
{
"name": {
"Rfc": "content_type"
},
"start": 279,
"end": 347
}
],
"html_body": [
0
],
"text_body": [
{
"header": {
"content_type": {
"c_type": "text",
"c_subtype": "plain",
"attributes": {
"charset": "US-ASCII"
}
}
},
"contents": "\r"
}
0
],
"attachments": [
1
],
"parts": [
{
"Binary": {
"header": {
"content_description": "red ball",
"content_disposition": {
"c_type": "attachment",
"attributes": {
"filename": "redball.png"
}
},
"content_id": "Pine.LNX.4.21.0005191023160.8452@penguin.example.com",
"content_transfer_encoding": "BASE64",
"Text": {
"headers": {
"content_type": {
"c_type": "application",
"c_subtype": "octet-stream",
"attributes": {
"name": "redball.png"
"ContentType": {
"c_type": "text",
"c_subtype": "plain",
"attributes": {
"charset": "US-ASCII"
}
}
}
},
"contents": [
"body": "\r"
}
},
{
"Binary": {
"headers": {
"content_id": {
"Text": "Pine.LNX.4.21.0005191023160.8452@penguin.example.com"
},
"content_description": {
"Text": "red ball"
},
"content_transfer_encoding": {
"Text": "BASE64"
},
"content_type": {
"ContentType": {
"c_type": "application",
"c_subtype": "octet-stream",
"attributes": {
"name": "redball.png"
}
}
},
"content_disposition": {
"ContentType": {
"c_type": "attachment",
"attributes": {
"filename": "redball.png"
}
}
}
},
"body": [
137,
80,
78,
@@ -1590,5 +1667,18 @@ vAAAAABJRU5ErkJggg==
]
}
}
]
],
"structure": {
"List": [
{
"Part": 0
},
{
"Part": 1
}
]
},
"offset_header": 0,
"offset_body": 351,
"offset_end": 2999
}
+161 -59
View File
@@ -59,27 +59,23 @@ Birds of a feather flock together.
---- EXPECTED STRUCTURE ----
{
"header": {
"headers_rfc": {
"date": {
"year": 2000,
"month": 5,
"day": 17,
"hour": 23,
"minute": 50,
"second": 4,
"tz_before_gmt": true,
"tz_hour": 4,
"tz_minute": 0
},
"from": {
"Address": {
"name": "Doug Sauder",
"address": "dwsauder@example.com"
"DateTime": {
"year": 2000,
"month": 5,
"day": 17,
"hour": 23,
"minute": 50,
"second": 4,
"tz_before_gmt": true,
"tz_hour": 4,
"tz_minute": 0
}
},
"message_id": "3923686C.99FB5E36@example.com",
"mime_version": "1.0",
"subject": "Test message from Netscape Communicator 4.7",
"mime_version": {
"Text": "1.0"
},
"to": {
"Address": {
"name": "Joe Blow",
@@ -87,63 +83,169 @@ Birds of a feather flock together.
}
},
"content_type": {
"c_type": "multipart",
"c_subtype": "mixed",
"attributes": {
"boundary": "------------77060D866A66DC8D0921E051"
"ContentType": {
"c_type": "multipart",
"c_subtype": "mixed",
"attributes": {
"boundary": "------------77060D866A66DC8D0921E051"
}
}
},
"others": {
"X-Accept-Language": [
"en"
],
"X-Mailer": [
"Mozilla 4.7 [en] (WinNT; I)"
]
"message_id": {
"Text": "3923686C.99FB5E36@example.com"
},
"from": {
"Address": {
"name": "Doug Sauder",
"address": "dwsauder@example.com"
}
},
"subject": {
"Text": "Test message from Netscape Communicator 4.7"
}
},
"html_body": [
{
"contents": "<html><body><br/>The Hare and the Tortoise <br/> <br/>A HARE one day ridiculed the short feet and slow pace of the Tortoise,<br/>who replied, laughing: \"Though you be swift as the wind, I will beat<br/>you in a race.\" The Hare, believing her assertion to be simply<br/>impossible, assented to the proposal; and they agreed that the Fox<br/>should choose the course and fix the goal. On the day appointed for the<br/>race the two started together. The Tortoise never for a moment stopped,<br/>but went on with a slow but steady pace straight to the end of the<br/>course. The Hare, lying down by the wayside, fell fast asleep. At last<br/>waking up, and moving as fast as he could, he saw the Tortoise had<br/>reached the goal, and was comfortably dozing after her fatigue. <br/> <br/>Slow but steady wins the race.</body></html>"
"headers_other": {
"X-Mailer": {
"Text": "Mozilla 4.7 [en] (WinNT; I)"
},
"X-Accept-Language": {
"Text": "en"
}
},
"headers_offsets": [
{
"name": {
"Rfc": "message_id"
},
"start": 11,
"end": 45
},
{
"name": {
"Rfc": "date"
},
"start": 50,
"end": 84
},
{
"name": {
"Rfc": "from"
},
"start": 89,
"end": 126
},
{
"name": {
"Other": "X-Mailer"
},
"start": 135,
"end": 165
},
{
"name": {
"Other": "X-Accept-Language"
},
"start": 183,
"end": 188
},
{
"name": {
"Rfc": "mime_version"
},
"start": 201,
"end": 207
},
{
"name": {
"Rfc": "to"
},
"start": 210,
"end": 240
},
{
"name": {
"Rfc": "subject"
},
"start": 248,
"end": 294
},
{
"name": {
"Rfc": "content_type"
},
"start": 307,
"end": 376
}
],
"html_body": [
0
],
"text_body": [
{
"header": {
"content_transfer_encoding": "7bit",
"content_type": {
"c_type": "text",
"c_subtype": "plain",
"attributes": {
"charset": "us-ascii"
}
}
},
"contents": "\r\nThe Hare and the Tortoise \r\n \r\nA HARE one day ridiculed the short feet and slow pace of the Tortoise,\r\nwho replied, laughing: \"Though you be swift as the wind, I will beat\r\nyou in a race.\" The Hare, believing her assertion to be simply\r\nimpossible, assented to the proposal; and they agreed that the Fox\r\nshould choose the course and fix the goal. On the day appointed for the\r\nrace the two started together. The Tortoise never for a moment stopped,\r\nbut went on with a slow but steady pace straight to the end of the\r\ncourse. The Hare, lying down by the wayside, fell fast asleep. At last\r\nwaking up, and moving as fast as he could, he saw the Tortoise had\r\nreached the goal, and was comfortably dozing after her fatigue. \r\n \r\nSlow but steady wins the race.\r"
}
0
],
"attachments": [
1
],
"parts": [
{
"Text": {
"header": {
"content_disposition": {
"c_type": "inline",
"attributes": {
"filename": "farmerandstork.txt"
}
"headers": {
"content_transfer_encoding": {
"Text": "7bit"
},
"content_transfer_encoding": "7bit",
"content_type": {
"c_type": "text",
"c_subtype": "plain",
"attributes": {
"charset": "us-ascii",
"name": "farmerandstork.txt"
"ContentType": {
"c_type": "text",
"c_subtype": "plain",
"attributes": {
"charset": "us-ascii"
}
}
}
},
"contents": "\r\nThe Farmer and the Stork \r\n \r\nA FARMER placed nets on his newly-sown plowlands and caught a\r\nnumber of Cranes, which came to pick up his seed. With them he\r\ntrapped a Stork that had fractured his leg in the net and was\r\nearnestly beseeching the Farmer to spare his life. \"Pray save\r\nme, Master,\" he said, \"and let me go free this once. My broken\r\nlimb should excite your pity. Besides, I am no Crane, I am a\r\nStork, a bird of excellent character; and see how I love and\r\nslave for my father and mother. Look too, at my feathers--\r\nthey are not the least like those of a Crane.\" The Farmer \r\nlaughed aloud and said, \"It may be all as you say, I only know \r\nthis: I have taken you with these robbers, the Cranes, and you \r\nmust die in their company.\" \r\n \r\nBirds of a feather flock together. \r\n\r"
"body": "\r\nThe Hare and the Tortoise \r\n \r\nA HARE one day ridiculed the short feet and slow pace of the Tortoise,\r\nwho replied, laughing: \"Though you be swift as the wind, I will beat\r\nyou in a race.\" The Hare, believing her assertion to be simply\r\nimpossible, assented to the proposal; and they agreed that the Fox\r\nshould choose the course and fix the goal. On the day appointed for the\r\nrace the two started together. The Tortoise never for a moment stopped,\r\nbut went on with a slow but steady pace straight to the end of the\r\ncourse. The Hare, lying down by the wayside, fell fast asleep. At last\r\nwaking up, and moving as fast as he could, he saw the Tortoise had\r\nreached the goal, and was comfortably dozing after her fatigue. \r\n \r\nSlow but steady wins the race.\r"
}
},
{
"Text": {
"headers": {
"content_disposition": {
"ContentType": {
"c_type": "inline",
"attributes": {
"filename": "farmerandstork.txt"
}
}
},
"content_transfer_encoding": {
"Text": "7bit"
},
"content_type": {
"ContentType": {
"c_type": "text",
"c_subtype": "plain",
"attributes": {
"charset": "us-ascii",
"name": "farmerandstork.txt"
}
}
}
},
"body": "\r\nThe Farmer and the Stork \r\n \r\nA FARMER placed nets on his newly-sown plowlands and caught a\r\nnumber of Cranes, which came to pick up his seed. With them he\r\ntrapped a Stork that had fractured his leg in the net and was\r\nearnestly beseeching the Farmer to spare his life. \"Pray save\r\nme, Master,\" he said, \"and let me go free this once. My broken\r\nlimb should excite your pity. Besides, I am no Crane, I am a\r\nStork, a bird of excellent character; and see how I love and\r\nslave for my father and mother. Look too, at my feathers--\r\nthey are not the least like those of a Crane.\" The Farmer \r\nlaughed aloud and said, \"It may be all as you say, I only know \r\nthis: I have taken you with these robbers, the Cranes, and you \r\nmust die in their company.\" \r\n \r\nBirds of a feather flock together. \r\n\r"
}
}
]
],
"structure": {
"List": [
{
"Part": 0
},
{
"Part": 1
}
]
},
"offset_header": 0,
"offset_body": 378,
"offset_end": 2368
}
+157 -53
View File
@@ -62,17 +62,34 @@ als wir."
---- EXPECTED STRUCTURE ----
{
"header": {
"headers_rfc": {
"message_id": {
"Text": "392359CF.DFF4527@example.com"
},
"to": {
"Address": {
"name": "Heinz Müller",
"address": "mueller@example.com"
}
},
"subject": {
"Text": "Die Hasen und die Frösche (Netscape Communicator 4.7)"
},
"date": {
"year": 2000,
"month": 5,
"day": 17,
"hour": 22,
"minute": 47,
"second": 43,
"tz_before_gmt": true,
"tz_hour": 4,
"tz_minute": 0
"DateTime": {
"year": 2000,
"month": 5,
"day": 17,
"hour": 22,
"minute": 47,
"second": 43,
"tz_before_gmt": true,
"tz_hour": 4,
"tz_minute": 0
}
},
"mime_version": {
"Text": "1.0"
},
"from": {
"Address": {
@@ -80,59 +97,146 @@ als wir."
"address": "dwsauder@example.com"
}
},
"message_id": "392359CF.DFF4527@example.com",
"mime_version": "1.0",
"subject": "Die Hasen und die Frösche (Netscape Communicator 4.7)",
"to": {
"Address": {
"name": "Heinz Müller",
"address": "mueller@example.com"
}
},
"content_type": {
"c_type": "multipart",
"c_subtype": "alternative",
"attributes": {
"boundary": "------------9D454F23DA86BCD63FA3805F"
"ContentType": {
"c_type": "multipart",
"c_subtype": "alternative",
"attributes": {
"boundary": "------------9D454F23DA86BCD63FA3805F"
}
}
},
"others": {
"X-Accept-Language": [
"en"
],
"X-Mailer": [
"Mozilla 4.7 [en] (WinNT; I)"
]
}
},
"html_body": [
"headers_other": {
"X-Accept-Language": {
"Text": "en"
},
"X-Mailer": {
"Text": "Mozilla 4.7 [en] (WinNT; I)"
}
},
"headers_offsets": [
{
"header": {
"content_transfer_encoding": "7bit",
"content_type": {
"c_type": "text",
"c_subtype": "html",
"attributes": {
"charset": "us-ascii"
}
}
"name": {
"Rfc": "message_id"
},
"contents": "<!doctype html public \"-//w3c//dtd html 4.0 transitional//en\">\r\n<html>\r\n<b>Die Hasen und die Fr&ouml;sche</b>\r\n<p>Die Hasen klagten einst &uuml;ber ihre mi&szlig;liche Lage; \"wir leben\",\r\nsprach ein Redner, \"in steter Furcht vor Menschen und Tieren, eine Beute\r\nder Hunde, der Adler, ja fast aller Raubtiere! Unsere stete Angst ist &auml;rger\r\nals der Tod selbst. Auf, la&szlig;t uns ein f&uuml;r allemal sterben.\"\r\n<p>In einem nahen Teich wollten sie sich nun ers&auml;ufen; sie eilten\r\nihm zu; allein das au&szlig;erordentliche Get&ouml;se und ihre wunderbare\r\nGestalt erschreckte eine Menge Fr&ouml;sche, die am Ufer sa&szlig;en, so\r\nsehr, da&szlig; sie aufs schnellste untertauchten.\r\n<p>\"Halt\", rief nun eben dieser Sprecher, \"wir wollen das Ers&auml;ufen\r\nnoch ein wenig aufschieben, denn auch uns f&uuml;rchten, wie ihr seht,\r\neinige Tiere, welche also wohl noch ungl&uuml;cklicher sein m&uuml;ssen\r\nals wir.\"\r\n<br>&nbsp;\r\n<br>&nbsp;</html>\r\n\r"
"start": 11,
"end": 44
},
{
"name": {
"Rfc": "date"
},
"start": 49,
"end": 83
},
{
"name": {
"Rfc": "from"
},
"start": 88,
"end": 125
},
{
"name": {
"Other": "X-Mailer"
},
"start": 134,
"end": 164
},
{
"name": {
"Other": "X-Accept-Language"
},
"start": 182,
"end": 187
},
{
"name": {
"Rfc": "mime_version"
},
"start": 200,
"end": 206
},
{
"name": {
"Rfc": "to"
},
"start": 209,
"end": 265
},
{
"name": {
"Rfc": "subject"
},
"start": 273,
"end": 348
},
{
"name": {
"Rfc": "content_type"
},
"start": 361,
"end": 436
}
],
"html_body": [
1
],
"text_body": [
0
],
"parts": [
{
"header": {
"content_transfer_encoding": "quoted-printable",
"content_type": {
"c_type": "text",
"c_subtype": "plain",
"attributes": {
"charset": "iso-8859-1"
"Text": {
"headers": {
"content_type": {
"ContentType": {
"c_type": "text",
"c_subtype": "plain",
"attributes": {
"charset": "iso-8859-1"
}
}
},
"content_transfer_encoding": {
"Text": "quoted-printable"
}
}
},
"contents": "Die Hasen und die Frösche\n\nDie Hasen klagten einst über ihre mißliche Lage; \"wir leben\", sprach ein\nRedner, \"in steter Furcht vor Menschen und Tieren, eine Beute der Hunde,\nder Adler, ja fast aller Raubtiere! Unsere stete Angst ist ärger als der\nTod selbst. Auf, laßt uns ein für allemal sterben.\"\n\nIn einem nahen Teich wollten sie sich nun ersäufen; sie eilten ihm zu;\nallein das außerordentliche Getöse und ihre wunderbare Gestalt\nerschreckte eine Menge Frösche, die am Ufer saßen, so sehr, daß sie aufs\nschnellste untertauchten.\n\n\"Halt\", rief nun eben dieser Sprecher, \"wir wollen das Ersäufen noch ein\nwenig aufschieben, denn auch uns fürchten, wie ihr seht, einige Tiere,\nwelche also wohl noch unglücklicher sein müssen als wir.\"\n\n\n"
},
"body": "Die Hasen und die Frösche\n\nDie Hasen klagten einst über ihre mißliche Lage; \"wir leben\", sprach ein\nRedner, \"in steter Furcht vor Menschen und Tieren, eine Beute der Hunde,\nder Adler, ja fast aller Raubtiere! Unsere stete Angst ist ärger als der\nTod selbst. Auf, laßt uns ein für allemal sterben.\"\n\nIn einem nahen Teich wollten sie sich nun ersäufen; sie eilten ihm zu;\nallein das außerordentliche Getöse und ihre wunderbare Gestalt\nerschreckte eine Menge Frösche, die am Ufer saßen, so sehr, daß sie aufs\nschnellste untertauchten.\n\n\"Halt\", rief nun eben dieser Sprecher, \"wir wollen das Ersäufen noch ein\nwenig aufschieben, denn auch uns fürchten, wie ihr seht, einige Tiere,\nwelche also wohl noch unglücklicher sein müssen als wir.\"\n\n\n"
}
},
{
"Html": {
"headers": {
"content_type": {
"ContentType": {
"c_type": "text",
"c_subtype": "html",
"attributes": {
"charset": "us-ascii"
}
}
},
"content_transfer_encoding": {
"Text": "7bit"
}
},
"body": "<!doctype html public \"-//w3c//dtd html 4.0 transitional//en\">\r\n<html>\r\n<b>Die Hasen und die Fr&ouml;sche</b>\r\n<p>Die Hasen klagten einst &uuml;ber ihre mi&szlig;liche Lage; \"wir leben\",\r\nsprach ein Redner, \"in steter Furcht vor Menschen und Tieren, eine Beute\r\nder Hunde, der Adler, ja fast aller Raubtiere! Unsere stete Angst ist &auml;rger\r\nals der Tod selbst. Auf, la&szlig;t uns ein f&uuml;r allemal sterben.\"\r\n<p>In einem nahen Teich wollten sie sich nun ers&auml;ufen; sie eilten\r\nihm zu; allein das au&szlig;erordentliche Get&ouml;se und ihre wunderbare\r\nGestalt erschreckte eine Menge Fr&ouml;sche, die am Ufer sa&szlig;en, so\r\nsehr, da&szlig; sie aufs schnellste untertauchten.\r\n<p>\"Halt\", rief nun eben dieser Sprecher, \"wir wollen das Ers&auml;ufen\r\nnoch ein wenig aufschieben, denn auch uns f&uuml;rchten, wie ihr seht,\r\neinige Tiere, welche also wohl noch ungl&uuml;cklicher sein m&uuml;ssen\r\nals wir.\"\r\n<br>&nbsp;\r\n<br>&nbsp;</html>\r\n\r"
}
}
]
],
"structure": {
"List": [
{
"Part": 0
},
{
"Part": 1
}
]
},
"offset_header": 0,
"offset_body": 440,
"offset_end": 2482
}
+207 -85
View File
@@ -138,17 +138,30 @@ eSBZdmVzIFBpZ3VldDZzO7wAAAAASUVORK5CYII=
---- EXPECTED STRUCTURE ----
{
"header": {
"date": {
"year": 2000,
"month": 5,
"day": 17,
"hour": 23,
"minute": 6,
"second": 4,
"tz_before_gmt": true,
"tz_hour": 4,
"tz_minute": 0
"headers_rfc": {
"message_id": {
"Text": "39235E1C.1DC7EA90@example.com"
},
"mime_version": {
"Text": "1.0"
},
"to": {
"Address": {
"name": "Joe Blow",
"address": "blow@example.com"
}
},
"subject": {
"Text": "Test message from Netscape Communicator 4.7"
},
"content_type": {
"ContentType": {
"c_type": "multipart",
"c_subtype": "mixed",
"attributes": {
"boundary": "------------A1FCDEE154E03D875E5D6779"
}
}
},
"from": {
"Address": {
@@ -156,77 +169,155 @@ eSBZdmVzIFBpZ3VldDZzO7wAAAAASUVORK5CYII=
"address": "dwsauder@example.com"
}
},
"message_id": "39235E1C.1DC7EA90@example.com",
"mime_version": "1.0",
"subject": "Test message from Netscape Communicator 4.7",
"to": {
"Address": {
"name": "Joe Blow",
"address": "blow@example.com"
"date": {
"DateTime": {
"year": 2000,
"month": 5,
"day": 17,
"hour": 23,
"minute": 6,
"second": 4,
"tz_before_gmt": true,
"tz_hour": 4,
"tz_minute": 0
}
},
"content_type": {
"c_type": "multipart",
"c_subtype": "mixed",
"attributes": {
"boundary": "------------A1FCDEE154E03D875E5D6779"
}
},
"others": {
"X-Mailer": [
"Mozilla 4.7 [en] (WinNT; I)"
],
"X-Accept-Language": [
"en"
]
}
},
"html_body": [
{
"contents": "<html><body>Die Hasen und die Frösche<br/><br/>Die Hasen klagten einst über ihre mißliche Lage; \"wir leben\", sprach ein<br/>Redner, \"in steter Furcht vor Menschen und Tieren, eine Beute der Hunde,<br/>der Adler, ja fast aller Raubtiere! Unsere stete Angst ist ärger als der<br/>Tod selbst. Auf, laßt uns ein für allemal sterben.\"<br/><br/>In einem nahen Teich wollten sie sich nun ersäufen; sie eilten ihm zu;<br/>allein das außerordentliche Getöse und ihre wunderbare Gestalt<br/>erschreckte eine Menge Frösche, die am Ufer saßen, so sehr, daß sie aufs<br/>schnellste untertauchten.<br/><br/>\"Halt\", rief nun eben dieser Sprecher, \"wir wollen das Ersäufen noch ein<br/>wenig aufschieben, denn auch uns fürchten, wie ihr seht, einige Tiere,<br/>welche also wohl noch unglücklicher sein müssen als wir.\"<br/><br/><br/></body></html>"
"headers_other": {
"X-Mailer": {
"Text": "Mozilla 4.7 [en] (WinNT; I)"
},
"X-Accept-Language": {
"Text": "en"
}
},
"headers_offsets": [
{
"name": {
"Rfc": "message_id"
},
"start": 11,
"end": 45
},
{
"name": {
"Rfc": "date"
},
"start": 50,
"end": 84
},
{
"name": {
"Rfc": "from"
},
"start": 89,
"end": 126
},
{
"name": {
"Other": "X-Mailer"
},
"start": 135,
"end": 165
},
{
"name": {
"Other": "X-Accept-Language"
},
"start": 183,
"end": 188
},
{
"name": {
"Rfc": "mime_version"
},
"start": 201,
"end": 207
},
{
"name": {
"Rfc": "to"
},
"start": 210,
"end": 240
},
{
"name": {
"Rfc": "subject"
},
"start": 248,
"end": 294
},
{
"name": {
"Rfc": "content_type"
},
"start": 307,
"end": 376
}
],
"html_body": [
0,
1,
2
2,
3
],
"text_body": [
{
"header": {
"content_transfer_encoding": "quoted-printable",
"content_type": {
"c_type": "text",
"c_subtype": "plain",
"attributes": {
"charset": "iso-8859-1"
}
}
},
"contents": "Die Hasen und die Frösche\n\nDie Hasen klagten einst über ihre mißliche Lage; \"wir leben\", sprach ein\nRedner, \"in steter Furcht vor Menschen und Tieren, eine Beute der Hunde,\nder Adler, ja fast aller Raubtiere! Unsere stete Angst ist ärger als der\nTod selbst. Auf, laßt uns ein für allemal sterben.\"\n\nIn einem nahen Teich wollten sie sich nun ersäufen; sie eilten ihm zu;\nallein das außerordentliche Getöse und ihre wunderbare Gestalt\nerschreckte eine Menge Frösche, die am Ufer saßen, so sehr, daß sie aufs\nschnellste untertauchten.\n\n\"Halt\", rief nun eben dieser Sprecher, \"wir wollen das Ersäufen noch ein\nwenig aufschieben, denn auch uns fürchten, wie ihr seht, einige Tiere,\nwelche also wohl noch unglücklicher sein müssen als wir.\"\n\n\n"
},
0,
1,
2
2,
3
],
"attachments": [
1,
2,
3
],
"parts": [
{
"InlineBinary": {
"header": {
"content_disposition": {
"c_type": "inline",
"attributes": {
"filename": "redball.png"
}
"Text": {
"headers": {
"content_transfer_encoding": {
"Text": "quoted-printable"
},
"content_transfer_encoding": "base64",
"content_type": {
"c_type": "image",
"c_subtype": "png",
"attributes": {
"name": "redball.png"
"ContentType": {
"c_type": "text",
"c_subtype": "plain",
"attributes": {
"charset": "iso-8859-1"
}
}
}
},
"contents": [
"body": "Die Hasen und die Frösche\n\nDie Hasen klagten einst über ihre mißliche Lage; \"wir leben\", sprach ein\nRedner, \"in steter Furcht vor Menschen und Tieren, eine Beute der Hunde,\nder Adler, ja fast aller Raubtiere! Unsere stete Angst ist ärger als der\nTod selbst. Auf, laßt uns ein für allemal sterben.\"\n\nIn einem nahen Teich wollten sie sich nun ersäufen; sie eilten ihm zu;\nallein das außerordentliche Getöse und ihre wunderbare Gestalt\nerschreckte eine Menge Frösche, die am Ufer saßen, so sehr, daß sie aufs\nschnellste untertauchten.\n\n\"Halt\", rief nun eben dieser Sprecher, \"wir wollen das Ersäufen noch ein\nwenig aufschieben, denn auch uns fürchten, wie ihr seht, einige Tiere,\nwelche also wohl noch unglücklicher sein müssen als wir.\"\n\n\n"
}
},
{
"InlineBinary": {
"headers": {
"content_transfer_encoding": {
"Text": "base64"
},
"content_disposition": {
"ContentType": {
"c_type": "inline",
"attributes": {
"filename": "redball.png"
}
}
},
"content_type": {
"ContentType": {
"c_type": "image",
"c_subtype": "png",
"attributes": {
"name": "redball.png"
}
}
}
},
"body": [
137,
80,
78,
@@ -1685,23 +1776,29 @@ eSBZdmVzIFBpZ3VldDZzO7wAAAAASUVORK5CYII=
},
{
"InlineBinary": {
"header": {
"headers": {
"content_transfer_encoding": {
"Text": "base64"
},
"content_disposition": {
"c_type": "inline",
"attributes": {
"filename": "greenball.png"
"ContentType": {
"c_type": "inline",
"attributes": {
"filename": "greenball.png"
}
}
},
"content_transfer_encoding": "base64",
"content_type": {
"c_type": "image",
"c_subtype": "png",
"attributes": {
"name": "greenball.png"
"ContentType": {
"c_type": "image",
"c_subtype": "png",
"attributes": {
"name": "greenball.png"
}
}
}
},
"contents": [
"body": [
137,
80,
78,
@@ -3005,23 +3102,29 @@ eSBZdmVzIFBpZ3VldDZzO7wAAAAASUVORK5CYII=
},
{
"InlineBinary": {
"header": {
"headers": {
"content_disposition": {
"c_type": "inline",
"attributes": {
"filename": "blueball.png"
"ContentType": {
"c_type": "inline",
"attributes": {
"filename": "blueball.png"
}
}
},
"content_transfer_encoding": "base64",
"content_transfer_encoding": {
"Text": "base64"
},
"content_type": {
"c_type": "image",
"c_subtype": "png",
"attributes": {
"name": "blueball.png"
"ContentType": {
"c_type": "image",
"c_subtype": "png",
"attributes": {
"name": "blueball.png"
}
}
}
},
"contents": [
"body": [
137,
80,
78,
@@ -4350,5 +4453,24 @@ eSBZdmVzIFBpZ3VldDZzO7wAAAAASUVORK5CYII=
]
}
}
]
],
"structure": {
"List": [
{
"Part": 0
},
{
"Part": 1
},
{
"Part": 2
},
{
"Part": 3
}
]
},
"offset_header": 0,
"offset_body": 378,
"offset_end": 7534
}
+146 -56
View File
@@ -43,27 +43,7 @@ bGljaGVyIHNlaW4gbfxzc2VuIGFscyB3aXIuIiANDQoNDQo=
---- EXPECTED STRUCTURE ----
{
"header": {
"date": {
"year": 2000,
"month": 5,
"day": 19,
"hour": 10,
"minute": 26,
"second": 12,
"tz_before_gmt": true,
"tz_hour": 4,
"tz_minute": 0
},
"from": {
"Address": {
"name": "Doug Sauder",
"address": "doug@penguin.example.com"
}
},
"message_id": "Pine.LNX.4.21.0005191024380.8452-200000@penguin.example.com",
"mime_version": "1.0",
"subject": "Die Hasen und die Frösche",
"headers_rfc": {
"to": {
"AddressList": [
{
@@ -76,57 +56,167 @@ bGljaGVyIHNlaW4gbfxzc2VuIGFscyB3aXIuIiANDQoNDQo=
}
]
},
"mime_version": {
"Text": "1.0"
},
"date": {
"DateTime": {
"year": 2000,
"month": 5,
"day": 19,
"hour": 10,
"minute": 26,
"second": 12,
"tz_before_gmt": true,
"tz_hour": 4,
"tz_minute": 0
}
},
"from": {
"Address": {
"name": "Doug Sauder",
"address": "doug@penguin.example.com"
}
},
"subject": {
"Text": "Die Hasen und die Frösche"
},
"message_id": {
"Text": "Pine.LNX.4.21.0005191024380.8452-200000@penguin.example.com"
},
"content_type": {
"c_type": "multipart",
"c_subtype": "mixed",
"attributes": {
"boundary": "-1463757054-891160829-958746372=:8452"
"ContentType": {
"c_type": "multipart",
"c_subtype": "mixed",
"attributes": {
"boundary": "-1463757054-891160829-958746372=:8452"
}
}
}
},
"html_body": [
"headers_offsets": [
{
"contents": "<html><body></body></html>"
"name": {
"Rfc": "date"
},
"start": 5,
"end": 45
},
{
"name": {
"Rfc": "from"
},
"start": 50,
"end": 91
},
{
"name": {
"Rfc": "to"
},
"start": 94,
"end": 185
},
{
"name": {
"Rfc": "subject"
},
"start": 193,
"end": 240
},
{
"name": {
"Rfc": "message_id"
},
"start": 251,
"end": 315
},
{
"name": {
"Rfc": "mime_version"
},
"start": 328,
"end": 334
},
{
"name": {
"Rfc": "content_type"
},
"start": 347,
"end": 415
}
],
"html_body": [
0
],
"text_body": [
{
"header": {
"content_type": {
"c_type": "text",
"c_subtype": "plain",
"attributes": {
"charset": "US-ASCII"
}
}
},
"contents": "\r"
}
0
],
"attachments": [
1
],
"parts": [
{
"Text": {
"header": {
"content_description": "Short story in German",
"content_disposition": {
"c_type": "attachment",
"attributes": {
"filename": "HasenundFrösche.txt"
}
},
"content_id": "Pine.LNX.4.21.0005191026120.8452@penguin.example.com",
"content_transfer_encoding": "BASE64",
"headers": {
"content_type": {
"c_type": "text",
"c_subtype": "plain",
"attributes": {
"charset": "iso-8859-1",
"name": "HasenundFrösche.txt"
"ContentType": {
"c_type": "text",
"c_subtype": "plain",
"attributes": {
"charset": "US-ASCII"
}
}
}
},
"contents": "Die Hasen und die Frösche\r\r\n\r\r\nDie Hasen klagten einst über ihre mißliche Lage; \"wir leben\", sprach ein Redner, \"in steter Furcht vor Menschen und Tieren, eine Beute der Hunde, der Adler, ja fast aller Raubtiere! Unsere stete Angst ist ärger als der Tod selbst. Auf, laßt uns ein für allemal sterben.\" \r\r\n\r\r\nIn einem nahen Teich wollten sie sich nun ersäufen; sie eilten ihm zu; allein das außerordentliche Getöse und ihre wunderbare Gestalt erschreckte eine Menge Frösche, die am Ufer saßen, so sehr, daß sie aufs schnellste untertauchten. \r\r\n\r\r\n\"Halt\", rief nun eben dieser Sprecher, \"wir wollen das Ersäufen noch ein wenig aufschieben, denn auch uns fürchten, wie ihr seht, einige Tiere, welche also wohl noch unglücklicher sein müssen als wir.\" \r\r\n\r\r\n"
"body": "\r"
}
},
{
"Text": {
"headers": {
"content_type": {
"ContentType": {
"c_type": "text",
"c_subtype": "plain",
"attributes": {
"name": "HasenundFrösche.txt",
"charset": "iso-8859-1"
}
}
},
"content_description": {
"Text": "Short story in German"
},
"content_transfer_encoding": {
"Text": "BASE64"
},
"content_disposition": {
"ContentType": {
"c_type": "attachment",
"attributes": {
"filename": "HasenundFrösche.txt"
}
}
},
"content_id": {
"Text": "Pine.LNX.4.21.0005191026120.8452@penguin.example.com"
}
},
"body": "Die Hasen und die Frösche\r\r\n\r\r\nDie Hasen klagten einst über ihre mißliche Lage; \"wir leben\", sprach ein Redner, \"in steter Furcht vor Menschen und Tieren, eine Beute der Hunde, der Adler, ja fast aller Raubtiere! Unsere stete Angst ist ärger als der Tod selbst. Auf, laßt uns ein für allemal sterben.\" \r\r\n\r\r\nIn einem nahen Teich wollten sie sich nun ersäufen; sie eilten ihm zu; allein das außerordentliche Getöse und ihre wunderbare Gestalt erschreckte eine Menge Frösche, die am Ufer saßen, so sehr, daß sie aufs schnellste untertauchten. \r\r\n\r\r\n\"Halt\", rief nun eben dieser Sprecher, \"wir wollen das Ersäufen noch ein wenig aufschieben, denn auch uns fürchten, wie ihr seht, einige Tiere, welche also wohl noch unglücklicher sein müssen als wir.\" \r\r\n\r\r\n"
}
}
]
],
"structure": {
"List": [
{
"Part": 0
},
{
"Part": 1
}
]
},
"offset_header": 0,
"offset_body": 419,
"offset_end": 2168
}
+126 -33
View File
@@ -33,58 +33,151 @@ welche also wohl noch ungl=FCcklicher sein m=FCssen als wir."
---- EXPECTED STRUCTURE ----
{
"header": {
"date": {
"year": 2000,
"month": 5,
"day": 17,
"hour": 22,
"minute": 31,
"second": 57,
"tz_before_gmt": true,
"tz_hour": 4,
"tz_minute": 0
},
"headers_rfc": {
"from": {
"Address": {
"name": "Doug Sauder",
"address": "dwsauder@example.com"
}
},
"message_id": "3923561C.B7078DEF@example.com",
"mime_version": "1.0",
"subject": "Die Hasen und die Frösche (Netscape Communicator 4.7)",
"content_transfer_encoding": {
"Text": "quoted-printable"
},
"date": {
"DateTime": {
"year": 2000,
"month": 5,
"day": 17,
"hour": 22,
"minute": 31,
"second": 57,
"tz_before_gmt": true,
"tz_hour": 4,
"tz_minute": 0
}
},
"content_type": {
"ContentType": {
"c_type": "text",
"c_subtype": "plain",
"attributes": {
"charset": "iso-8859-1"
}
}
},
"to": {
"Address": {
"name": "Jürgen Schmürgen",
"address": "schmuergen@example.com"
}
},
"content_transfer_encoding": "quoted-printable",
"content_type": {
"c_type": "text",
"c_subtype": "plain",
"attributes": {
"charset": "iso-8859-1"
}
"mime_version": {
"Text": "1.0"
},
"others": {
"X-Accept-Language": [
"en"
],
"X-Mailer": [
"Mozilla 4.7 [en] (WinNT; I)"
]
"subject": {
"Text": "Die Hasen und die Frösche (Netscape Communicator 4.7)"
},
"message_id": {
"Text": "3923561C.B7078DEF@example.com"
}
},
"html_body": [
"headers_other": {
"X-Accept-Language": {
"Text": "en"
},
"X-Mailer": {
"Text": "Mozilla 4.7 [en] (WinNT; I)"
}
},
"headers_offsets": [
{
"contents": "<html><body>Die Hasen und die Frösche<br/><br/>Die Hasen klagten einst über ihre mißliche Lage; \"wir leben\", sprach ein<br/>Redner, \"in steter Furcht vor Menschen und Tieren, eine Beute der Hunde,<br/>der Adler, ja fast aller Raubtiere! Unsere stete Angst ist ärger als der<br/>Tod selbst. Auf, laßt uns ein für allemal sterben.\"<br/><br/>In einem nahen Teich wollten sie sich nun ersäufen; sie eilten ihm zu;<br/>allein das außerordentliche Getöse und ihre wunderbare Gestalt<br/>erschreckte eine Menge Frösche, die am Ufer saßen, so sehr, daß sie aufs<br/>schnellste untertauchten.<br/><br/>\"Halt\", rief nun eben dieser Sprecher, \"wir wollen das Ersäufen noch ein<br/>wenig aufschieben, denn auch uns fürchten, wie ihr seht, einige Tiere,<br/>welche also wohl noch unglücklicher sein müssen als wir.\"<br/><br/><br/></body></html>"
"name": {
"Rfc": "message_id"
},
"start": 11,
"end": 45
},
{
"name": {
"Rfc": "date"
},
"start": 50,
"end": 84
},
{
"name": {
"Rfc": "from"
},
"start": 89,
"end": 126
},
{
"name": {
"Other": "X-Mailer"
},
"start": 135,
"end": 165
},
{
"name": {
"Other": "X-Accept-Language"
},
"start": 183,
"end": 188
},
{
"name": {
"Rfc": "mime_version"
},
"start": 201,
"end": 207
},
{
"name": {
"Rfc": "to"
},
"start": 210,
"end": 277
},
{
"name": {
"Rfc": "subject"
},
"start": 285,
"end": 360
},
{
"name": {
"Rfc": "content_type"
},
"start": 373,
"end": 406
},
{
"name": {
"Rfc": "content_transfer_encoding"
},
"start": 432,
"end": 451
}
],
"html_body": [
0
],
"text_body": [
0
],
"parts": [
{
"contents": "Die Hasen und die Frösche\n\nDie Hasen klagten einst über ihre mißliche Lage; \"wir leben\", sprach ein\nRedner, \"in steter Furcht vor Menschen und Tieren, eine Beute der Hunde,\nder Adler, ja fast aller Raubtiere! Unsere stete Angst ist ärger als der\nTod selbst. Auf, laßt uns ein für allemal sterben.\"\n\nIn einem nahen Teich wollten sie sich nun ersäufen; sie eilten ihm zu;\nallein das außerordentliche Getöse und ihre wunderbare Gestalt\nerschreckte eine Menge Frösche, die am Ufer saßen, so sehr, daß sie aufs\nschnellste untertauchten.\n\n\"Halt\", rief nun eben dieser Sprecher, \"wir wollen das Ersäufen noch ein\nwenig aufschieben, denn auch uns fürchten, wie ihr seht, einige Tiere,\nwelche also wohl noch unglücklicher sein müssen als wir.\"\n\n\n"
"Text": {
"body": "Die Hasen und die Frösche\n\nDie Hasen klagten einst über ihre mißliche Lage; \"wir leben\", sprach ein\nRedner, \"in steter Furcht vor Menschen und Tieren, eine Beute der Hunde,\nder Adler, ja fast aller Raubtiere! Unsere stete Angst ist ärger als der\nTod selbst. Auf, laßt uns ein für allemal sterben.\"\n\nIn einem nahen Teich wollten sie sich nun ersäufen; sie eilten ihm zu;\nallein das außerordentliche Getöse und ihre wunderbare Gestalt\nerschreckte eine Menge Frösche, die am Ufer saßen, so sehr, daß sie aufs\nschnellste untertauchten.\n\n\"Halt\", rief nun eben dieser Sprecher, \"wir wollen das Ersäufen noch ein\nwenig aufschieben, denn auch uns fürchten, wie ihr seht, einige Tiere,\nwelche also wohl noch unglücklicher sein müssen als wir.\"\n\n\n"
}
}
]
],
"structure": {
"Part": 0
},
"offset_header": 0,
"offset_body": 453,
"offset_end": 1251
}
+157 -55
View File
@@ -61,17 +61,15 @@ n wenig aufschieben, denn auch uns f=FCrchten, wie ihr seht, einige Tiere=
---- EXPECTED STRUCTURE ----
{
"header": {
"date": {
"year": 2000,
"month": 5,
"day": 17,
"hour": 23,
"minute": 47,
"second": 8,
"tz_before_gmt": true,
"tz_hour": 4,
"tz_minute": 0
"headers_rfc": {
"content_type": {
"ContentType": {
"c_type": "multipart",
"c_subtype": "mixed",
"attributes": {
"boundary": "------------CA611088711119FBDB3473B4"
}
}
},
"from": {
"Address": {
@@ -79,73 +77,177 @@ n wenig aufschieben, denn auch uns f=FCrchten, wie ihr seht, einige Tiere=
"address": "dwsauder@example.com"
}
},
"message_id": "392367BC.3D075C95@example.com",
"mime_version": "1.0",
"subject": "Test message from Netscape Communicator 4.7",
"mime_version": {
"Text": "1.0"
},
"message_id": {
"Text": "392367BC.3D075C95@example.com"
},
"to": {
"Address": {
"name": "Joe Blow",
"address": "blow@example.com"
}
},
"content_type": {
"c_type": "multipart",
"c_subtype": "mixed",
"attributes": {
"boundary": "------------CA611088711119FBDB3473B4"
"date": {
"DateTime": {
"year": 2000,
"month": 5,
"day": 17,
"hour": 23,
"minute": 47,
"second": 8,
"tz_before_gmt": true,
"tz_hour": 4,
"tz_minute": 0
}
},
"others": {
"X-Accept-Language": [
"en"
],
"X-Mailer": [
"Mozilla 4.7 [en] (WinNT; I)"
]
"subject": {
"Text": "Test message from Netscape Communicator 4.7"
}
},
"html_body": [
{
"contents": "<html><body><br/>The Hare and the Tortoise <br/> <br/>A HARE one day ridiculed the short feet and slow pace of the Tortoise,<br/>who replied, laughing: \"Though you be swift as the wind, I will beat<br/>you in a race.\" The Hare, believing her assertion to be simply<br/>impossible, assented to the proposal; and they agreed that the Fox<br/>should choose the course and fix the goal. On the day appointed for the<br/>race the two started together. The Tortoise never for a moment stopped,<br/>but went on with a slow but steady pace straight to the end of the<br/>course. The Hare, lying down by the wayside, fell fast asleep. At last<br/>waking up, and moving as fast as he could, he saw the Tortoise had<br/>reached the goal, and was comfortably dozing after her fatigue. <br/> <br/>Slow but steady wins the race.</body></html>"
"headers_other": {
"X-Mailer": {
"Text": "Mozilla 4.7 [en] (WinNT; I)"
},
"X-Accept-Language": {
"Text": "en"
}
},
"headers_offsets": [
{
"name": {
"Rfc": "message_id"
},
"start": 11,
"end": 45
},
{
"name": {
"Rfc": "date"
},
"start": 50,
"end": 84
},
{
"name": {
"Rfc": "from"
},
"start": 89,
"end": 126
},
{
"name": {
"Other": "X-Mailer"
},
"start": 135,
"end": 165
},
{
"name": {
"Other": "X-Accept-Language"
},
"start": 183,
"end": 188
},
{
"name": {
"Rfc": "mime_version"
},
"start": 201,
"end": 207
},
{
"name": {
"Rfc": "to"
},
"start": 210,
"end": 240
},
{
"name": {
"Rfc": "subject"
},
"start": 248,
"end": 294
},
{
"name": {
"Rfc": "content_type"
},
"start": 307,
"end": 376
}
],
"html_body": [
0
],
"text_body": [
{
"header": {
"content_transfer_encoding": "7bit",
"content_type": {
"c_type": "text",
"c_subtype": "plain",
"attributes": {
"charset": "us-ascii"
}
}
},
"contents": "\r\nThe Hare and the Tortoise \r\n \r\nA HARE one day ridiculed the short feet and slow pace of the Tortoise,\r\nwho replied, laughing: \"Though you be swift as the wind, I will beat\r\nyou in a race.\" The Hare, believing her assertion to be simply\r\nimpossible, assented to the proposal; and they agreed that the Fox\r\nshould choose the course and fix the goal. On the day appointed for the\r\nrace the two started together. The Tortoise never for a moment stopped,\r\nbut went on with a slow but steady pace straight to the end of the\r\ncourse. The Hare, lying down by the wayside, fell fast asleep. At last\r\nwaking up, and moving as fast as he could, he saw the Tortoise had\r\nreached the goal, and was comfortably dozing after her fatigue. \r\n \r\nSlow but steady wins the race.\r"
}
0
],
"attachments": [
1
],
"parts": [
{
"Text": {
"header": {
"content_disposition": {
"c_type": "inline",
"attributes": {
"filename": "HasenundFrösche.txt"
"headers": {
"content_type": {
"ContentType": {
"c_type": "text",
"c_subtype": "plain",
"attributes": {
"charset": "us-ascii"
}
}
},
"content_transfer_encoding": "quoted-printable",
"content_transfer_encoding": {
"Text": "7bit"
}
},
"body": "\r\nThe Hare and the Tortoise \r\n \r\nA HARE one day ridiculed the short feet and slow pace of the Tortoise,\r\nwho replied, laughing: \"Though you be swift as the wind, I will beat\r\nyou in a race.\" The Hare, believing her assertion to be simply\r\nimpossible, assented to the proposal; and they agreed that the Fox\r\nshould choose the course and fix the goal. On the day appointed for the\r\nrace the two started together. The Tortoise never for a moment stopped,\r\nbut went on with a slow but steady pace straight to the end of the\r\ncourse. The Hare, lying down by the wayside, fell fast asleep. At last\r\nwaking up, and moving as fast as he could, he saw the Tortoise had\r\nreached the goal, and was comfortably dozing after her fatigue. \r\n \r\nSlow but steady wins the race.\r"
}
},
{
"Text": {
"headers": {
"content_transfer_encoding": {
"Text": "quoted-printable"
},
"content_type": {
"c_type": "text",
"c_subtype": "plain",
"attributes": {
"name": "HasenundFrösche.txt",
"charset": "iso-8859-1"
"ContentType": {
"c_type": "text",
"c_subtype": "plain",
"attributes": {
"charset": "iso-8859-1",
"name": "HasenundFrösche.txt"
}
}
},
"content_disposition": {
"ContentType": {
"c_type": "inline",
"attributes": {
"filename": "HasenundFrösche.txt"
}
}
}
},
"contents": "Die Hasen und die Frösche\n\nDie Hasen klagten einst über ihre mißliche Lage; \"wir leben\", sprach ein Redner, \"in steter Furcht vor Menschen und Tieren, eine Beute der Hunde, der Adler, ja fast aller Raubtiere! Unsere stete Angst ist ärger als der Tod selbst. Auf, laßt uns ein für allemal sterben.\" \n\nIn einem nahen Teich wollten sie sich nun ersäufen; sie eilten ihm zu; allein das außerordentliche Getöse und ihre wunderbare Gestalt erschreckte eine Menge Frösche, die am Ufer saßen, so sehr, daß sie aufs schnellste untertauchten. \n\n\"Halt\", rief nun eben dieser Sprecher, \"wir wollen das Ersäufen noch ein wenig aufschieben, denn auch uns fürchten, wie ihr seht, einige Tiere, welche also wohl noch unglücklicher sein müssen als wir.\" \n\n"
"body": "Die Hasen und die Frösche\n\nDie Hasen klagten einst über ihre mißliche Lage; \"wir leben\", sprach ein Redner, \"in steter Furcht vor Menschen und Tieren, eine Beute der Hunde, der Adler, ja fast aller Raubtiere! Unsere stete Angst ist ärger als der Tod selbst. Auf, laßt uns ein für allemal sterben.\" \n\nIn einem nahen Teich wollten sie sich nun ersäufen; sie eilten ihm zu; allein das außerordentliche Getöse und ihre wunderbare Gestalt erschreckte eine Menge Frösche, die am Ufer saßen, so sehr, daß sie aufs schnellste untertauchten. \n\n\"Halt\", rief nun eben dieser Sprecher, \"wir wollen das Ersäufen noch ein wenig aufschieben, denn auch uns fürchten, wie ihr seht, einige Tiere, welche also wohl noch unglücklicher sein müssen als wir.\" \n\n"
}
}
]
],
"structure": {
"List": [
{
"Part": 0
},
{
"Part": 1
}
]
},
"offset_header": 0,
"offset_body": 378,
"offset_end": 2434
}
+208 -86
View File
@@ -156,95 +156,186 @@ end
---- EXPECTED STRUCTURE ----
{
"header": {
"date": {
"year": 2000,
"month": 5,
"day": 17,
"hour": 23,
"minute": 44,
"second": 12,
"tz_before_gmt": true,
"tz_hour": 4,
"tz_minute": 0
},
"from": {
"Address": {
"name": "Doug Sauder",
"address": "dwsauder@example.com"
}
},
"message_id": "3923670C.67D83A99@example.com",
"mime_version": "1.0",
"subject": "Test message from Netscape Communicator 4.7",
"headers_rfc": {
"to": {
"Address": {
"name": "Joe Blow",
"address": "blow@example.com"
}
},
"mime_version": {
"Text": "1.0"
},
"subject": {
"Text": "Test message from Netscape Communicator 4.7"
},
"content_type": {
"c_type": "multipart",
"c_subtype": "mixed",
"attributes": {
"boundary": "------------177483472E7788F4AD46AB1A"
"ContentType": {
"c_type": "multipart",
"c_subtype": "mixed",
"attributes": {
"boundary": "------------177483472E7788F4AD46AB1A"
}
}
},
"others": {
"X-Mailer": [
"Mozilla 4.7 [en] (WinNT; I)"
],
"X-Accept-Language": [
"en"
]
"message_id": {
"Text": "3923670C.67D83A99@example.com"
},
"date": {
"DateTime": {
"year": 2000,
"month": 5,
"day": 17,
"hour": 23,
"minute": 44,
"second": 12,
"tz_before_gmt": true,
"tz_hour": 4,
"tz_minute": 0
}
},
"from": {
"Address": {
"name": "Doug Sauder",
"address": "dwsauder@example.com"
}
}
},
"html_body": [
{
"contents": "<html><body><br/>The Hare and the Tortoise <br/> <br/>A HARE one day ridiculed the short feet and slow pace of the Tortoise,<br/>who replied, laughing: \"Though you be swift as the wind, I will beat<br/>you in a race.\" The Hare, believing her assertion to be simply<br/>impossible, assented to the proposal; and they agreed that the Fox<br/>should choose the course and fix the goal. On the day appointed for the<br/>race the two started together. The Tortoise never for a moment stopped,<br/>but went on with a slow but steady pace straight to the end of the<br/>course. The Hare, lying down by the wayside, fell fast asleep. At last<br/>waking up, and moving as fast as he could, he saw the Tortoise had<br/>reached the goal, and was comfortably dozing after her fatigue. <br/> <br/>Slow but steady wins the race.</body></html>"
"headers_other": {
"X-Mailer": {
"Text": "Mozilla 4.7 [en] (WinNT; I)"
},
"X-Accept-Language": {
"Text": "en"
}
},
"headers_offsets": [
{
"name": {
"Rfc": "message_id"
},
"start": 11,
"end": 45
},
{
"name": {
"Rfc": "date"
},
"start": 50,
"end": 84
},
{
"name": {
"Rfc": "from"
},
"start": 89,
"end": 126
},
{
"name": {
"Other": "X-Mailer"
},
"start": 135,
"end": 165
},
{
"name": {
"Other": "X-Accept-Language"
},
"start": 183,
"end": 188
},
{
"name": {
"Rfc": "mime_version"
},
"start": 201,
"end": 207
},
{
"name": {
"Rfc": "to"
},
"start": 210,
"end": 240
},
{
"name": {
"Rfc": "subject"
},
"start": 248,
"end": 294
},
{
"name": {
"Rfc": "content_type"
},
"start": 307,
"end": 376
}
],
"html_body": [
0,
1,
2
2,
3
],
"text_body": [
{
"header": {
"content_transfer_encoding": "7bit",
"content_type": {
"c_type": "text",
"c_subtype": "plain",
"attributes": {
"charset": "us-ascii"
}
}
},
"contents": "\r\nThe Hare and the Tortoise \r\n \r\nA HARE one day ridiculed the short feet and slow pace of the Tortoise,\r\nwho replied, laughing: \"Though you be swift as the wind, I will beat\r\nyou in a race.\" The Hare, believing her assertion to be simply\r\nimpossible, assented to the proposal; and they agreed that the Fox\r\nshould choose the course and fix the goal. On the day appointed for the\r\nrace the two started together. The Tortoise never for a moment stopped,\r\nbut went on with a slow but steady pace straight to the end of the\r\ncourse. The Hare, lying down by the wayside, fell fast asleep. At last\r\nwaking up, and moving as fast as he could, he saw the Tortoise had\r\nreached the goal, and was comfortably dozing after her fatigue. \r\n \r\nSlow but steady wins the race.\r"
},
0,
1,
2
2,
3
],
"attachments": [
1,
2,
3
],
"parts": [
{
"InlineBinary": {
"header": {
"content_disposition": {
"c_type": "inline",
"attributes": {
"filename": "redball.png"
}
"Text": {
"headers": {
"content_transfer_encoding": {
"Text": "7bit"
},
"content_transfer_encoding": "x-uuencode",
"content_type": {
"c_type": "image",
"c_subtype": "png",
"attributes": {
"name": "redball.png"
"ContentType": {
"c_type": "text",
"c_subtype": "plain",
"attributes": {
"charset": "us-ascii"
}
}
}
},
"contents": [
"body": "\r\nThe Hare and the Tortoise \r\n \r\nA HARE one day ridiculed the short feet and slow pace of the Tortoise,\r\nwho replied, laughing: \"Though you be swift as the wind, I will beat\r\nyou in a race.\" The Hare, believing her assertion to be simply\r\nimpossible, assented to the proposal; and they agreed that the Fox\r\nshould choose the course and fix the goal. On the day appointed for the\r\nrace the two started together. The Tortoise never for a moment stopped,\r\nbut went on with a slow but steady pace straight to the end of the\r\ncourse. The Hare, lying down by the wayside, fell fast asleep. At last\r\nwaking up, and moving as fast as he could, he saw the Tortoise had\r\nreached the goal, and was comfortably dozing after her fatigue. \r\n \r\nSlow but steady wins the race.\r"
}
},
{
"InlineBinary": {
"headers": {
"content_transfer_encoding": {
"Text": "x-uuencode"
},
"content_disposition": {
"ContentType": {
"c_type": "inline",
"attributes": {
"filename": "redball.png"
}
}
},
"content_type": {
"ContentType": {
"c_type": "image",
"c_subtype": "png",
"attributes": {
"name": "redball.png"
}
}
}
},
"body": [
98,
101,
103,
@@ -2318,23 +2409,29 @@ end
},
{
"InlineBinary": {
"header": {
"content_disposition": {
"c_type": "inline",
"attributes": {
"filename": "greenball.png"
"headers": {
"content_type": {
"ContentType": {
"c_type": "image",
"c_subtype": "png",
"attributes": {
"name": "greenball.png"
}
}
},
"content_transfer_encoding": "x-uuencode",
"content_type": {
"c_type": "image",
"c_subtype": "png",
"attributes": {
"name": "greenball.png"
"content_transfer_encoding": {
"Text": "x-uuencode"
},
"content_disposition": {
"ContentType": {
"c_type": "inline",
"attributes": {
"filename": "greenball.png"
}
}
}
},
"contents": [
"body": [
98,
101,
103,
@@ -4190,23 +4287,29 @@ end
},
{
"InlineBinary": {
"header": {
"headers": {
"content_transfer_encoding": {
"Text": "x-uuencode"
},
"content_disposition": {
"c_type": "inline",
"attributes": {
"filename": "blueball.png"
"ContentType": {
"c_type": "inline",
"attributes": {
"filename": "blueball.png"
}
}
},
"content_transfer_encoding": "x-uuencode",
"content_type": {
"c_type": "image",
"c_subtype": "png",
"attributes": {
"name": "blueball.png"
"ContentType": {
"c_type": "image",
"c_subtype": "png",
"attributes": {
"name": "blueball.png"
}
}
}
},
"contents": [
"body": [
98,
101,
103,
@@ -6098,5 +6201,24 @@ end
]
}
}
]
],
"structure": {
"List": [
{
"Part": 0
},
{
"Part": 1
},
{
"Part": 2
},
{
"Part": 3
}
]
},
"offset_header": 0,
"offset_body": 378,
"offset_end": 7716
}
+126 -39
View File
File diff suppressed because one or more lines are too long
+202 -79
View File
@@ -110,94 +110,193 @@ IFl2ZXMgUGlndWV0NnM7vAAAAABJRU5ErkJggg==
---- EXPECTED STRUCTURE ----
{
"header": {
"headers_rfc": {
"content_type": {
"ContentType": {
"c_type": "multipart",
"c_subtype": "related",
"attributes": {
"type": "text/html",
"boundary": "=====================_715546120==_.REL"
}
}
},
"message_id": {
"Text": "4.2.0.58.20000519003934.00a866f0@pop.example.com"
},
"subject": {
"Text": "Die Hasen und die Frösche"
},
"date": {
"year": 2000,
"month": 5,
"day": 19,
"hour": 0,
"minute": 39,
"second": 36,
"tz_before_gmt": true,
"tz_hour": 4,
"tz_minute": 0
},
"from": {
"Address": {
"name": "Doug Sauder",
"address": "dwsauder@example.com"
"DateTime": {
"year": 2000,
"month": 5,
"day": 19,
"hour": 0,
"minute": 39,
"second": 36,
"tz_before_gmt": true,
"tz_hour": 4,
"tz_minute": 0
}
},
"message_id": "4.2.0.58.20000519003934.00a866f0@pop.example.com",
"mime_version": "1.0",
"subject": "Die Hasen und die Frösche",
"to": {
"Address": {
"name": "Heinz Müller",
"address": "mueller@example.com"
}
},
"content_type": {
"c_type": "multipart",
"c_subtype": "related",
"attributes": {
"type": "text/html",
"boundary": "=====================_715546120==_.REL"
}
"mime_version": {
"Text": "1.0"
},
"others": {
"X-Priority": [
"2 (High)"
],
"X-Sender": [
"dwsauder@pop.example.com (Unverified)"
],
"X-Mailer": [
"QUALCOMM Windows Eudora Pro Version 4.2.0.58"
]
"from": {
"Address": {
"name": "Doug Sauder",
"address": "dwsauder@example.com"
}
}
},
"html_body": [
{
"header": {
"content_transfer_encoding": "quoted-printable",
"content_type": {
"c_type": "text",
"c_subtype": "html",
"attributes": {
"charset": "iso-8859-1"
}
}
},
"contents": "<html>\n<img src=\"cid:4.2.0.58.20000519003934.00a866f0@pop.example.com.2\" width=27 height=27 alt=\"2aa658b6.png\"><br>\n<br>\n<font face=\"Arial, Helvetica\" size=5 color=\"#0000FF\"><b>Die Hasen und die\nFrösche<br>\n<br>\n</font></b><font face=\"Arial, Helvetica\">Die Hasen klagten einst über\nihre mißliche Lage; &quot;wir leben&quot;, sprach ein Redner, &quot;in\nsteter Furcht vor Menschen und Tieren, eine Beute der Hunde, der Adler,\nja fast aller Raubtiere! Unsere stete Angst ist ärger als der Tod selbst.\nAuf, laßt uns ein für allemal sterben.&quot; <br>\n<br>\nIn einem nahen Teich wollten sie sich nun ersäufen; sie eilten ihm zu;\nallein das außerordentliche Getöse und ihre wunderbare Gestalt\nerschreckte eine Menge Frösche, die am Ufer saßen, so sehr, daß sie aufs\nschnellste untertauchten. <br>\n<br>\n&quot;Halt&quot;, rief nun eben dieser Sprecher, &quot;wir wollen das\nErsäufen noch ein wenig aufschieben, denn auch uns fürchten, wie ihr\nseht, einige Tiere, welche also wohl noch unglücklicher sein müssen als\nwir.&quot; <br>\n<br>\n<img src=\"cid:4.2.0.58.20000519003934.00a866f0@pop.example.com.3\" width=27 height=27 alt=\"2aa658c0.png\"></font></html>\n"
"headers_other": {
"X-Priority": {
"Text": "2 (High)"
},
"X-Sender": {
"Text": "dwsauder@pop.example.com (Unverified)"
},
"X-Mailer": {
"Text": "QUALCOMM Windows Eudora Pro Version 4.2.0.58"
}
},
"headers_offsets": [
{
"name": {
"Rfc": "message_id"
},
"start": 11,
"end": 64
},
{
"name": {
"Other": "X-Sender"
},
"start": 73,
"end": 113
},
{
"name": {
"Other": "X-Mailer"
},
"start": 122,
"end": 170
},
{
"name": {
"Other": "X-Priority"
},
"start": 181,
"end": 192
},
{
"name": {
"Rfc": "date"
},
"start": 197,
"end": 231
},
{
"name": {
"Rfc": "to"
},
"start": 234,
"end": 288
},
{
"name": {
"Rfc": "from"
},
"start": 293,
"end": 330
},
{
"name": {
"Rfc": "subject"
},
"start": 338,
"end": 383
},
{
"name": {
"Rfc": "mime_version"
},
"start": 396,
"end": 402
},
{
"name": {
"Rfc": "content_type"
},
"start": 415,
"end": 508
}
],
"html_body": [
0
],
"text_body": [
{
"contents": "\n\nDie Hasen und die Frösche\n\nDie Hasen klagten einst über ihre mißliche Lage; \"wir leben\", sprach ein Redner, \"in steter Furcht vor Menschen und Tieren, eine Beute der Hunde, der Adler, ja fast aller Raubtiere! Unsere stete Angst ist ärger als der Tod selbst. Auf, laßt uns ein für allemal sterben.\"\n\nIn einem nahen Teich wollten sie sich nun ersäufen; sie eilten ihm zu; allein das außerordentliche Getöse und ihre wunderbare Gestalt erschreckte eine Menge Frösche, die am Ufer saßen, so sehr, daß sie aufs schnellste untertauchten.\n\n\"Halt\", rief nun eben dieser Sprecher, \"wir wollen das Ersäufen noch ein wenig aufschieben, denn auch uns fürchten, wie ihr seht, einige Tiere, welche also wohl noch unglücklicher sein müssen als wir.\"\n\n"
}
0
],
"attachments": [
1,
2
],
"parts": [
{
"Binary": {
"header": {
"content_disposition": {
"c_type": "inline",
"attributes": {
"filename": "2aa658b6.png"
}
"Html": {
"headers": {
"content_transfer_encoding": {
"Text": "quoted-printable"
},
"content_id": "4.2.0.58.20000519003934.00a866f0@pop.example.com.2",
"content_transfer_encoding": "base64",
"content_type": {
"c_type": "image",
"c_subtype": "png",
"attributes": {
"name": "2aa658b6.png"
"ContentType": {
"c_type": "text",
"c_subtype": "html",
"attributes": {
"charset": "iso-8859-1"
}
}
}
},
"contents": [
"body": "<html>\n<img src=\"cid:4.2.0.58.20000519003934.00a866f0@pop.example.com.2\" width=27 height=27 alt=\"2aa658b6.png\"><br>\n<br>\n<font face=\"Arial, Helvetica\" size=5 color=\"#0000FF\"><b>Die Hasen und die\nFrösche<br>\n<br>\n</font></b><font face=\"Arial, Helvetica\">Die Hasen klagten einst über\nihre mißliche Lage; &quot;wir leben&quot;, sprach ein Redner, &quot;in\nsteter Furcht vor Menschen und Tieren, eine Beute der Hunde, der Adler,\nja fast aller Raubtiere! Unsere stete Angst ist ärger als der Tod selbst.\nAuf, laßt uns ein für allemal sterben.&quot; <br>\n<br>\nIn einem nahen Teich wollten sie sich nun ersäufen; sie eilten ihm zu;\nallein das außerordentliche Getöse und ihre wunderbare Gestalt\nerschreckte eine Menge Frösche, die am Ufer saßen, so sehr, daß sie aufs\nschnellste untertauchten. <br>\n<br>\n&quot;Halt&quot;, rief nun eben dieser Sprecher, &quot;wir wollen das\nErsäufen noch ein wenig aufschieben, denn auch uns fürchten, wie ihr\nseht, einige Tiere, welche also wohl noch unglücklicher sein müssen als\nwir.&quot; <br>\n<br>\n<img src=\"cid:4.2.0.58.20000519003934.00a866f0@pop.example.com.3\" width=27 height=27 alt=\"2aa658c0.png\"></font></html>\n"
}
},
{
"Binary": {
"headers": {
"content_transfer_encoding": {
"Text": "base64"
},
"content_type": {
"ContentType": {
"c_type": "image",
"c_subtype": "png",
"attributes": {
"name": "2aa658b6.png"
}
}
},
"content_id": {
"Text": "4.2.0.58.20000519003934.00a866f0@pop.example.com.2"
},
"content_disposition": {
"ContentType": {
"c_type": "inline",
"attributes": {
"filename": "2aa658b6.png"
}
}
}
},
"body": [
137,
80,
78,
@@ -1528,24 +1627,32 @@ IFl2ZXMgUGlndWV0NnM7vAAAAABJRU5ErkJggg==
},
{
"Binary": {
"header": {
"content_disposition": {
"c_type": "inline",
"attributes": {
"filename": "2aa658c0.png"
"headers": {
"content_type": {
"ContentType": {
"c_type": "image",
"c_subtype": "png",
"attributes": {
"name": "2aa658c0.png"
}
}
},
"content_id": "4.2.0.58.20000519003934.00a866f0@pop.example.com.3",
"content_transfer_encoding": "base64",
"content_type": {
"c_type": "image",
"c_subtype": "png",
"attributes": {
"name": "2aa658c0.png"
"content_id": {
"Text": "4.2.0.58.20000519003934.00a866f0@pop.example.com.3"
},
"content_disposition": {
"ContentType": {
"c_type": "inline",
"attributes": {
"filename": "2aa658c0.png"
}
}
},
"content_transfer_encoding": {
"Text": "base64"
}
},
"contents": [
"body": [
137,
80,
78,
@@ -3002,5 +3109,21 @@ IFl2ZXMgUGlndWV0NnM7vAAAAABJRU5ErkJggg==
]
}
}
]
],
"structure": {
"List": [
{
"Part": 0
},
{
"Part": 1
},
{
"Part": 2
}
]
},
"offset_header": 0,
"offset_body": 510,
"offset_end": 6227
}
+265 -101
View File
@@ -162,17 +162,30 @@ bGlwMmdpZiB2LjAuNiBieSBZdmVzIFBpZ3VldDZzO7wAAAAASUVORK5CYII=
---- EXPECTED STRUCTURE ----
{
"header": {
"date": {
"year": 2000,
"month": 5,
"day": 19,
"hour": 0,
"minute": 39,
"second": 5,
"tz_before_gmt": true,
"tz_hour": 4,
"tz_minute": 0
"headers_rfc": {
"subject": {
"Text": "Die Hasen und die Frösche"
},
"message_id": {
"Text": "4.2.0.58.20000519003903.00a859b0@pop.example.com"
},
"mime_version": {
"Text": "1.0"
},
"content_type": {
"ContentType": {
"c_type": "multipart",
"c_subtype": "mixed",
"attributes": {
"boundary": "=====================_715515186==_"
}
}
},
"to": {
"Address": {
"name": "Heinz Müller",
"address": "mueller@example.com"
}
},
"from": {
"Address": {
@@ -180,75 +193,177 @@ bGlwMmdpZiB2LjAuNiBieSBZdmVzIFBpZ3VldDZzO7wAAAAASUVORK5CYII=
"address": "dwsauder@example.com"
}
},
"message_id": "4.2.0.58.20000519003903.00a859b0@pop.example.com",
"mime_version": "1.0",
"subject": "Die Hasen und die Frösche",
"to": {
"Address": {
"name": "Heinz Müller",
"address": "mueller@example.com"
"date": {
"DateTime": {
"year": 2000,
"month": 5,
"day": 19,
"hour": 0,
"minute": 39,
"second": 5,
"tz_before_gmt": true,
"tz_hour": 4,
"tz_minute": 0
}
},
"content_type": {
"c_type": "multipart",
"c_subtype": "mixed",
"attributes": {
"boundary": "=====================_715515186==_"
}
},
"others": {
"X-Mailer": [
"QUALCOMM Windows Eudora Pro Version 4.2.0.58"
],
"X-Priority": [
"2 (High)"
],
"X-Sender": [
"dwsauder@pop.example.com (Unverified)"
]
}
},
"html_body": [
{
"contents": "<html><body>Die Hasen und die Frösche<br/><br/>Die Hasen klagten einst über ihre mißliche Lage; \"wir leben\", sprach ein Redner, \"in steter Furcht vor Menschen und Tieren, eine Beute der Hunde, der Adler, ja fast aller Raubtiere! Unsere stete Angst ist ärger als der Tod selbst. Auf, laßt uns ein für allemal sterben.\" <br/><br/>In einem nahen Teich wollten sie sich nun ersäufen; sie eilten ihm zu; allein das außerordentliche Getöse und ihre wunderbare Gestalt erschreckte eine Menge Frösche, die am Ufer saßen, so sehr, daß sie aufs schnellste untertauchten. <br/><br/>\"Halt\", rief nun eben dieser Sprecher, \"wir wollen das Ersäufen noch ein wenig aufschieben, denn auch uns fürchten, wie ihr seht, einige Tiere, welche also wohl noch unglücklicher sein müssen als wir.\" <br/><br/>2aa5e03a.png2aa5e044.png</body></html>"
"headers_other": {
"X-Priority": {
"Text": "2 (High)"
},
"X-Mailer": {
"Text": "QUALCOMM Windows Eudora Pro Version 4.2.0.58"
},
"X-Sender": {
"Text": "dwsauder@pop.example.com (Unverified)"
}
},
"headers_offsets": [
{
"name": {
"Rfc": "message_id"
},
"start": 11,
"end": 64
},
{
"name": {
"Other": "X-Sender"
},
"start": 73,
"end": 113
},
{
"name": {
"Other": "X-Mailer"
},
"start": 122,
"end": 170
},
{
"name": {
"Other": "X-Priority"
},
"start": 181,
"end": 192
},
{
"name": {
"Rfc": "date"
},
"start": 197,
"end": 231
},
{
"name": {
"Rfc": "to"
},
"start": 234,
"end": 288
},
{
"name": {
"Rfc": "from"
},
"start": 293,
"end": 330
},
{
"name": {
"Rfc": "subject"
},
"start": 338,
"end": 383
},
{
"name": {
"Rfc": "mime_version"
},
"start": 396,
"end": 402
},
{
"name": {
"Rfc": "content_type"
},
"start": 415,
"end": 482
}
],
"html_body": [
1
],
"text_body": [
{
"header": {
"content_transfer_encoding": "quoted-printable",
"content_type": {
"c_type": "text",
"c_subtype": "plain",
"attributes": {
"charset": "iso-8859-1"
}
}
},
"contents": "Die Hasen und die Frösche\n\nDie Hasen klagten einst über ihre mißliche Lage; \"wir leben\", sprach ein Redner, \"in steter Furcht vor Menschen und Tieren, eine Beute der Hunde, der Adler, ja fast aller Raubtiere! Unsere stete Angst ist ärger als der Tod selbst. Auf, laßt uns ein für allemal sterben.\" \n\nIn einem nahen Teich wollten sie sich nun ersäufen; sie eilten ihm zu; allein das außerordentliche Getöse und ihre wunderbare Gestalt erschreckte eine Menge Frösche, die am Ufer saßen, so sehr, daß sie aufs schnellste untertauchten. \n\n\"Halt\", rief nun eben dieser Sprecher, \"wir wollen das Ersäufen noch ein wenig aufschieben, denn auch uns fürchten, wie ihr seht, einige Tiere, welche also wohl noch unglücklicher sein müssen als wir.\" \n\n2aa5e03a.png2aa5e044.png"
}
1
],
"attachments": [
2,
3,
4,
5
],
"parts": [
{
"Binary": {
"header": {
"content_disposition": {
"c_type": "inline",
"Multipart": {
"content_type": {
"ContentType": {
"c_type": "multipart",
"c_subtype": "related",
"attributes": {
"filename": "2aa5e03a.png"
}
},
"content_id": "4.2.0.58.20000519003903.00a859b0@pop.example.com.2",
"content_transfer_encoding": "base64",
"content_type": {
"c_type": "image",
"c_subtype": "png",
"attributes": {
"name": "2aa5e03a.png"
"type": "text/plain",
"boundary": "=====================_715515186==_.REL"
}
}
}
}
},
{
"Text": {
"headers": {
"content_type": {
"ContentType": {
"c_type": "text",
"c_subtype": "plain",
"attributes": {
"charset": "iso-8859-1"
}
}
},
"content_transfer_encoding": {
"Text": "quoted-printable"
}
},
"contents": [
"body": "Die Hasen und die Frösche\n\nDie Hasen klagten einst über ihre mißliche Lage; \"wir leben\", sprach ein Redner, \"in steter Furcht vor Menschen und Tieren, eine Beute der Hunde, der Adler, ja fast aller Raubtiere! Unsere stete Angst ist ärger als der Tod selbst. Auf, laßt uns ein für allemal sterben.\" \n\nIn einem nahen Teich wollten sie sich nun ersäufen; sie eilten ihm zu; allein das außerordentliche Getöse und ihre wunderbare Gestalt erschreckte eine Menge Frösche, die am Ufer saßen, so sehr, daß sie aufs schnellste untertauchten. \n\n\"Halt\", rief nun eben dieser Sprecher, \"wir wollen das Ersäufen noch ein wenig aufschieben, denn auch uns fürchten, wie ihr seht, einige Tiere, welche also wohl noch unglücklicher sein müssen als wir.\" \n\n2aa5e03a.png2aa5e044.png"
}
},
{
"Binary": {
"headers": {
"content_disposition": {
"ContentType": {
"c_type": "inline",
"attributes": {
"filename": "2aa5e03a.png"
}
}
},
"content_transfer_encoding": {
"Text": "base64"
},
"content_type": {
"ContentType": {
"c_type": "image",
"c_subtype": "png",
"attributes": {
"name": "2aa5e03a.png"
}
}
},
"content_id": {
"Text": "4.2.0.58.20000519003903.00a859b0@pop.example.com.2"
}
},
"body": [
137,
80,
78,
@@ -1579,24 +1694,32 @@ bGlwMmdpZiB2LjAuNiBieSBZdmVzIFBpZ3VldDZzO7wAAAAASUVORK5CYII=
},
{
"Binary": {
"header": {
"content_disposition": {
"c_type": "inline",
"attributes": {
"filename": "2aa5e044.png"
"headers": {
"content_transfer_encoding": {
"Text": "base64"
},
"content_type": {
"ContentType": {
"c_type": "image",
"c_subtype": "png",
"attributes": {
"name": "2aa5e044.png"
}
}
},
"content_id": "4.2.0.58.20000519003903.00a859b0@pop.example.com.3",
"content_transfer_encoding": "base64",
"content_type": {
"c_type": "image",
"c_subtype": "png",
"attributes": {
"name": "2aa5e044.png"
"content_id": {
"Text": "4.2.0.58.20000519003903.00a859b0@pop.example.com.3"
},
"content_disposition": {
"ContentType": {
"c_type": "inline",
"attributes": {
"filename": "2aa5e044.png"
}
}
}
},
"contents": [
"body": [
137,
80,
78,
@@ -3055,23 +3178,29 @@ bGlwMmdpZiB2LjAuNiBieSBZdmVzIFBpZ3VldDZzO7wAAAAASUVORK5CYII=
},
{
"Binary": {
"header": {
"headers": {
"content_disposition": {
"c_type": "attachment",
"attributes": {
"filename": "blueball.png"
"ContentType": {
"c_type": "attachment",
"attributes": {
"filename": "blueball.png"
}
}
},
"content_transfer_encoding": "base64",
"content_type": {
"c_type": "image",
"c_subtype": "png",
"attributes": {
"name": "blueball.png"
"ContentType": {
"c_type": "image",
"c_subtype": "png",
"attributes": {
"name": "blueball.png"
}
}
},
"content_transfer_encoding": {
"Text": "base64"
}
},
"contents": [
"body": [
137,
80,
78,
@@ -4402,23 +4531,29 @@ bGlwMmdpZiB2LjAuNiBieSBZdmVzIFBpZ3VldDZzO7wAAAAASUVORK5CYII=
},
{
"Binary": {
"header": {
"headers": {
"content_disposition": {
"c_type": "attachment",
"attributes": {
"filename": "greenball.png"
"ContentType": {
"c_type": "attachment",
"attributes": {
"filename": "greenball.png"
}
}
},
"content_transfer_encoding": "base64",
"content_transfer_encoding": {
"Text": "base64"
},
"content_type": {
"c_type": "image",
"c_subtype": "png",
"attributes": {
"name": "greenball.png"
"ContentType": {
"c_type": "image",
"c_subtype": "png",
"attributes": {
"name": "greenball.png"
}
}
}
},
"contents": [
"body": [
137,
80,
78,
@@ -5720,5 +5855,34 @@ bGlwMmdpZiB2LjAuNiBieSBZdmVzIFBpZ3VldDZzO7wAAAAASUVORK5CYII=
]
}
}
]
],
"structure": {
"List": [
{
"MultiPart": [
0,
[
{
"Part": 1
},
{
"Part": 2
},
{
"Part": 3
}
]
]
},
{
"Part": 4
},
{
"Part": 5
}
]
},
"offset_header": 0,
"offset_body": 484,
"offset_end": 9939
}
+127 -40
View File
@@ -28,58 +28,145 @@ welche also wohl noch ungl
---- EXPECTED STRUCTURE ----
{
"header": {
"date": {
"year": 2000,
"month": 5,
"day": 17,
"hour": 19,
"minute": 28,
"second": 40,
"tz_before_gmt": true,
"tz_hour": 4,
"tz_minute": 0
},
"from": {
"Address": {
"name": "Doug Sauder",
"address": "doug@example.com"
}
},
"message_id": "NDBBIAKOPKHFGPLCODIGOEKDCHAA.doug@example.com",
"subject": "Die Hasen und die Fr�sche (Microsoft Outlook 00)",
"headers_rfc": {
"to": {
"Address": {
"name": "Heinz M�ller",
"address": "mueller@example.com"
}
},
"others": {
"X-MSMail-Priority": [
"Normal"
],
"X-MimeOLE": [
"Produced By Microsoft MimeOLE V5.00.2314.1300"
],
"X-Mailer": [
"Microsoft Outlook IMO, Build 9.0.2416 (9.0.2910.0)"
],
"Importance": [
"Normal"
],
"X-Priority": [
"3 (Normal)"
]
"date": {
"DateTime": {
"year": 2000,
"month": 5,
"day": 17,
"hour": 19,
"minute": 28,
"second": 40,
"tz_before_gmt": true,
"tz_hour": 4,
"tz_minute": 0
}
},
"subject": {
"Text": "Die Hasen und die Fr�sche (Microsoft Outlook 00)"
},
"message_id": {
"Text": "NDBBIAKOPKHFGPLCODIGOEKDCHAA.doug@example.com"
},
"from": {
"Address": {
"name": "Doug Sauder",
"address": "doug@example.com"
}
}
},
"html_body": [
"headers_other": {
"X-MSMail-Priority": {
"Text": "Normal"
},
"X-MimeOLE": {
"Text": "Produced By Microsoft MimeOLE V5.00.2314.1300"
},
"X-Priority": {
"Text": "3 (Normal)"
},
"X-Mailer": {
"Text": "Microsoft Outlook IMO, Build 9.0.2416 (9.0.2910.0)"
},
"Importance": {
"Text": "Normal"
}
},
"headers_offsets": [
{
"contents": "<html><body>Die Hasen und die Fr�sche<br/><br/>Die Hasen klagten einst �ber ihre mi�liche Lage; \"wir leben\", sprach ein<br/>Redner, \"in steter Furcht vor Menschen und Tieren, eine Beute der Hunde, der<br/>Adler, ja fast aller Raubtiere! Unsere stete Angst ist �rger als der Tod<br/>selbst. Auf, la�t uns ein f�r allemal sterben.\"<br/><br/>In einem nahen Teich wollten sie sich nun ers�ufen; sie eilten ihm zu;<br/>allein das au�erordentliche Get�se und ihre wunderbare Gestalt erschreckte<br/>eine Menge Fr�sche, die am Ufer sa�en, so sehr, da� sie aufs schnellste<br/>untertauchten.<br/><br/>\"Halt\", rief nun eben dieser Sprecher, \"wir wollen das Ers�ufen noch ein<br/>wenig aufschieben, denn auch uns f�rchten, wie ihr seht, einige Tiere,<br/>welche also wohl noch ungl�cklicher sein m�ssen als wir.\"<br/><br/></body></html>"
"name": {
"Rfc": "from"
},
"start": 5,
"end": 40
},
{
"name": {
"Rfc": "to"
},
"start": 43,
"end": 82
},
{
"name": {
"Rfc": "subject"
},
"start": 90,
"end": 141
},
{
"name": {
"Rfc": "date"
},
"start": 146,
"end": 180
},
{
"name": {
"Rfc": "message_id"
},
"start": 191,
"end": 241
},
{
"name": {
"Other": "X-Priority"
},
"start": 252,
"end": 265
},
{
"name": {
"Other": "X-MSMail-Priority"
},
"start": 283,
"end": 292
},
{
"name": {
"Other": "X-Mailer"
},
"start": 301,
"end": 354
},
{
"name": {
"Other": "Importance"
},
"start": 365,
"end": 374
},
{
"name": {
"Other": "X-MimeOLE"
},
"start": 384,
"end": 432
}
],
"html_body": [
0
],
"text_body": [
0
],
"parts": [
{
"contents": "Die Hasen und die Fr�sche\r\n\r\nDie Hasen klagten einst �ber ihre mi�liche Lage; \"wir leben\", sprach ein\r\nRedner, \"in steter Furcht vor Menschen und Tieren, eine Beute der Hunde, der\r\nAdler, ja fast aller Raubtiere! Unsere stete Angst ist �rger als der Tod\r\nselbst. Auf, la�t uns ein f�r allemal sterben.\"\r\n\r\nIn einem nahen Teich wollten sie sich nun ers�ufen; sie eilten ihm zu;\r\nallein das au�erordentliche Get�se und ihre wunderbare Gestalt erschreckte\r\neine Menge Fr�sche, die am Ufer sa�en, so sehr, da� sie aufs schnellste\r\nuntertauchten.\r\n\r\n\"Halt\", rief nun eben dieser Sprecher, \"wir wollen das Ers�ufen noch ein\r\nwenig aufschieben, denn auch uns f�rchten, wie ihr seht, einige Tiere,\r\nwelche also wohl noch ungl�cklicher sein m�ssen als wir.\"\r\n\r\n"
"Text": {
"body": "Die Hasen und die Fr�sche\r\n\r\nDie Hasen klagten einst �ber ihre mi�liche Lage; \"wir leben\", sprach ein\r\nRedner, \"in steter Furcht vor Menschen und Tieren, eine Beute der Hunde, der\r\nAdler, ja fast aller Raubtiere! Unsere stete Angst ist �rger als der Tod\r\nselbst. Auf, la�t uns ein f�r allemal sterben.\"\r\n\r\nIn einem nahen Teich wollten sie sich nun ers�ufen; sie eilten ihm zu;\r\nallein das au�erordentliche Get�se und ihre wunderbare Gestalt erschreckte\r\neine Menge Fr�sche, die am Ufer sa�en, so sehr, da� sie aufs schnellste\r\nuntertauchten.\r\n\r\n\"Halt\", rief nun eben dieser Sprecher, \"wir wollen das Ers�ufen noch ein\r\nwenig aufschieben, denn auch uns f�rchten, wie ihr seht, einige Tiere,\r\nwelche also wohl noch ungl�cklicher sein m�ssen als wir.\"\r\n\r\n"
}
}
]
],
"structure": {
"Part": 0
},
"offset_header": 0,
"offset_body": 434,
"offset_end": 1186
}
+154 -40
View File
@@ -33,17 +33,15 @@ als wir."=20
---- EXPECTED STRUCTURE ----
{
"header": {
"date": {
"year": 2000,
"month": 5,
"day": 17,
"hour": 19,
"minute": 27,
"second": 4,
"tz_before_gmt": true,
"tz_hour": 4,
"tz_minute": 0
"headers_rfc": {
"subject": {
"Text": "Die Hasen und die Frösche (Microsoft Outlook 00)"
},
"message_id": {
"Text": "NDBBIAKOPKHFGPLCODIGKEKDCHAA.doug@example.com"
},
"mime_version": {
"Text": "1.0"
},
"from": {
"Address": {
@@ -51,49 +49,165 @@ als wir."=20
"address": "doug@example.com"
}
},
"message_id": "NDBBIAKOPKHFGPLCODIGKEKDCHAA.doug@example.com",
"mime_version": "1.0",
"subject": "Die Hasen und die Frösche (Microsoft Outlook 00)",
"content_type": {
"ContentType": {
"c_type": "text",
"c_subtype": "plain",
"attributes": {
"charset": "utf-8"
}
}
},
"to": {
"Address": {
"name": "Heinz Müller",
"address": "mueller@example.com"
}
},
"content_transfer_encoding": "quoted-printable",
"content_type": {
"c_type": "text",
"c_subtype": "plain",
"attributes": {
"charset": "utf-8"
"date": {
"DateTime": {
"year": 2000,
"month": 5,
"day": 17,
"hour": 19,
"minute": 27,
"second": 4,
"tz_before_gmt": true,
"tz_hour": 4,
"tz_minute": 0
}
},
"others": {
"X-MimeOLE": [
"Produced By Microsoft MimeOLE V5.00.2314.1300"
],
"X-MSMail-Priority": [
"Normal"
],
"X-Mailer": [
"Microsoft Outlook IMO, Build 9.0.2416 (9.0.2910.0)"
],
"Importance": [
"Normal"
],
"X-Priority": [
"3 (Normal)"
]
"content_transfer_encoding": {
"Text": "quoted-printable"
}
},
"html_body": [
"headers_other": {
"Importance": {
"Text": "Normal"
},
"X-Priority": {
"Text": "3 (Normal)"
},
"X-Mailer": {
"Text": "Microsoft Outlook IMO, Build 9.0.2416 (9.0.2910.0)"
},
"X-MSMail-Priority": {
"Text": "Normal"
},
"X-MimeOLE": {
"Text": "Produced By Microsoft MimeOLE V5.00.2314.1300"
}
},
"headers_offsets": [
{
"contents": "<html><body>Die Hasen und die Frösche<br/><br/>Die Hasen klagten einst über ihre mißliche Lage; \"wir leben\", sprach ein Redner, \"in steter Furcht vor Menschen und Tieren, eine Beute der Hunde, der Adler, ja fast aller Raubtiere! Unsere stete Angst ist ärger als der Tod selbst. Auf, laßt uns ein für allemal sterben.\" <br/><br/>In einem nahen Teich wollten sie sich nun ersäufen; sie eilten ihm zu; allein das außerordentliche Getöse und ihre wunderbare Gestalt erschreckte eine Menge Frösche, die am Ufer saßen, so sehr, daß sie aufs schnellste untertauchten. <br/><br/>\"Halt\", rief nun eben dieser Sprecher, \"wir wollen das Ersäufen noch ein wenig aufschieben, denn auch uns fürchten, wie ihr seht, einige Tiere, welche also wohl noch unglücklicher sein müssen als wir.\" <br/></body></html>"
"name": {
"Rfc": "from"
},
"start": 5,
"end": 40
},
{
"name": {
"Rfc": "to"
},
"start": 43,
"end": 97
},
{
"name": {
"Rfc": "subject"
},
"start": 105,
"end": 177
},
{
"name": {
"Rfc": "date"
},
"start": 182,
"end": 216
},
{
"name": {
"Rfc": "message_id"
},
"start": 227,
"end": 277
},
{
"name": {
"Rfc": "mime_version"
},
"start": 290,
"end": 296
},
{
"name": {
"Rfc": "content_type"
},
"start": 309,
"end": 341
},
{
"name": {
"Rfc": "content_transfer_encoding"
},
"start": 367,
"end": 386
},
{
"name": {
"Other": "X-Priority"
},
"start": 397,
"end": 410
},
{
"name": {
"Other": "X-MSMail-Priority"
},
"start": 428,
"end": 437
},
{
"name": {
"Other": "X-Mailer"
},
"start": 446,
"end": 499
},
{
"name": {
"Other": "Importance"
},
"start": 510,
"end": 519
},
{
"name": {
"Other": "X-MimeOLE"
},
"start": 529,
"end": 577
}
],
"html_body": [
0
],
"text_body": [
0
],
"parts": [
{
"contents": "Die Hasen und die Frösche\n\nDie Hasen klagten einst über ihre mißliche Lage; \"wir leben\", sprach ein Redner, \"in steter Furcht vor Menschen und Tieren, eine Beute der Hunde, der Adler, ja fast aller Raubtiere! Unsere stete Angst ist ärger als der Tod selbst. Auf, laßt uns ein für allemal sterben.\" \n\nIn einem nahen Teich wollten sie sich nun ersäufen; sie eilten ihm zu; allein das außerordentliche Getöse und ihre wunderbare Gestalt erschreckte eine Menge Frösche, die am Ufer saßen, so sehr, daß sie aufs schnellste untertauchten. \n\n\"Halt\", rief nun eben dieser Sprecher, \"wir wollen das Ersäufen noch ein wenig aufschieben, denn auch uns fürchten, wie ihr seht, einige Tiere, welche also wohl noch unglücklicher sein müssen als wir.\" \n"
"Text": {
"body": "Die Hasen und die Frösche\n\nDie Hasen klagten einst über ihre mißliche Lage; \"wir leben\", sprach ein Redner, \"in steter Furcht vor Menschen und Tieren, eine Beute der Hunde, der Adler, ja fast aller Raubtiere! Unsere stete Angst ist ärger als der Tod selbst. Auf, laßt uns ein für allemal sterben.\" \n\nIn einem nahen Teich wollten sie sich nun ersäufen; sie eilten ihm zu; allein das außerordentliche Getöse und ihre wunderbare Gestalt erschreckte eine Menge Frösche, die am Ufer saßen, so sehr, daß sie aufs schnellste untertauchten. \n\n\"Halt\", rief nun eben dieser Sprecher, \"wir wollen das Ersäufen noch ein wenig aufschieben, denn auch uns fürchten, wie ihr seht, einige Tiere, welche also wohl noch unglücklicher sein müssen als wir.\" \n"
}
}
]
],
"structure": {
"Part": 0
},
"offset_header": 0,
"offset_body": 579,
"offset_end": 1440
}
+58 -6
View File
@@ -11,13 +11,65 @@ Content-Type: text/html
---- EXPECTED STRUCTURE ----
{
"header": {
"headers_rfc": {
"content_type": {
"c_type": "multipart",
"c_subtype": "mixed",
"attributes": {
"boundary": ":foo"
"ContentType": {
"c_type": "multipart",
"c_subtype": "mixed",
"attributes": {
"boundary": ":foo"
}
}
}
}
},
"headers_offsets": [
{
"name": {
"Rfc": "content_type"
},
"start": 13,
"end": 47
}
],
"html_body": [
0,
1
],
"text_body": [
0,
1
],
"parts": [
{
"Text": {
"body": "Content-Type: text/plain"
}
},
{
"Text": {
"headers": {
"content_type": {
"ContentType": {
"c_type": "text",
"c_subtype": "plain"
}
}
},
"body": "Content-Type: text/html"
}
}
],
"structure": {
"List": [
{
"Part": 0
},
{
"Part": 1
}
]
},
"offset_header": 0,
"offset_body": 48,
"offset_end": 159
}
+49 -9
View File
@@ -11,23 +11,63 @@ Content-Type: text/plain
---- EXPECTED STRUCTURE ----
{
"header": {
"headers_rfc": {
"content_type": {
"c_type": "multipart",
"c_subtype": "mixed",
"attributes": {
"boundary": "ab"
"ContentType": {
"c_type": "multipart",
"c_subtype": "mixed",
"attributes": {
"boundary": "ab"
}
}
}
},
"html_body": [
"headers_offsets": [
{
"contents": "<html><body>Content-Type: text/plain<br/></body></html>"
"name": {
"Rfc": "content_type"
},
"start": 13,
"end": 45
}
],
"html_body": [
1
],
"text_body": [
1
],
"parts": [
{
"contents": "Content-Type: text/plain\n"
"Multipart": {
"content_type": {
"ContentType": {
"c_type": "multipart",
"c_subtype": "mixed",
"attributes": {
"boundary": "a"
}
}
}
}
},
{
"Text": {
"body": "Content-Type: text/plain\n"
}
}
]
],
"structure": {
"MultiPart": [
0,
[
{
"Part": 1
}
]
]
},
"offset_header": 0,
"offset_body": 46,
"offset_end": 132
}
+27 -7
View File
@@ -4,20 +4,40 @@ body
---- EXPECTED STRUCTURE ----
{
"header": {
"headers_rfc": {
"content_type": {
"c_type": "multipart",
"c_subtype": "mixed",
"attributes": {
"boundary": "ab"
"ContentType": {
"c_type": "multipart",
"c_subtype": "mixed",
"attributes": {
"boundary": "ab"
}
}
}
},
"headers_offsets": [
{
"name": {
"Rfc": "content_type"
},
"start": 13,
"end": 45
}
],
"attachments": [
0
],
"parts": [
{
"Text": {
"contents": "body\n"
"body": "body\n"
}
}
]
],
"structure": {
"Part": 0
},
"offset_header": 0,
"offset_body": 46,
"offset_end": 51
}
+52 -10
View File
@@ -10,26 +10,68 @@ body
---- EXPECTED STRUCTURE ----
{
"header": {
"headers_rfc": {
"content_type": {
"c_type": "multipart",
"c_subtype": "mixed",
"attributes": {
"boundary": "a"
"ContentType": {
"c_type": "multipart",
"c_subtype": "mixed",
"attributes": {
"boundary": "a"
}
}
}
},
"headers_offsets": [
{
"name": {
"Rfc": "content_type"
},
"start": 13,
"end": 44
}
],
"attachments": [
1
],
"parts": [
{
"Multipart": {
"content_type": {
"ContentType": {
"c_type": "multipart",
"c_subtype": "mixed",
"attributes": {
"boundary": "a"
}
}
}
}
},
{
"Text": {
"header": {
"headers": {
"content_type": {
"c_type": "text",
"c_subtype": "plain"
"ContentType": {
"c_type": "text",
"c_subtype": "plain"
}
}
},
"contents": "body\n"
"body": "body\n"
}
}
]
],
"structure": {
"MultiPart": [
0,
[
{
"Part": 1
}
]
]
},
"offset_header": 0,
"offset_body": 45,
"offset_end": 129
}
+27 -7
View File
@@ -10,20 +10,40 @@ body
---- EXPECTED STRUCTURE ----
{
"header": {
"headers_rfc": {
"content_type": {
"c_type": "multipart",
"c_subtype": "mixed",
"attributes": {
"boundary": "a"
"ContentType": {
"c_type": "multipart",
"c_subtype": "mixed",
"attributes": {
"boundary": "a"
}
}
}
},
"headers_offsets": [
{
"name": {
"Rfc": "content_type"
},
"start": 13,
"end": 44
}
],
"attachments": [
0
],
"parts": [
{
"Text": {
"contents": "Content-Type: multipart/mixed; boundary=\"a\"\n\n--ac\nContent-Type: text/plain\n\nbody\n"
"body": "Content-Type: multipart/mixed; boundary=\"a\"\n\n--ac\nContent-Type: text/plain\n\nbody\n"
}
}
]
],
"structure": {
"Part": 0
},
"offset_header": 0,
"offset_body": 45,
"offset_end": 131
}
+55 -13
View File
@@ -14,29 +14,71 @@ body2
--a----
---- EXPECTED STRUCTURE ----
{
"header": {
"headers_rfc": {
"content_type": {
"c_type": "multipart",
"c_subtype": "mixed",
"attributes": {
"boundary": "a--"
"ContentType": {
"c_type": "multipart",
"c_subtype": "mixed",
"attributes": {
"boundary": "a--"
}
}
}
},
"html_body": [
"headers_offsets": [
{
"contents": "<html><body>body</body></html>"
"name": {
"Rfc": "content_type"
},
"start": 13,
"end": 46
}
],
"html_body": [
1
],
"text_body": [
1
],
"parts": [
{
"header": {
"Multipart": {
"content_type": {
"c_type": "text",
"c_subtype": "plain"
"ContentType": {
"c_type": "multipart",
"c_subtype": "mixed",
"attributes": {
"boundary": "a----"
}
}
}
},
"contents": "body"
}
},
{
"Text": {
"headers": {
"content_type": {
"ContentType": {
"c_type": "text",
"c_subtype": "plain"
}
}
},
"body": "body"
}
}
]
],
"structure": {
"MultiPart": [
0,
[
{
"Part": 1
}
]
]
},
"offset_header": 0,
"offset_body": 47,
"offset_end": 189
}
+52 -10
View File
@@ -10,26 +10,68 @@ body
---- EXPECTED STRUCTURE ----
{
"header": {
"headers_rfc": {
"content_type": {
"c_type": "multipart",
"c_subtype": "mixed",
"attributes": {
"boundary": "a"
"ContentType": {
"c_type": "multipart",
"c_subtype": "mixed",
"attributes": {
"boundary": "a"
}
}
}
},
"headers_offsets": [
{
"name": {
"Rfc": "content_type"
},
"start": 13,
"end": 44
}
],
"attachments": [
1
],
"parts": [
{
"Multipart": {
"content_type": {
"ContentType": {
"c_type": "multipart",
"c_subtype": "mixed",
"attributes": {
"boundary": "ab"
}
}
}
}
},
{
"Text": {
"header": {
"headers": {
"content_type": {
"c_type": "text",
"c_subtype": "plain"
"ContentType": {
"c_type": "text",
"c_subtype": "plain"
}
}
},
"contents": "body\n"
"body": "body\n"
}
}
]
],
"structure": {
"MultiPart": [
0,
[
{
"Part": 1
}
]
]
},
"offset_header": 0,
"offset_body": 45,
"offset_end": 131
}
+50 -7
View File
@@ -12,20 +12,63 @@ Content-Type: text/plain
---- EXPECTED STRUCTURE ----
{
"header": {
"headers_rfc": {
"content_type": {
"c_type": "multipart",
"c_subtype": "mixed",
"attributes": {
"boundary": "a"
"ContentType": {
"c_type": "multipart",
"c_subtype": "mixed",
"attributes": {
"boundary": "a"
}
}
}
},
"headers_offsets": [
{
"name": {
"Rfc": "content_type"
},
"start": 13,
"end": 44
}
],
"attachments": [
1
],
"parts": [
{
"Multipart": {
"content_type": {
"ContentType": {
"c_type": "multipart",
"c_subtype": "mixed",
"attributes": {
"boundary": "ab"
}
}
},
"mime_version": {
"Text": "1.0"
}
}
},
{
"Text": {
"contents": "--a--\n\n"
"body": "--a--\n\n"
}
}
]
],
"structure": {
"MultiPart": [
0,
[
{
"Part": 1
}
]
]
},
"offset_header": 0,
"offset_body": 45,
"offset_end": 157
}
+52 -10
View File
@@ -14,26 +14,68 @@ body2
---- EXPECTED STRUCTURE ----
{
"header": {
"headers_rfc": {
"content_type": {
"c_type": "multipart",
"c_subtype": "mixed",
"attributes": {
"boundary": "ab"
"ContentType": {
"c_type": "multipart",
"c_subtype": "mixed",
"attributes": {
"boundary": "ab"
}
}
}
},
"headers_offsets": [
{
"name": {
"Rfc": "content_type"
},
"start": 13,
"end": 45
}
],
"attachments": [
1
],
"parts": [
{
"Multipart": {
"content_type": {
"ContentType": {
"c_type": "multipart",
"c_subtype": "mixed",
"attributes": {
"boundary": "a"
}
}
}
}
},
{
"Text": {
"header": {
"headers": {
"content_type": {
"c_type": "text",
"c_subtype": "plain"
"ContentType": {
"c_type": "text",
"c_subtype": "plain"
}
}
},
"contents": "body\n--ab\nContent-Type: text/html\n\nbody2\n"
"body": "body\n--ab\nContent-Type: text/html\n\nbody2\n"
}
}
]
],
"structure": {
"MultiPart": [
0,
[
{
"Part": 1
}
]
]
},
"offset_header": 0,
"offset_body": 46,
"offset_end": 167
}
+69 -21
View File
@@ -18,42 +18,90 @@ Content-Type: text/plain
---- EXPECTED STRUCTURE ----
{
"header": {
"headers_rfc": {
"content_type": {
"c_type": "multipart",
"c_subtype": "mixed",
"attributes": {
"boundary": "1"
"ContentType": {
"c_type": "multipart",
"c_subtype": "mixed",
"attributes": {
"boundary": "1"
}
}
}
},
"html_body": [
"headers_offsets": [
{
"contents": "<html><body>1</body></html>"
"name": {
"Rfc": "content_type"
},
"start": 13,
"end": 44
}
],
"html_body": [
1
],
"text_body": [
{
"header": {
"content_type": {
"c_type": "text",
"c_subtype": "plain"
}
},
"contents": "1"
}
1
],
"attachments": [
2
],
"parts": [
{
"Multipart": {
"content_type": {
"ContentType": {
"c_type": "multipart",
"c_subtype": "mixed",
"attributes": {
"boundary": "2"
}
}
}
}
},
{
"Text": {
"header": {
"headers": {
"content_type": {
"c_type": "text",
"c_subtype": "plain"
"ContentType": {
"c_type": "text",
"c_subtype": "plain"
}
}
},
"contents": "22\n--1\nContent-Type: text/plain\n\n333\n"
"body": "1"
}
},
{
"Text": {
"headers": {
"content_type": {
"ContentType": {
"c_type": "text",
"c_subtype": "plain"
}
}
},
"body": "22\n--1\nContent-Type: text/plain\n\n333\n"
}
}
]
],
"structure": {
"MultiPart": [
0,
[
{
"Part": 1
},
{
"Part": 2
}
]
]
},
"offset_header": 0,
"offset_body": 45,
"offset_end": 193
}
+117 -37
View File
@@ -8,44 +8,124 @@ Content-Type: text/plain
---- EXPECTED STRUCTURE ----
{
"header": {
"headers_rfc": {
"content_type": {
"c_type": "message",
"c_subtype": "rfc822"
}
},
"attachments": [
{
"Message": {
"header": {
"content_type": {
"c_type": "message",
"c_subtype": "rfc822"
}
},
"attachments": [
{
"Message": {
"header": {
"content_type": {
"c_type": "text",
"c_subtype": "plain"
}
},
"html_body": [
{
"contents": "<html><body>1<br/></body></html>"
}
],
"text_body": [
{
"contents": "1\n"
}
]
}
}
]
"ContentType": {
"c_type": "message",
"c_subtype": "rfc822"
}
}
]
},
"headers_offsets": [
{
"name": {
"Rfc": "content_type"
},
"start": 13,
"end": 29
}
],
"attachments": [
0
],
"parts": [
{
"Message": {
"headers": {
"content_type": {
"ContentType": {
"c_type": "message",
"c_subtype": "rfc822"
}
}
},
"body": {
"headers_rfc": {
"content_type": {
"ContentType": {
"c_type": "message",
"c_subtype": "rfc822"
}
}
},
"headers_offsets": [
{
"name": {
"Rfc": "content_type"
},
"start": 43,
"end": 59
}
],
"attachments": [
0
],
"parts": [
{
"Message": {
"headers": {
"content_type": {
"ContentType": {
"c_type": "message",
"c_subtype": "rfc822"
}
}
},
"body": {
"headers_rfc": {
"content_type": {
"ContentType": {
"c_type": "text",
"c_subtype": "plain"
}
}
},
"headers_offsets": [
{
"name": {
"Rfc": "content_type"
},
"start": 73,
"end": 85
}
],
"html_body": [
0
],
"text_body": [
0
],
"parts": [
{
"Text": {
"body": "1\n"
}
}
],
"structure": {
"Part": 0
},
"offset_header": 60,
"offset_body": 86,
"offset_end": 88
}
}
}
],
"structure": {
"List": []
},
"offset_header": 30,
"offset_body": 60,
"offset_end": 88
}
}
}
],
"structure": {
"List": []
},
"offset_header": 0,
"offset_body": 30,
"offset_end": 88
}
+69 -21
View File
@@ -18,42 +18,90 @@ Content-Type: text/plain
---- EXPECTED STRUCTURE ----
{
"header": {
"headers_rfc": {
"content_type": {
"c_type": "multipart",
"c_subtype": "mixed",
"attributes": {
"boundary": "1"
"ContentType": {
"c_type": "multipart",
"c_subtype": "mixed",
"attributes": {
"boundary": "1"
}
}
}
},
"html_body": [
"headers_offsets": [
{
"contents": "<html><body>1</body></html>"
"name": {
"Rfc": "content_type"
},
"start": 13,
"end": 44
}
],
"html_body": [
1
],
"text_body": [
{
"header": {
"content_type": {
"c_type": "text",
"c_subtype": "plain"
}
},
"contents": "1"
}
1
],
"attachments": [
2
],
"parts": [
{
"Multipart": {
"content_type": {
"ContentType": {
"c_type": "multipart",
"c_subtype": "mixed",
"attributes": {
"boundary": "2"
}
}
}
}
},
{
"Text": {
"header": {
"headers": {
"content_type": {
"c_type": "text",
"c_subtype": "plain"
"ContentType": {
"c_type": "text",
"c_subtype": "plain"
}
}
},
"contents": "22\n--1\nContent-Type: text/plain\n\n333\n"
"body": "1"
}
},
{
"Text": {
"headers": {
"content_type": {
"ContentType": {
"c_type": "text",
"c_subtype": "plain"
}
}
},
"body": "22\n--1\nContent-Type: text/plain\n\n333\n"
}
}
]
],
"structure": {
"MultiPart": [
0,
[
{
"Part": 1
},
{
"Part": 2
}
]
]
},
"offset_header": 0,
"offset_body": 45,
"offset_end": 193
}
+130 -33
View File
@@ -24,52 +24,149 @@ Content-Type: text/plain
---- EXPECTED STRUCTURE ----
{
"header": {
"headers_rfc": {
"content_type": {
"c_type": "multipart",
"c_subtype": "mixed",
"attributes": {
"boundary": "1"
"ContentType": {
"c_type": "multipart",
"c_subtype": "mixed",
"attributes": {
"boundary": "1"
}
}
}
},
"attachments": [
"headers_offsets": [
{
"Message": {
"header": {
"content_type": {
"c_type": "text",
"c_subtype": "plain"
"name": {
"Rfc": "content_type"
},
"start": 13,
"end": 44
}
],
"attachments": [
1,
2
],
"parts": [
{
"Multipart": {
"content_type": {
"ContentType": {
"c_type": "multipart",
"c_subtype": "mixed",
"attributes": {
"boundary": "2"
}
}
},
"html_body": [
{
"contents": "<html><body>1</body></html>"
}
],
"text_body": [
{
"contents": "1"
}
]
}
}
},
{
"Message": {
"header": {
"headers": {
"content_type": {
"c_type": "text",
"c_subtype": "plain"
}
},
"attachments": [
{
"Text": {
"contents": "22\n--1\nContent-Type: message/rfc822\n\nContent-Type: text/plain\n\n333\n"
"ContentType": {
"c_type": "message",
"c_subtype": "rfc822"
}
}
]
},
"body": {
"headers_rfc": {
"content_type": {
"ContentType": {
"c_type": "text",
"c_subtype": "plain"
}
}
},
"headers_offsets": [
{
"name": {
"Rfc": "content_type"
},
"start": 141,
"end": 153
}
],
"html_body": [
0
],
"text_body": [
0
],
"parts": [
{
"Text": {
"body": "1"
}
}
],
"structure": {
"Part": 0
},
"offset_header": 128,
"offset_body": 154,
"offset_end": 160
}
}
},
{
"Message": {
"headers": {
"content_type": {
"ContentType": {
"c_type": "message",
"c_subtype": "rfc822"
}
}
},
"body": {
"headers_rfc": {
"content_type": {
"ContentType": {
"c_type": "text",
"c_subtype": "plain"
}
}
},
"headers_offsets": [
{
"name": {
"Rfc": "content_type"
},
"start": 203,
"end": 215
}
],
"attachments": [
0
],
"parts": [
{
"Text": {
"body": "22\n--1\nContent-Type: message/rfc822\n\nContent-Type: text/plain\n\n333\n"
}
}
],
"structure": {
"Part": 0
},
"offset_header": 190,
"offset_body": 216,
"offset_end": 283
}
}
}
]
],
"structure": {
"MultiPart": [
0,
[]
]
},
"offset_header": 0,
"offset_body": 45,
"offset_end": 283
}
+132 -40
View File
@@ -33,66 +33,158 @@ hello, world
---- EXPECTED STRUCTURE ----
{
"header": {
"mime_version": "1.0",
"headers_rfc": {
"content_type": {
"c_type": "multipart",
"c_subtype": "mixed",
"attributes": {
"boundary": "1"
"ContentType": {
"c_type": "multipart",
"c_subtype": "mixed",
"attributes": {
"boundary": "1"
}
}
},
"mime_version": {
"Text": "1.0"
}
},
"html_body": [
"headers_offsets": [
{
"contents": "<html><body>hello, world</body></html>"
"name": {
"Rfc": "content_type"
},
"start": 13,
"end": 44
},
{
"contents": "<html><body>hello, world</body></html>"
},
{
"contents": "<html><body>hello, world</body></html>"
},
{
"contents": "<html><body>hello, world</body></html>"
"name": {
"Rfc": "mime_version"
},
"start": 57,
"end": 62
}
],
"html_body": [
0,
2,
4,
6
],
"text_body": [
0,
2,
4,
6
],
"parts": [
{
"header": {
"content_type": {
"c_type": "text",
"c_subtype": "plain"
}
},
"contents": "hello, world"
"Text": {
"headers": {
"content_type": {
"ContentType": {
"c_type": "text",
"c_subtype": "plain"
}
}
},
"body": "hello, world"
}
},
{
"header": {
"Multipart": {
"mime_version": {
"Text": "2.0"
},
"content_type": {
"c_type": "text",
"c_subtype": "plain"
"ContentType": {
"c_type": "multipart",
"c_subtype": "mixed",
"attributes": {
"boundary": "1"
}
}
}
},
"contents": "hello, world"
}
},
{
"header": {
"content_type": {
"c_type": "text",
"c_subtype": "plain"
}
},
"contents": "hello, world"
"Text": {
"headers": {
"content_type": {
"ContentType": {
"c_type": "text",
"c_subtype": "plain"
}
}
},
"body": "hello, world"
}
},
{
"header": {
"Multipart": {
"content_type": {
"c_type": "text",
"c_subtype": "plain"
"ContentType": {
"c_type": "multipart",
"c_subtype": "mixed",
"attributes": {
"boundary": "1"
}
}
},
"mime_version": {
"Text": "abc"
}
},
"contents": "hello, world"
}
},
{
"Text": {
"headers": {
"content_type": {
"ContentType": {
"c_type": "text",
"c_subtype": "plain"
}
}
},
"body": "hello, world"
}
},
{
"Multipart": {
"content_type": {
"ContentType": {
"c_type": "multipart",
"c_subtype": "mixed",
"attributes": {
"boundary": "1"
}
}
}
}
},
{
"Text": {
"headers": {
"content_type": {
"ContentType": {
"c_type": "text",
"c_subtype": "plain"
}
}
},
"body": "hello, world"
}
}
]
],
"structure": {
"MultiPart": [
5,
[
{
"Part": 6
}
]
]
},
"offset_header": 0,
"offset_body": 63,
"offset_end": 436
}
+37 -15
View File
@@ -8,29 +8,51 @@ hello, world
---- EXPECTED STRUCTURE ----
{
"header": {
"headers_rfc": {
"content_type": {
"c_type": "multipart",
"c_subtype": "mixed",
"attributes": {
"boundary": "1"
"ContentType": {
"c_type": "multipart",
"c_subtype": "mixed",
"attributes": {
"boundary": "1"
}
}
}
},
"html_body": [
"headers_offsets": [
{
"contents": "<html><body>hello, world</body></html>"
"name": {
"Rfc": "content_type"
},
"start": 13,
"end": 44
}
],
"html_body": [
0
],
"text_body": [
0
],
"parts": [
{
"header": {
"content_type": {
"c_type": "text",
"c_subtype": "plain"
}
},
"contents": "hello, world"
"Text": {
"headers": {
"content_type": {
"ContentType": {
"c_type": "text",
"c_subtype": "plain"
}
}
},
"body": "hello, world"
}
}
]
],
"structure": {
"Part": 0
},
"offset_header": 0,
"offset_body": 45,
"offset_end": 92
}
+140 -49
View File
@@ -26,17 +26,35 @@ invalid
---- EXPECTED STRUCTURE ----
{
"header": {
"date": {
"year": 2007,
"month": 5,
"day": 23,
"hour": 4,
"minute": 58,
"second": 8,
"tz_before_gmt": false,
"tz_hour": 3,
"tz_minute": 0
"headers_rfc": {
"message_id": {
"Text": "1.2.3.4@example"
},
"subject": {
"Text": "Hello world"
},
"content_type": {
"ContentType": {
"c_type": "multipart",
"c_subtype": "signed",
"attributes": {
"boundary": "=-GNQXLhuj24Pl1aCkk4/d",
"micalg": "pgp-sha1",
"protocol": "application/pgp-signature"
}
}
},
"to": {
"Address": {
"name": "Another User",
"address": "test2@example.org"
}
},
"return_path": {
"Text": "test@example.org"
},
"mime_version": {
"Text": "1.0"
},
"from": {
"Address": {
@@ -44,58 +62,118 @@ invalid
"address": "test@example.org"
}
},
"message_id": "1.2.3.4@example",
"mime_version": "1.0",
"return_path": [
"test@example.org"
],
"subject": "Hello world",
"to": {
"Address": {
"name": "Another User",
"address": "test2@example.org"
}
},
"content_type": {
"c_type": "multipart",
"c_subtype": "signed",
"attributes": {
"boundary": "=-GNQXLhuj24Pl1aCkk4/d",
"protocol": "application/pgp-signature",
"micalg": "pgp-sha1"
"date": {
"DateTime": {
"year": 2007,
"month": 5,
"day": 23,
"hour": 4,
"minute": 58,
"second": 8,
"tz_before_gmt": false,
"tz_hour": 3,
"tz_minute": 0
}
}
},
"html_body": [
"headers_offsets": [
{
"contents": "<html><body>There was a day <br/>a happy day<br/></body></html>"
"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": [
{
"header": {
"content_transfer_encoding": "quoted-printable",
"content_type": {
"c_type": "text",
"c_subtype": "plain"
}
},
"contents": "There was a day \na happy day\n"
}
0
],
"attachments": [
1
],
"parts": [
{
"Text": {
"headers": {
"content_type": {
"ContentType": {
"c_type": "text",
"c_subtype": "plain"
}
},
"content_transfer_encoding": {
"Text": "quoted-printable"
}
},
"body": "There was a day \na happy day\n"
}
},
{
"Binary": {
"header": {
"headers": {
"content_type": {
"c_type": "application",
"c_subtype": "pgp-signature",
"attributes": {
"name": "signature.asc"
"ContentType": {
"c_type": "application",
"c_subtype": "pgp-signature",
"attributes": {
"name": "signature.asc"
}
}
}
},
"contents": [
"body": [
105,
110,
118,
@@ -107,5 +185,18 @@ invalid
]
}
}
]
],
"structure": {
"List": [
{
"Part": 0
},
{
"Part": 1
}
]
},
"offset_header": 0,
"offset_body": 335,
"offset_end": 585
}
+82 -21
View File
@@ -25,42 +25,103 @@ Content-Type: text/plain
---- EXPECTED STRUCTURE ----
{
"header": {
"headers_rfc": {
"content_type": {
"c_type": "multipart",
"c_subtype": "mixed",
"attributes": {
"boundary": "1234567890123456789012345678901234567890123456789012345678901234567890123456789012"
"ContentType": {
"c_type": "multipart",
"c_subtype": "mixed",
"attributes": {
"boundary": "1234567890123456789012345678901234567890123456789012345678901234567890123456789012"
}
}
}
},
"html_body": [
"headers_offsets": [
{
"contents": "<html><body>1<br/>--1234567890123456789012345678901234567890123456789012345678901234567890123456789012<br/>Content-Type: text/plain<br/><br/>22<br/>--123456789012345678901234567890123456789012345678901234567890123456789012345678901<br/>Content-Type: text/plain<br/><br/>333</body></html>"
"name": {
"Rfc": "content_type"
},
"start": 13,
"end": 125
}
],
"html_body": [
2
],
"text_body": [
{
"header": {
"content_type": {
"c_type": "text",
"c_subtype": "plain"
}
},
"contents": "1\n--1234567890123456789012345678901234567890123456789012345678901234567890123456789012\nContent-Type: text/plain\n\n22\n--123456789012345678901234567890123456789012345678901234567890123456789012345678901\nContent-Type: text/plain\n\n333"
}
2
],
"attachments": [
3
],
"parts": [
{
"Multipart": {
"content_type": {
"ContentType": {
"c_type": "multipart",
"c_subtype": "mixed",
"attributes": {
"boundary": "123456789012345678901234567890123456789012345678901234567890123456789012345678901"
}
}
}
}
},
{
"Multipart": {
"content_type": {
"ContentType": {
"c_type": "multipart",
"c_subtype": "mixed",
"attributes": {
"boundary": "12345678901234567890123456789012345678901234567890123456789012345678901234567890"
}
}
}
}
},
{
"Text": {
"header": {
"headers": {
"content_type": {
"c_type": "text",
"c_subtype": "plain"
"ContentType": {
"c_type": "text",
"c_subtype": "plain"
}
}
},
"contents": "4444\n"
"body": "1\n--1234567890123456789012345678901234567890123456789012345678901234567890123456789012\nContent-Type: text/plain\n\n22\n--123456789012345678901234567890123456789012345678901234567890123456789012345678901\nContent-Type: text/plain\n\n333"
}
},
{
"Text": {
"headers": {
"content_type": {
"ContentType": {
"c_type": "text",
"c_subtype": "plain"
}
}
},
"body": "4444\n"
}
}
]
],
"structure": {
"MultiPart": [
1,
[
{
"Part": 2
},
{
"Part": 3
}
]
]
},
"offset_header": 0,
"offset_body": 126,
"offset_end": 997
}
+261 -85
View File
@@ -73,135 +73,311 @@ Content-Transfer-Encoding: Quoted-printable
---- EXPECTED STRUCTURE ----
{
"header": {
"date": {
"year": 1994,
"month": 10,
"day": 7,
"hour": 16,
"minute": 15,
"second": 5,
"tz_before_gmt": true,
"tz_hour": 7,
"tz_minute": 0
"headers_rfc": {
"subject": {
"Text": "A multipart example"
},
"from": {
"Address": {
"name": "Nathaniel Borenstein",
"address": "nsb@nsb.fv.com"
"content_type": {
"ContentType": {
"c_type": "multipart",
"c_subtype": "mixed",
"attributes": {
"boundary": "unique-boundary-1"
}
}
},
"mime_version": "1.0",
"subject": "A multipart example",
"to": {
"Address": {
"name": "Ned Freed",
"address": "ned@innosoft.com"
}
},
"content_type": {
"c_type": "multipart",
"c_subtype": "mixed",
"attributes": {
"boundary": "unique-boundary-1"
"mime_version": {
"Text": "1.0"
},
"date": {
"DateTime": {
"year": 1994,
"month": 10,
"day": 7,
"hour": 16,
"minute": 15,
"second": 5,
"tz_before_gmt": true,
"tz_hour": 7,
"tz_minute": 0
}
},
"from": {
"Address": {
"name": "Nathaniel Borenstein",
"address": "nsb@nsb.fv.com"
}
}
},
"html_body": [
"headers_offsets": [
{
"contents": "<html><body>... Some text appears here ...<br/><br/>[Note that the blank between the boundary and the start<br/>of the text in this part means no header fields were<br/>given and this is text in the US-ASCII character set.<br/>It could have been done with explicit typing as in the<br/>next part.]<br/></body></html>"
"name": {
"Rfc": "mime_version"
},
"start": 13,
"end": 18
},
{
"contents": "<html><body>This could have been part of the previous part, but<br/>illustrates explicit versus implicit typing of body<br/>parts.<br/></body></html>"
"name": {
"Rfc": "from"
},
"start": 23,
"end": 62
},
{
"name": {
"Rfc": "to"
},
"start": 65,
"end": 95
},
{
"name": {
"Rfc": "date"
},
"start": 100,
"end": 139
},
{
"name": {
"Rfc": "subject"
},
"start": 147,
"end": 168
},
{
"name": {
"Rfc": "content_type"
},
"start": 181,
"end": 238
}
],
"html_body": [
0,
1
],
"text_body": [
{
"contents": "... Some text appears here ...\n\n[Note that the blank between the boundary and the start\nof the text in this part means no header fields were\ngiven and this is text in the US-ASCII character set.\nIt could have been done with explicit typing as in the\nnext part.]\n"
},
{
"header": {
"content_type": {
"c_type": "text",
"c_subtype": "plain",
"attributes": {
"charset": "US-ASCII"
}
}
},
"contents": "This could have been part of the previous part, but\nillustrates explicit versus implicit typing of body\nparts.\n"
}
0,
1
],
"attachments": [
3,
4,
5,
6
],
"parts": [
{
"Text": {
"header": {
"content_transfer_encoding": "base64",
"content_type": {
"c_type": "audio",
"c_subtype": "basic"
}
},
"contents": "... base64-encoded 8000 Hz single-channel\n mu-law-format audio data goes here ...\n"
"body": "... Some text appears here ...\n\n[Note that the blank between the boundary and the start\nof the text in this part means no header fields were\ngiven and this is text in the US-ASCII character set.\nIt could have been done with explicit typing as in the\nnext part.]\n"
}
},
{
"Text": {
"header": {
"content_transfer_encoding": "base64",
"headers": {
"content_type": {
"c_type": "image",
"c_subtype": "jpeg"
"ContentType": {
"c_type": "text",
"c_subtype": "plain",
"attributes": {
"charset": "US-ASCII"
}
}
}
},
"contents": "... base64-encoded image data goes here ...\n"
"body": "This could have been part of the previous part, but\nillustrates explicit versus implicit typing of body\nparts.\n"
}
},
{
"Multipart": {
"content_type": {
"ContentType": {
"c_type": "multipart",
"c_subtype": "parallel",
"attributes": {
"boundary": "unique-boundary-2"
}
}
}
}
},
{
"Text": {
"header": {
"headers": {
"content_type": {
"c_type": "text",
"c_subtype": "enriched"
"ContentType": {
"c_type": "audio",
"c_subtype": "basic"
}
},
"content_transfer_encoding": {
"Text": "base64"
}
},
"contents": "This is <bold><italic>enriched.</italic></bold>\n<smaller>as defined in RFC 1896</smaller>\n\nIsn't it\n<bigger><bigger>cool?</bigger></bigger>\n"
"body": "... base64-encoded 8000 Hz single-channel\n mu-law-format audio data goes here ...\n"
}
},
{
"Text": {
"headers": {
"content_transfer_encoding": {
"Text": "base64"
},
"content_type": {
"ContentType": {
"c_type": "image",
"c_subtype": "jpeg"
}
}
},
"body": "... base64-encoded image data goes here ...\n"
}
},
{
"Text": {
"headers": {
"content_type": {
"ContentType": {
"c_type": "text",
"c_subtype": "enriched"
}
}
},
"body": "This is <bold><italic>enriched.</italic></bold>\n<smaller>as defined in RFC 1896</smaller>\n\nIsn't it\n<bigger><bigger>cool?</bigger></bigger>\n"
}
},
{
"Message": {
"header": {
"from": {
"Address": {
"name": "mailbox in US-ASCII"
}
},
"subject": "(subject in US-ASCII)",
"to": {
"Address": {
"name": "address in US-ASCII"
}
},
"content_transfer_encoding": "Quoted-printable",
"headers": {
"content_type": {
"c_type": "text",
"c_subtype": "plain",
"attributes": {
"charset": "ISO-8859-1"
"ContentType": {
"c_type": "message",
"c_subtype": "rfc822"
}
}
},
"html_body": [
{
"contents": "<html><body>... Additional text in ISO-8859-1 goes here ...<br/></body></html>"
}
],
"text_body": [
{
"contents": "... Additional text in ISO-8859-1 goes here ...\n"
}
]
"body": {
"headers_rfc": {
"from": {
"Address": {
"name": "mailbox in US-ASCII"
}
},
"to": {
"Address": {
"name": "address in US-ASCII"
}
},
"content_type": {
"ContentType": {
"c_type": "text",
"c_subtype": "plain",
"attributes": {
"charset": "ISO-8859-1"
}
}
},
"content_transfer_encoding": {
"Text": "Quoted-printable"
},
"subject": {
"Text": "(subject in US-ASCII)"
}
},
"headers_offsets": [
{
"name": {
"Rfc": "from"
},
"start": 1612,
"end": 1635
},
{
"name": {
"Rfc": "to"
},
"start": 1638,
"end": 1661
},
{
"name": {
"Rfc": "subject"
},
"start": 1669,
"end": 1692
},
{
"name": {
"Rfc": "content_type"
},
"start": 1705,
"end": 1737
},
{
"name": {
"Rfc": "content_transfer_encoding"
},
"start": 1763,
"end": 1781
}
],
"html_body": [
0
],
"text_body": [
0
],
"parts": [
{
"Text": {
"body": "... Additional text in ISO-8859-1 goes here ...\n"
}
}
],
"structure": {
"Part": 0
},
"offset_header": 1607,
"offset_body": 1782,
"offset_end": 1850
}
}
}
]
],
"structure": {
"List": [
{
"Part": 0
},
{
"Part": 1
},
{
"MultiPart": [
2,
[
{
"Part": 3
},
{
"Part": 4
}
]
]
},
{
"Part": 5
}
]
},
"offset_header": 0,
"offset_body": 239,
"offset_end": 1852
}
+137 -42
View File
@@ -41,47 +41,122 @@ get RFC-MIME.DOC
---- EXPECTED STRUCTURE ----
{
"header": {
"from": {
"Address": {
"name": "Whomever"
"headers_rfc": {
"mime_version": {
"Text": "1.0"
},
"message_id": {
"Text": "id1@host.com"
},
"content_type": {
"ContentType": {
"c_type": "multipart",
"c_subtype": "alternative",
"attributes": {
"boundary": "42"
}
}
},
"message_id": "id1@host.com",
"mime_version": "1.0",
"subject": "whatever",
"content_id": {
"Text": "id001@guppylake.bellcore.com"
},
"to": {
"Address": {
"name": "Someone"
}
},
"content_id": "id001@guppylake.bellcore.com",
"content_type": {
"c_type": "multipart",
"c_subtype": "alternative",
"attributes": {
"boundary": "42"
"subject": {
"Text": "whatever"
},
"from": {
"Address": {
"name": "Whomever"
}
}
},
"headers_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": [
0,
1,
2
],
"parts": [
{
"Binary": {
"header": {
"headers": {
"content_type": {
"c_type": "message",
"c_subtype": "external-body",
"attributes": {
"name": "BodyFormats.ps",
"mode": "image",
"access-type": "ANON-FTP",
"directory": "pub",
"expiration": "Fri, 14 Jun 1991 19:13:14 -0400 (EDT)",
"site": "thumper.bellcore.com"
"ContentType": {
"c_type": "message",
"c_subtype": "external-body",
"attributes": {
"expiration": "Fri, 14 Jun 1991 19:13:14 -0400 (EDT)",
"directory": "pub",
"mode": "image",
"name": "BodyFormats.ps",
"site": "thumper.bellcore.com",
"access-type": "ANON-FTP"
}
}
}
},
"contents": [
"body": [
67,
111,
110,
@@ -166,19 +241,21 @@ get RFC-MIME.DOC
},
{
"Binary": {
"header": {
"headers": {
"content_type": {
"c_type": "message",
"c_subtype": "external-body",
"attributes": {
"access-type": "local-file",
"name": "/u/nsb/writing/rfcs/RFC-MIME.ps",
"expiration": "Fri, 14 Jun 1991 19:13:14 -0400 (EDT)",
"site": "thumper.bellcore.com"
"ContentType": {
"c_type": "message",
"c_subtype": "external-body",
"attributes": {
"access-type": "local-file",
"site": "thumper.bellcore.com",
"expiration": "Fri, 14 Jun 1991 19:13:14 -0400 (EDT)",
"name": "/u/nsb/writing/rfcs/RFC-MIME.ps"
}
}
}
},
"contents": [
"body": [
67,
111,
110,
@@ -263,18 +340,20 @@ get RFC-MIME.DOC
},
{
"Binary": {
"header": {
"headers": {
"content_type": {
"c_type": "message",
"c_subtype": "external-body",
"attributes": {
"access-type": "mail-server",
"server": "listserv@bogus.bitnet",
"expiration": "Fri, 14 Jun 1991 19:13:14 -0400 (EDT)"
"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"
}
}
}
},
"contents": [
"body": [
67,
111,
110,
@@ -375,5 +454,21 @@ get RFC-MIME.DOC
]
}
}
]
],
"structure": {
"List": [
{
"Part": 0
},
{
"Part": 1
},
{
"Part": 2
}
]
},
"offset_header": 0,
"offset_body": 198,
"offset_end": 1106
}
+566 -385
View File
@@ -73,428 +73,609 @@ U6ZGxseyk8SasGw3J9GRzdTQky1iHNvcPNNI4TLeKdfMvy0vMqLrItvuxfDW8ubjueDtJufz
---- EXPECTED STRUCTURE ----
{
"header": {
"headers_rfc": {
"subject": {
"Text": "[Fwd: Map of Argentina with Description]"
},
"from": {
"Address": {
"name": "Al Gore",
"address": "vice-president@whitehouse.gov"
}
},
"subject": "[Fwd: Map of Argentina with Description]",
"content_type": {
"ContentType": {
"c_type": "multipart",
"c_subtype": "mixed",
"attributes": {
"boundary": "D7F------------D7FD5A0B8AB9C65CCDBFA872"
}
}
},
"to": {
"Address": {
"name": "White House Transportation Coordinator",
"address": "transport@whitehouse.gov"
}
},
"content_type": {
"c_type": "multipart",
"c_subtype": "mixed",
"attributes": {
"boundary": "D7F------------D7FD5A0B8AB9C65CCDBFA872"
}
}
},
"html_body": [
"headers_offsets": [
{
"contents": "<html><body>Fred,<br/><br/>Fire up Air Force One! We're going South!<br/><br/>Thanks,<br/>Al</body></html>"
"name": {
"Rfc": "from"
},
"start": 5,
"end": 47
},
{
"name": {
"Rfc": "to"
},
"start": 50,
"end": 123
},
{
"name": {
"Rfc": "subject"
},
"start": 131,
"end": 173
},
{
"name": {
"Rfc": "content_type"
},
"start": 186,
"end": 269
}
],
"html_body": [
0
],
"text_body": [
{
"header": {
"content_transfer_encoding": "7bit",
"content_type": {
"c_type": "text",
"c_subtype": "plain",
"attributes": {
"charset": "us-ascii"
}
}
},
"contents": "Fred,\n\nFire up Air Force One! We're going South!\n\nThanks,\nAl"
}
0
],
"attachments": [
1
],
"parts": [
{
"Message": {
"header": {
"date": {
"year": 1998,
"month": 8,
"day": 13,
"hour": 17,
"minute": 42,
"second": 41,
"tz_before_gmt": false,
"tz_hour": 10,
"tz_minute": 0
},
"from": {
"Address": {
"name": "Bill Clinton",
"address": "president@whitehouse.gov"
"Text": {
"headers": {
"content_type": {
"ContentType": {
"c_type": "text",
"c_subtype": "plain",
"attributes": {
"charset": "us-ascii"
}
}
},
"message_id": "199804130742.RAA20366@mai1host.whitehouse.gov",
"mime_version": "1.0",
"received": [
"from mailhost.whitehouse.gov ([192.168.51.200])\n by heartbeat.whitehouse.gov (8.8.8/8.8.8) with ESMTP id SAA22453\n for <vice-president@heartbeat.whitehouse.gov>;\n Mon, 13 Aug 1998 l8:14:23 +1000",
"from the_big_box.whitehouse.gov ([192.168.51.50])\n by mailhost.whitehouse.gov (8.8.8/8.8.7) with ESMTP id RAA20366\n for vice-president@whitehouse.gov; Mon, 13 Aug 1998 17:42:41 +1000"
],
"return_path": [
"president@whitehouse.gov"
],
"subject": "Map of Argentina with Description",
"to": {
"Address": {
"name": "A1 Gore (The Enforcer)",
"address": "vice-president@whitehouse.gov"
"content_transfer_encoding": {
"Text": "7bit"
}
},
"body": "Fred,\n\nFire up Air Force One! We're going South!\n\nThanks,\nAl"
}
},
{
"Message": {
"headers": {
"content_transfer_encoding": {
"Text": "7bit"
},
"content_disposition": {
"ContentType": {
"c_type": "inline"
}
},
"content_type": {
"c_type": "multipart",
"c_subtype": "mixed",
"attributes": {
"boundary": "DC8------------DC8638F443D87A7F0726DEF7"
"ContentType": {
"c_type": "message",
"c_subtype": "rfc822"
}
}
},
"html_body": [
{
"contents": "<html><body>Hi A1,<br/><br/>I finally figured out this MIME thing. Pretty cool. I'll send you<br/>some sax music in .au files next week!<br/><br/>Anyway, the attached image is really too small to get a good look at<br/>Argentina. Try this for a much better map:<br/><br/> http://www.1one1yp1anet.com/dest/sam/graphics/map-arg.htm<br/><br/>Then again, shouldn't the CIA have something like that?<br/><br/>Bill</body></html>"
},
0
],
"text_body": [
{
"header": {
"content_transfer_encoding": "7bit",
"content_type": {
"c_type": "text",
"c_subtype": "plain",
"body": {
"headers_rfc": {
"content_type": {
"ContentType": {
"c_type": "multipart",
"c_subtype": "mixed",
"attributes": {
"charset": "us-ascii"
"boundary": "DC8------------DC8638F443D87A7F0726DEF7"
}
}
},
"contents": "Hi A1,\n\nI finally figured out this MIME thing. Pretty cool. I'll send you\nsome sax music in .au files next week!\n\nAnyway, the attached image is really too small to get a good look at\nArgentina. Try this for a much better map:\n\n http://www.1one1yp1anet.com/dest/sam/graphics/map-arg.htm\n\nThen again, shouldn't the CIA have something like that?\n\nBill"
"message_id": {
"Text": "199804130742.RAA20366@mai1host.whitehouse.gov"
},
"subject": {
"Text": "Map of Argentina with Description"
},
"from": {
"Address": {
"name": "Bill Clinton",
"address": "president@whitehouse.gov"
}
},
"return_path": {
"Text": "president@whitehouse.gov"
},
"received": {
"Collection": [
{
"Text": "from mailhost.whitehouse.gov ([192.168.51.200])\n by heartbeat.whitehouse.gov (8.8.8/8.8.8) with ESMTP id SAA22453\n for <vice-president@heartbeat.whitehouse.gov>;\n Mon, 13 Aug 1998 l8:14:23 +1000"
},
{
"Text": "from the_big_box.whitehouse.gov ([192.168.51.50])\n by mailhost.whitehouse.gov (8.8.8/8.8.7) with ESMTP id RAA20366\n for vice-president@whitehouse.gov; Mon, 13 Aug 1998 17:42:41 +1000"
}
]
},
"date": {
"DateTime": {
"year": 1998,
"month": 8,
"day": 13,
"hour": 17,
"minute": 42,
"second": 41,
"tz_before_gmt": false,
"tz_hour": 10,
"tz_minute": 0
}
},
"mime_version": {
"Text": "1.0"
},
"to": {
"Address": {
"name": "A1 Gore (The Enforcer)",
"address": "vice-president@whitehouse.gov"
}
}
},
0
],
"attachments": [
{
"InlineBinary": {
"header": {
"content_disposition": {
"c_type": "inline",
"attributes": {
"fi1ename": "map_of_Argentina.gif"
"headers_offsets": [
{
"name": {
"Rfc": "return_path"
},
"start": 639,
"end": 667
},
{
"name": {
"Rfc": "received"
},
"start": 676,
"end": 893
},
{
"name": {
"Rfc": "received"
},
"start": 902,
"end": 1100
},
{
"name": {
"Rfc": "date"
},
"start": 1105,
"end": 1138
},
{
"name": {
"Rfc": "message_id"
},
"start": 1149,
"end": 1198
},
{
"name": {
"Rfc": "from"
},
"start": 1203,
"end": 1244
},
{
"name": {
"Rfc": "to"
},
"start": 1247,
"end": 1303
},
{
"name": {
"Rfc": "subject"
},
"start": 1311,
"end": 1347
},
{
"name": {
"Rfc": "mime_version"
},
"start": 1360,
"end": 1365
},
{
"name": {
"Rfc": "content_type"
},
"start": 1378,
"end": 1461
}
],
"html_body": [
0,
1
],
"text_body": [
0,
1
],
"attachments": [
1
],
"parts": [
{
"Text": {
"headers": {
"content_type": {
"ContentType": {
"c_type": "text",
"c_subtype": "plain",
"attributes": {
"charset": "us-ascii"
}
}
},
"content_transfer_encoding": {
"Text": "7bit"
}
},
"content_transfer_encoding": "base64",
"content_type": {
"c_type": "image",
"c_subtype": "gif",
"attributes": {
"name": "map_of_Argentina.gif"
"body": "Hi A1,\n\nI finally figured out this MIME thing. Pretty cool. I'll send you\nsome sax music in .au files next week!\n\nAnyway, the attached image is really too small to get a good look at\nArgentina. Try this for a much better map:\n\n http://www.1one1yp1anet.com/dest/sam/graphics/map-arg.htm\n\nThen again, shouldn't the CIA have something like that?\n\nBill"
}
},
{
"InlineBinary": {
"headers": {
"content_disposition": {
"ContentType": {
"c_type": "inline",
"attributes": {
"fi1ename": "map_of_Argentina.gif"
}
}
},
"content_type": {
"ContentType": {
"c_type": "image",
"c_subtype": "gif",
"attributes": {
"name": "map_of_Argentina.gif"
}
}
},
"content_transfer_encoding": {
"Text": "base64"
}
}
},
"contents": [
71,
77,
70,
56,
61,
97,
37,
0,
53,
0,
162,
0,
0,
255,
255,
255,
255,
251,
240,
255,
232,
154,
125,
125,
125,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
44,
0,
0,
0,
0,
37,
0,
53,
0,
0,
3,
237,
8,
186,
220,
254,
112,
192,
73,
163,
4,
34,
235,
157,
9,
225,
96,
40,
12,
215,
8,
126,
166,
72,
42,
169,
224,
189,
94,
187,
173,
152,
25,
187,
132,
2,
183,
180,
253,
245,
128,
87,
0,
136,
82,
149,
66,
177,
133,
71,
169,
44,
114,
122,
39,
77,
238,
197,
0,
6,
157,
26,
232,
38,
70,
237,
194,
154,
32,
109,
231,
183,
236,
86,
173,
216,
209,
81,
74,
158,
150,
29,
196,
240,
186,
51,
182,
94,
225,
202,
231,
156,
123,
166,
226,
131,
122,
44,
82,
117,
110,
126,
77,
93,
51,
123,
56,
94,
95,
66,
67,
121,
89,
138,
48,
4,
67,
118,
118,
65,
144,
25,
98,
109,
75,
58,
134,
76,
128,
137,
130,
116,
46,
76,
147,
127,
88,
155,
40,
141,
167,
125,
169,
115,
46,
132,
133,
157,
141,
114,
163,
99,
139,
94,
158,
58,
58,
182,
53,
108,
178,
77,
160,
105,
106,
183,
184,
99,
87,
83,
166,
70,
198,
199,
178,
147,
196,
154,
176,
108,
55,
39,
209,
145,
205,
212,
208,
147,
45,
98,
28,
219,
220,
60,
211,
72,
225,
50,
222,
41,
215,
204,
191,
45,
47,
50,
162,
235,
34,
219,
238,
197,
240,
214,
242,
230,
227,
185,
224,
237,
38,
231,
243,
238,
43,
72,
8,
28,
72,
72,
160,
193,
131,
8,
19,
42,
60,
152,
0,
0,
59
]
},
"body": [
71,
77,
70,
56,
61,
97,
37,
0,
53,
0,
162,
0,
0,
255,
255,
255,
255,
251,
240,
255,
232,
154,
125,
125,
125,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
44,
0,
0,
0,
0,
37,
0,
53,
0,
0,
3,
237,
8,
186,
220,
254,
112,
192,
73,
163,
4,
34,
235,
157,
9,
225,
96,
40,
12,
215,
8,
126,
166,
72,
42,
169,
224,
189,
94,
187,
173,
152,
25,
187,
132,
2,
183,
180,
253,
245,
128,
87,
0,
136,
82,
149,
66,
177,
133,
71,
169,
44,
114,
122,
39,
77,
238,
197,
0,
6,
157,
26,
232,
38,
70,
237,
194,
154,
32,
109,
231,
183,
236,
86,
173,
216,
209,
81,
74,
158,
150,
29,
196,
240,
186,
51,
182,
94,
225,
202,
231,
156,
123,
166,
226,
131,
122,
44,
82,
117,
110,
126,
77,
93,
51,
123,
56,
94,
95,
66,
67,
121,
89,
138,
48,
4,
67,
118,
118,
65,
144,
25,
98,
109,
75,
58,
134,
76,
128,
137,
130,
116,
46,
76,
147,
127,
88,
155,
40,
141,
167,
125,
169,
115,
46,
132,
133,
157,
141,
114,
163,
99,
139,
94,
158,
58,
58,
182,
53,
108,
178,
77,
160,
105,
106,
183,
184,
99,
87,
83,
166,
70,
198,
199,
178,
147,
196,
154,
176,
108,
55,
39,
209,
145,
205,
212,
208,
147,
45,
98,
28,
219,
220,
60,
211,
72,
225,
50,
222,
41,
215,
204,
191,
45,
47,
50,
162,
235,
34,
219,
238,
197,
240,
214,
242,
230,
227,
185,
224,
237,
38,
231,
243,
238,
43,
72,
8,
28,
72,
72,
160,
193,
131,
8,
19,
42,
60,
152,
0,
0,
59
]
}
}
}
]
],
"structure": {
"List": [
{
"Part": 0
},
{
"Part": 1
}
]
},
"offset_header": 627,
"offset_body": 1462,
"offset_end": 2607
}
}
}
]
],
"structure": {
"Part": 0
},
"offset_header": 0,
"offset_body": 270,
"offset_end": 2650
}
+125 -46
View File
@@ -25,17 +25,24 @@ Content-Type: application/x-whatever
---- EXPECTED STRUCTURE ----
{
"header": {
"date": {
"year": 1993,
"month": 3,
"day": 22,
"hour": 9,
"minute": 41,
"second": 9,
"tz_before_gmt": true,
"tz_hour": 8,
"tz_minute": 0
"headers_rfc": {
"content_type": {
"ContentType": {
"c_type": "multipart",
"c_subtype": "alternative",
"attributes": {
"boundary": "boundary42"
}
}
},
"subject": {
"Text": "Formatted text mail"
},
"to": {
"Address": {
"name": "Ned Freed",
"address": "ned@innosoft.com"
}
},
"from": {
"Address": {
@@ -43,62 +50,118 @@ Content-Type: application/x-whatever
"address": "nsb@bellcore.com"
}
},
"mime_version": "1.0",
"subject": "Formatted text mail",
"to": {
"Address": {
"name": "Ned Freed",
"address": "ned@innosoft.com"
"date": {
"DateTime": {
"year": 1993,
"month": 3,
"day": 22,
"hour": 9,
"minute": 41,
"second": 9,
"tz_before_gmt": true,
"tz_hour": 8,
"tz_minute": 0
}
},
"content_type": {
"c_type": "multipart",
"c_subtype": "alternative",
"attributes": {
"boundary": "boundary42"
}
"mime_version": {
"Text": "1.0"
}
},
"html_body": [
"headers_offsets": [
{
"contents": "<html><body>... plain text version of message goes here ...<br/></body></html>"
"name": {
"Rfc": "from"
},
"start": 5,
"end": 46
},
{
"name": {
"Rfc": "to"
},
"start": 49,
"end": 79
},
{
"name": {
"Rfc": "date"
},
"start": 84,
"end": 123
},
{
"name": {
"Rfc": "subject"
},
"start": 131,
"end": 152
},
{
"name": {
"Rfc": "mime_version"
},
"start": 165,
"end": 170
},
{
"name": {
"Rfc": "content_type"
},
"start": 183,
"end": 227
}
],
"html_body": [
0
],
"text_body": [
{
"header": {
"content_type": {
"c_type": "text",
"c_subtype": "plain",
"attributes": {
"charset": "us-ascii"
}
}
},
"contents": "... plain text version of message goes here ...\n"
}
0
],
"attachments": [
1,
2
],
"parts": [
{
"Text": {
"header": {
"headers": {
"content_type": {
"c_type": "text",
"c_subtype": "enriched"
"ContentType": {
"c_type": "text",
"c_subtype": "plain",
"attributes": {
"charset": "us-ascii"
}
}
}
},
"contents": "... RFC 1896 text/enriched version of same message\n goes here ...\n"
"body": "... plain text version of message goes here ...\n"
}
},
{
"Text": {
"headers": {
"content_type": {
"ContentType": {
"c_type": "text",
"c_subtype": "enriched"
}
}
},
"body": "... RFC 1896 text/enriched version of same message\n goes here ...\n"
}
},
{
"Binary": {
"header": {
"headers": {
"content_type": {
"c_type": "application",
"c_subtype": "x-whatever"
"ContentType": {
"c_type": "application",
"c_subtype": "x-whatever"
}
}
},
"contents": [
"body": [
46,
46,
46,
@@ -153,5 +216,21 @@ Content-Type: application/x-whatever
]
}
}
]
],
"structure": {
"List": [
{
"Part": 0
},
{
"Part": 1
},
{
"Part": 2
}
]
},
"offset_header": 0,
"offset_body": 228,
"offset_end": 563
}
+256 -78
View File
@@ -36,114 +36,292 @@ Subject: my different opinion
---- EXPECTED STRUCTURE ----
{
"header": {
"date": {
"year": 1994,
"month": 3,
"day": 22,
"hour": 13,
"minute": 34,
"second": 51,
"tz_before_gmt": false,
"tz_hour": 0,
"tz_minute": 0
},
"headers_rfc": {
"from": {
"Address": {
"name": "Moderator-Address"
}
},
"mime_version": "1.0",
"subject": "Internet Digest, volume 42",
"date": {
"DateTime": {
"year": 1994,
"month": 3,
"day": 22,
"hour": 13,
"minute": 34,
"second": 51,
"tz_before_gmt": false,
"tz_hour": 0,
"tz_minute": 0
}
},
"mime_version": {
"Text": "1.0"
},
"to": {
"Address": {
"name": "Recipient-List"
}
},
"content_type": {
"c_type": "multipart",
"c_subtype": "mixed",
"attributes": {
"boundary": "---- main boundary ----"
"ContentType": {
"c_type": "multipart",
"c_subtype": "mixed",
"attributes": {
"boundary": "---- main boundary ----"
}
}
},
"subject": {
"Text": "Internet Digest, volume 42"
}
},
"html_body": [
"headers_offsets": [
{
"contents": "<html><body>...Introductory text or table of contents...<br/></body></html>"
"name": {
"Rfc": "from"
},
"start": 5,
"end": 24
},
{
"name": {
"Rfc": "to"
},
"start": 27,
"end": 43
},
{
"name": {
"Rfc": "date"
},
"start": 48,
"end": 81
},
{
"name": {
"Rfc": "subject"
},
"start": 89,
"end": 117
},
{
"name": {
"Rfc": "mime_version"
},
"start": 130,
"end": 135
},
{
"name": {
"Rfc": "content_type"
},
"start": 148,
"end": 213
}
],
"html_body": [
0
],
"text_body": [
{
"contents": "...Introductory text or table of contents...\n"
}
0
],
"attachments": [
2,
3
],
"parts": [
{
"Message": {
"header": {
"date": {
"year": 1993,
"month": 3,
"day": 26,
"hour": 11,
"minute": 13,
"second": 32,
"tz_before_gmt": false,
"tz_hour": 2,
"tz_minute": 0
},
"from": {
"Address": {
"name": "someone-else"
"Text": {
"body": "...Introductory text or table of contents...\n"
}
},
{
"Multipart": {
"content_type": {
"ContentType": {
"c_type": "multipart",
"c_subtype": "digest",
"attributes": {
"boundary": "---- next message ----"
}
},
"subject": "my opinion"
},
"html_body": [
{
"contents": "<html><body>...body goes here ...<br/></body></html>"
}
],
"text_body": [
{
"contents": "...body goes here ...\n"
}
]
}
}
},
{
"Message": {
"header": {
"date": {
"year": 1993,
"month": 3,
"day": 26,
"hour": 10,
"minute": 7,
"second": 13,
"tz_before_gmt": true,
"tz_hour": 5,
"tz_minute": 0
},
"from": {
"Address": {
"name": "someone-else-again"
"headers": {
"content_type": {
"ContentType": {
"c_type": "message",
"c_subtype": "rfc822"
}
}
},
"body": {
"headers_rfc": {
"date": {
"DateTime": {
"year": 1993,
"month": 3,
"day": 26,
"hour": 11,
"minute": 13,
"second": 32,
"tz_before_gmt": false,
"tz_hour": 2,
"tz_minute": 0
}
},
"subject": {
"Text": "my opinion"
},
"from": {
"Address": {
"name": "someone-else"
}
}
},
"subject": "my different opinion"
"headers_offsets": [
{
"name": {
"Rfc": "from"
},
"start": 423,
"end": 437
},
{
"name": {
"Rfc": "date"
},
"start": 442,
"end": 475
},
{
"name": {
"Rfc": "subject"
},
"start": 483,
"end": 495
}
],
"html_body": [
0
],
"text_body": [
0
],
"parts": [
{
"Text": {
"body": "...body goes here ...\n"
}
}
],
"structure": {
"Part": 0
},
"offset_header": 418,
"offset_body": 496,
"offset_end": 545
}
}
},
{
"Message": {
"headers": {
"content_type": {
"ContentType": {
"c_type": "message",
"c_subtype": "rfc822"
}
}
},
"html_body": [
{
"contents": "<html><body>... another body goes here ...<br/></body></html>"
}
],
"text_body": [
{
"contents": "... another body goes here ...\n"
}
]
"body": {
"headers_rfc": {
"from": {
"Address": {
"name": "someone-else-again"
}
},
"date": {
"DateTime": {
"year": 1993,
"month": 3,
"day": 26,
"hour": 10,
"minute": 7,
"second": 13,
"tz_before_gmt": true,
"tz_hour": 5,
"tz_minute": 0
}
},
"subject": {
"Text": "my different opinion"
}
},
"headers_offsets": [
{
"name": {
"Rfc": "from"
},
"start": 550,
"end": 570
},
{
"name": {
"Rfc": "date"
},
"start": 575,
"end": 608
},
{
"name": {
"Rfc": "subject"
},
"start": 616,
"end": 638
}
],
"html_body": [
0
],
"text_body": [
0
],
"parts": [
{
"Text": {
"body": "... another body goes here ...\n"
}
}
],
"structure": {
"Part": 0
},
"offset_header": 545,
"offset_body": 639,
"offset_end": 695
}
}
}
]
],
"structure": {
"List": [
{
"Part": 0
},
{
"MultiPart": [
1,
[]
]
}
]
},
"offset_header": 0,
"offset_body": 214,
"offset_end": 726
}
+104 -33
View File
@@ -25,63 +25,134 @@ This is the epilogue. It is also to be ignored.
---- EXPECTED STRUCTURE ----
{
"header": {
"date": {
"year": 1993,
"month": 3,
"day": 21,
"hour": 23,
"minute": 56,
"second": 48,
"tz_before_gmt": true,
"tz_hour": 8,
"tz_minute": 0
},
"headers_rfc": {
"from": {
"Address": {
"name": "Nathaniel Borenstein",
"address": "nsb@bellcore.com"
}
},
"mime_version": "1.0",
"subject": "Sample message",
"mime_version": {
"Text": "1.0"
},
"to": {
"Address": {
"name": "Ned Freed",
"address": "ned@innosoft.com"
}
},
"content_type": {
"c_type": "multipart",
"c_subtype": "mixed",
"attributes": {
"boundary": "simple boundary"
"date": {
"DateTime": {
"year": 1993,
"month": 3,
"day": 21,
"hour": 23,
"minute": 56,
"second": 48,
"tz_before_gmt": true,
"tz_hour": 8,
"tz_minute": 0
}
},
"content_type": {
"ContentType": {
"c_type": "multipart",
"c_subtype": "mixed",
"attributes": {
"boundary": "simple boundary"
}
}
},
"subject": {
"Text": "Sample message"
}
},
"html_body": [
"headers_offsets": [
{
"contents": "<html><body>This is implicitly typed plain US-ASCII text.<br/>It does NOT end with a linebreak.</body></html>"
"name": {
"Rfc": "from"
},
"start": 5,
"end": 46
},
{
"contents": "<html><body>This is explicitly typed plain US-ASCII text.<br/>It DOES end with a linebreak.<br/></body></html>"
"name": {
"Rfc": "to"
},
"start": 49,
"end": 79
},
{
"name": {
"Rfc": "date"
},
"start": 84,
"end": 123
},
{
"name": {
"Rfc": "subject"
},
"start": 131,
"end": 147
},
{
"name": {
"Rfc": "mime_version"
},
"start": 160,
"end": 165
},
{
"name": {
"Rfc": "content_type"
},
"start": 178,
"end": 223
}
],
"html_body": [
0,
1
],
"text_body": [
0,
1
],
"parts": [
{
"contents": "This is implicitly typed plain US-ASCII text.\nIt does NOT end with a linebreak."
"Text": {
"body": "This is implicitly typed plain US-ASCII text.\nIt does NOT end with a linebreak."
}
},
{
"header": {
"content_type": {
"c_type": "text",
"c_subtype": "plain",
"attributes": {
"charset": "us-ascii"
"Text": {
"headers": {
"content_type": {
"ContentType": {
"c_type": "text",
"c_subtype": "plain",
"attributes": {
"charset": "us-ascii"
}
}
}
}
},
"contents": "This is explicitly typed plain US-ASCII text.\nIt DOES end with a linebreak.\n"
},
"body": "This is explicitly typed plain US-ASCII text.\nIt DOES end with a linebreak.\n"
}
}
]
],
"structure": {
"List": [
{
"Part": 0
},
{
"Part": 1
}
]
},
"offset_header": 0,
"offset_body": 224,
"offset_end": 639
}
+106 -39
View File
@@ -23,60 +23,127 @@ Content-Disposition: inline
---- EXPECTED STRUCTURE ----
{
"header": {
"from": {
"Address": {
"address": "sender@example.com"
}
},
"subject": "Multipart Email Example",
"headers_rfc": {
"to": {
"Address": {
"address": "recipient@example.com"
}
},
"from": {
"Address": {
"address": "sender@example.com"
}
},
"subject": {
"Text": "Multipart Email Example"
},
"content_type": {
"c_type": "multipart",
"c_subtype": "alternative",
"attributes": {
"boundary": "boundary-string"
"ContentType": {
"c_type": "multipart",
"c_subtype": "alternative",
"attributes": {
"boundary": "boundary-string"
}
}
}
},
"html_body": [
"headers_offsets": [
{
"header": {
"content_disposition": {
"c_type": "inline"
},
"content_transfer_encoding": "quoted-printable",
"content_type": {
"c_type": "text",
"c_subtype": "html",
"attributes": {
"charset": "utf-8"
}
}
"name": {
"Rfc": "from"
},
"contents": "<h1>This is the HTML Section!</h1>\n<p>This is what displays in most modern email clients</p>\n"
"start": 5,
"end": 25
},
{
"name": {
"Rfc": "to"
},
"start": 28,
"end": 51
},
{
"name": {
"Rfc": "subject"
},
"start": 59,
"end": 84
},
{
"name": {
"Rfc": "content_type"
},
"start": 97,
"end": 148
}
],
"html_body": [
1
],
"text_body": [
0
],
"parts": [
{
"header": {
"content_disposition": {
"c_type": "inline"
},
"content_transfer_encoding": "quoted-printable",
"content_type": {
"c_type": "text",
"c_subtype": "plain",
"attributes": {
"charset": "utf-8"
"Text": {
"headers": {
"content_transfer_encoding": {
"Text": "quoted-printable"
},
"content_disposition": {
"ContentType": {
"c_type": "inline"
}
},
"content_type": {
"ContentType": {
"c_type": "text",
"c_subtype": "plain",
"attributes": {
"charset": "utf-8"
}
}
}
}
},
"contents": "Plain text email goes here!\nThis is the fallback if email client does not support HTML\n"
},
"body": "Plain text email goes here!\nThis is the fallback if email client does not support HTML\n"
}
},
{
"Html": {
"headers": {
"content_disposition": {
"ContentType": {
"c_type": "inline"
}
},
"content_type": {
"ContentType": {
"c_type": "text",
"c_subtype": "html",
"attributes": {
"charset": "utf-8"
}
}
},
"content_transfer_encoding": {
"Text": "quoted-printable"
}
},
"body": "<h1>This is the HTML Section!</h1>\n<p>This is what displays in most modern email clients</p>\n"
}
}
]
],
"structure": {
"List": [
{
"Part": 0
},
{
"Part": 1
}
]
},
"offset_header": 0,
"offset_body": 149,
"offset_end": 615
}
+311 -99
View File
@@ -73,159 +73,371 @@ K
---- EXPECTED STRUCTURE ----
{
"header": {
"subject": "RFC 8621 Section 4.1.4 test",
"headers_rfc": {
"content_type": {
"c_type": "multipart",
"c_subtype": "mixed",
"attributes": {
"boundary": "1"
"ContentType": {
"c_type": "multipart",
"c_subtype": "mixed",
"attributes": {
"boundary": "1"
}
}
},
"subject": {
"Text": "RFC 8621 Section 4.1.4 test"
}
},
"html_body": [
"headers_offsets": [
{
"contents": "<html><body>A</body></html>"
},
{
"header": {
"content_type": {
"c_type": "text",
"c_subtype": "html"
}
"name": {
"Rfc": "subject"
},
"contents": "<html>E</html>"
"start": 8,
"end": 37
},
{
"contents": "<html><body>K</body></html>"
"name": {
"Rfc": "content_type"
},
"start": 50,
"end": 81
}
],
"html_body": [
0,
8,
13
],
"text_body": [
{
"header": {
"content_disposition": {
"c_type": "inline"
},
"content_type": {
"c_type": "text",
"c_subtype": "plain"
}
},
"contents": "A"
},
{
"header": {
"content_disposition": {
"c_type": "inline"
},
"content_type": {
"c_type": "text",
"c_subtype": "plain"
}
},
"contents": "B"
},
0,
{
"header": {
"content_disposition": {
"c_type": "inline"
},
"content_type": {
"c_type": "text",
"c_subtype": "plain"
}
},
"contents": "D"
},
{
"header": {
"content_disposition": {
"c_type": "inline"
},
"content_type": {
"c_type": "text",
"c_subtype": "plain"
}
},
"contents": "K"
}
4,
5,
6,
13
],
"attachments": [
5,
9,
10,
11,
12
],
"parts": [
{
"InlineBinary": {
"header": {
"Text": {
"headers": {
"content_disposition": {
"c_type": "inline"
"ContentType": {
"c_type": "inline"
}
},
"content_type": {
"c_type": "image",
"c_subtype": "jpeg"
"ContentType": {
"c_type": "text",
"c_subtype": "plain"
}
}
},
"contents": [
"body": "A"
}
},
{
"Multipart": {
"content_type": {
"ContentType": {
"c_type": "multipart",
"c_subtype": "mixed",
"attributes": {
"boundary": "2"
}
}
}
}
},
{
"Multipart": {
"content_type": {
"ContentType": {
"c_type": "multipart",
"c_subtype": "alternative",
"attributes": {
"boundary": "3"
}
}
}
}
},
{
"Multipart": {
"content_type": {
"ContentType": {
"c_type": "multipart",
"c_subtype": "mixed",
"attributes": {
"boundary": "4"
}
}
}
}
},
{
"Text": {
"headers": {
"content_type": {
"ContentType": {
"c_type": "text",
"c_subtype": "plain"
}
},
"content_disposition": {
"ContentType": {
"c_type": "inline"
}
}
},
"body": "B"
}
},
{
"InlineBinary": {
"headers": {
"content_disposition": {
"ContentType": {
"c_type": "inline"
}
},
"content_type": {
"ContentType": {
"c_type": "image",
"c_subtype": "jpeg"
}
}
},
"body": [
67
]
}
},
{
"Binary": {
"header": {
"Text": {
"headers": {
"content_type": {
"c_type": "image",
"c_subtype": "jpeg"
"ContentType": {
"c_type": "text",
"c_subtype": "plain"
}
},
"content_disposition": {
"ContentType": {
"c_type": "inline"
}
}
},
"contents": [
"body": "D"
}
},
{
"Multipart": {
"content_type": {
"ContentType": {
"c_type": "multipart",
"c_subtype": "related",
"attributes": {
"boundary": "5"
}
}
}
}
},
{
"Html": {
"headers": {
"content_type": {
"ContentType": {
"c_type": "text",
"c_subtype": "html"
}
}
},
"body": "<html>E</html>"
}
},
{
"Binary": {
"headers": {
"content_type": {
"ContentType": {
"c_type": "image",
"c_subtype": "jpeg"
}
}
},
"body": [
70
]
}
},
{
"Binary": {
"header": {
"content_disposition": {
"c_type": "attachment"
},
"headers": {
"content_type": {
"c_type": "image",
"c_subtype": "jpeg"
"ContentType": {
"c_type": "image",
"c_subtype": "jpeg"
}
},
"content_disposition": {
"ContentType": {
"c_type": "attachment"
}
}
},
"contents": [
"body": [
71
]
}
},
{
"Binary": {
"header": {
"headers": {
"content_type": {
"c_type": "application",
"c_subtype": "x-excel"
"ContentType": {
"c_type": "application",
"c_subtype": "x-excel"
}
}
},
"contents": [
"body": [
72
]
}
},
{
"Message": {
"header": {
"subject": "J"
"headers": {
"content_type": {
"ContentType": {
"c_type": "message",
"c_subtype": "rfc822"
}
}
},
"html_body": [
{
"contents": "<html><body>J</body></html>"
"body": {
"headers_rfc": {
"subject": {
"Text": "J"
}
},
"headers_offsets": [
{
"name": {
"Rfc": "subject"
},
"start": 789,
"end": 792
}
],
"html_body": [
0
],
"text_body": [
0
],
"parts": [
{
"Text": {
"body": "J"
}
}
],
"structure": {
"Part": 0
},
"offset_header": 781,
"offset_body": 793,
"offset_end": 798
}
}
},
{
"Text": {
"headers": {
"content_disposition": {
"ContentType": {
"c_type": "inline"
}
},
"content_type": {
"ContentType": {
"c_type": "text",
"c_subtype": "plain"
}
}
],
"text_body": [
{
"contents": "J"
}
]
},
"body": "K"
}
}
]
],
"structure": {
"List": [
{
"Part": 0
},
{
"MultiPart": [
1,
[
{
"MultiPart": [
2,
[
{
"MultiPart": [
3,
[
{
"Part": 4
},
{
"Part": 5
},
{
"Part": 6
}
]
]
},
{
"MultiPart": [
7,
[
{
"Part": 8
},
{
"Part": 9
}
]
]
}
]
]
},
{
"Part": 10
},
{
"Part": 11
}
]
]
},
{
"Part": 13
}
]
},
"offset_header": 0,
"offset_body": 82,
"offset_end": 869
}
+71 -26
View File
@@ -20,44 +20,89 @@ ZWg=
---- EXPECTED STRUCTURE ----
{
"header": {
"mime_version": "1.0",
"headers_rfc": {
"mime_version": {
"Text": "1.0"
},
"content_type": {
"c_type": "multipart",
"c_subtype": "alternative",
"attributes": {
"boundary": "bound"
"ContentType": {
"c_type": "multipart",
"c_subtype": "alternative",
"attributes": {
"boundary": "bound"
}
}
}
},
"html_body": [
"headers_offsets": [
{
"contents": "<html><body>we havea lot <br/>of \u0000binary stuff in here<br/>b adjig sadjg jasidgjiaehga3wht8a3w8ghxjc dsgad hasdghsd gasd dsjdsoga sjdga0w3tjhawjgsertniq3n5oqerjqw2r89q23h awhrqh835r8a</body></html>"
"name": {
"Rfc": "mime_version"
},
"start": 13,
"end": 19
},
{
"contents": "<html><body>eh</body></html>"
"name": {
"Rfc": "content_type"
},
"start": 32,
"end": 76
}
],
"html_body": [
0,
1
],
"text_body": [
0,
1
],
"parts": [
{
"header": {
"content_transfer_encoding": "base64",
"content_type": {
"c_type": "text",
"c_subtype": "plain"
}
},
"contents": "we have\ra lot \nof \u0000binary stuff in here\nb adjig sadjg jasidgjiaehga3wht8a3w8ghxjc dsgad hasdghsd gasd dsjdsoga sjdga0w3tjhawjgsertniq3n5oqerjqw2r89q23h awhrqh835r8a"
"Text": {
"headers": {
"content_transfer_encoding": {
"Text": "base64"
},
"content_type": {
"ContentType": {
"c_type": "text",
"c_subtype": "plain"
}
}
},
"body": "we have\ra lot \nof \u0000binary stuff in here\nb adjig sadjg jasidgjiaehga3wht8a3w8ghxjc dsgad hasdghsd gasd dsjdsoga sjdga0w3tjhawjgsertniq3n5oqerjqw2r89q23h awhrqh835r8a"
}
},
{
"header": {
"content_transfer_encoding": "base64",
"content_type": {
"c_type": "text",
"c_subtype": "plain"
}
},
"contents": "eh"
"Text": {
"headers": {
"content_type": {
"ContentType": {
"c_type": "text",
"c_subtype": "plain"
}
},
"content_transfer_encoding": {
"Text": "base64"
}
},
"body": "eh"
}
}
]
],
"structure": {
"List": [
{
"Part": 0
},
{
"Part": 1
}
]
},
"offset_header": 0,
"offset_body": 78,
"offset_end": 478
}
+87 -36
View File
@@ -25,56 +25,107 @@ hello world
---- EXPECTED STRUCTURE ----
{
"header": {
"mime_version": "1.0",
"headers_rfc": {
"mime_version": {
"Text": "1.0"
},
"content_type": {
"c_type": "multipart",
"c_subtype": "alternative",
"attributes": {
"boundary": "bound"
"ContentType": {
"c_type": "multipart",
"c_subtype": "alternative",
"attributes": {
"boundary": "bound"
}
}
}
},
"html_body": [
"headers_offsets": [
{
"contents": "<html><body>d2UgaGF2ZQ1hIGxvdCAKb2YgAGJpbmFyeSBzdHVmZiBpbiBoZXJlCmIgYWRqaWcgc2FkamcgamFz<br/>aWRnamlhZWhnYTN3aHQ4YTN3OGdoeGpjIGRzZ2FkIGhhc2RnaHNkIGdhc2QgZHNqZHNvZ2Egc2pk<br/>Z2EwdzN0amhhd2pnc2VydG5pcTNuNW9xZXJqcXcycjg5cTIzaCBhd2hycWg4MzVyOGE=</body></html>"
"name": {
"Rfc": "mime_version"
},
"start": 13,
"end": 19
},
{
"contents": "<html><body>ZWg=</body></html>"
},
{
"contents": "<html><body>hello world<br/></body></html>"
"name": {
"Rfc": "content_type"
},
"start": 32,
"end": 76
}
],
"html_body": [
0,
1,
2
],
"text_body": [
0,
1,
2
],
"parts": [
{
"header": {
"content_transfer_encoding": "binary",
"content_type": {
"c_type": "text",
"c_subtype": "plain"
}
},
"contents": "d2UgaGF2ZQ1hIGxvdCAKb2YgAGJpbmFyeSBzdHVmZiBpbiBoZXJlCmIgYWRqaWcgc2FkamcgamFz\r\naWRnamlhZWhnYTN3aHQ4YTN3OGdoeGpjIGRzZ2FkIGhhc2RnaHNkIGdhc2QgZHNqZHNvZ2Egc2pk\r\nZ2EwdzN0amhhd2pnc2VydG5pcTNuNW9xZXJqcXcycjg5cTIzaCBhd2hycWg4MzVyOGE=\r"
"Text": {
"headers": {
"content_type": {
"ContentType": {
"c_type": "text",
"c_subtype": "plain"
}
},
"content_transfer_encoding": {
"Text": "binary"
}
},
"body": "d2UgaGF2ZQ1hIGxvdCAKb2YgAGJpbmFyeSBzdHVmZiBpbiBoZXJlCmIgYWRqaWcgc2FkamcgamFz\r\naWRnamlhZWhnYTN3aHQ4YTN3OGdoeGpjIGRzZ2FkIGhhc2RnaHNkIGdhc2QgZHNqZHNvZ2Egc2pk\r\nZ2EwdzN0amhhd2pnc2VydG5pcTNuNW9xZXJqcXcycjg5cTIzaCBhd2hycWg4MzVyOGE=\r"
}
},
{
"header": {
"content_transfer_encoding": "binary",
"content_type": {
"c_type": "text",
"c_subtype": "plain"
}
},
"contents": "ZWg="
"Text": {
"headers": {
"content_transfer_encoding": {
"Text": "binary"
},
"content_type": {
"ContentType": {
"c_type": "text",
"c_subtype": "plain"
}
}
},
"body": "ZWg="
}
},
{
"header": {
"content_type": {
"c_type": "text",
"c_subtype": "plain"
}
},
"contents": "hello world\r\n\r"
"Text": {
"headers": {
"content_type": {
"ContentType": {
"c_type": "text",
"c_subtype": "plain"
}
}
},
"body": "hello world\r\n\r"
}
}
]
],
"structure": {
"List": [
{
"Part": 0
},
{
"Part": 1
},
{
"Part": 2
}
]
},
"offset_header": 0,
"offset_body": 78,
"offset_end": 529
}

Some files were not shown because too many files have changed in this diff Show More