mirror of
https://github.com/stalwartlabs/mail-parser.git
synced 2026-11-29 16:01:27 +00:00
Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
2805e029ff | ||
|
|
35b4846c7e | ||
|
|
75d9a9e96a | ||
|
|
1e8dfd31cf | ||
|
|
0be5ed4a41 | ||
|
|
62057172d0 | ||
|
|
a963f0caa7 | ||
|
|
e2b33a90f3 | ||
|
|
d157525b1c | ||
|
|
9f1edeed33 | ||
|
|
509fb718f3 | ||
|
|
eab28c0b2d | ||
|
|
2cae61c6d2 | ||
|
|
da4a9d9a47 | ||
|
|
c3b36dd0d6 | ||
|
|
2f380451f5 | ||
|
|
1a2ac1d027 | ||
|
|
beb21b3d03 | ||
|
|
c77f3e2cb4 | ||
|
|
94522f1179 | ||
|
|
6749649e8c | ||
|
|
63a4620407 | ||
|
|
ccdee2332e | ||
|
|
35754eeaa8 | ||
|
|
4a6ec957d2 | ||
|
|
b48e2d711b | ||
|
|
d4c75e74a6 | ||
|
|
f7281e09cf | ||
|
|
46a8db9a54 | ||
|
|
a0448c31e9 | ||
|
|
41de06fd4e | ||
|
|
7792452a88 | ||
|
|
fdf7075e37 | ||
|
|
bbb2979e4b | ||
|
|
c29fcdc8bf | ||
|
|
715fbbab46 | ||
|
|
09ae0216ca | ||
|
|
d88bc20336 | ||
|
|
3f99761706 | ||
|
|
ac87792052 | ||
|
|
3ebe77098a | ||
|
|
ba750b4dee | ||
|
|
de82b6ea34 | ||
|
|
6ddbedae48 | ||
|
|
bd78d654c2 | ||
|
|
f820cee04a | ||
|
|
ea23e474d3 | ||
|
|
3c14e77932 |
@@ -0,0 +1,82 @@
|
|||||||
|
mail-parser 0.4.7
|
||||||
|
================================
|
||||||
|
- Retrieving message headers in order (#19)
|
||||||
|
- Added `get_raw_headers` and `get_header` methods.
|
||||||
|
- Support for malformed Return-Path fields.
|
||||||
|
- Support for ks_c_5601 charsets (#20)
|
||||||
|
|
||||||
|
mail-parser 0.4.6
|
||||||
|
================================
|
||||||
|
- DateTime is_valid() fix (#15)
|
||||||
|
|
||||||
|
mail-parser 0.4.5
|
||||||
|
================================
|
||||||
|
- DateTime to UNIX timestamp conversion.
|
||||||
|
- Ord, PartialOrd support for DateTime (#13).
|
||||||
|
- Fixed Message::parse() panic on duplicate Content-Type headers (#14).
|
||||||
|
|
||||||
|
mail-parser 0.4.4
|
||||||
|
================================
|
||||||
|
- Support for multi-line headers.
|
||||||
|
- Text and HTML message body preview.
|
||||||
|
- Improved support for raw headers.
|
||||||
|
|
||||||
|
mail-parser 0.4.3
|
||||||
|
================================
|
||||||
|
- Mbox file parsing support (issue #11) conforming to the [QMail specification](http://qmail.org/qmail-manual-html/man5/mbox.html).
|
||||||
|
- Support for bincode serialize/deserialize.
|
||||||
|
|
||||||
|
mail-parser 0.4.2
|
||||||
|
================================
|
||||||
|
- Added `Message::get_thread_name()` to obtain the base subject of a message as defined in [RFC 5957 - Internet Message Access Protocol - SORT and THREAD Extensions (Section 2.1)](https://datatracker.ietf.org/doc/html/rfc5256#section-2.1).
|
||||||
|
- Added `MimeHeader::get_attachment_name` for simplified access to a MIME attachment file name.
|
||||||
|
|
||||||
|
mail-parser 0.4.1
|
||||||
|
================================
|
||||||
|
- Lazy parsing of nested e-mail messages.
|
||||||
|
- Support for base64/quoted-printable nested messages.
|
||||||
|
|
||||||
|
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.
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@@ -1,4 +1,4 @@
|
|||||||
Copyright (C) 2020-2022, Stalwart Labs, Minter Ltd.
|
Copyright (C) 2020-2022, Stalwart Labs Ltd.
|
||||||
All rights reserved.
|
All rights reserved.
|
||||||
|
|
||||||
Redistribution and use in source and binary forms, with or without
|
Redistribution and use in source and binary forms, with or without
|
||||||
|
|||||||
Generated
+112
-40
@@ -4,9 +4,18 @@ version = 3
|
|||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "autocfg"
|
name = "autocfg"
|
||||||
version = "1.0.1"
|
version = "1.1.0"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "cdb031dd78e28731d87d56cc8ffef4a8f36ca26c38fe2de700543e627f8a464a"
|
checksum = "d468802bab17cbc0cc575e9b053f41e72aa36bfa6b7f55e3529ffa43161b97fa"
|
||||||
|
|
||||||
|
[[package]]
|
||||||
|
name = "bincode"
|
||||||
|
version = "1.3.3"
|
||||||
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
|
checksum = "b1f45e9417d87227c7a56d22e471c6206462cba514c7590c09aff4cf6d1ddcad"
|
||||||
|
dependencies = [
|
||||||
|
"serde",
|
||||||
|
]
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "cfg-if"
|
name = "cfg-if"
|
||||||
@@ -15,16 +24,23 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
|
|||||||
checksum = "baf1de4339761588bc0619e3cbc0120ee582ebb74b53b4efbf79117bd2da40fd"
|
checksum = "baf1de4339761588bc0619e3cbc0120ee582ebb74b53b4efbf79117bd2da40fd"
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "dtoa"
|
name = "chrono"
|
||||||
version = "0.4.8"
|
version = "0.4.19"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "56899898ce76aaf4a0f24d914c97ea6ed976d42fec6ad33fcbb0a1103e07b2b0"
|
checksum = "670ad68c9088c2a963aaa298cb369688cf3f9465ce5e2d4ca10e6e0098a1ce73"
|
||||||
|
dependencies = [
|
||||||
|
"libc",
|
||||||
|
"num-integer",
|
||||||
|
"num-traits",
|
||||||
|
"time",
|
||||||
|
"winapi",
|
||||||
|
]
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "encoding_rs"
|
name = "encoding_rs"
|
||||||
version = "0.8.28"
|
version = "0.8.30"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "80df024fbc5ac80f87dfef0d9f5209a252f2a497f7f42944cff24d8253cac065"
|
checksum = "7896dc8abb250ffdda33912550faa54c88ec8b998dec0b2c55ab224921ce11df"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"cfg-if",
|
"cfg-if",
|
||||||
]
|
]
|
||||||
@@ -37,9 +53,9 @@ checksum = "ab5ef0d4909ef3724cc8cce6ccc8572c5c817592e9285f5464f8e86f8bd3726e"
|
|||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "indexmap"
|
name = "indexmap"
|
||||||
version = "1.7.0"
|
version = "1.8.0"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "bc633605454125dec4b66843673f01c7df2b89479b32e0ed634e43a91cff62a5"
|
checksum = "282a6247722caba404c065016bbfa522806e51714c34f5dfc3e4a3a46fcb4223"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"autocfg",
|
"autocfg",
|
||||||
"hashbrown",
|
"hashbrown",
|
||||||
@@ -47,9 +63,15 @@ dependencies = [
|
|||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "itoa"
|
name = "itoa"
|
||||||
version = "0.4.8"
|
version = "1.0.1"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "b71991ff56294aa922b450139ee08b3bfc70982c6b2c7562771375cf73542dd4"
|
checksum = "1aab8fc367588b89dcee83ab0fd66b72b50b72fa1904d7095045ace2b0c81c35"
|
||||||
|
|
||||||
|
[[package]]
|
||||||
|
name = "libc"
|
||||||
|
version = "0.2.121"
|
||||||
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
|
checksum = "efaa7b300f3b5fe8eb6bf21ce3895e1751d9665086af2d64b42f19701015ff4f"
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "linked-hash-map"
|
name = "linked-hash-map"
|
||||||
@@ -59,62 +81,73 @@ checksum = "7fb9b38af92608140b86b693604b9ffcc5824240a484d1ecd4795bacb2fe88f3"
|
|||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "mail-parser"
|
name = "mail-parser"
|
||||||
version = "0.2.1"
|
version = "0.4.7"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
|
"bincode",
|
||||||
|
"chrono",
|
||||||
"encoding_rs",
|
"encoding_rs",
|
||||||
"serde",
|
"serde",
|
||||||
"serde_bytes",
|
|
||||||
"serde_json",
|
"serde_json",
|
||||||
"serde_yaml",
|
"serde_yaml",
|
||||||
]
|
]
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "proc-macro2"
|
name = "num-integer"
|
||||||
version = "1.0.30"
|
version = "0.1.44"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "edc3358ebc67bc8b7fa0c007f945b0b18226f78437d61bec735a9eb96b61ee70"
|
checksum = "d2cc698a63b549a70bc047073d2949cce27cd1c7b0a4a862d08a8031bc2801db"
|
||||||
|
dependencies = [
|
||||||
|
"autocfg",
|
||||||
|
"num-traits",
|
||||||
|
]
|
||||||
|
|
||||||
|
[[package]]
|
||||||
|
name = "num-traits"
|
||||||
|
version = "0.2.14"
|
||||||
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
|
checksum = "9a64b1ec5cda2586e284722486d802acf1f7dbdc623e2bfc57e65ca1cd099290"
|
||||||
|
dependencies = [
|
||||||
|
"autocfg",
|
||||||
|
]
|
||||||
|
|
||||||
|
[[package]]
|
||||||
|
name = "proc-macro2"
|
||||||
|
version = "1.0.36"
|
||||||
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
|
checksum = "c7342d5883fbccae1cc37a2353b09c87c9b0f3afd73f5fb9bba687a1f733b029"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"unicode-xid",
|
"unicode-xid",
|
||||||
]
|
]
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "quote"
|
name = "quote"
|
||||||
version = "1.0.10"
|
version = "1.0.16"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "38bc8cc6a5f2e3655e0899c1b848643b2562f853f114bfec7be120678e3ace05"
|
checksum = "b4af2ec4714533fcdf07e886f17025ace8b997b9ce51204ee69b6da831c3da57"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"proc-macro2",
|
"proc-macro2",
|
||||||
]
|
]
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "ryu"
|
name = "ryu"
|
||||||
version = "1.0.5"
|
version = "1.0.9"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "71d301d4193d031abdd79ff7e3dd721168a9572ef3fe51a1517aba235bd8f86e"
|
checksum = "73b4b750c782965c211b42f022f59af1fbceabdd026623714f104152f1ec149f"
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "serde"
|
name = "serde"
|
||||||
version = "1.0.130"
|
version = "1.0.136"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "f12d06de37cf59146fbdecab66aa99f9fe4f78722e3607577a5375d66bd0c913"
|
checksum = "ce31e24b01e1e524df96f1c2fdd054405f8d7376249a5110886fb4b658484789"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"serde_derive",
|
"serde_derive",
|
||||||
]
|
]
|
||||||
|
|
||||||
[[package]]
|
|
||||||
name = "serde_bytes"
|
|
||||||
version = "0.11.5"
|
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
||||||
checksum = "16ae07dd2f88a366f15bd0632ba725227018c69a1c8550a927324f8eb8368bb9"
|
|
||||||
dependencies = [
|
|
||||||
"serde",
|
|
||||||
]
|
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "serde_derive"
|
name = "serde_derive"
|
||||||
version = "1.0.130"
|
version = "1.0.136"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "d7bc1a1ab1961464eae040d96713baa5a724a8152c1222492465b54322ec508b"
|
checksum = "08597e7152fcd306f41838ed3e37be9eaeed2b61c42e2117266a554fab4662f9"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"proc-macro2",
|
"proc-macro2",
|
||||||
"quote",
|
"quote",
|
||||||
@@ -123,9 +156,9 @@ dependencies = [
|
|||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "serde_json"
|
name = "serde_json"
|
||||||
version = "1.0.68"
|
version = "1.0.79"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "0f690853975602e1bfe1ccbf50504d67174e3bcf340f23b5ea9992e0587a52d8"
|
checksum = "8e8d9fa5c3b304765ce1fd9c4c8a3de2c8db365a5b91be52f186efc675681d95"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"itoa",
|
"itoa",
|
||||||
"ryu",
|
"ryu",
|
||||||
@@ -134,33 +167,72 @@ dependencies = [
|
|||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "serde_yaml"
|
name = "serde_yaml"
|
||||||
version = "0.8.21"
|
version = "0.8.23"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "d8c608a35705a5d3cdc9fbe403147647ff34b921f8e833e49306df898f9b20af"
|
checksum = "a4a521f2940385c165a24ee286aa8599633d162077a54bdcae2a6fd5a7bfa7a0"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"dtoa",
|
|
||||||
"indexmap",
|
"indexmap",
|
||||||
|
"ryu",
|
||||||
"serde",
|
"serde",
|
||||||
"yaml-rust",
|
"yaml-rust",
|
||||||
]
|
]
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "syn"
|
name = "syn"
|
||||||
version = "1.0.80"
|
version = "1.0.89"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "d010a1623fbd906d51d650a9916aaefc05ffa0e4053ff7fe601167f3e715d194"
|
checksum = "ea297be220d52398dcc07ce15a209fce436d361735ac1db700cab3b6cdfb9f54"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"proc-macro2",
|
"proc-macro2",
|
||||||
"quote",
|
"quote",
|
||||||
"unicode-xid",
|
"unicode-xid",
|
||||||
]
|
]
|
||||||
|
|
||||||
|
[[package]]
|
||||||
|
name = "time"
|
||||||
|
version = "0.1.44"
|
||||||
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
|
checksum = "6db9e6914ab8b1ae1c260a4ae7a49b6c5611b40328a735b21862567685e73255"
|
||||||
|
dependencies = [
|
||||||
|
"libc",
|
||||||
|
"wasi",
|
||||||
|
"winapi",
|
||||||
|
]
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "unicode-xid"
|
name = "unicode-xid"
|
||||||
version = "0.2.2"
|
version = "0.2.2"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "8ccb82d61f80a663efe1f787a51b16b5a51e3314d6ac365b08639f52387b33f3"
|
checksum = "8ccb82d61f80a663efe1f787a51b16b5a51e3314d6ac365b08639f52387b33f3"
|
||||||
|
|
||||||
|
[[package]]
|
||||||
|
name = "wasi"
|
||||||
|
version = "0.10.0+wasi-snapshot-preview1"
|
||||||
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
|
checksum = "1a143597ca7c7793eff794def352d41792a93c481eb1042423ff7ff72ba2c31f"
|
||||||
|
|
||||||
|
[[package]]
|
||||||
|
name = "winapi"
|
||||||
|
version = "0.3.9"
|
||||||
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
|
checksum = "5c839a674fcd7a98952e593242ea400abe93992746761e38641405d28b00f419"
|
||||||
|
dependencies = [
|
||||||
|
"winapi-i686-pc-windows-gnu",
|
||||||
|
"winapi-x86_64-pc-windows-gnu",
|
||||||
|
]
|
||||||
|
|
||||||
|
[[package]]
|
||||||
|
name = "winapi-i686-pc-windows-gnu"
|
||||||
|
version = "0.4.0"
|
||||||
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
|
checksum = "ac3b87c63620426dd9b991e5ce0329eff545bccbbb34f3be09ff6fb6ab51b7b6"
|
||||||
|
|
||||||
|
[[package]]
|
||||||
|
name = "winapi-x86_64-pc-windows-gnu"
|
||||||
|
version = "0.4.0"
|
||||||
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
|
checksum = "712e227841d057c1ee1cd2fb22fa7e5a5461ae8e48fa2ca79ec42cfc1931183f"
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "yaml-rust"
|
name = "yaml-rust"
|
||||||
version = "0.4.5"
|
version = "0.4.5"
|
||||||
|
|||||||
+8
-7
@@ -1,7 +1,7 @@
|
|||||||
[package]
|
[package]
|
||||||
name = "mail-parser"
|
name = "mail-parser"
|
||||||
description = "Fast and robust e-mail parsing library for Rust"
|
description = "Fast and robust e-mail parsing library for Rust"
|
||||||
version = "0.2.1"
|
version = "0.4.7"
|
||||||
edition = "2018"
|
edition = "2018"
|
||||||
authors = [ "Stalwart Labs <hello@stalw.art>"]
|
authors = [ "Stalwart Labs <hello@stalw.art>"]
|
||||||
license = "Apache-2.0 OR MIT"
|
license = "Apache-2.0 OR MIT"
|
||||||
@@ -12,18 +12,19 @@ categories = ["email", "parser-implementations"]
|
|||||||
readme = "README.md"
|
readme = "README.md"
|
||||||
|
|
||||||
[dependencies]
|
[dependencies]
|
||||||
encoding_rs = {version=">=0.8.28", optional=true}
|
encoding_rs = {version="0.8", optional=true}
|
||||||
serde = { version = ">=1.0.117", features = ["derive"], optional=true}
|
serde = { version = "1.0", features = ["derive"], optional=true}
|
||||||
serde_bytes = { version = ">=0.11.5", optional=true}
|
|
||||||
|
|
||||||
[dev-dependencies]
|
[dev-dependencies]
|
||||||
serde_yaml = ">=0.8.21"
|
serde_yaml = "0.8"
|
||||||
serde_json = ">=1.0.59"
|
serde_json = "1.0"
|
||||||
|
bincode = "1.3.3"
|
||||||
|
chrono = "0.4"
|
||||||
|
|
||||||
[features]
|
[features]
|
||||||
default = ["serde_support", "full_encoding"]
|
default = ["serde_support", "full_encoding"]
|
||||||
full_encoding = ["encoding_rs"]
|
full_encoding = ["encoding_rs"]
|
||||||
serde_support = ["serde", "serde_bytes"]
|
serde_support = ["serde"]
|
||||||
|
|
||||||
[profile.bench]
|
[profile.bench]
|
||||||
debug = true
|
debug = true
|
||||||
|
|||||||
@@ -4,10 +4,9 @@
|
|||||||
[](https://github.com/stalwartlabs/mail-parser/actions/workflows/rust.yml)
|
[](https://github.com/stalwartlabs/mail-parser/actions/workflows/rust.yml)
|
||||||
[](https://docs.rs/mail-parser)
|
[](https://docs.rs/mail-parser)
|
||||||
[](http://www.apache.org/licenses/LICENSE-2.0)
|
[](http://www.apache.org/licenses/LICENSE-2.0)
|
||||||
[](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
|
_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.
|
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
|
All Unicode (UTF-*) and single-byte character sets are handled internally by the library while support for legacy multi-byte encodings of Chinese
|
||||||
@@ -29,82 +28,78 @@ 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).
|
- **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.
|
- Written in **100% safe** Rust with no external dependencies.
|
||||||
- Every function in the library has been [fuzzed](#testing-fuzzing--benchmarking) and
|
- Every function in the library has been [fuzzed](#testing-fuzzing--benchmarking) and
|
||||||
meticulously [tested with MIRI](#testing-fuzzing--benchmarking).
|
thoroughly [tested with MIRI](#testing-fuzzing--benchmarking).
|
||||||
- Thoroughly **battle-tested** with millions of real-world e-mail messages dating from 1995 until today.
|
- **Battle-tested** with millions of real-world e-mail messages dating from 1995 until today.
|
||||||
|
|
||||||
## Usage Example
|
## Usage Example
|
||||||
|
|
||||||
```rust
|
```rust
|
||||||
let input = concat!(
|
let input = br#"From: Art Vandelay <art@vandelay.com> (Vandelay Industries)
|
||||||
"From: Art Vandelay <art@vandelay.com> (Vandelay Industries)\n",
|
To: "Colleagues": "James Smythe" <james@vandelay.com>; Friends:
|
||||||
"To: \"Colleagues\": \"James Smythe\" <james@vandelay.com>; Friends:\n",
|
jane@example.com, =?UTF-8?Q?John_Sm=C3=AEth?= <john@example.com>;
|
||||||
" jane@example.com, =?UTF-8?Q?John_Sm=C3=AEth?= <john@example.com>;\n",
|
Date: Sat, 20 Nov 2021 14:22:01 -0800
|
||||||
"Date: Sat, 20 Nov 2021 14:22:01 -0800\n",
|
Subject: Why not both importing AND exporting? =?utf-8?b?4pi6?=
|
||||||
"Subject: Why not both importing AND exporting? =?utf-8?b?4pi6?=\n",
|
Content-Type: multipart/mixed; boundary="festivus";
|
||||||
"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 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
|
// Parses addresses (including comments), lists and groups
|
||||||
assert_eq!(
|
assert_eq!(
|
||||||
message.get_from(),
|
message.get_from(),
|
||||||
&Address::Address(Addr {
|
&HeaderValue::Address(Addr::new(
|
||||||
name: Some("Art Vandelay (Vandelay Industries)".into()),
|
"Art Vandelay (Vandelay Industries)".into(),
|
||||||
address: Some("art@vandelay.com".into())
|
"art@vandelay.com"
|
||||||
})
|
))
|
||||||
);
|
);
|
||||||
|
|
||||||
assert_eq!(
|
assert_eq!(
|
||||||
message.get_to(),
|
message.get_to(),
|
||||||
&Address::GroupList(vec![
|
&HeaderValue::GroupList(vec![
|
||||||
Group {
|
Group::new(
|
||||||
name: Some("Colleagues".into()),
|
"Colleagues",
|
||||||
addresses: vec![Addr {
|
vec![Addr::new("James Smythe".into(), "james@vandelay.com")]
|
||||||
name: Some("James Smythe".into()),
|
),
|
||||||
address: Some("james@vandelay.com".into())
|
Group::new(
|
||||||
}]
|
"Friends",
|
||||||
},
|
vec![
|
||||||
Group {
|
Addr::new(None, "jane@example.com"),
|
||||||
name: Some("Friends".into()),
|
Addr::new("John Smîth".into(), "john@example.com"),
|
||||||
addresses: vec![
|
|
||||||
Addr {
|
|
||||||
name: None,
|
|
||||||
address: Some("jane@example.com".into())
|
|
||||||
},
|
|
||||||
Addr {
|
|
||||||
name: Some("John Smîth".into()),
|
|
||||||
address: Some("john@example.com".into())
|
|
||||||
}
|
|
||||||
]
|
]
|
||||||
}
|
)
|
||||||
])
|
])
|
||||||
);
|
);
|
||||||
|
|
||||||
@@ -121,7 +116,7 @@ Performance and memory safety were two important factors while designing _mail-p
|
|||||||
|
|
||||||
// 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!(
|
assert_eq!(
|
||||||
message.get_html_body(0).unwrap().to_string(),
|
message.get_html_body(0).unwrap(),
|
||||||
concat!(
|
concat!(
|
||||||
"<html><p>I was thinking about quitting the “exporting” to ",
|
"<html><p>I was thinking about quitting the “exporting” to ",
|
||||||
"focus just on the “importing”,</p><p>but then I thought,",
|
"focus just on the “importing”,</p><p>but then I thought,",
|
||||||
@@ -131,7 +126,7 @@ Performance and memory safety were two important factors while designing _mail-p
|
|||||||
|
|
||||||
// HTML parts are converted to plain text (and viceversa) when missing
|
// HTML parts are converted to plain text (and viceversa) when missing
|
||||||
assert_eq!(
|
assert_eq!(
|
||||||
message.get_text_body(0).unwrap().to_string(),
|
message.get_text_body(0).unwrap(),
|
||||||
concat!(
|
concat!(
|
||||||
"I was thinking about quitting the “exporting” to focus just on the",
|
"I was thinking about quitting the “exporting” to focus just on the",
|
||||||
" “importing”,\nbut then I thought, why not do both? ☺\n"
|
" “importing”,\nbut then I thought, why not do both? ☺\n"
|
||||||
@@ -139,10 +134,10 @@ Performance and memory safety were two important factors while designing _mail-p
|
|||||||
);
|
);
|
||||||
|
|
||||||
// Supports nested messages as well as multipart/digest
|
// Supports nested messages as well as multipart/digest
|
||||||
let nested_message = match message.get_attachment(0).unwrap() {
|
let nested_message = message
|
||||||
MessagePart::Message(v) => v,
|
.get_attachment(0)
|
||||||
_ => unreachable!(),
|
.unwrap()
|
||||||
};
|
.unwrap_message();
|
||||||
|
|
||||||
assert_eq!(
|
assert_eq!(
|
||||||
nested_message.get_subject().unwrap(),
|
nested_message.get_subject().unwrap(),
|
||||||
@@ -151,30 +146,21 @@ Performance and memory safety were two important factors while designing _mail-p
|
|||||||
|
|
||||||
// Handles UTF-* as well as many legacy encodings
|
// Handles UTF-* as well as many legacy encodings
|
||||||
assert_eq!(
|
assert_eq!(
|
||||||
nested_message.get_text_body(0).unwrap().to_string(),
|
nested_message.get_text_body(0).unwrap(),
|
||||||
"ℌ𝔢𝔩𝔭 𝔪𝔢 𝔢𝔵𝔭𝔬𝔯𝔱 𝔪𝔶 𝔟𝔬𝔬𝔨 𝔭𝔩𝔢𝔞𝔰𝔢!"
|
"ℌ𝔢𝔩𝔭 𝔪𝔢 𝔢𝔵𝔭𝔬𝔯𝔱 𝔪𝔶 𝔟𝔬𝔬𝔨 𝔭𝔩𝔢𝔞𝔰𝔢!"
|
||||||
);
|
);
|
||||||
assert_eq!(
|
assert_eq!(
|
||||||
nested_message.get_html_body(0).unwrap().to_string(),
|
nested_message.get_html_body(0).unwrap(),
|
||||||
"<html><body>ℌ𝔢𝔩𝔭 𝔪𝔢 𝔢𝔵𝔭𝔬𝔯𝔱 𝔪𝔶 𝔟𝔬𝔬𝔨 𝔭𝔩𝔢𝔞𝔰𝔢!</body></html>"
|
"<html><body>ℌ𝔢𝔩𝔭 𝔪𝔢 𝔢𝔵𝔭𝔬𝔯𝔱 𝔪𝔶 𝔟𝔬𝔬𝔨 𝔭𝔩𝔢𝔞𝔰𝔢!</body></html>"
|
||||||
);
|
);
|
||||||
|
|
||||||
let nested_attachment = match nested_message.get_attachment(0).unwrap() {
|
let nested_attachment = nested_message.get_attachment(0).unwrap().unwrap_binary();
|
||||||
MessagePart::Binary(v) => v,
|
|
||||||
_ => unreachable!(),
|
|
||||||
};
|
|
||||||
|
|
||||||
assert_eq!(nested_attachment.len(), 42);
|
assert_eq!(nested_attachment.len(), 42);
|
||||||
|
|
||||||
// Full RFC2231 support for continuations and character sets
|
// Full RFC2231 support for continuations and character sets
|
||||||
assert_eq!(
|
assert_eq!(
|
||||||
nested_attachment
|
nested_attachment.get_attachment_name().unwrap(),
|
||||||
.get_header()
|
|
||||||
.unwrap()
|
|
||||||
.get_content_type()
|
|
||||||
.unwrap()
|
|
||||||
.get_attribute("name")
|
|
||||||
.unwrap(),
|
|
||||||
"Book about ☕ tables.gif"
|
"Book about ☕ tables.gif"
|
||||||
);
|
);
|
||||||
|
|
||||||
@@ -183,6 +169,8 @@ Performance and memory safety were two important factors while designing _mail-p
|
|||||||
println!("{}", serde_yaml::to_string(&message).unwrap());
|
println!("{}", serde_yaml::to_string(&message).unwrap());
|
||||||
```
|
```
|
||||||
|
|
||||||
|
More examples available under the [examples](examples) directory. Please note that this library does not support building e-mail messages as this functionality is provided separately by the [`mail-builder`](https://crates.io/crates/mail-builder) crate.
|
||||||
|
|
||||||
## Testing, Fuzzing & Benchmarking
|
## Testing, Fuzzing & Benchmarking
|
||||||
|
|
||||||
To run the testsuite:
|
To run the testsuite:
|
||||||
@@ -219,12 +207,17 @@ and, to run the benchmarks:
|
|||||||
- [RFC 2048 - Multipurpose Internet Mail Extensions (MIME) Part Four: Registration Procedures](https://datatracker.ietf.org/doc/html/rfc2048)
|
- [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 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 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 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 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 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 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 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)
|
- [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)
|
||||||
|
- [RFC 5957 - Internet Message Access Protocol - SORT and THREAD Extensions (Section 2.1)](https://datatracker.ietf.org/doc/html/rfc5256#section-2.1)
|
||||||
|
|
||||||
## Supported Character Sets
|
## Supported Character Sets
|
||||||
|
|
||||||
@@ -284,7 +277,7 @@ at your option.
|
|||||||
|
|
||||||
## Copyright
|
## Copyright
|
||||||
|
|
||||||
Copyright (C) 2020-2022, Stalwart Labs, Minter Ltd.
|
Copyright (C) 2020-2022, Stalwart Labs Ltd.
|
||||||
|
|
||||||
See [COPYING] for the license.
|
See [COPYING] for the license.
|
||||||
|
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright Stalwart Labs, Minter Ltd. See the COPYING
|
* Copyright Stalwart Labs Ltd. See the COPYING
|
||||||
* file at the top-level directory of this distribution.
|
* file at the top-level directory of this distribution.
|
||||||
*
|
*
|
||||||
* Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
|
* Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
|
||||||
|
|||||||
@@ -1,161 +0,0 @@
|
|||||||
/*
|
|
||||||
* 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::{Addr, Address, BodyPart, Group, Message, MessagePart, MimeFieldGet};
|
|
||||||
|
|
||||||
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 message = Message::parse(input);
|
|
||||||
|
|
||||||
// Parses addresses (including comments), lists and groups
|
|
||||||
assert_eq!(
|
|
||||||
message.get_from(),
|
|
||||||
&Address::Address(Addr {
|
|
||||||
name: Some("Art Vandelay (Vandelay Industries)".into()),
|
|
||||||
address: Some("art@vandelay.com".into())
|
|
||||||
})
|
|
||||||
);
|
|
||||||
assert_eq!(
|
|
||||||
message.get_to(),
|
|
||||||
&Address::GroupList(vec![
|
|
||||||
Group {
|
|
||||||
name: Some("Colleagues".into()),
|
|
||||||
addresses: vec![Addr {
|
|
||||||
name: Some("James Smythe".into()),
|
|
||||||
address: Some("james@vandelay.com".into())
|
|
||||||
}]
|
|
||||||
},
|
|
||||||
Group {
|
|
||||||
name: Some("Friends".into()),
|
|
||||||
addresses: vec![
|
|
||||||
Addr {
|
|
||||||
name: None,
|
|
||||||
address: Some("jane@example.com".into())
|
|
||||||
},
|
|
||||||
Addr {
|
|
||||||
name: Some("John Smîth".into()),
|
|
||||||
address: Some("john@example.com".into())
|
|
||||||
}
|
|
||||||
]
|
|
||||||
}
|
|
||||||
])
|
|
||||||
);
|
|
||||||
|
|
||||||
assert_eq!(
|
|
||||||
message.get_date().unwrap().to_iso8601(),
|
|
||||||
"2021-11-20T14:22:01-08:00"
|
|
||||||
);
|
|
||||||
|
|
||||||
// RFC2047 support for encoded text in message readers
|
|
||||||
assert_eq!(
|
|
||||||
message.get_subject().unwrap(),
|
|
||||||
"Why not both importing AND exporting? ☺"
|
|
||||||
);
|
|
||||||
|
|
||||||
// HTML and text body parts are returned conforming to RFC8621, Section 4.1.4
|
|
||||||
assert_eq!(
|
|
||||||
message.get_html_body(0).unwrap().to_string(),
|
|
||||||
concat!(
|
|
||||||
"<html><p>I was thinking about quitting the “exporting” to ",
|
|
||||||
"focus just on the “importing”,</p><p>but then I thought,",
|
|
||||||
" why not do both? ☺</p></html>"
|
|
||||||
)
|
|
||||||
);
|
|
||||||
|
|
||||||
// HTML parts are converted to plain text (and viceversa) when missing
|
|
||||||
assert_eq!(
|
|
||||||
message.get_text_body(0).unwrap().to_string(),
|
|
||||||
concat!(
|
|
||||||
"I was thinking about quitting the “exporting” to focus just on the",
|
|
||||||
" “importing”,\nbut then I thought, why not do both? ☺\n"
|
|
||||||
)
|
|
||||||
);
|
|
||||||
|
|
||||||
// Supports nested messages as well as multipart/digest
|
|
||||||
let nested_message = match message.get_attachment(0).unwrap() {
|
|
||||||
MessagePart::Message(v) => v,
|
|
||||||
_ => unreachable!(),
|
|
||||||
};
|
|
||||||
|
|
||||||
assert_eq!(
|
|
||||||
nested_message.get_subject().unwrap(),
|
|
||||||
"Exporting my book about coffee tables"
|
|
||||||
);
|
|
||||||
|
|
||||||
// Handles UTF-* as well as many legacy encodings
|
|
||||||
assert_eq!(
|
|
||||||
nested_message.get_text_body(0).unwrap().to_string(),
|
|
||||||
"ℌ𝔢𝔩𝔭 𝔪𝔢 𝔢𝔵𝔭𝔬𝔯𝔱 𝔪𝔶 𝔟𝔬𝔬𝔨 𝔭𝔩𝔢𝔞𝔰𝔢!"
|
|
||||||
);
|
|
||||||
assert_eq!(
|
|
||||||
nested_message.get_html_body(0).unwrap().to_string(),
|
|
||||||
"<html><body>ℌ𝔢𝔩𝔭 𝔪𝔢 𝔢𝔵𝔭𝔬𝔯𝔱 𝔪𝔶 𝔟𝔬𝔬𝔨 𝔭𝔩𝔢𝔞𝔰𝔢!</body></html>"
|
|
||||||
);
|
|
||||||
|
|
||||||
let nested_attachment = match nested_message.get_attachment(0).unwrap() {
|
|
||||||
MessagePart::Binary(v) => v,
|
|
||||||
_ => unreachable!(),
|
|
||||||
};
|
|
||||||
|
|
||||||
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")
|
|
||||||
.unwrap(),
|
|
||||||
"Book about ☕ tables.gif"
|
|
||||||
);
|
|
||||||
|
|
||||||
// Integrates with Serde
|
|
||||||
println!("{}", serde_json::to_string_pretty(&message).unwrap());
|
|
||||||
println!("{}", serde_yaml::to_string(&message).unwrap());
|
|
||||||
}
|
|
||||||
@@ -0,0 +1,145 @@
|
|||||||
|
/*
|
||||||
|
* Copyright Stalwart Labs 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
|
||||||
|
|
||||||
|
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(),
|
||||||
|
&HeaderValue::Address(Addr::new(
|
||||||
|
"Art Vandelay (Vandelay Industries)".into(),
|
||||||
|
"art@vandelay.com"
|
||||||
|
))
|
||||||
|
);
|
||||||
|
|
||||||
|
assert_eq!(
|
||||||
|
message.get_to(),
|
||||||
|
&HeaderValue::GroupList(vec![
|
||||||
|
Group::new(
|
||||||
|
"Colleagues",
|
||||||
|
vec![Addr::new("James Smythe".into(), "james@vandelay.com")]
|
||||||
|
),
|
||||||
|
Group::new(
|
||||||
|
"Friends",
|
||||||
|
vec![
|
||||||
|
Addr::new(None, "jane@example.com"),
|
||||||
|
Addr::new("John Smîth".into(), "john@example.com"),
|
||||||
|
]
|
||||||
|
)
|
||||||
|
])
|
||||||
|
);
|
||||||
|
|
||||||
|
assert_eq!(
|
||||||
|
message.get_date().unwrap().to_iso8601(),
|
||||||
|
"2021-11-20T14:22:01-08:00"
|
||||||
|
);
|
||||||
|
|
||||||
|
// RFC2047 support for encoded text in message readers
|
||||||
|
assert_eq!(
|
||||||
|
message.get_subject().unwrap(),
|
||||||
|
"Why not both importing AND exporting? ☺"
|
||||||
|
);
|
||||||
|
|
||||||
|
// HTML and text body parts are returned conforming to RFC8621, Section 4.1.4
|
||||||
|
assert_eq!(
|
||||||
|
message.get_html_body(0).unwrap(),
|
||||||
|
concat!(
|
||||||
|
"<html><p>I was thinking about quitting the “exporting” to ",
|
||||||
|
"focus just on the “importing”,</p><p>but then I thought,",
|
||||||
|
" why not do both? ☺</p></html>"
|
||||||
|
)
|
||||||
|
);
|
||||||
|
|
||||||
|
// HTML parts are converted to plain text (and viceversa) when missing
|
||||||
|
assert_eq!(
|
||||||
|
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"
|
||||||
|
)
|
||||||
|
);
|
||||||
|
|
||||||
|
// Supports nested messages as well as multipart/digest
|
||||||
|
let nested_message = message.get_attachment(0).unwrap().unwrap_message();
|
||||||
|
|
||||||
|
assert_eq!(
|
||||||
|
nested_message.get_subject().unwrap(),
|
||||||
|
"Exporting my book about coffee tables"
|
||||||
|
);
|
||||||
|
|
||||||
|
// Handles UTF-* as well as many legacy encodings
|
||||||
|
assert_eq!(
|
||||||
|
nested_message.get_text_body(0).unwrap(),
|
||||||
|
"ℌ𝔢𝔩𝔭 𝔪𝔢 𝔢𝔵𝔭𝔬𝔯𝔱 𝔪𝔶 𝔟𝔬𝔬𝔨 𝔭𝔩𝔢𝔞𝔰𝔢!"
|
||||||
|
);
|
||||||
|
assert_eq!(
|
||||||
|
nested_message.get_html_body(0).unwrap(),
|
||||||
|
"<html><body>ℌ𝔢𝔩𝔭 𝔪𝔢 𝔢𝔵𝔭𝔬𝔯𝔱 𝔪𝔶 𝔟𝔬𝔬𝔨 𝔭𝔩𝔢𝔞𝔰𝔢!</body></html>"
|
||||||
|
);
|
||||||
|
|
||||||
|
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_attachment_name().unwrap(),
|
||||||
|
"Book about ☕ tables.gif"
|
||||||
|
);
|
||||||
|
|
||||||
|
// Integrates with Serde
|
||||||
|
println!("{}", serde_json::to_string_pretty(&message).unwrap());
|
||||||
|
println!("{}", serde_yaml::to_string(&message).unwrap());
|
||||||
|
}
|
||||||
@@ -0,0 +1,21 @@
|
|||||||
|
/*
|
||||||
|
* Copyright Stalwart Labs 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::{parsers::mbox::MBoxParser, Message};
|
||||||
|
|
||||||
|
fn main() {
|
||||||
|
// Read an MBox mailbox from stdin and prints each message as YAML.
|
||||||
|
|
||||||
|
for raw_message in MBoxParser::new(std::io::stdin()) {
|
||||||
|
let message = Message::parse(&raw_message).unwrap();
|
||||||
|
println!("{}", serde_yaml::to_string(&message).unwrap());
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,89 @@
|
|||||||
|
/*
|
||||||
|
* Copyright Stalwart Labs 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(attached_message) => {
|
||||||
|
// Write attachments of nested messages
|
||||||
|
match &attached_message.body {
|
||||||
|
MessageAttachment::Parsed(message) => write_attachments(message.as_ref()),
|
||||||
|
MessageAttachment::Raw(_) => {
|
||||||
|
write_attachments(&attached_message.parse_raw().unwrap())
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// Write raw message
|
||||||
|
write_part(attached_message);
|
||||||
|
}
|
||||||
|
_ => (),
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
fn write_part<'x>(part: &'x impl BodyPart<'x>) {
|
||||||
|
std::fs::write(
|
||||||
|
part.get_attachment_name().unwrap_or("Untitled"),
|
||||||
|
part.get_contents(),
|
||||||
|
)
|
||||||
|
.unwrap();
|
||||||
|
}
|
||||||
Generated
+1
-1
@@ -42,7 +42,7 @@ dependencies = [
|
|||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "mail-parser"
|
name = "mail-parser"
|
||||||
version = "0.2.1"
|
version = "0.4.2"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"encoding_rs",
|
"encoding_rs",
|
||||||
"serde",
|
"serde",
|
||||||
|
|||||||
@@ -22,11 +22,12 @@ use mail_parser::{
|
|||||||
id::parse_id,
|
id::parse_id,
|
||||||
list::parse_comma_separared,
|
list::parse_comma_separared,
|
||||||
raw::{parse_and_ignore, parse_raw},
|
raw::{parse_and_ignore, parse_raw},
|
||||||
|
thread::{thread_name, trim_trailing_fwd},
|
||||||
unstructured::parse_unstructured,
|
unstructured::parse_unstructured,
|
||||||
},
|
},
|
||||||
mime::*,
|
|
||||||
header::parse_header_name,
|
header::parse_header_name,
|
||||||
message::MessageStream,
|
message::MessageStream,
|
||||||
|
mime::*,
|
||||||
},
|
},
|
||||||
Message,
|
Message,
|
||||||
};
|
};
|
||||||
@@ -62,7 +63,7 @@ fuzz_target!(|data: &[u8]| {
|
|||||||
parse_content_type(&mut stream);
|
parse_content_type(&mut stream);
|
||||||
}
|
}
|
||||||
9 => {
|
9 => {
|
||||||
parse_header_name(&mut stream);
|
parse_header_name(&data);
|
||||||
}
|
}
|
||||||
10 => {
|
10 => {
|
||||||
decode_rfc2047(&mut stream, 0);
|
decode_rfc2047(&mut stream, 0);
|
||||||
@@ -113,26 +114,27 @@ fuzz_target!(|data: &[u8]| {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Fuzz HTML functions
|
// Fuzz text functions
|
||||||
let mut html_str = String::with_capacity(data.len());
|
let mut html_str = String::with_capacity(data.len());
|
||||||
let str_data = String::from_utf8_lossy(data);
|
let str_data = String::from_utf8_lossy(data);
|
||||||
add_html_token(&mut html_str, str_data.as_ref().as_bytes(), false);
|
add_html_token(&mut html_str, str_data.as_ref().as_bytes(), false);
|
||||||
html_to_text(&str_data);
|
html_to_text(&str_data);
|
||||||
text_to_html(&str_data);
|
text_to_html(&str_data);
|
||||||
|
thread_name(&str_data);
|
||||||
|
trim_trailing_fwd(&str_data);
|
||||||
|
|
||||||
// Fuzz decoding functions
|
// Fuzz decoding functions
|
||||||
decode_hex(data);
|
decode_hex(data);
|
||||||
get_charset_decoder(data);
|
get_charset_decoder(data);
|
||||||
|
|
||||||
let decoders: &[for<'x> fn(&'x [u8]) -> String] = &[
|
for decoder in &[
|
||||||
decoder_utf7,
|
decoder_utf7,
|
||||||
decoder_utf16_le,
|
decoder_utf16_le,
|
||||||
decoder_utf16_be,
|
decoder_utf16_be,
|
||||||
decoder_utf16,
|
decoder_utf16,
|
||||||
decoder_iso_8859_1,
|
decoder_iso_8859_1,
|
||||||
];
|
] as &[for<'x> fn(&'x [u8]) -> String]
|
||||||
|
{
|
||||||
for decoder in decoders {
|
|
||||||
decoder(data);
|
decoder(data);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright Stalwart Labs, Minter Ltd. See the COPYING
|
* Copyright Stalwart Labs Ltd. See the COPYING
|
||||||
* file at the top-level directory of this distribution.
|
* file at the top-level directory of this distribution.
|
||||||
*
|
*
|
||||||
* Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
|
* Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright Stalwart Labs, Minter Ltd. See the COPYING
|
* Copyright Stalwart Labs Ltd. See the COPYING
|
||||||
* file at the top-level directory of this distribution.
|
* file at the top-level directory of this distribution.
|
||||||
*
|
*
|
||||||
* Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
|
* Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
|
||||||
@@ -550,7 +550,7 @@ static CH_MAP: &[&[u8]; 758] = &[
|
|||||||
b"",
|
b"",
|
||||||
b"",
|
b"",
|
||||||
b"",
|
b"",
|
||||||
b"",
|
b"ks_c_5601-1989",
|
||||||
b"",
|
b"",
|
||||||
b"",
|
b"",
|
||||||
b"",
|
b"",
|
||||||
@@ -660,7 +660,7 @@ static CH_MAP: &[&[u8]; 758] = &[
|
|||||||
b"",
|
b"",
|
||||||
b"",
|
b"",
|
||||||
b"",
|
b"",
|
||||||
b"",
|
b"ks_c_5601-1987",
|
||||||
b"",
|
b"",
|
||||||
b"",
|
b"",
|
||||||
b"",
|
b"",
|
||||||
@@ -1312,7 +1312,7 @@ static FNC_MAP: &[for<'x> fn(&'x [u8]) -> String; 758] = &[
|
|||||||
no_op,
|
no_op,
|
||||||
no_op,
|
no_op,
|
||||||
no_op,
|
no_op,
|
||||||
no_op,
|
decoder_euc_kr,
|
||||||
no_op,
|
no_op,
|
||||||
no_op,
|
no_op,
|
||||||
no_op,
|
no_op,
|
||||||
@@ -1422,7 +1422,7 @@ static FNC_MAP: &[for<'x> fn(&'x [u8]) -> String; 758] = &[
|
|||||||
no_op,
|
no_op,
|
||||||
no_op,
|
no_op,
|
||||||
no_op,
|
no_op,
|
||||||
no_op,
|
decoder_euc_kr,
|
||||||
no_op,
|
no_op,
|
||||||
no_op,
|
no_op,
|
||||||
no_op,
|
no_op,
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright Stalwart Labs, Minter Ltd. See the COPYING
|
* Copyright Stalwart Labs Ltd. See the COPYING
|
||||||
* file at the top-level directory of this distribution.
|
* file at the top-level directory of this distribution.
|
||||||
*
|
*
|
||||||
* Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
|
* Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright Stalwart Labs, Minter Ltd. See the COPYING
|
* Copyright Stalwart Labs Ltd. See the COPYING
|
||||||
* file at the top-level directory of this distribution.
|
* file at the top-level directory of this distribution.
|
||||||
*
|
*
|
||||||
* Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
|
* Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
|
||||||
@@ -12,9 +12,6 @@
|
|||||||
#[cfg(feature = "full_encoding")]
|
#[cfg(feature = "full_encoding")]
|
||||||
use encoding_rs::*;
|
use encoding_rs::*;
|
||||||
|
|
||||||
#[cfg(not(feature = "full_encoding"))]
|
|
||||||
use super::map::decoder_default;
|
|
||||||
|
|
||||||
#[cfg(feature = "full_encoding")]
|
#[cfg(feature = "full_encoding")]
|
||||||
fn multi_byte_decoder(mut decoder: Decoder, bytes: &[u8]) -> String {
|
fn multi_byte_decoder(mut decoder: Decoder, bytes: &[u8]) -> String {
|
||||||
let mut result = String::with_capacity(bytes.len() * 3);
|
let mut result = String::with_capacity(bytes.len() * 3);
|
||||||
@@ -35,7 +32,7 @@ pub fn decoder_shift_jis(bytes: &[u8]) -> String {
|
|||||||
|
|
||||||
#[cfg(not(feature = "full_encoding"))]
|
#[cfg(not(feature = "full_encoding"))]
|
||||||
{
|
{
|
||||||
decoder_default(bytes)
|
String::from_utf8_lossy(bytes).into_owned()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -47,7 +44,7 @@ pub fn decoder_big5(bytes: &[u8]) -> String {
|
|||||||
|
|
||||||
#[cfg(not(feature = "full_encoding"))]
|
#[cfg(not(feature = "full_encoding"))]
|
||||||
{
|
{
|
||||||
decoder_default(bytes)
|
String::from_utf8_lossy(bytes).into_owned()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -59,7 +56,7 @@ pub fn decoder_euc_jp(bytes: &[u8]) -> String {
|
|||||||
|
|
||||||
#[cfg(not(feature = "full_encoding"))]
|
#[cfg(not(feature = "full_encoding"))]
|
||||||
{
|
{
|
||||||
decoder_default(bytes)
|
String::from_utf8_lossy(bytes).into_owned()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -71,7 +68,7 @@ pub fn decoder_euc_kr(bytes: &[u8]) -> String {
|
|||||||
|
|
||||||
#[cfg(not(feature = "full_encoding"))]
|
#[cfg(not(feature = "full_encoding"))]
|
||||||
{
|
{
|
||||||
decoder_default(bytes)
|
String::from_utf8_lossy(bytes).into_owned()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -83,7 +80,7 @@ pub fn decoder_gb18030(bytes: &[u8]) -> String {
|
|||||||
|
|
||||||
#[cfg(not(feature = "full_encoding"))]
|
#[cfg(not(feature = "full_encoding"))]
|
||||||
{
|
{
|
||||||
decoder_default(bytes)
|
String::from_utf8_lossy(bytes).into_owned()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -95,7 +92,7 @@ pub fn decoder_gbk(bytes: &[u8]) -> String {
|
|||||||
|
|
||||||
#[cfg(not(feature = "full_encoding"))]
|
#[cfg(not(feature = "full_encoding"))]
|
||||||
{
|
{
|
||||||
decoder_default(bytes)
|
String::from_utf8_lossy(bytes).into_owned()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -107,7 +104,7 @@ pub fn decoder_iso2022_jp(bytes: &[u8]) -> String {
|
|||||||
|
|
||||||
#[cfg(not(feature = "full_encoding"))]
|
#[cfg(not(feature = "full_encoding"))]
|
||||||
{
|
{
|
||||||
decoder_default(bytes)
|
String::from_utf8_lossy(bytes).into_owned()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -119,7 +116,7 @@ pub fn decoder_windows874(bytes: &[u8]) -> String {
|
|||||||
|
|
||||||
#[cfg(not(feature = "full_encoding"))]
|
#[cfg(not(feature = "full_encoding"))]
|
||||||
{
|
{
|
||||||
decoder_default(bytes)
|
String::from_utf8_lossy(bytes).into_owned()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -131,6 +128,6 @@ pub fn decoder_ibm866(bytes: &[u8]) -> String {
|
|||||||
|
|
||||||
#[cfg(not(feature = "full_encoding"))]
|
#[cfg(not(feature = "full_encoding"))]
|
||||||
{
|
{
|
||||||
decoder_default(bytes)
|
String::from_utf8_lossy(bytes).into_owned()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright Stalwart Labs, Minter Ltd. See the COPYING
|
* Copyright Stalwart Labs Ltd. See the COPYING
|
||||||
* file at the top-level directory of this distribution.
|
* file at the top-level directory of this distribution.
|
||||||
*
|
*
|
||||||
* Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
|
* Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright Stalwart Labs, Minter Ltd. See the COPYING
|
* Copyright Stalwart Labs Ltd. See the COPYING
|
||||||
* file at the top-level directory of this distribution.
|
* file at the top-level directory of this distribution.
|
||||||
*
|
*
|
||||||
* Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
|
* Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright Stalwart Labs, Minter Ltd. See the COPYING
|
* Copyright Stalwart Labs Ltd. See the COPYING
|
||||||
* file at the top-level directory of this distribution.
|
* file at the top-level directory of this distribution.
|
||||||
*
|
*
|
||||||
* Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
|
* Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
|
||||||
|
|||||||
+1
-1
@@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright Stalwart Labs, Minter Ltd. See the COPYING
|
* Copyright Stalwart Labs Ltd. See the COPYING
|
||||||
* file at the top-level directory of this distribution.
|
* file at the top-level directory of this distribution.
|
||||||
*
|
*
|
||||||
* Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
|
* Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright Stalwart Labs, Minter Ltd. See the COPYING
|
* Copyright Stalwart Labs Ltd. See the COPYING
|
||||||
* file at the top-level directory of this distribution.
|
* file at the top-level directory of this distribution.
|
||||||
*
|
*
|
||||||
* Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
|
* Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
|
||||||
|
|||||||
+1
-1
@@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright Stalwart Labs, Minter Ltd. See the COPYING
|
* Copyright Stalwart Labs Ltd. See the COPYING
|
||||||
* file at the top-level directory of this distribution.
|
* file at the top-level directory of this distribution.
|
||||||
*
|
*
|
||||||
* Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
|
* Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright Stalwart Labs, Minter Ltd. See the COPYING
|
* Copyright Stalwart Labs Ltd. See the COPYING
|
||||||
* file at the top-level directory of this distribution.
|
* file at the top-level directory of this distribution.
|
||||||
*
|
*
|
||||||
* Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
|
* Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
|
||||||
|
|||||||
+1052
-679
File diff suppressed because it is too large
Load Diff
@@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright Stalwart Labs, Minter Ltd. See the COPYING
|
* Copyright Stalwart Labs Ltd. See the COPYING
|
||||||
* file at the top-level directory of this distribution.
|
* file at the top-level directory of this distribution.
|
||||||
*
|
*
|
||||||
* Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
|
* Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
|
||||||
@@ -12,21 +12,10 @@
|
|||||||
use std::borrow::Cow;
|
use std::borrow::Cow;
|
||||||
|
|
||||||
use crate::{
|
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)]
|
#[derive(PartialEq, Clone, Copy, Debug)]
|
||||||
enum AddressState {
|
enum AddressState {
|
||||||
Address,
|
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 {
|
let mut parser = AddressParser {
|
||||||
token_start: 0,
|
token_start: 0,
|
||||||
token_end: 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() {
|
if parser.group_name.is_some() || !parser.result.is_empty() {
|
||||||
add_group(&mut parser);
|
add_group(&mut parser);
|
||||||
if parser.result.len() > 1 {
|
if parser.result.len() > 1 {
|
||||||
Address::GroupList(parser.result)
|
HeaderValue::GroupList(parser.result)
|
||||||
} else {
|
} else {
|
||||||
Address::Group(parser.result.pop().unwrap())
|
HeaderValue::Group(parser.result.pop().unwrap())
|
||||||
}
|
}
|
||||||
} else if !parser.addresses.is_empty() {
|
} else if !parser.addresses.is_empty() {
|
||||||
if parser.addresses.len() > 1 {
|
if parser.addresses.len() > 1 {
|
||||||
Address::AddressList(parser.addresses)
|
HeaderValue::AddressList(parser.addresses)
|
||||||
} else {
|
} else {
|
||||||
Address::Address(parser.addresses.pop().unwrap())
|
HeaderValue::Address(parser.addresses.pop().unwrap())
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
Address::Empty
|
HeaderValue::Empty
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -933,10 +922,9 @@ mod tests {
|
|||||||
];
|
];
|
||||||
|
|
||||||
for input in inputs {
|
for input in inputs {
|
||||||
println!("Testiong {}", input.0);
|
|
||||||
let str = input.0.to_string();
|
let str = input.0.to_string();
|
||||||
let result = parse_address(&mut MessageStream::new(str.as_bytes()));
|
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 {
|
/*if input.0.len() >= 70 {
|
||||||
println!(
|
println!(
|
||||||
|
|||||||
+934
-745
File diff suppressed because it is too large
Load Diff
+94
-11
@@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright Stalwart Labs, Minter Ltd. See the COPYING
|
* Copyright Stalwart Labs Ltd. See the COPYING
|
||||||
* file at the top-level directory of this distribution.
|
* file at the top-level directory of this distribution.
|
||||||
*
|
*
|
||||||
* Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
|
* Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
|
||||||
@@ -11,7 +11,7 @@
|
|||||||
|
|
||||||
use std::fmt;
|
use std::fmt;
|
||||||
|
|
||||||
use crate::{parsers::message::MessageStream, DateTime};
|
use crate::{parsers::message::MessageStream, DateTime, HeaderValue};
|
||||||
|
|
||||||
impl DateTime {
|
impl DateTime {
|
||||||
/// Returns an ISO-8601 representation of the parsed RFC5322 datetime field
|
/// Returns an ISO-8601 representation of the parsed RFC5322 datetime field
|
||||||
@@ -24,11 +24,62 @@ impl DateTime {
|
|||||||
self.hour,
|
self.hour,
|
||||||
self.minute,
|
self.minute,
|
||||||
self.second,
|
self.second,
|
||||||
if self.tz_before_gmt { "-" } else { "+" },
|
if self.tz_before_gmt && (self.tz_hour > 0 || self.tz_minute > 0) {
|
||||||
|
"-"
|
||||||
|
} else {
|
||||||
|
"+"
|
||||||
|
},
|
||||||
self.tz_hour,
|
self.tz_hour,
|
||||||
self.tz_minute
|
self.tz_minute
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// Returns true if the date is valid
|
||||||
|
pub fn is_valid(&self) -> bool {
|
||||||
|
(0..=23).contains(&self.tz_hour)
|
||||||
|
&& (1970..=3000).contains(&self.year)
|
||||||
|
&& (0..=59).contains(&self.tz_minute)
|
||||||
|
&& (1..=12).contains(&self.month)
|
||||||
|
&& (1..=31).contains(&self.day)
|
||||||
|
&& (0..=23).contains(&self.hour)
|
||||||
|
&& (0..=59).contains(&self.minute)
|
||||||
|
&& (0..=59).contains(&self.second)
|
||||||
|
}
|
||||||
|
|
||||||
|
/// Returns the numbers of seconds since 1970-01-01T00:00:00Z (Unix epoch)
|
||||||
|
/// or None if the date is invalid.
|
||||||
|
pub fn to_timestamp(&self) -> i64 {
|
||||||
|
// Ported from https://github.com/protocolbuffers/upb/blob/22182e6e/upb/json_decode.c#L982-L992
|
||||||
|
let year_base = 4800; /* Before min year, multiple of 400. */
|
||||||
|
let m_adj = self.month.wrapping_sub(3); /* March-based month. */
|
||||||
|
let carry = if m_adj > self.month { 1 } else { 0 };
|
||||||
|
let adjust = if carry > 0 { 12 } else { 0 };
|
||||||
|
let y_adj = self.year as i64 + year_base - carry;
|
||||||
|
let month_days = ((m_adj.wrapping_add(adjust)) * 62719 + 769) / 2048;
|
||||||
|
let leap_days = y_adj / 4 - y_adj / 100 + y_adj / 400;
|
||||||
|
(y_adj * 365 + leap_days + month_days as i64 + (self.day as i64 - 1) - 2472632) * 86400
|
||||||
|
+ self.hour as i64 * 3600
|
||||||
|
+ self.minute as i64 * 60
|
||||||
|
+ self.second as i64
|
||||||
|
+ ((self.tz_hour as i64 * 3600 + self.tz_minute as i64 * 60)
|
||||||
|
* if self.tz_before_gmt { 1 } else { -1 })
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
impl PartialOrd for DateTime {
|
||||||
|
fn partial_cmp(&self, other: &Self) -> Option<std::cmp::Ordering> {
|
||||||
|
self.cmp(other).into()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
impl Ord for DateTime {
|
||||||
|
fn cmp(&self, other: &Self) -> std::cmp::Ordering {
|
||||||
|
match self.to_timestamp() - other.to_timestamp() {
|
||||||
|
0 => std::cmp::Ordering::Equal,
|
||||||
|
x if x > 0 => std::cmp::Ordering::Greater,
|
||||||
|
_ => std::cmp::Ordering::Less,
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
impl fmt::Display for DateTime {
|
impl fmt::Display for DateTime {
|
||||||
@@ -37,7 +88,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 pos = 0;
|
||||||
let mut parts = [0u32; 7];
|
let mut parts = [0u32; 7];
|
||||||
let mut parts_sizes = [
|
let mut parts_sizes = [
|
||||||
@@ -151,7 +202,7 @@ pub fn parse_date(stream: &mut MessageStream) -> Option<DateTime> {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if pos >= 6 {
|
if pos >= 6 {
|
||||||
Some(DateTime {
|
HeaderValue::DateTime(DateTime {
|
||||||
year: if (1..=99).contains(&parts[2]) {
|
year: if (1..=99).contains(&parts[2]) {
|
||||||
parts[2] + 1900
|
parts[2] + 1900
|
||||||
} else {
|
} else {
|
||||||
@@ -171,7 +222,7 @@ pub fn parse_date(stream: &mut MessageStream) -> Option<DateTime> {
|
|||||||
tz_before_gmt: !is_plus,
|
tz_before_gmt: !is_plus,
|
||||||
})
|
})
|
||||||
} else {
|
} else {
|
||||||
None
|
HeaderValue::Empty
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -195,7 +246,12 @@ pub static MONTH_MAP: &[u8; 31] = &[
|
|||||||
|
|
||||||
#[cfg(test)]
|
#[cfg(test)]
|
||||||
mod tests {
|
mod tests {
|
||||||
use crate::parsers::{fields::date::parse_date, message::MessageStream};
|
use chrono::{FixedOffset, LocalResult, SecondsFormat, TimeZone, Utc};
|
||||||
|
|
||||||
|
use crate::{
|
||||||
|
parsers::{fields::date::parse_date, message::MessageStream},
|
||||||
|
HeaderValue,
|
||||||
|
};
|
||||||
|
|
||||||
#[test]
|
#[test]
|
||||||
fn parse_dates() {
|
fn parse_dates() {
|
||||||
@@ -262,14 +318,41 @@ mod tests {
|
|||||||
for input in inputs {
|
for input in inputs {
|
||||||
let str = input.0.to_string();
|
let str = input.0.to_string();
|
||||||
match parse_date(&mut MessageStream::new(str.as_bytes())) {
|
match parse_date(&mut MessageStream::new(str.as_bytes())) {
|
||||||
Some(date) => {
|
HeaderValue::DateTime(datetime) => {
|
||||||
//println!("{} -> {}", input.0.escape_debug(), date.to_iso8601());
|
assert_eq!(input.1, datetime.to_iso8601());
|
||||||
assert_eq!(input.1, date.to_iso8601());
|
|
||||||
|
if datetime.is_valid() {
|
||||||
|
if let LocalResult::Single(chrono_datetime)
|
||||||
|
| LocalResult::Ambiguous(chrono_datetime, _) = FixedOffset::west_opt(
|
||||||
|
((datetime.tz_hour as i32 * 3600i32) + datetime.tz_minute as i32 * 60)
|
||||||
|
* if datetime.tz_before_gmt { 1i32 } else { -1i32 },
|
||||||
|
)
|
||||||
|
.unwrap_or_else(|| FixedOffset::east(0))
|
||||||
|
.ymd_opt(datetime.year as i32, datetime.month, datetime.day)
|
||||||
|
.and_hms_opt(datetime.hour, datetime.minute, datetime.second)
|
||||||
|
{
|
||||||
|
assert_eq!(
|
||||||
|
chrono_datetime.timestamp(),
|
||||||
|
datetime.to_timestamp(),
|
||||||
|
"{} -> {} ({}) -> {} ({})",
|
||||||
|
input.0.escape_debug(),
|
||||||
|
datetime.to_timestamp(),
|
||||||
|
Utc.timestamp_opt(datetime.to_timestamp(), 0)
|
||||||
|
.unwrap()
|
||||||
|
.to_rfc3339_opts(SecondsFormat::Secs, true),
|
||||||
|
chrono_datetime.timestamp(),
|
||||||
|
Utc.timestamp_opt(chrono_datetime.timestamp(), 0)
|
||||||
|
.unwrap()
|
||||||
|
.to_rfc3339_opts(SecondsFormat::Secs, true)
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
None => {
|
HeaderValue::Empty => {
|
||||||
//println!("{} -> None", input.0.escape_debug());
|
//println!("{} -> None", input.0.escape_debug());
|
||||||
assert!(input.1.is_empty());
|
assert!(input.1.is_empty());
|
||||||
}
|
}
|
||||||
|
_ => panic!("Unexpected result"),
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
+48
-14
@@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright Stalwart Labs, Minter Ltd. See the COPYING
|
* Copyright Stalwart Labs Ltd. See the COPYING
|
||||||
* file at the top-level directory of this distribution.
|
* file at the top-level directory of this distribution.
|
||||||
*
|
*
|
||||||
* Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
|
* Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
|
||||||
@@ -9,13 +9,13 @@
|
|||||||
* except according to those terms.
|
* 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>) -> HeaderValue<'x> {
|
||||||
|
|
||||||
pub fn parse_id<'x>(stream: &mut MessageStream<'x>) -> Option<Vec<Cow<'x, str>>> {
|
|
||||||
let mut token_start: usize = 0;
|
let mut token_start: usize = 0;
|
||||||
let mut token_end: usize = 0;
|
let mut token_end: usize = 0;
|
||||||
|
let mut token_invalid_start: usize = 0; // Handle broken clients
|
||||||
|
let mut token_invalid_end: usize = 0; // Handle broken clients
|
||||||
let mut is_id_part = false;
|
let mut is_id_part = false;
|
||||||
let mut ids = Vec::new();
|
let mut ids = Vec::new();
|
||||||
|
|
||||||
@@ -31,7 +31,19 @@ pub fn parse_id<'x>(stream: &mut MessageStream<'x>) -> Option<Vec<Cow<'x, str>>>
|
|||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
_ => {
|
_ => {
|
||||||
return if !ids.is_empty() { Some(ids) } else { None };
|
return match ids.len() {
|
||||||
|
1 => HeaderValue::Text(ids.pop().unwrap()),
|
||||||
|
0 => {
|
||||||
|
if token_invalid_start > 0 {
|
||||||
|
HeaderValue::Text(String::from_utf8_lossy(
|
||||||
|
&stream.data[token_invalid_start - 1..token_invalid_end],
|
||||||
|
))
|
||||||
|
} else {
|
||||||
|
HeaderValue::Empty
|
||||||
|
}
|
||||||
|
}
|
||||||
|
_ => HeaderValue::TextList(ids),
|
||||||
|
};
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
b'<' => {
|
b'<' => {
|
||||||
@@ -50,23 +62,29 @@ pub fn parse_id<'x>(stream: &mut MessageStream<'x>) -> Option<Vec<Cow<'x, str>>>
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
b' ' | b'\t' | b'\r' => continue,
|
b' ' | b'\t' | b'\r' => continue,
|
||||||
_ => (),
|
_ => {}
|
||||||
}
|
}
|
||||||
if is_id_part {
|
if is_id_part {
|
||||||
if token_start == 0 {
|
if token_start == 0 {
|
||||||
token_start = stream.pos;
|
token_start = stream.pos;
|
||||||
}
|
}
|
||||||
token_end = stream.pos;
|
token_end = stream.pos;
|
||||||
|
} else {
|
||||||
|
if token_invalid_start == 0 {
|
||||||
|
token_invalid_start = stream.pos;
|
||||||
|
}
|
||||||
|
token_invalid_end = stream.pos;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
None
|
HeaderValue::Empty
|
||||||
}
|
}
|
||||||
|
|
||||||
#[cfg(test)]
|
#[cfg(test)]
|
||||||
mod tests {
|
mod tests {
|
||||||
use crate::parsers::fields::id::parse_id;
|
use crate::parsers::fields::id::parse_id;
|
||||||
use crate::parsers::message::MessageStream;
|
use crate::parsers::message::MessageStream;
|
||||||
|
use crate::HeaderValue;
|
||||||
|
|
||||||
#[test]
|
#[test]
|
||||||
fn parse_message_ids() {
|
fn parse_message_ids() {
|
||||||
@@ -99,16 +117,32 @@ mod tests {
|
|||||||
"<1234 @ local(blah) .machine .example>\n",
|
"<1234 @ local(blah) .machine .example>\n",
|
||||||
vec!["1234 @ local(blah) .machine .example"],
|
vec!["1234 @ local(blah) .machine .example"],
|
||||||
),
|
),
|
||||||
|
("<>\n", vec![""]),
|
||||||
|
// Malformed Ids should be parsed anyway
|
||||||
|
(
|
||||||
|
"malformed@id.machine.example\n",
|
||||||
|
vec!["malformed@id.machine.example"],
|
||||||
|
),
|
||||||
|
(
|
||||||
|
" malformed2@id.machine.example \t \n",
|
||||||
|
vec!["malformed2@id.machine.example"],
|
||||||
|
),
|
||||||
|
(" m \n", vec!["m"]),
|
||||||
];
|
];
|
||||||
|
|
||||||
for input in inputs {
|
for input in inputs {
|
||||||
let str = input.0.to_string();
|
let str = input.0.to_string();
|
||||||
assert_eq!(
|
match parse_id(&mut MessageStream::new(str.as_bytes())) {
|
||||||
input.1,
|
HeaderValue::TextList(ids) => {
|
||||||
parse_id(&mut MessageStream::new(str.as_bytes())).unwrap(),
|
assert_eq!(ids, input.1, "Failed to parse '{:?}'", input.0);
|
||||||
"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);
|
||||||
|
}
|
||||||
|
HeaderValue::Empty if input.1[0].is_empty() => {}
|
||||||
|
result => panic!("Unexpected result: {:?}", result),
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
+20
-12
@@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright Stalwart Labs, Minter Ltd. See the COPYING
|
* Copyright Stalwart Labs Ltd. See the COPYING
|
||||||
* file at the top-level directory of this distribution.
|
* file at the top-level directory of this distribution.
|
||||||
*
|
*
|
||||||
* Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
|
* Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
|
||||||
@@ -11,7 +11,7 @@
|
|||||||
|
|
||||||
use std::borrow::Cow;
|
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> {
|
struct ListParser<'x> {
|
||||||
token_start: usize,
|
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 {
|
let mut parser = ListParser {
|
||||||
token_start: 0,
|
token_start: 0,
|
||||||
token_end: 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);
|
add_tokens_to_list(&mut parser);
|
||||||
|
|
||||||
return if !parser.list.is_empty() {
|
return match parser.list.len() {
|
||||||
parser.list.into()
|
1 => HeaderValue::Text(parser.list.pop().unwrap()),
|
||||||
} else {
|
0 => HeaderValue::Empty,
|
||||||
None
|
_ => 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;
|
parser.token_end = stream.pos;
|
||||||
}
|
}
|
||||||
|
|
||||||
None
|
HeaderValue::Empty
|
||||||
}
|
}
|
||||||
|
|
||||||
#[cfg(test)]
|
#[cfg(test)]
|
||||||
mod tests {
|
mod tests {
|
||||||
use crate::parsers::fields::list::parse_comma_separared;
|
use crate::parsers::fields::list::parse_comma_separared;
|
||||||
use crate::parsers::message::MessageStream;
|
use crate::parsers::message::MessageStream;
|
||||||
|
use crate::HeaderValue;
|
||||||
|
|
||||||
#[test]
|
#[test]
|
||||||
fn parse_comma_separated_text() {
|
fn parse_comma_separated_text() {
|
||||||
@@ -172,10 +173,17 @@ mod tests {
|
|||||||
|
|
||||||
for input in inputs {
|
for input in inputs {
|
||||||
let str = input.0.to_string();
|
let str = input.0.to_string();
|
||||||
assert_eq!(
|
|
||||||
parse_comma_separared(&mut MessageStream::new(str.as_bytes()),).unwrap(),
|
match parse_comma_separared(&mut MessageStream::new(str.as_bytes())) {
|
||||||
input.1
|
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"),
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
+2
-570
@@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright Stalwart Labs, Minter Ltd. See the COPYING
|
* Copyright Stalwart Labs Ltd. See the COPYING
|
||||||
* file at the top-level directory of this distribution.
|
* file at the top-level directory of this distribution.
|
||||||
*
|
*
|
||||||
* Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
|
* Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
|
||||||
@@ -9,579 +9,11 @@
|
|||||||
* except according to those terms.
|
* 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 address;
|
||||||
pub mod content_type;
|
pub mod content_type;
|
||||||
pub mod date;
|
pub mod date;
|
||||||
pub mod id;
|
pub mod id;
|
||||||
pub mod list;
|
pub mod list;
|
||||||
pub mod raw;
|
pub mod raw;
|
||||||
|
pub mod thread;
|
||||||
pub mod unstructured;
|
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);
|
|
||||||
}
|
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright Stalwart Labs, Minter Ltd. See the COPYING
|
* Copyright Stalwart Labs Ltd. See the COPYING
|
||||||
* file at the top-level directory of this distribution.
|
* file at the top-level directory of this distribution.
|
||||||
*
|
*
|
||||||
* Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
|
* Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
|
||||||
@@ -9,11 +9,9 @@
|
|||||||
* except according to those terms.
|
* 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>) -> HeaderValue<'x> {
|
||||||
|
|
||||||
pub fn parse_raw<'x>(stream: &mut MessageStream<'x>) -> Option<Cow<'x, str>> {
|
|
||||||
let mut token_start: usize = 0;
|
let mut token_start: usize = 0;
|
||||||
let mut token_end: 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 {
|
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 {
|
} 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;
|
token_end = stream.pos;
|
||||||
}
|
}
|
||||||
|
|
||||||
None
|
HeaderValue::Empty
|
||||||
}
|
}
|
||||||
|
|
||||||
pub fn parse_and_ignore(stream: &mut MessageStream) {
|
pub fn parse_and_ignore(stream: &mut MessageStream) {
|
||||||
@@ -73,6 +73,7 @@ pub fn parse_and_ignore(stream: &mut MessageStream) {
|
|||||||
mod tests {
|
mod tests {
|
||||||
use crate::parsers::fields::raw::parse_raw;
|
use crate::parsers::fields::raw::parse_raw;
|
||||||
use crate::parsers::message::MessageStream;
|
use crate::parsers::message::MessageStream;
|
||||||
|
use crate::{HeaderName, Message, RfcHeader};
|
||||||
|
|
||||||
#[test]
|
#[test]
|
||||||
fn parse_raw_text() {
|
fn parse_raw_text() {
|
||||||
@@ -96,11 +97,60 @@ mod tests {
|
|||||||
for input in inputs {
|
for input in inputs {
|
||||||
let str = input.0.to_string();
|
let str = input.0.to_string();
|
||||||
assert_eq!(
|
assert_eq!(
|
||||||
parse_raw(&mut MessageStream::new(str.as_bytes())).unwrap(),
|
parse_raw(&mut MessageStream::new(str.as_bytes())).unwrap_text(),
|
||||||
input.1,
|
input.1,
|
||||||
"Failed for '{:?}'",
|
"Failed for '{:?}'",
|
||||||
input.0
|
input.0
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#[test]
|
||||||
|
fn ordered_raw_headers() {
|
||||||
|
let input = br#"From: Art Vandelay <art@vandelay.com>
|
||||||
|
To: jane@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";
|
||||||
|
|
||||||
|
Here's a message body.
|
||||||
|
"#;
|
||||||
|
let message = Message::parse(input).unwrap();
|
||||||
|
let mut iter = message.get_raw_headers();
|
||||||
|
assert_eq!(
|
||||||
|
iter.next().unwrap(),
|
||||||
|
(
|
||||||
|
&HeaderName::Rfc(RfcHeader::From),
|
||||||
|
" Art Vandelay <art@vandelay.com>\n".into()
|
||||||
|
)
|
||||||
|
);
|
||||||
|
assert_eq!(
|
||||||
|
iter.next().unwrap(),
|
||||||
|
(
|
||||||
|
&HeaderName::Rfc(RfcHeader::To),
|
||||||
|
" jane@example.com\n".into()
|
||||||
|
)
|
||||||
|
);
|
||||||
|
assert_eq!(
|
||||||
|
iter.next().unwrap(),
|
||||||
|
(
|
||||||
|
&HeaderName::Rfc(RfcHeader::Date),
|
||||||
|
" Sat, 20 Nov 2021 14:22:01 -0800\n".into()
|
||||||
|
)
|
||||||
|
);
|
||||||
|
assert_eq!(
|
||||||
|
iter.next().unwrap(),
|
||||||
|
(
|
||||||
|
&HeaderName::Rfc(RfcHeader::Subject),
|
||||||
|
" Why not both importing AND exporting? =?utf-8?b?4pi6?=\n".into()
|
||||||
|
)
|
||||||
|
);
|
||||||
|
assert_eq!(
|
||||||
|
iter.next().unwrap(),
|
||||||
|
(
|
||||||
|
&HeaderName::Rfc(RfcHeader::ContentType),
|
||||||
|
" multipart/mixed; boundary=\"festivus\";\n".into()
|
||||||
|
)
|
||||||
|
);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -0,0 +1,308 @@
|
|||||||
|
/*
|
||||||
|
* Copyright Stalwart Labs 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.
|
||||||
|
*/
|
||||||
|
|
||||||
|
static RE_PREFIXES: &[&str] = &[
|
||||||
|
"re", "res", "sv", "antw", "ref", "aw", "απ", "השב", "vá", "r", "rif", "bls", "odp", "ynt",
|
||||||
|
"atb", "رد", "回复", "转发",
|
||||||
|
];
|
||||||
|
|
||||||
|
static FWD_PREFIXES: &[&str] = &[
|
||||||
|
"fwd",
|
||||||
|
"fw",
|
||||||
|
"rv",
|
||||||
|
"enc",
|
||||||
|
"vs",
|
||||||
|
"doorst",
|
||||||
|
"vl",
|
||||||
|
"tr",
|
||||||
|
"wg",
|
||||||
|
"πρθ",
|
||||||
|
"הועבר",
|
||||||
|
"továbbítás",
|
||||||
|
"i",
|
||||||
|
"fs",
|
||||||
|
"trs",
|
||||||
|
"vb",
|
||||||
|
"pd",
|
||||||
|
"i̇lt",
|
||||||
|
"yml",
|
||||||
|
"إعادة توجيه",
|
||||||
|
"回覆",
|
||||||
|
"轉寄",
|
||||||
|
];
|
||||||
|
|
||||||
|
pub fn thread_name(text: &str) -> &str {
|
||||||
|
let mut token_start = 0;
|
||||||
|
let mut token_end = 0;
|
||||||
|
|
||||||
|
let mut thread_name_start = 0;
|
||||||
|
let mut fwd_start = 0;
|
||||||
|
let mut fwd_end = 0;
|
||||||
|
let mut last_blob_end = 0;
|
||||||
|
|
||||||
|
let mut in_blob = false;
|
||||||
|
let mut in_blob_ignore = false;
|
||||||
|
let mut seen_header = false;
|
||||||
|
let mut seen_blob_header = false;
|
||||||
|
let mut token_found = false;
|
||||||
|
|
||||||
|
for (pos, ch) in text.char_indices() {
|
||||||
|
match ch {
|
||||||
|
'[' => {
|
||||||
|
if !in_blob {
|
||||||
|
if token_found {
|
||||||
|
if token_end == 0 {
|
||||||
|
token_end = pos;
|
||||||
|
}
|
||||||
|
let prefix = text[token_start..token_end].to_lowercase();
|
||||||
|
if RE_PREFIXES.contains(&prefix.as_ref())
|
||||||
|
|| FWD_PREFIXES.contains(&prefix.as_ref())
|
||||||
|
{
|
||||||
|
seen_header = true;
|
||||||
|
} else {
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
token_found = false;
|
||||||
|
in_blob = true;
|
||||||
|
} else {
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
']' if in_blob => {
|
||||||
|
if seen_blob_header && token_found {
|
||||||
|
fwd_start = token_start;
|
||||||
|
fwd_end = pos;
|
||||||
|
}
|
||||||
|
if !seen_header {
|
||||||
|
last_blob_end = pos + 1;
|
||||||
|
}
|
||||||
|
in_blob = false;
|
||||||
|
token_found = false;
|
||||||
|
seen_blob_header = false;
|
||||||
|
in_blob_ignore = false;
|
||||||
|
}
|
||||||
|
':' if !in_blob => {
|
||||||
|
if (seen_header && token_found) || (!seen_header && !token_found) {
|
||||||
|
break;
|
||||||
|
} else if !seen_header {
|
||||||
|
if token_end == 0 {
|
||||||
|
token_end = pos;
|
||||||
|
}
|
||||||
|
let prefix = text[token_start..token_end].to_lowercase();
|
||||||
|
if !RE_PREFIXES.contains(&prefix.as_ref())
|
||||||
|
&& !FWD_PREFIXES.contains(&prefix.as_ref())
|
||||||
|
{
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
seen_header = false;
|
||||||
|
}
|
||||||
|
thread_name_start = pos + 1;
|
||||||
|
token_found = false;
|
||||||
|
}
|
||||||
|
':' if in_blob && !in_blob_ignore => {
|
||||||
|
if token_end == 0 {
|
||||||
|
token_end = pos;
|
||||||
|
}
|
||||||
|
|
||||||
|
let prefix = text[token_start..token_end].to_lowercase();
|
||||||
|
if FWD_PREFIXES.contains(&prefix.as_ref()) {
|
||||||
|
token_found = false;
|
||||||
|
seen_blob_header = true;
|
||||||
|
} else if seen_blob_header && RE_PREFIXES.contains(&prefix.as_ref()) {
|
||||||
|
token_found = false;
|
||||||
|
} else {
|
||||||
|
in_blob_ignore = true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
_ if ch.is_whitespace() => {
|
||||||
|
if token_end == 0 {
|
||||||
|
token_end = pos;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
_ => {
|
||||||
|
if !token_found {
|
||||||
|
token_start = pos;
|
||||||
|
token_end = 0;
|
||||||
|
token_found = true;
|
||||||
|
} else if !in_blob && pos - token_start > 21 {
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if last_blob_end > thread_name_start
|
||||||
|
|| (fwd_start > 0 && last_blob_end > fwd_start && fwd_start > thread_name_start)
|
||||||
|
{
|
||||||
|
let result = trim_trailing_fwd(&text[last_blob_end..]);
|
||||||
|
if !result.is_empty() {
|
||||||
|
return result;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if fwd_start > 0 && thread_name_start < fwd_start {
|
||||||
|
let result = trim_trailing_fwd(&text[fwd_start..fwd_end]);
|
||||||
|
if !result.is_empty() {
|
||||||
|
return result;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
trim_trailing_fwd(&text[thread_name_start..])
|
||||||
|
}
|
||||||
|
|
||||||
|
pub fn trim_trailing_fwd(text: &str) -> &str {
|
||||||
|
let mut in_parentheses = false;
|
||||||
|
let mut trim_end = true;
|
||||||
|
let mut end_found = false;
|
||||||
|
|
||||||
|
let mut text_start = 0;
|
||||||
|
let mut text_end = text.len();
|
||||||
|
let mut fwd_end = 0;
|
||||||
|
|
||||||
|
for (pos, ch) in text.char_indices().rev() {
|
||||||
|
match ch {
|
||||||
|
'(' if !end_found => {
|
||||||
|
if in_parentheses {
|
||||||
|
in_parentheses = false;
|
||||||
|
if fwd_end - pos > 2
|
||||||
|
&& FWD_PREFIXES.contains(&text[pos + 1..fwd_end].to_lowercase().as_ref())
|
||||||
|
{
|
||||||
|
text_end = pos;
|
||||||
|
trim_end = true;
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
end_found = true;
|
||||||
|
}
|
||||||
|
')' if !end_found => {
|
||||||
|
if !in_parentheses {
|
||||||
|
in_parentheses = true;
|
||||||
|
fwd_end = pos;
|
||||||
|
} else {
|
||||||
|
end_found = true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
_ if ch.is_whitespace() => {
|
||||||
|
if trim_end {
|
||||||
|
text_end = pos;
|
||||||
|
}
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
_ => {
|
||||||
|
if !in_parentheses && !end_found {
|
||||||
|
end_found = true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if trim_end {
|
||||||
|
trim_end = false;
|
||||||
|
}
|
||||||
|
text_start = pos;
|
||||||
|
}
|
||||||
|
|
||||||
|
if text_end >= text_start {
|
||||||
|
&text[text_start..text_end]
|
||||||
|
} else {
|
||||||
|
""
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
#[cfg(test)]
|
||||||
|
mod tests {
|
||||||
|
use crate::parsers::fields::thread::{thread_name, trim_trailing_fwd};
|
||||||
|
|
||||||
|
#[test]
|
||||||
|
fn parse_thread_name() {
|
||||||
|
let tests = [
|
||||||
|
("re: hello", "hello"),
|
||||||
|
("re:re: hello", "hello"),
|
||||||
|
("re:fwd: hello", "hello"),
|
||||||
|
("fwd[5]:re[5]: hello", "hello"),
|
||||||
|
("fwd[99]: re[40]: hello", "hello"),
|
||||||
|
(": hello", ": hello"),
|
||||||
|
("z: hello", "z: hello"),
|
||||||
|
("re:: hello", ": hello"),
|
||||||
|
("[10] hello", "hello"),
|
||||||
|
("fwd[a]: hello", "hello"),
|
||||||
|
("re:", ""),
|
||||||
|
("re::", ":"),
|
||||||
|
("", ""),
|
||||||
|
(" ", ""),
|
||||||
|
("回复: 轉寄: 轉寄", "轉寄"),
|
||||||
|
("aw[50]: wg: aw[1]: hallo", "hallo"),
|
||||||
|
("res: rv: enc: továbbítás: ", ""),
|
||||||
|
("[fwd: hello world]", "hello world"),
|
||||||
|
("re: enc: re[5]: [fwd: hello world]", "hello world"),
|
||||||
|
("[fwd: re: fw: hello world]", "hello world"),
|
||||||
|
("[fwd: hello world]: another text", ": another text"),
|
||||||
|
("[fwd: re: fwd:] another text", "another text"),
|
||||||
|
("[hello world]", "[hello world]"),
|
||||||
|
("re: fwd[9]: [hello world]", "[hello world]"),
|
||||||
|
("[mailing-list] hello world", "hello world"),
|
||||||
|
("[mailing-list] re: hello world", "hello world"),
|
||||||
|
("[mailing-list] wg[8]:re: hello world", "hello world"),
|
||||||
|
("hello [world]", "hello [world]"),
|
||||||
|
(" [hello] [world] ", "[hello] [world]"),
|
||||||
|
("[mailing-list] hello [world]", "hello [world]"),
|
||||||
|
("[hello [world]", "[hello [world]"),
|
||||||
|
("[]hello [world]", "hello [world]"),
|
||||||
|
("[fwd: re: re:] fwd[6]:re: fw:", ""),
|
||||||
|
("[fwd hello] world hello", "world hello"),
|
||||||
|
("[fwd: مرحبا بالعالم]", "مرحبا بالعالم"),
|
||||||
|
("[fwd: hello world] مرحبا بالعالم", "مرحبا بالعالم"),
|
||||||
|
(" hello world ", "hello world"),
|
||||||
|
(
|
||||||
|
"[mailing-list] wg[8]:re: hello world (fwd)(fwd)",
|
||||||
|
"hello world",
|
||||||
|
),
|
||||||
|
("[fwd: re: fw: hello world (fwd)]", "hello world"),
|
||||||
|
(
|
||||||
|
"res: rv: enc: továbbítás: hello world (doorst)",
|
||||||
|
"hello world",
|
||||||
|
),
|
||||||
|
("[fwd: re: re: (fwd)] fwd[6]:re: fw: (fwd)", ""),
|
||||||
|
];
|
||||||
|
|
||||||
|
for (input, expected) in tests {
|
||||||
|
assert_eq!(thread_name(input), expected, "{:?}", input);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
#[test]
|
||||||
|
fn parse_trail_fwd() {
|
||||||
|
let tests = [
|
||||||
|
("hello (fwd)", "hello"),
|
||||||
|
(" hello (fwd)(fwd)", "hello"),
|
||||||
|
("hello (wg) (fwd) (fwd)", "hello"),
|
||||||
|
("(fwd)(fwd)", ""),
|
||||||
|
("(fwd)hello(fwd)", "(fwd)hello"),
|
||||||
|
(" hello ", "hello"),
|
||||||
|
(" hello world ", "hello world"),
|
||||||
|
("", ""),
|
||||||
|
(" ", ""),
|
||||||
|
("hello ()(fwd)", "hello ()"),
|
||||||
|
("(hello)", "(hello)"),
|
||||||
|
("hello () (fwd) ()(fwd)", "hello () (fwd) ()"),
|
||||||
|
(")(", ")("),
|
||||||
|
(" 你好世界(fwd) ", "你好世界"),
|
||||||
|
("你好世界 (回覆)", "你好世界"),
|
||||||
|
("hello(fwd", "hello(fwd"),
|
||||||
|
("hello(fwd))", "hello(fwd))"),
|
||||||
|
];
|
||||||
|
|
||||||
|
for (input, expected) in tests {
|
||||||
|
assert_eq!(trim_trailing_fwd(input), expected, "{:?}", input);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright Stalwart Labs, Minter Ltd. See the COPYING
|
* Copyright Stalwart Labs Ltd. See the COPYING
|
||||||
* file at the top-level directory of this distribution.
|
* file at the top-level directory of this distribution.
|
||||||
*
|
*
|
||||||
* Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
|
* Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
|
||||||
@@ -11,7 +11,7 @@
|
|||||||
|
|
||||||
use std::borrow::Cow;
|
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> {
|
struct UnstructuredParser<'x> {
|
||||||
token_start: usize,
|
token_start: usize,
|
||||||
token_end: 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 {
|
let mut parser = UnstructuredParser {
|
||||||
token_start: 0,
|
token_start: 0,
|
||||||
token_end: 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() {
|
return match parser.tokens.len() {
|
||||||
1 => parser.tokens.pop().unwrap().into(),
|
1 => HeaderValue::Text(parser.tokens.pop().unwrap()),
|
||||||
0 => None,
|
0 => HeaderValue::Empty,
|
||||||
_ => Some(parser.tokens.concat().into()),
|
_ => HeaderValue::Text(parser.tokens.concat().into()),
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -101,12 +101,11 @@ pub fn parse_unstructured<'x>(stream: &mut MessageStream<'x>) -> Option<Cow<'x,
|
|||||||
parser.token_end = stream.pos;
|
parser.token_end = stream.pos;
|
||||||
}
|
}
|
||||||
|
|
||||||
None
|
HeaderValue::Empty
|
||||||
}
|
}
|
||||||
|
|
||||||
#[cfg(test)]
|
#[cfg(test)]
|
||||||
mod tests {
|
mod tests {
|
||||||
|
|
||||||
#[test]
|
#[test]
|
||||||
fn parse_unstructured_text() {
|
fn parse_unstructured_text() {
|
||||||
use crate::parsers::fields::unstructured::parse_unstructured;
|
use crate::parsers::fields::unstructured::parse_unstructured;
|
||||||
@@ -184,7 +183,7 @@ mod tests {
|
|||||||
for input in inputs {
|
for input in inputs {
|
||||||
let str = input.0.to_string();
|
let str = input.0.to_string();
|
||||||
assert_eq!(
|
assert_eq!(
|
||||||
parse_unstructured(&mut MessageStream::new(str.as_bytes()),).unwrap(),
|
parse_unstructured(&mut MessageStream::new(str.as_bytes()),).unwrap_text(),
|
||||||
input.1,
|
input.1,
|
||||||
"Failed to parse '{:?}'",
|
"Failed to parse '{:?}'",
|
||||||
input.0
|
input.0
|
||||||
|
|||||||
+270
-192
@@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright Stalwart Labs, Minter Ltd. See the COPYING
|
* Copyright Stalwart Labs Ltd. See the COPYING
|
||||||
* file at the top-level directory of this distribution.
|
* file at the top-level directory of this distribution.
|
||||||
*
|
*
|
||||||
* Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
|
* Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
|
||||||
@@ -9,107 +9,115 @@
|
|||||||
* except according to those terms.
|
* except according to those terms.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
use crate::{MessageHeader, MimeHeader};
|
use std::{borrow::Cow, collections::hash_map::Entry};
|
||||||
|
|
||||||
|
use crate::{HeaderName, HeaderOffset, HeaderValue, RawHeaders, RfcHeader, RfcHeaders};
|
||||||
|
|
||||||
use super::{
|
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_and_ignore, parse_raw},
|
||||||
|
unstructured::parse_unstructured,
|
||||||
|
},
|
||||||
message::MessageStream,
|
message::MessageStream,
|
||||||
};
|
};
|
||||||
|
|
||||||
impl<'x> MessageHeader<'x> {
|
#[derive(Debug, PartialEq)]
|
||||||
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()
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
pub enum HeaderParserResult<'x> {
|
pub enum HeaderParserResult<'x> {
|
||||||
Supported(fn(&mut dyn MessageField<'x>, &mut MessageStream<'x>)),
|
Rfc(RfcHeader),
|
||||||
Unsupported(&'x [u8]),
|
Other(Cow<'x, str>),
|
||||||
Lf,
|
Lf,
|
||||||
Eof,
|
Eof,
|
||||||
}
|
}
|
||||||
|
|
||||||
pub fn parse_headers<'x>(
|
pub fn parse_headers<'x>(
|
||||||
header: &mut dyn MessageField<'x>,
|
headers_rfc: &mut RfcHeaders<'x>,
|
||||||
|
headers_raw: &mut RawHeaders<'x>,
|
||||||
stream: &mut MessageStream<'x>,
|
stream: &mut MessageStream<'x>,
|
||||||
) -> bool {
|
) -> bool {
|
||||||
loop {
|
loop {
|
||||||
match parse_header_name(stream) {
|
let (bytes_read, result) = parse_header_name(&stream.data[stream.pos..]);
|
||||||
HeaderParserResult::Supported(fnc) => fnc(header, stream),
|
stream.pos += bytes_read;
|
||||||
HeaderParserResult::Unsupported(name) => parse_unsupported(header, stream, name),
|
|
||||||
|
match result {
|
||||||
|
HeaderParserResult::Rfc(name) => {
|
||||||
|
let (_, parser) = HDR_PARSER[name as usize];
|
||||||
|
|
||||||
|
let from_offset = stream.pos;
|
||||||
|
let value = parser(stream);
|
||||||
|
headers_raw.push((
|
||||||
|
HeaderName::Rfc(name),
|
||||||
|
HeaderOffset {
|
||||||
|
start: from_offset,
|
||||||
|
end: stream.pos,
|
||||||
|
},
|
||||||
|
));
|
||||||
|
|
||||||
|
if !value.is_empty() {
|
||||||
|
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);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
HeaderParserResult::Other(name) => {
|
||||||
|
let from_offset = stream.pos;
|
||||||
|
parse_and_ignore(stream);
|
||||||
|
headers_raw.push((
|
||||||
|
HeaderName::Other(name),
|
||||||
|
HeaderOffset {
|
||||||
|
start: from_offset,
|
||||||
|
end: stream.pos,
|
||||||
|
},
|
||||||
|
));
|
||||||
|
}
|
||||||
HeaderParserResult::Lf => return true,
|
HeaderParserResult::Lf => return true,
|
||||||
HeaderParserResult::Eof => return false,
|
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_start: usize = 0;
|
||||||
let mut token_end: usize = 0;
|
let mut token_end: usize = 0;
|
||||||
let mut token_len: usize = 0;
|
let mut token_len: usize = 0;
|
||||||
let mut token_hash: usize = 0;
|
let mut token_hash: usize = 0;
|
||||||
let mut last_ch: u8 = 0;
|
let mut last_ch: u8 = 0;
|
||||||
|
let mut bytes_read: usize = 0;
|
||||||
|
|
||||||
for ch in stream.data[stream.pos..].iter() {
|
for ch in data.iter() {
|
||||||
stream.pos += 1;
|
bytes_read += 1;
|
||||||
|
|
||||||
match ch {
|
match ch {
|
||||||
b':' => {
|
b':' => {
|
||||||
if token_start != 0 {
|
if token_start != 0 {
|
||||||
let field = &stream.data[token_start - 1..token_end];
|
break;
|
||||||
|
|
||||||
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) {
|
|
||||||
let token_hash = token_hash - 4;
|
|
||||||
|
|
||||||
if field.eq_ignore_ascii_case(HDR_NAMES[token_hash]) {
|
|
||||||
return HeaderParserResult::Supported(HDR_FNCS[token_hash]);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return HeaderParserResult::Unsupported(field);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
b'\n' => {
|
b'\n' => {
|
||||||
stream.pos -= 1;
|
return (bytes_read - 1, HeaderParserResult::Lf);
|
||||||
return HeaderParserResult::Lf;
|
|
||||||
}
|
}
|
||||||
_ => {
|
_ => {
|
||||||
if !(*ch).is_ascii_whitespace() {
|
if !(*ch).is_ascii_whitespace() {
|
||||||
if token_start == 0 {
|
if token_start == 0 {
|
||||||
token_start = stream.pos;
|
token_start = bytes_read;
|
||||||
token_end = token_start;
|
token_end = token_start;
|
||||||
} else {
|
} else {
|
||||||
token_end = stream.pos;
|
token_end = bytes_read;
|
||||||
last_ch = *ch;
|
last_ch = *ch;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -122,199 +130,269 @@ pub fn parse_header_name<'x>(stream: &mut MessageStream<'x>) -> HeaderParserResu
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
HeaderParserResult::Eof
|
if token_start != 0 {
|
||||||
|
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..=72).contains(&token_hash) {
|
||||||
|
let token_hash = token_hash - 4;
|
||||||
|
|
||||||
|
if field.eq_ignore_ascii_case(HDR_NAMES[token_hash]) {
|
||||||
|
return (bytes_read, HeaderParserResult::Rfc(HDR_MAP[token_hash]));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return (
|
||||||
|
bytes_read,
|
||||||
|
HeaderParserResult::Other(String::from_utf8_lossy(field)),
|
||||||
|
);
|
||||||
|
} else {
|
||||||
|
(bytes_read, HeaderParserResult::Eof)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
impl From<RfcHeader> for u8 {
|
||||||
|
fn from(name: RfcHeader) -> Self {
|
||||||
|
name as u8
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#[cfg(test)]
|
#[cfg(test)]
|
||||||
mod tests {
|
mod tests {
|
||||||
use crate::parsers::{
|
use crate::{parsers::header::parse_header_name, RfcHeader};
|
||||||
fields::{parse_from, parse_mime_version, parse_received, parse_subject},
|
|
||||||
header::parse_header_name,
|
|
||||||
message::MessageStream,
|
|
||||||
};
|
|
||||||
|
|
||||||
use super::HeaderParserResult;
|
use super::HeaderParserResult;
|
||||||
|
|
||||||
#[test]
|
#[test]
|
||||||
fn header_name_parse() {
|
fn header_name_parse() {
|
||||||
let inputs = [
|
let inputs = [
|
||||||
("From: ", HeaderParserResult::Supported(parse_from)),
|
("From: ", HeaderParserResult::Rfc(RfcHeader::From)),
|
||||||
("receiVED: ", HeaderParserResult::Supported(parse_received)),
|
("receiVED: ", HeaderParserResult::Rfc(RfcHeader::Received)),
|
||||||
(
|
(" subject : ", HeaderParserResult::Rfc(RfcHeader::Subject)),
|
||||||
" subject : ",
|
|
||||||
HeaderParserResult::Supported(parse_subject),
|
|
||||||
),
|
|
||||||
(
|
(
|
||||||
"X-Custom-Field : ",
|
"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: ",
|
"mal formed: ",
|
||||||
HeaderParserResult::Unsupported(b"mal formed"),
|
HeaderParserResult::Other("mal formed".into()),
|
||||||
),
|
),
|
||||||
(
|
(
|
||||||
"MIME-version : ",
|
"MIME-version : ",
|
||||||
HeaderParserResult::Supported(parse_mime_version),
|
HeaderParserResult::Rfc(RfcHeader::MimeVersion),
|
||||||
),
|
),
|
||||||
];
|
];
|
||||||
|
|
||||||
for input in inputs {
|
for input in inputs {
|
||||||
let str = input.0.to_string();
|
let str = input.0.to_string();
|
||||||
match parse_header_name(&mut MessageStream::new(str.as_bytes())) {
|
let (_, result) = parse_header_name(str.as_bytes());
|
||||||
HeaderParserResult::Supported(f) => {
|
assert_eq!(input.1, result, "Failed to parse '{:?}'", input.0);
|
||||||
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)
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#[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_id), // 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] = &[
|
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,
|
73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73,
|
||||||
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,
|
||||||
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,
|
||||||
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,
|
||||||
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,
|
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,
|
||||||
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,
|
||||||
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,
|
||||||
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,
|
||||||
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,
|
||||||
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,
|
||||||
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,
|
||||||
];
|
];
|
||||||
|
|
||||||
static HDR_FNCS: &[for<'x, 'y> fn(&mut dyn MessageField<'x>, &mut MessageStream<'x>); 58] = &[
|
static HDR_MAP: &[RfcHeader] = &[
|
||||||
super::fields::parse_date,
|
RfcHeader::Date,
|
||||||
super::fields::parse_no_op,
|
RfcHeader::MimeVersion, // Invalid
|
||||||
super::fields::parse_sender,
|
RfcHeader::Sender,
|
||||||
super::fields::parse_subject,
|
RfcHeader::MimeVersion, // Invalid
|
||||||
super::fields::parse_received,
|
RfcHeader::Received,
|
||||||
super::fields::parse_no_op,
|
RfcHeader::MimeVersion, // Invalid
|
||||||
super::fields::parse_references,
|
RfcHeader::References,
|
||||||
super::fields::parse_resent_date,
|
RfcHeader::MimeVersion, // Invalid
|
||||||
super::fields::parse_cc,
|
RfcHeader::Cc,
|
||||||
super::fields::parse_comments,
|
RfcHeader::Comments,
|
||||||
super::fields::parse_resent_cc,
|
RfcHeader::ResentCc,
|
||||||
super::fields::parse_content_id,
|
RfcHeader::ContentId,
|
||||||
super::fields::parse_return_path,
|
RfcHeader::MimeVersion, // Invalid
|
||||||
super::fields::parse_resent_message_id,
|
RfcHeader::ResentMessageId,
|
||||||
super::fields::parse_resent_sender,
|
RfcHeader::ReplyTo,
|
||||||
super::fields::parse_no_op,
|
RfcHeader::ResentTo,
|
||||||
super::fields::parse_resent_bcc,
|
RfcHeader::ResentBcc,
|
||||||
super::fields::parse_no_op,
|
RfcHeader::ContentLanguage,
|
||||||
super::fields::parse_list_id,
|
RfcHeader::Subject,
|
||||||
super::fields::parse_bcc,
|
RfcHeader::ResentSender,
|
||||||
super::fields::parse_list_post,
|
RfcHeader::MimeVersion, // Invalid
|
||||||
super::fields::parse_list_owner,
|
RfcHeader::MimeVersion, // Invalid
|
||||||
super::fields::parse_no_op,
|
RfcHeader::ResentDate,
|
||||||
super::fields::parse_content_type,
|
RfcHeader::To,
|
||||||
super::fields::parse_keywords,
|
RfcHeader::Bcc,
|
||||||
super::fields::parse_content_description,
|
RfcHeader::MimeVersion, // Invalid
|
||||||
super::fields::parse_message_id,
|
RfcHeader::ContentTransferEncoding,
|
||||||
super::fields::parse_no_op,
|
RfcHeader::ReturnPath,
|
||||||
super::fields::parse_to,
|
RfcHeader::ListId,
|
||||||
super::fields::parse_no_op,
|
RfcHeader::Keywords,
|
||||||
super::fields::parse_list_subscribe,
|
RfcHeader::ContentDescription,
|
||||||
super::fields::parse_content_transfer_encoding,
|
RfcHeader::ListOwner,
|
||||||
super::fields::parse_no_op,
|
RfcHeader::MimeVersion, // Invalid
|
||||||
super::fields::parse_no_op,
|
RfcHeader::ContentType,
|
||||||
super::fields::parse_reply_to,
|
RfcHeader::MimeVersion, // Invalid
|
||||||
super::fields::parse_resent_to,
|
RfcHeader::ListHelp,
|
||||||
super::fields::parse_no_op,
|
RfcHeader::MessageId,
|
||||||
super::fields::parse_no_op,
|
RfcHeader::ContentLocation,
|
||||||
super::fields::parse_list_archive,
|
RfcHeader::MimeVersion, // Invalid
|
||||||
super::fields::parse_no_op,
|
RfcHeader::MimeVersion, // Invalid
|
||||||
super::fields::parse_content_disposition,
|
RfcHeader::ListSubscribe,
|
||||||
super::fields::parse_no_op,
|
RfcHeader::MimeVersion, // Invalid
|
||||||
super::fields::parse_list_unsubscribe,
|
RfcHeader::MimeVersion, // Invalid
|
||||||
super::fields::parse_no_op,
|
RfcHeader::MimeVersion, // Invalid
|
||||||
super::fields::parse_no_op,
|
RfcHeader::MimeVersion, // Invalid
|
||||||
super::fields::parse_list_help,
|
RfcHeader::ListPost,
|
||||||
super::fields::parse_no_op,
|
RfcHeader::MimeVersion, // Invalid
|
||||||
super::fields::parse_no_op,
|
RfcHeader::ResentFrom,
|
||||||
super::fields::parse_mime_version,
|
RfcHeader::MimeVersion, // Invalid
|
||||||
super::fields::parse_no_op,
|
RfcHeader::MimeVersion, // Invalid
|
||||||
super::fields::parse_from,
|
RfcHeader::ContentDisposition,
|
||||||
super::fields::parse_no_op,
|
RfcHeader::MimeVersion, // Invalid
|
||||||
super::fields::parse_in_reply_to,
|
RfcHeader::InReplyTo,
|
||||||
super::fields::parse_no_op,
|
RfcHeader::ListArchive,
|
||||||
super::fields::parse_no_op,
|
RfcHeader::MimeVersion, // Invalid
|
||||||
super::fields::parse_no_op,
|
RfcHeader::From,
|
||||||
super::fields::parse_no_op,
|
RfcHeader::MimeVersion, // Invalid
|
||||||
super::fields::parse_resent_from,
|
RfcHeader::ListUnsubscribe,
|
||||||
|
RfcHeader::MimeVersion, // Invalid
|
||||||
|
RfcHeader::MimeVersion, // Invalid
|
||||||
|
RfcHeader::MimeVersion, // Invalid
|
||||||
|
RfcHeader::MimeVersion, // Invalid
|
||||||
|
RfcHeader::MimeVersion, // Invalid
|
||||||
|
RfcHeader::MimeVersion, // Invalid
|
||||||
|
RfcHeader::MimeVersion, // Invalid
|
||||||
|
RfcHeader::MimeVersion, // Invalid
|
||||||
|
RfcHeader::MimeVersion, // Invalid
|
||||||
|
RfcHeader::MimeVersion, // Invalid
|
||||||
|
RfcHeader::MimeVersion,
|
||||||
];
|
];
|
||||||
|
|
||||||
static HDR_NAMES: &[&[u8]; 58] = &[
|
static HDR_NAMES: &[&[u8]] = &[
|
||||||
b"date",
|
b"date",
|
||||||
b"",
|
b"",
|
||||||
b"sender",
|
b"sender",
|
||||||
b"subject",
|
b"",
|
||||||
b"received",
|
b"received",
|
||||||
b"",
|
b"",
|
||||||
b"references",
|
b"references",
|
||||||
b"resent-date",
|
b"",
|
||||||
b"cc",
|
b"cc",
|
||||||
b"comments",
|
b"comments",
|
||||||
b"resent-cc",
|
b"resent-cc",
|
||||||
b"content-id",
|
b"content-id",
|
||||||
b"return-path",
|
b"",
|
||||||
b"resent-message-id",
|
b"resent-message-id",
|
||||||
|
b"reply-to",
|
||||||
|
b"resent-to",
|
||||||
|
b"resent-bcc",
|
||||||
|
b"content-language",
|
||||||
|
b"subject",
|
||||||
b"resent-sender",
|
b"resent-sender",
|
||||||
b"",
|
b"",
|
||||||
b"resent-bcc",
|
|
||||||
b"",
|
b"",
|
||||||
b"list-id",
|
b"resent-date",
|
||||||
|
b"to",
|
||||||
b"bcc",
|
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"list-owner",
|
||||||
b"",
|
b"",
|
||||||
b"content-type",
|
b"content-type",
|
||||||
b"keywords",
|
|
||||||
b"content-description",
|
|
||||||
b"message-id",
|
|
||||||
b"",
|
b"",
|
||||||
b"to",
|
b"list-help",
|
||||||
|
b"message-id",
|
||||||
|
b"content-location",
|
||||||
|
b"",
|
||||||
b"",
|
b"",
|
||||||
b"list-subscribe",
|
b"list-subscribe",
|
||||||
b"content-transfer-encoding",
|
|
||||||
b"",
|
b"",
|
||||||
b"",
|
b"",
|
||||||
b"reply-to",
|
|
||||||
b"resent-to",
|
|
||||||
b"",
|
b"",
|
||||||
b"",
|
b"",
|
||||||
b"list-archive",
|
b"list-post",
|
||||||
|
b"",
|
||||||
|
b"resent-from",
|
||||||
|
b"",
|
||||||
b"",
|
b"",
|
||||||
b"content-disposition",
|
b"content-disposition",
|
||||||
b"",
|
b"",
|
||||||
|
b"in-reply-to",
|
||||||
|
b"list-archive",
|
||||||
|
b"",
|
||||||
|
b"from",
|
||||||
|
b"",
|
||||||
b"list-unsubscribe",
|
b"list-unsubscribe",
|
||||||
b"",
|
b"",
|
||||||
b"",
|
b"",
|
||||||
b"list-help",
|
b"",
|
||||||
|
b"",
|
||||||
|
b"",
|
||||||
|
b"",
|
||||||
|
b"",
|
||||||
|
b"",
|
||||||
b"",
|
b"",
|
||||||
b"",
|
b"",
|
||||||
b"mime-version",
|
b"mime-version",
|
||||||
b"",
|
|
||||||
b"from",
|
|
||||||
b"",
|
|
||||||
b"in-reply-to",
|
|
||||||
b"",
|
|
||||||
b"",
|
|
||||||
b"",
|
|
||||||
b"",
|
|
||||||
b"resent-from",
|
|
||||||
];
|
];
|
||||||
|
|||||||
@@ -0,0 +1,126 @@
|
|||||||
|
/*
|
||||||
|
* Copyright Stalwart Labs 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 std::io::{BufRead, BufReader, Read};
|
||||||
|
|
||||||
|
/// Parses an MBox mailbox from a `Read` stream, returning each message as a
|
||||||
|
/// `Vec<u8>`.
|
||||||
|
/// supports >From quoting as defined in the [QMail mbox specification](http://qmail.org/qmail-manual-html/man5/mbox.html).
|
||||||
|
pub struct MBoxParser<T: Read> {
|
||||||
|
reader: BufReader<T>,
|
||||||
|
found_from: bool,
|
||||||
|
}
|
||||||
|
|
||||||
|
impl<T> MBoxParser<T>
|
||||||
|
where
|
||||||
|
T: Read,
|
||||||
|
{
|
||||||
|
pub fn new(reader: T) -> MBoxParser<T> {
|
||||||
|
MBoxParser {
|
||||||
|
reader: BufReader::new(reader),
|
||||||
|
found_from: false,
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
impl<T> Iterator for MBoxParser<T>
|
||||||
|
where
|
||||||
|
T: Read,
|
||||||
|
{
|
||||||
|
type Item = Vec<u8>;
|
||||||
|
|
||||||
|
fn next(&mut self) -> Option<Vec<u8>> {
|
||||||
|
let mut message = Vec::with_capacity(1024);
|
||||||
|
let mut message_line = Vec::with_capacity(80);
|
||||||
|
|
||||||
|
while self
|
||||||
|
.reader
|
||||||
|
.read_until(b'\n', &mut message_line)
|
||||||
|
.expect("Error while reading Mbox")
|
||||||
|
> 0
|
||||||
|
{
|
||||||
|
let is_from = message_line
|
||||||
|
.get(..5)
|
||||||
|
.map(|line| line == b"From ")
|
||||||
|
.unwrap_or(false);
|
||||||
|
|
||||||
|
if self.found_from {
|
||||||
|
if !is_from {
|
||||||
|
if message_line[0] != b'>' {
|
||||||
|
message.append(&mut message_line);
|
||||||
|
} else if message_line
|
||||||
|
.iter()
|
||||||
|
.skip_while(|&&ch| ch == b'>')
|
||||||
|
.take(5)
|
||||||
|
.copied()
|
||||||
|
.collect::<Vec<u8>>()
|
||||||
|
== b"From "
|
||||||
|
{
|
||||||
|
message.extend_from_slice(&message_line[1..]);
|
||||||
|
message_line.clear();
|
||||||
|
} else {
|
||||||
|
message.append(&mut message_line);
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
if is_from {
|
||||||
|
self.found_from = true;
|
||||||
|
}
|
||||||
|
message_line.clear();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if !message.is_empty() {
|
||||||
|
Some(message)
|
||||||
|
} else {
|
||||||
|
None
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
#[cfg(test)]
|
||||||
|
mod tests {
|
||||||
|
use super::MBoxParser;
|
||||||
|
|
||||||
|
#[test]
|
||||||
|
fn parse_mbox() {
|
||||||
|
let message = br#"From Mon, 15 Jan 2018 15:30:00 +0100
|
||||||
|
Message 1
|
||||||
|
|
||||||
|
From Mon, 15 Jan 2018 15:30:00 +0100
|
||||||
|
Message 2
|
||||||
|
|
||||||
|
From Mon, 15 Jan 2018 15:30:00 +0100
|
||||||
|
Message 3
|
||||||
|
>From hello
|
||||||
|
>>From world
|
||||||
|
>>>From test
|
||||||
|
|
||||||
|
From Mon, 15 Jan 2018 15:30:00 +0100
|
||||||
|
Message 4
|
||||||
|
> From
|
||||||
|
>F
|
||||||
|
"#;
|
||||||
|
|
||||||
|
let mut parser = MBoxParser::new(&message[..]);
|
||||||
|
|
||||||
|
assert_eq!(parser.next().unwrap(), b"Message 1\n\n");
|
||||||
|
assert_eq!(parser.next().unwrap(), b"Message 2\n\n");
|
||||||
|
assert_eq!(
|
||||||
|
parser.next().unwrap(),
|
||||||
|
b"Message 3\nFrom hello\n>From world\n>>From test\n\n"
|
||||||
|
);
|
||||||
|
assert_eq!(parser.next().unwrap(), b"Message 4\n> From\n>F\n");
|
||||||
|
assert!(parser.next().is_none());
|
||||||
|
}
|
||||||
|
}
|
||||||
+376
-181
@@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright Stalwart Labs, Minter Ltd. See the COPYING
|
* Copyright Stalwart Labs Ltd. See the COPYING
|
||||||
* file at the top-level directory of this distribution.
|
* file at the top-level directory of this distribution.
|
||||||
*
|
*
|
||||||
* Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
|
* Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
|
||||||
@@ -13,21 +13,28 @@ use std::borrow::Cow;
|
|||||||
|
|
||||||
use crate::{
|
use crate::{
|
||||||
decoders::{
|
decoders::{
|
||||||
base64::decode_base64,
|
base64::decode_base64, charsets::map::get_charset_decoder,
|
||||||
charsets::map::get_charset_decoder,
|
quoted_printable::decode_quoted_printable, DecodeFnc, DecodeResult,
|
||||||
html::{html_to_text, text_to_html},
|
|
||||||
quoted_printable::decode_quoted_printable,
|
|
||||||
DecodeFnc, DecodeResult,
|
|
||||||
},
|
},
|
||||||
BinaryPart, ContentType, InlinePart, Message, MessageHeader, MessagePart, MimeHeader, TextPart,
|
ContentType, HeaderName, HeaderValue, Message, MessageAttachment, MessagePart, MessagePartId,
|
||||||
|
MessageStructure, MultiPart, Part, RawHeaders, RfcHeader, RfcHeaders,
|
||||||
};
|
};
|
||||||
|
|
||||||
use super::{
|
use super::{
|
||||||
fields::MessageField,
|
|
||||||
header::parse_headers,
|
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},
|
||||||
};
|
};
|
||||||
|
|
||||||
|
const MIME_HEADERS: &[RfcHeader] = &[
|
||||||
|
RfcHeader::ContentType,
|
||||||
|
RfcHeader::ContentDisposition,
|
||||||
|
RfcHeader::ContentId,
|
||||||
|
RfcHeader::ContentLanguage,
|
||||||
|
RfcHeader::ContentLocation,
|
||||||
|
RfcHeader::ContentTransferEncoding,
|
||||||
|
RfcHeader::ContentDescription,
|
||||||
|
];
|
||||||
|
|
||||||
#[derive(Debug, PartialEq)]
|
#[derive(Debug, PartialEq)]
|
||||||
enum MimeType {
|
enum MimeType {
|
||||||
MultipartMixed,
|
MultipartMixed,
|
||||||
@@ -42,6 +49,12 @@ enum MimeType {
|
|||||||
Other,
|
Other,
|
||||||
}
|
}
|
||||||
|
|
||||||
|
impl Default for MimeType {
|
||||||
|
fn default() -> Self {
|
||||||
|
MimeType::Message
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
fn result_to_string<'x>(
|
fn result_to_string<'x>(
|
||||||
result: DecodeResult,
|
result: DecodeResult,
|
||||||
data: &'x [u8],
|
data: &'x [u8],
|
||||||
@@ -111,6 +124,25 @@ fn get_mime_type(
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#[inline(always)]
|
||||||
|
fn add_missing_type<'x>(
|
||||||
|
headers: &mut RfcHeaders<'x>,
|
||||||
|
c_type: Cow<'x, str>,
|
||||||
|
c_subtype: Cow<'x, str>,
|
||||||
|
) {
|
||||||
|
if headers.is_empty() {
|
||||||
|
headers.insert(
|
||||||
|
RfcHeader::ContentType,
|
||||||
|
HeaderValue::ContentType(ContentType {
|
||||||
|
c_type,
|
||||||
|
c_subtype: Some(c_subtype),
|
||||||
|
attributes: None,
|
||||||
|
}),
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
#[derive(Default)]
|
||||||
struct MessageParserState {
|
struct MessageParserState {
|
||||||
mime_type: MimeType,
|
mime_type: MimeType,
|
||||||
mime_boundary: Option<Vec<u8>>,
|
mime_boundary: Option<Vec<u8>>,
|
||||||
@@ -120,6 +152,8 @@ struct MessageParserState {
|
|||||||
text_parts: usize,
|
text_parts: usize,
|
||||||
need_html_body: bool,
|
need_html_body: bool,
|
||||||
need_text_body: bool,
|
need_text_body: bool,
|
||||||
|
header_id: Option<MessagePartId>,
|
||||||
|
structure: Vec<MessageStructure>,
|
||||||
}
|
}
|
||||||
|
|
||||||
impl MessageParserState {
|
impl MessageParserState {
|
||||||
@@ -133,6 +167,19 @@ impl MessageParserState {
|
|||||||
text_parts: 0,
|
text_parts: 0,
|
||||||
need_text_body: true,
|
need_text_body: true,
|
||||||
need_html_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,25 +198,23 @@ impl<'x> MessageStream<'x> {
|
|||||||
impl<'x> Message<'x> {
|
impl<'x> Message<'x> {
|
||||||
fn new() -> Message<'x> {
|
fn new() -> Message<'x> {
|
||||||
Message {
|
Message {
|
||||||
header: Box::new(MessageHeader::new()),
|
|
||||||
..Default::default()
|
..Default::default()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Returns `false` if at least one header field was successfully parsed.
|
/// Returns `false` if at least one header field was successfully parsed.
|
||||||
pub fn is_empty(&self) -> bool {
|
pub fn is_empty(&self) -> bool {
|
||||||
self.header.is_empty()
|
self.headers_rfc.is_empty() && self.headers_raw.is_empty()
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Parses a byte slice containing the RFC5322 raw message and returns a
|
/// Parses a byte slice containing the RFC5322 raw message and returns a
|
||||||
/// `Message` struct.
|
/// `Message` struct.
|
||||||
///
|
///
|
||||||
/// This function never panics, a best-effort is made to parse the message and
|
/// 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.
|
/// if no headers are found None is returned.
|
||||||
/// To make sure parsing was successfull use `is_empty()`.
|
|
||||||
///
|
///
|
||||||
pub fn parse(bytes: &'x [u8]) -> Message<'x> {
|
pub fn parse(raw_message: &'x [u8]) -> Option<Message<'x>> {
|
||||||
let mut stream = MessageStream::new(bytes);
|
let mut stream = MessageStream::new(raw_message);
|
||||||
|
|
||||||
let mut message = Message::new();
|
let mut message = Message::new();
|
||||||
let mut message_stack = Vec::new();
|
let mut message_stack = Vec::new();
|
||||||
@@ -177,30 +222,45 @@ impl<'x> Message<'x> {
|
|||||||
let mut state = MessageParserState::new();
|
let mut state = MessageParserState::new();
|
||||||
let mut state_stack = Vec::new();
|
let mut state_stack = Vec::new();
|
||||||
|
|
||||||
let mut mime_part_header = MimeHeader::new();
|
let mut mime_part_header = RfcHeaders::new();
|
||||||
|
let mut mime_part_header_raw = RawHeaders::new();
|
||||||
|
|
||||||
'outer: loop {
|
'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
|
// Parse headers
|
||||||
if !parse_headers(header, &mut stream) {
|
let (is_message, header) = if let MimeType::Message = state.mime_type {
|
||||||
break;
|
message.offset_header = stream.pos;
|
||||||
}
|
if !parse_headers(
|
||||||
|
&mut message.headers_rfc,
|
||||||
|
&mut message.headers_raw,
|
||||||
|
&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,
|
||||||
|
&mut mime_part_header_raw,
|
||||||
|
&mut stream,
|
||||||
|
) {
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
(false, &mut mime_part_header)
|
||||||
|
};
|
||||||
|
|
||||||
state.parts += 1;
|
state.parts += 1;
|
||||||
|
|
||||||
|
let content_type = header
|
||||||
|
.get(&RfcHeader::ContentType)
|
||||||
|
.and_then(|c| c.as_content_type_ref());
|
||||||
|
|
||||||
let (is_multipart, mut is_inline, mut is_text, mut mime_type) =
|
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 is_multipart {
|
||||||
if let Some(mime_boundary) = header
|
if let Some(mime_boundary) =
|
||||||
.get_content_type()
|
content_type.map_or_else(|| None, |f| f.get_attribute("boundary"))
|
||||||
.map_or_else(|| None, |f| f.get_attribute("boundary"))
|
|
||||||
{
|
{
|
||||||
let mime_boundary = ("\n--".to_string() + mime_boundary).into_bytes();
|
let mime_boundary = ("\n--".to_string() + mime_boundary).into_bytes();
|
||||||
|
|
||||||
@@ -210,13 +270,24 @@ impl<'x> Message<'x> {
|
|||||||
|| mime_type == MimeType::MultipartAlernative,
|
|| mime_type == MimeType::MultipartAlernative,
|
||||||
mime_type,
|
mime_type,
|
||||||
mime_boundary: mime_boundary.into(),
|
mime_boundary: mime_boundary.into(),
|
||||||
parts: 0,
|
|
||||||
html_parts: message.html_body.len(),
|
html_parts: message.html_body.len(),
|
||||||
text_parts: message.text_body.len(),
|
text_parts: message.text_body.len(),
|
||||||
need_html_body: state.need_html_body,
|
need_html_body: state.need_html_body,
|
||||||
need_text_body: state.need_text_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 {
|
||||||
|
add_missing_type(&mut mime_part_header, "text".into(), "plain".into());
|
||||||
|
message.parts.push(MessagePart::Multipart(MultiPart::new(
|
||||||
|
std::mem::take(&mut mime_part_header),
|
||||||
|
std::mem::take(&mut mime_part_header_raw),
|
||||||
|
)));
|
||||||
|
}
|
||||||
state_stack.push(state);
|
state_stack.push(state);
|
||||||
state = new_state;
|
state = new_state;
|
||||||
skip_crlf(&mut stream);
|
skip_crlf(&mut stream);
|
||||||
@@ -226,38 +297,48 @@ impl<'x> Message<'x> {
|
|||||||
is_text = true;
|
is_text = true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} else if mime_type == MimeType::Message {
|
|
||||||
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,
|
|
||||||
};
|
|
||||||
mime_part_header.clear();
|
|
||||||
message_stack.push(message);
|
|
||||||
state_stack.push(state);
|
|
||||||
message = Message::new();
|
|
||||||
state = new_state;
|
|
||||||
skip_crlf(&mut stream);
|
|
||||||
continue;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
skip_crlf(&mut stream);
|
skip_crlf(&mut stream);
|
||||||
|
|
||||||
let (is_binary, decode_fnc): (bool, DecodeFnc) = match header
|
let (is_binary, decode_fnc): (bool, DecodeFnc) = match header
|
||||||
.get_content_transfer_encoding()
|
.get(&RfcHeader::ContentTransferEncoding)
|
||||||
{
|
{
|
||||||
Some(encoding) if encoding.eq_ignore_ascii_case("base64") => (false, decode_base64),
|
Some(HeaderValue::Text(encoding)) if encoding.eq_ignore_ascii_case("base64") => {
|
||||||
Some(encoding) if encoding.eq_ignore_ascii_case("quoted-printable") => {
|
(false, decode_base64)
|
||||||
|
}
|
||||||
|
Some(HeaderValue::Text(encoding))
|
||||||
|
if encoding.eq_ignore_ascii_case("quoted-printable") =>
|
||||||
|
{
|
||||||
(false, decode_quoted_printable)
|
(false, decode_quoted_printable)
|
||||||
}
|
}
|
||||||
_ => (true, get_bytes_to_boundary),
|
_ => (true, get_bytes_to_boundary),
|
||||||
};
|
};
|
||||||
|
|
||||||
|
state
|
||||||
|
.structure
|
||||||
|
.push(MessageStructure::Part(message.parts.len()));
|
||||||
|
|
||||||
|
if is_binary && mime_type == MimeType::Message {
|
||||||
|
let new_state = MessageParserState {
|
||||||
|
mime_type: MimeType::Message,
|
||||||
|
mime_boundary: state.mime_boundary.take(),
|
||||||
|
need_html_body: true,
|
||||||
|
need_text_body: true,
|
||||||
|
..Default::default()
|
||||||
|
};
|
||||||
|
add_missing_type(&mut mime_part_header, "message".into(), "rfc822".into());
|
||||||
|
message_stack.push((
|
||||||
|
message,
|
||||||
|
std::mem::take(&mut mime_part_header),
|
||||||
|
std::mem::take(&mut mime_part_header_raw),
|
||||||
|
));
|
||||||
|
state_stack.push(state);
|
||||||
|
message = Message::new();
|
||||||
|
state = new_state;
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
let (bytes_read, mut bytes) = decode_fnc(
|
let (bytes_read, mut bytes) = decode_fnc(
|
||||||
&stream,
|
&stream,
|
||||||
stream.pos,
|
stream.pos,
|
||||||
@@ -269,8 +350,10 @@ impl<'x> Message<'x> {
|
|||||||
);
|
);
|
||||||
|
|
||||||
// Attempt to recover contents of an invalid message
|
// Attempt to recover contents of an invalid message
|
||||||
if bytes_read == 0 {
|
let is_encoding_problem = bytes_read == 0;
|
||||||
|
if is_encoding_problem {
|
||||||
if stream.pos >= stream.data.len() || (is_binary && state.mime_boundary.is_none()) {
|
if stream.pos >= stream.data.len() || (is_binary && state.mime_boundary.is_none()) {
|
||||||
|
state.structure.pop();
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -298,9 +381,11 @@ impl<'x> Message<'x> {
|
|||||||
bytes = r_bytes;
|
bytes = r_bytes;
|
||||||
stream.pos += bytes_read;
|
stream.pos += bytes_read;
|
||||||
} else {
|
} else {
|
||||||
|
state.structure.pop();
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
|
state.structure.pop();
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
@@ -314,110 +399,173 @@ impl<'x> Message<'x> {
|
|||||||
stream.pos += bytes_read;
|
stream.pos += bytes_read;
|
||||||
}
|
}
|
||||||
|
|
||||||
let is_inline = is_inline
|
if mime_type != MimeType::Message {
|
||||||
&& header
|
let is_inline = is_inline
|
||||||
.get_content_disposition()
|
&& header
|
||||||
.map_or_else(|| true, |d| !d.is_attachment())
|
.get(&RfcHeader::ContentDisposition)
|
||||||
&& (state.parts == 1
|
.map_or_else(|| true, |d| !d.get_content_type().is_attachment())
|
||||||
|| (state.mime_type != MimeType::MultipartRelated
|
&& (state.parts == 1
|
||||||
&& (mime_type == MimeType::Inline
|
|| (state.mime_type != MimeType::MultipartRelated
|
||||||
|| header
|
&& (mime_type == MimeType::Inline
|
||||||
.get_content_type()
|
|| content_type
|
||||||
.map_or_else(|| true, |c| !c.has_attribute("name")))));
|
.map_or_else(|| true, |c| !c.has_attribute("name")))));
|
||||||
|
|
||||||
let (add_to_html, add_to_text) = if let MimeType::MultipartAlernative = state.mime_type
|
let (add_to_html, add_to_text) =
|
||||||
{
|
if let MimeType::MultipartAlernative = state.mime_type {
|
||||||
match mime_type {
|
match mime_type {
|
||||||
MimeType::TextHtml => (true, false),
|
MimeType::TextHtml => (true, false),
|
||||||
MimeType::TextPlain => (false, true),
|
MimeType::TextPlain => (false, true),
|
||||||
_ => (false, false),
|
_ => (false, false),
|
||||||
}
|
|
||||||
} else if is_inline {
|
|
||||||
if state.in_alternative && (state.need_text_body || state.need_html_body) {
|
|
||||||
match mime_type {
|
|
||||||
MimeType::TextHtml => {
|
|
||||||
state.need_text_body = false;
|
|
||||||
}
|
}
|
||||||
MimeType::TextPlain => {
|
} else if is_inline {
|
||||||
state.need_html_body = false;
|
if state.in_alternative && (state.need_text_body || state.need_html_body) {
|
||||||
|
match mime_type {
|
||||||
|
MimeType::TextHtml => {
|
||||||
|
state.need_text_body = false;
|
||||||
|
}
|
||||||
|
MimeType::TextPlain => {
|
||||||
|
state.need_html_body = false;
|
||||||
|
}
|
||||||
|
_ => (),
|
||||||
|
}
|
||||||
|
}
|
||||||
|
(state.need_html_body, state.need_text_body)
|
||||||
|
} else {
|
||||||
|
(false, false)
|
||||||
|
};
|
||||||
|
|
||||||
|
if is_text {
|
||||||
|
let is_html = mime_type == MimeType::TextHtml;
|
||||||
|
let mut text_part = Part {
|
||||||
|
body: result_to_string(bytes, stream.data, content_type),
|
||||||
|
headers_rfc: std::mem::take(&mut mime_part_header),
|
||||||
|
headers_raw: std::mem::take(&mut mime_part_header_raw),
|
||||||
|
is_encoding_problem,
|
||||||
|
};
|
||||||
|
|
||||||
|
// If there is a single part in the message, move MIME headers
|
||||||
|
// to the part
|
||||||
|
if is_message {
|
||||||
|
for header_name in MIME_HEADERS {
|
||||||
|
if let Some(value) = message.headers_rfc.remove(header_name) {
|
||||||
|
text_part.headers_rfc.insert(*header_name, value);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
for (header_name, offset) in &message.headers_raw {
|
||||||
|
match header_name {
|
||||||
|
HeaderName::Rfc(header_name)
|
||||||
|
if MIME_HEADERS.contains(header_name) =>
|
||||||
|
{
|
||||||
|
text_part
|
||||||
|
.headers_raw
|
||||||
|
.push((HeaderName::Rfc(*header_name), offset.clone()));
|
||||||
|
}
|
||||||
|
_ => (),
|
||||||
|
}
|
||||||
}
|
}
|
||||||
_ => (),
|
|
||||||
}
|
}
|
||||||
}
|
add_missing_type(&mut text_part.headers_rfc, "text".into(), "plain".into());
|
||||||
(state.need_html_body, state.need_text_body)
|
|
||||||
} else {
|
|
||||||
(false, false)
|
|
||||||
};
|
|
||||||
|
|
||||||
if is_text {
|
if add_to_html && !is_html {
|
||||||
let text_part = TextPart {
|
message.html_body.push(message.parts.len());
|
||||||
contents: result_to_string(bytes, stream.data, header.get_content_type()),
|
} else if add_to_text && is_html {
|
||||||
header: if !mime_part_header.is_empty() {
|
message.text_body.push(message.parts.len());
|
||||||
Some(std::mem::take(&mut mime_part_header))
|
}
|
||||||
|
|
||||||
|
if add_to_html && is_html {
|
||||||
|
message.html_body.push(message.parts.len());
|
||||||
|
} else if add_to_text && !is_html {
|
||||||
|
message.text_body.push(message.parts.len());
|
||||||
} else {
|
} else {
|
||||||
None
|
message.attachments.push(message.parts.len());
|
||||||
},
|
}
|
||||||
};
|
|
||||||
|
|
||||||
let is_html = mime_type == MimeType::TextHtml;
|
message.parts.push(if is_html {
|
||||||
|
MessagePart::Html(text_part)
|
||||||
if add_to_html && !is_html {
|
|
||||||
message.html_body.push(InlinePart::Text(TextPart {
|
|
||||||
header: None,
|
|
||||||
contents: text_to_html(&text_part.contents).into(),
|
|
||||||
}));
|
|
||||||
} else if add_to_text && is_html {
|
|
||||||
message.text_body.push(InlinePart::Text(TextPart {
|
|
||||||
header: None,
|
|
||||||
contents: html_to_text(&text_part.contents).into(),
|
|
||||||
}));
|
|
||||||
}
|
|
||||||
|
|
||||||
if add_to_html && is_html {
|
|
||||||
message.html_body.push(InlinePart::Text(text_part));
|
|
||||||
} else if add_to_text && !is_html {
|
|
||||||
message.text_body.push(InlinePart::Text(text_part));
|
|
||||||
} else {
|
|
||||||
message.attachments.push(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 {
|
} else {
|
||||||
None
|
MessagePart::Text(text_part)
|
||||||
},
|
});
|
||||||
contents: result_to_bytes(bytes, stream.data),
|
|
||||||
};
|
|
||||||
|
|
||||||
if add_to_html {
|
|
||||||
message
|
|
||||||
.html_body
|
|
||||||
.push(InlinePart::InlineBinary(message.attachments.len() as u32));
|
|
||||||
}
|
|
||||||
if add_to_text {
|
|
||||||
message
|
|
||||||
.text_body
|
|
||||||
.push(InlinePart::InlineBinary(message.attachments.len() as u32));
|
|
||||||
}
|
|
||||||
|
|
||||||
message.attachments.push(if !is_inline {
|
|
||||||
MessagePart::Binary(binary_part)
|
|
||||||
} else {
|
} else {
|
||||||
MessagePart::InlineBinary(binary_part)
|
if add_to_html {
|
||||||
});
|
message.html_body.push(message.parts.len());
|
||||||
};
|
}
|
||||||
|
if add_to_text {
|
||||||
|
message.text_body.push(message.parts.len());
|
||||||
|
}
|
||||||
|
|
||||||
|
message.attachments.push(message.parts.len());
|
||||||
|
|
||||||
|
let mut binary_part = Part::new(
|
||||||
|
std::mem::take(&mut mime_part_header),
|
||||||
|
std::mem::take(&mut mime_part_header_raw),
|
||||||
|
result_to_bytes(bytes, stream.data),
|
||||||
|
is_encoding_problem,
|
||||||
|
);
|
||||||
|
|
||||||
|
// If there is a single part in the message, move MIME headers
|
||||||
|
// to the part
|
||||||
|
if is_message {
|
||||||
|
for header_name in MIME_HEADERS {
|
||||||
|
if let Some(value) = message.headers_rfc.remove(header_name) {
|
||||||
|
binary_part.headers_rfc.insert(*header_name, value);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
for (header_name, offset) in &message.headers_raw {
|
||||||
|
match header_name {
|
||||||
|
HeaderName::Rfc(header_name)
|
||||||
|
if MIME_HEADERS.contains(header_name) =>
|
||||||
|
{
|
||||||
|
binary_part
|
||||||
|
.headers_raw
|
||||||
|
.push((HeaderName::Rfc(*header_name), offset.clone()));
|
||||||
|
}
|
||||||
|
_ => (),
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
message.parts.push(if !is_inline {
|
||||||
|
MessagePart::Binary(binary_part)
|
||||||
|
} else {
|
||||||
|
MessagePart::InlineBinary(binary_part)
|
||||||
|
});
|
||||||
|
};
|
||||||
|
} else {
|
||||||
|
add_missing_type(&mut mime_part_header, "message".into(), "rfc822".into());
|
||||||
|
message.attachments.push(message.parts.len());
|
||||||
|
message.parts.push(MessagePart::Message(Part::new(
|
||||||
|
std::mem::take(&mut mime_part_header),
|
||||||
|
std::mem::take(&mut mime_part_header_raw),
|
||||||
|
MessageAttachment::Raw(result_to_bytes(bytes, stream.data)),
|
||||||
|
is_encoding_problem,
|
||||||
|
)));
|
||||||
|
}
|
||||||
|
|
||||||
if state.mime_boundary.is_some() {
|
if state.mime_boundary.is_some() {
|
||||||
// Currently processing a MIME part
|
// Currently processing a MIME part
|
||||||
|
let mut last_part_offset = stream.pos;
|
||||||
|
|
||||||
'inner: loop {
|
'inner: loop {
|
||||||
if let MimeType::Message = state.mime_type {
|
if let MimeType::Message = state.mime_type {
|
||||||
// Finished processing nested message, restore parent message from stack
|
// Finished processing nested message, restore parent message from stack
|
||||||
if let (Some(mut prev_message), Some(mut prev_state)) =
|
if let (
|
||||||
(message_stack.pop(), state_stack.pop())
|
Some((mut prev_message, headers, headers_raw)),
|
||||||
|
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].into();
|
||||||
|
prev_message.attachments.push(prev_message.parts.len());
|
||||||
|
prev_message.parts.push(MessagePart::Message(Part::new(
|
||||||
|
headers,
|
||||||
|
headers_raw,
|
||||||
|
MessageAttachment::Parsed(Box::new(message)),
|
||||||
|
false,
|
||||||
|
)));
|
||||||
message = prev_message;
|
message = prev_message;
|
||||||
prev_state.mime_boundary = state.mime_boundary;
|
prev_state.mime_boundary = state.mime_boundary;
|
||||||
state = prev_state;
|
state = prev_state;
|
||||||
@@ -438,16 +586,8 @@ impl<'x> Message<'x> {
|
|||||||
if state.text_parts == message.text_body.len()
|
if state.text_parts == message.text_body.len()
|
||||||
&& state.html_parts != message.html_body.len()
|
&& state.html_parts != message.html_body.len()
|
||||||
{
|
{
|
||||||
for part in message.html_body[state.html_parts..].iter() {
|
for &part_id in &message.html_body[state.html_parts..] {
|
||||||
message.text_body.push(match part {
|
message.text_body.push(part_id);
|
||||||
InlinePart::Text(part) => InlinePart::Text(TextPart {
|
|
||||||
header: None,
|
|
||||||
contents: html_to_text(&part.contents).into(),
|
|
||||||
}),
|
|
||||||
InlinePart::InlineBinary(index) => {
|
|
||||||
InlinePart::InlineBinary(*index)
|
|
||||||
}
|
|
||||||
});
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -455,23 +595,19 @@ impl<'x> Message<'x> {
|
|||||||
if state.html_parts == message.html_body.len()
|
if state.html_parts == message.html_body.len()
|
||||||
&& state.text_parts != message.text_body.len()
|
&& state.text_parts != message.text_body.len()
|
||||||
{
|
{
|
||||||
for part in message.text_body[state.text_parts..].iter() {
|
for &part_id in &message.text_body[state.html_parts..] {
|
||||||
message.html_body.push(match part {
|
message.html_body.push(part_id);
|
||||||
InlinePart::Text(part) => InlinePart::Text(TextPart {
|
|
||||||
header: None,
|
|
||||||
contents: text_to_html(&part.contents).into(),
|
|
||||||
}),
|
|
||||||
InlinePart::InlineBinary(index) => {
|
|
||||||
InlinePart::InlineBinary(*index)
|
|
||||||
}
|
|
||||||
});
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
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
|
// Restore ancestor's state
|
||||||
state = prev_state;
|
state = prev_state;
|
||||||
|
last_part_offset = stream.pos;
|
||||||
|
|
||||||
if let Some(ref mime_boundary) = state.mime_boundary {
|
if let Some(ref mime_boundary) = state.mime_boundary {
|
||||||
// Ancestor has a MIME boundary, seek it.
|
// Ancestor has a MIME boundary, seek it.
|
||||||
@@ -492,24 +628,48 @@ impl<'x> Message<'x> {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
while let Some(mut prev_message) = message_stack.pop() {
|
while let (Some((mut prev_message, headers, headers_raw)), Some(prev_state)) =
|
||||||
prev_message.attachments.push(MessagePart::Message(message));
|
(message_stack.pop(), state_stack.pop())
|
||||||
|
{
|
||||||
|
message.offset_end = stream.pos;
|
||||||
|
if !message.is_empty() {
|
||||||
|
message.structure = state.get_structure();
|
||||||
|
message.raw_message = raw_message[message.offset_header..message.offset_end].into();
|
||||||
|
prev_message.attachments.push(prev_message.parts.len());
|
||||||
|
prev_message.parts.push(MessagePart::Message(Part::new(
|
||||||
|
headers,
|
||||||
|
headers_raw,
|
||||||
|
MessageAttachment::Parsed(Box::new(message)),
|
||||||
|
false,
|
||||||
|
)));
|
||||||
|
}
|
||||||
message = prev_message;
|
message = prev_message;
|
||||||
|
state = prev_state;
|
||||||
}
|
}
|
||||||
|
|
||||||
message
|
message.raw_message = raw_message.into();
|
||||||
|
message.structure = state.get_structure();
|
||||||
|
message.offset_end = stream.pos;
|
||||||
|
|
||||||
|
if !message.is_empty() {
|
||||||
|
Some(message)
|
||||||
|
} else {
|
||||||
|
None
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
#[cfg(test)]
|
#[cfg(test)]
|
||||||
mod tests {
|
mod tests {
|
||||||
use std::{fs, path::PathBuf};
|
use std::{fs, path::PathBuf};
|
||||||
|
|
||||||
|
use serde_json::Value;
|
||||||
|
|
||||||
use crate::parsers::message::Message;
|
use crate::parsers::message::Message;
|
||||||
|
|
||||||
|
const SEPARATOR: &[u8] = "\n---- EXPECTED STRUCTURE ----".as_bytes();
|
||||||
|
|
||||||
#[test]
|
#[test]
|
||||||
fn parse_full_messages() {
|
fn parse_full_messages() {
|
||||||
const SEPARATOR: &[u8] = "\n---- EXPECTED STRUCTURE ----\n".as_bytes();
|
|
||||||
|
|
||||||
for test_suite in ["rfc", "legacy", "thirdparty", "malformed"] {
|
for test_suite in ["rfc", "legacy", "thirdparty", "malformed"] {
|
||||||
let mut test_dir = PathBuf::from(env!("CARGO_MANIFEST_DIR"));
|
let mut test_dir = PathBuf::from(env!("CARGO_MANIFEST_DIR"));
|
||||||
test_dir.push("tests");
|
test_dir.push("tests");
|
||||||
@@ -539,16 +699,18 @@ mod tests {
|
|||||||
tests_run += 1;
|
tests_run += 1;
|
||||||
|
|
||||||
let input = input.split_at_mut(pos);
|
let input = input.split_at_mut(pos);
|
||||||
let message = Message::parse(input.0);
|
let message = Message::parse(input.0).unwrap();
|
||||||
|
let json_message = serde_json::to_string_pretty(&message).unwrap();
|
||||||
assert!(!message.is_empty());
|
|
||||||
|
|
||||||
assert_eq!(
|
assert_eq!(
|
||||||
message,
|
serde_json::from_str::<Value>(&json_message).unwrap(),
|
||||||
serde_json::from_slice::<Message>(&input.1[SEPARATOR.len()..]).unwrap(),
|
serde_json::from_str::<Value>(
|
||||||
|
std::str::from_utf8(&input.1[SEPARATOR.len()..]).unwrap()
|
||||||
|
)
|
||||||
|
.unwrap(),
|
||||||
"Test failed for '{}', result was:\n{}",
|
"Test failed for '{}', result was:\n{}",
|
||||||
file_name.display(),
|
file_name.display(),
|
||||||
serde_json::to_string_pretty(&message).unwrap()
|
json_message
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -562,26 +724,59 @@ mod tests {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/*#[test]
|
/*#[test]
|
||||||
fn generate_test_samples() {
|
fn message_to_yaml() {
|
||||||
const SEPARATOR: &[u8] = "\n---- EXPECTED STRUCTURE ----\n".as_bytes();
|
let mut file_name = PathBuf::from(env!("CARGO_MANIFEST_DIR"));
|
||||||
|
file_name.push("tests");
|
||||||
|
file_name.push("rfc");
|
||||||
|
file_name.push("003.txt");
|
||||||
|
|
||||||
for test_suite in ["malformed" /*"legacy","malformed"*/] {
|
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 ----".as_bytes();
|
||||||
|
|
||||||
|
for test_suite in ["legacy", "malformed", "rfc", "thirdparty"] {
|
||||||
let mut test_dir = PathBuf::from(env!("CARGO_MANIFEST_DIR"));
|
let mut test_dir = PathBuf::from(env!("CARGO_MANIFEST_DIR"));
|
||||||
test_dir.push("tests");
|
test_dir.push("tests");
|
||||||
test_dir.push(test_suite);
|
test_dir.push(test_suite);
|
||||||
|
|
||||||
for file_name in fs::read_dir(test_dir).unwrap() {
|
for file_name in fs::read_dir(test_dir).unwrap() {
|
||||||
/*if !file_name
|
if file_name
|
||||||
.as_ref()
|
.as_ref()
|
||||||
.unwrap()
|
.unwrap()
|
||||||
.path()
|
.path()
|
||||||
.to_str()
|
.to_str()
|
||||||
.unwrap()
|
.unwrap()
|
||||||
.contains("001")
|
.contains("COPYING")
|
||||||
{
|
{
|
||||||
continue;
|
continue;
|
||||||
}*/
|
}
|
||||||
|
|
||||||
|
println!("{:}", file_name.as_ref().unwrap().path().display());
|
||||||
let mut input = fs::read(file_name.as_ref().unwrap().path()).unwrap();
|
let mut input = fs::read(file_name.as_ref().unwrap().path()).unwrap();
|
||||||
let mut pos = 0;
|
let mut pos = 0;
|
||||||
for sep_pos in 0..input.len() {
|
for sep_pos in 0..input.len() {
|
||||||
@@ -602,8 +797,8 @@ mod tests {
|
|||||||
output.extend_from_slice(input.0);
|
output.extend_from_slice(input.0);
|
||||||
output.extend_from_slice(SEPARATOR);
|
output.extend_from_slice(SEPARATOR);
|
||||||
output.extend_from_slice(
|
output.extend_from_slice(
|
||||||
serde_json::to_string_pretty(&Message::parse(input.0))
|
serde_json::to_string_pretty(&Message::parse(input.0).unwrap())
|
||||||
.unwrap_or_else(|_| "".to_string())
|
.unwrap()
|
||||||
.as_bytes(),
|
.as_bytes(),
|
||||||
);
|
);
|
||||||
fs::write(file_name.as_ref().unwrap().path(), &output).unwrap();
|
fs::write(file_name.as_ref().unwrap().path(), &output).unwrap();
|
||||||
|
|||||||
+23
-7
@@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright Stalwart Labs, Minter Ltd. See the COPYING
|
* Copyright Stalwart Labs Ltd. See the COPYING
|
||||||
* file at the top-level directory of this distribution.
|
* file at the top-level directory of this distribution.
|
||||||
*
|
*
|
||||||
* Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
|
* Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
|
||||||
@@ -19,7 +19,7 @@ pub fn seek_next_part(stream: &mut MessageStream, boundary: &[u8]) -> bool {
|
|||||||
|
|
||||||
let mut match_count = 0;
|
let mut match_count = 0;
|
||||||
|
|
||||||
for ch in stream.data[pos..].iter() {
|
for ch in &stream.data[pos..] {
|
||||||
pos += 1;
|
pos += 1;
|
||||||
|
|
||||||
if ch == &boundary[match_count] {
|
if ch == &boundary[match_count] {
|
||||||
@@ -52,17 +52,21 @@ pub fn get_bytes_to_boundary<'x>(
|
|||||||
) -> (usize, DecodeResult) {
|
) -> (usize, DecodeResult) {
|
||||||
let mut read_pos = start_pos;
|
let mut read_pos = start_pos;
|
||||||
|
|
||||||
return if !boundary.is_empty() {
|
if !boundary.is_empty() {
|
||||||
let mut match_count = 0;
|
let mut match_count = 0;
|
||||||
|
|
||||||
for ch in stream.data[read_pos..].iter() {
|
for ch in &stream.data[read_pos..] {
|
||||||
read_pos += 1;
|
read_pos += 1;
|
||||||
|
|
||||||
if ch == &boundary[match_count] {
|
if ch == &boundary[match_count] {
|
||||||
match_count += 1;
|
match_count += 1;
|
||||||
if match_count == boundary.len() {
|
if match_count == boundary.len() {
|
||||||
if is_boundary_end(stream, read_pos) {
|
if is_boundary_end(stream, read_pos) {
|
||||||
let match_pos = read_pos - match_count;
|
let mut match_pos = read_pos - match_count;
|
||||||
|
|
||||||
|
if let Some(b'\r') = stream.data.get(match_pos - 1) {
|
||||||
|
match_pos -= 1;
|
||||||
|
}
|
||||||
|
|
||||||
return (
|
return (
|
||||||
read_pos - start_pos,
|
read_pos - start_pos,
|
||||||
@@ -95,7 +99,7 @@ pub fn get_bytes_to_boundary<'x>(
|
|||||||
)
|
)
|
||||||
} else {
|
} else {
|
||||||
(0, DecodeResult::Empty)
|
(0, DecodeResult::Empty)
|
||||||
};
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#[inline(always)]
|
#[inline(always)]
|
||||||
@@ -123,7 +127,7 @@ pub fn skip_multipart_end(stream: &mut MessageStream) -> bool {
|
|||||||
|
|
||||||
#[inline(always)]
|
#[inline(always)]
|
||||||
pub fn skip_crlf(stream: &mut MessageStream) {
|
pub fn skip_crlf(stream: &mut MessageStream) {
|
||||||
for ch in stream.data[stream.pos..].iter() {
|
for ch in &stream.data[stream.pos..] {
|
||||||
match ch {
|
match ch {
|
||||||
b'\r' | b' ' | b'\t' => stream.pos += 1,
|
b'\r' | b' ' | b'\t' => stream.pos += 1,
|
||||||
b'\n' => {
|
b'\n' => {
|
||||||
@@ -134,3 +138,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
|
||||||
|
}
|
||||||
|
|||||||
+3
-1
@@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright Stalwart Labs, Minter Ltd. See the COPYING
|
* Copyright Stalwart Labs Ltd. See the COPYING
|
||||||
* file at the top-level directory of this distribution.
|
* file at the top-level directory of this distribution.
|
||||||
*
|
*
|
||||||
* Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
|
* Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
|
||||||
@@ -11,5 +11,7 @@
|
|||||||
|
|
||||||
pub mod fields;
|
pub mod fields;
|
||||||
pub mod header;
|
pub mod header;
|
||||||
|
pub mod mbox;
|
||||||
pub mod message;
|
pub mod message;
|
||||||
pub mod mime;
|
pub mod mime;
|
||||||
|
pub mod preview;
|
||||||
|
|||||||
@@ -0,0 +1,173 @@
|
|||||||
|
/*
|
||||||
|
* Copyright Stalwart Labs 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 std::borrow::Cow;
|
||||||
|
|
||||||
|
use crate::decoders::html::html_to_text;
|
||||||
|
|
||||||
|
pub fn preview_html<'x, 'y>(html: Cow<'y, str>, max_len: usize) -> Cow<'x, str> {
|
||||||
|
preview_text(html_to_text(html.as_ref()).into(), max_len)
|
||||||
|
}
|
||||||
|
|
||||||
|
pub fn preview_text<'x, 'y>(text: Cow<'y, str>, max_len: usize) -> Cow<'x, str> {
|
||||||
|
if text.len() > max_len {
|
||||||
|
let mut result = String::with_capacity(max_len);
|
||||||
|
for ch in text.chars() {
|
||||||
|
if ch.len_utf8() + result.len() + 3 > max_len {
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
result.push(ch);
|
||||||
|
}
|
||||||
|
result.push_str("...");
|
||||||
|
result.into()
|
||||||
|
} else {
|
||||||
|
text.into_owned().into()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
pub fn truncate_text<'x, 'y>(text: Cow<'y, str>, max_len: usize) -> Cow<'x, str> {
|
||||||
|
preview_text(text, max_len)
|
||||||
|
}
|
||||||
|
|
||||||
|
pub fn truncate_html<'x, 'y>(html: Cow<'y, str>, max_len: usize) -> Cow<'x, str> {
|
||||||
|
if html.len() > max_len {
|
||||||
|
let mut result = String::with_capacity(max_len);
|
||||||
|
let mut in_tag = false;
|
||||||
|
let mut in_comment = false;
|
||||||
|
let mut last_tag_end_pos = 0;
|
||||||
|
for (pos, ch) in html.char_indices() {
|
||||||
|
let mut set_last_tag = 0;
|
||||||
|
match ch {
|
||||||
|
'<' if !in_tag => {
|
||||||
|
in_tag = true;
|
||||||
|
if let Some("!--") = html.get(pos + 1..pos + 4) {
|
||||||
|
in_comment = true;
|
||||||
|
}
|
||||||
|
set_last_tag = pos;
|
||||||
|
}
|
||||||
|
'>' if in_tag => {
|
||||||
|
if in_comment {
|
||||||
|
if let Some("--") = html.get(pos - 2..pos) {
|
||||||
|
in_comment = false;
|
||||||
|
in_tag = false;
|
||||||
|
set_last_tag = pos + 1;
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
in_tag = false;
|
||||||
|
set_last_tag = pos + 1;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
_ => (),
|
||||||
|
}
|
||||||
|
if ch.len_utf8() + pos + 3 > max_len {
|
||||||
|
result.push_str(
|
||||||
|
&html[0..if (in_tag || set_last_tag > 0) && last_tag_end_pos > 0 {
|
||||||
|
last_tag_end_pos
|
||||||
|
} else {
|
||||||
|
pos
|
||||||
|
}],
|
||||||
|
);
|
||||||
|
result.push_str("...");
|
||||||
|
break;
|
||||||
|
} else if set_last_tag > 0 {
|
||||||
|
last_tag_end_pos = set_last_tag;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
result.into()
|
||||||
|
} else {
|
||||||
|
html.into_owned().into()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
#[cfg(test)]
|
||||||
|
mod tests {
|
||||||
|
#[test]
|
||||||
|
fn text_preview() {
|
||||||
|
let text_1 = concat!(
|
||||||
|
"J'interdis aux marchands de vanter trop leurs marchandises. ",
|
||||||
|
"Car ils se fontvite pédagogues et t'enseignent comme but ce qui ",
|
||||||
|
"n'est par essence qu'un moyen, et te trompant ainsi sur la route ",
|
||||||
|
"à suivre les voilà bientôt qui te dégradent, car si leur musique ",
|
||||||
|
"est vulgaire ils te fabriquent pour te la vendre une âme vulgaire.\n",
|
||||||
|
"— Antoine de Saint-Exupéry, Citadelle (1948)"
|
||||||
|
);
|
||||||
|
let text_2 = concat!(
|
||||||
|
"長沮、桀溺耦而耕,孔子過之,使子路問津焉。長沮曰:「夫執輿者為誰?」",
|
||||||
|
"子路曰:「為孔丘。」曰:「是魯孔丘與?」曰:「是也。」曰:「是知津矣。」問於桀溺,",
|
||||||
|
"桀溺曰:「子為誰?」曰:「為仲由。」曰:「是魯孔丘之徒與?」對曰:「然。",
|
||||||
|
"」曰:「滔滔者天下皆是也,而誰以易之?且而與其從辟人之士也,豈若從",
|
||||||
|
"辟世之士哉?」耰而不輟。子路行以告。夫子憮然曰:「鳥獸不可與同群,吾非斯人之徒",
|
||||||
|
"與而誰與?天下有道,丘不與易也。」",
|
||||||
|
"子路從而後,遇丈人,以杖荷蓧。子路問曰:「子見夫子乎?」丈人曰:「四體不勤,",
|
||||||
|
"五穀不分。孰為夫子?」植其杖而芸。子路拱而立。止子路宿,殺雞為黍而食之,見其二",
|
||||||
|
"子焉。明日,子路行以告。子曰:「隱者也。」使子路反見之。至則行矣。子路曰:「",
|
||||||
|
"不仕無義。長幼之節,不可廢也;君臣之義,如之何其廢之?欲潔其身,而亂大倫。君",
|
||||||
|
"子之仕也,行其義也。道之不行,已知之矣。」"
|
||||||
|
);
|
||||||
|
|
||||||
|
assert_eq!(
|
||||||
|
super::truncate_text(text_1.into(), 110),
|
||||||
|
"J'interdis aux marchands de vanter trop leurs marchandises. Car ils se fontvite pédagogues et t'enseignent..."
|
||||||
|
);
|
||||||
|
|
||||||
|
assert_eq!(
|
||||||
|
super::truncate_text(text_2.into(), 110),
|
||||||
|
"長沮、桀溺耦而耕,孔子過之,使子路問津焉。長沮曰:「夫執輿者為誰?」子..."
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
#[test]
|
||||||
|
fn html_truncate() {
|
||||||
|
for (html, expected_result) in [
|
||||||
|
(
|
||||||
|
"<html>hello<br/>world<br/></html>",
|
||||||
|
"<html>hello<br/>world...",
|
||||||
|
),
|
||||||
|
("<html>using <><br/></html>", "<html>using <><br/>..."),
|
||||||
|
(
|
||||||
|
"test <not br/>tag<br />test <not br/>tag<br />",
|
||||||
|
"test <not br/>tag...",
|
||||||
|
),
|
||||||
|
(
|
||||||
|
"<>< ><tag\n/>>hello world< br \n />",
|
||||||
|
"<>< ><tag\n/>>hello ...",
|
||||||
|
),
|
||||||
|
(
|
||||||
|
concat!(
|
||||||
|
"<head><title>ignore head</title><not head>xyz</not head></head>",
|
||||||
|
"<h1><body></h1>"
|
||||||
|
),
|
||||||
|
"<head><title>ignore he...",
|
||||||
|
),
|
||||||
|
(
|
||||||
|
concat!(
|
||||||
|
"<p>what is ♥?</p><p>ßĂΒγ ",
|
||||||
|
"don't hurt me.</p>"
|
||||||
|
),
|
||||||
|
"<p>what is ♥...",
|
||||||
|
),
|
||||||
|
(
|
||||||
|
"<!-- <> < < < -->the actual<!--> text",
|
||||||
|
"<!-- <> < < < -->the a...",
|
||||||
|
),
|
||||||
|
(
|
||||||
|
" < p > hello < / p > < p > world < / p > !!! < br > ",
|
||||||
|
" < p > hello ...",
|
||||||
|
),
|
||||||
|
(
|
||||||
|
" <p>please unsubscribe <a href=#>here</a>.</p> ",
|
||||||
|
" <p>please unsubscribe...",
|
||||||
|
),
|
||||||
|
] {
|
||||||
|
assert_eq!(super::truncate_html(html.into(), 25), expected_result);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
+81
-84
@@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright Stalwart Labs, Minter Ltd. See the COPYING
|
* Copyright Stalwart Labs Ltd. See the COPYING
|
||||||
* file at the top-level directory of this distribution.
|
* file at the top-level directory of this distribution.
|
||||||
*
|
*
|
||||||
* Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
|
* Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
|
||||||
@@ -13,75 +13,77 @@ use mail_parser::*;
|
|||||||
|
|
||||||
#[test]
|
#[test]
|
||||||
fn test_api() {
|
fn test_api() {
|
||||||
let input = concat!(
|
let input = br#"From: Art Vandelay <art@vandelay.com> (Vandelay Industries)
|
||||||
"From: Art Vandelay <art@vandelay.com> (Vandelay Industries)\n",
|
To: "Colleagues": "James Smythe" <james@vandelay.com>; Friends:
|
||||||
"To: \"Colleagues\": \"James Smythe\" <james@vandelay.com>; Friends:\n",
|
jane@example.com, =?UTF-8?Q?John_Sm=C3=AEth?= <john@example.com>;
|
||||||
" jane@example.com, =?UTF-8?Q?John_Sm=C3=AEth?= <john@example.com>;\n",
|
Date: Sat, 20 Nov 2021 14:22:01 -0800
|
||||||
"Date: Sat, 20 Nov 2021 14:22:01 -0800\n",
|
Subject: Why not both importing AND exporting? =?utf-8?b?4pi6?=
|
||||||
"Subject: Why not both importing AND exporting? =?utf-8?b?4pi6?=\n",
|
Content-Type: multipart/mixed; boundary="festivus";
|
||||||
"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 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!(
|
||||||
|
bincode::deserialize::<RfcHeaders>(&bincode::serialize(&message.headers_rfc).unwrap())
|
||||||
|
.unwrap(),
|
||||||
|
message.headers_rfc
|
||||||
|
);
|
||||||
|
|
||||||
assert_eq!(
|
assert_eq!(
|
||||||
message.get_from(),
|
message.get_from(),
|
||||||
&Address::Address(Addr {
|
&HeaderValue::Address(Addr::new(
|
||||||
name: Some("Art Vandelay (Vandelay Industries)".into()),
|
"Art Vandelay (Vandelay Industries)".into(),
|
||||||
address: Some("art@vandelay.com".into())
|
"art@vandelay.com"
|
||||||
})
|
))
|
||||||
);
|
);
|
||||||
|
|
||||||
assert_eq!(
|
assert_eq!(
|
||||||
message.get_to(),
|
message.get_to(),
|
||||||
&Address::GroupList(vec![
|
&HeaderValue::GroupList(vec![
|
||||||
Group {
|
Group::new(
|
||||||
name: Some("Colleagues".into()),
|
"Colleagues",
|
||||||
addresses: vec![Addr {
|
vec![Addr::new("James Smythe".into(), "james@vandelay.com")]
|
||||||
name: Some("James Smythe".into()),
|
),
|
||||||
address: Some("james@vandelay.com".into())
|
Group::new(
|
||||||
}]
|
"Friends",
|
||||||
},
|
vec![
|
||||||
Group {
|
Addr::new(None, "jane@example.com"),
|
||||||
name: Some("Friends".into()),
|
Addr::new("John Smîth".into(), "john@example.com"),
|
||||||
addresses: vec![
|
|
||||||
Addr {
|
|
||||||
name: None,
|
|
||||||
address: Some("jane@example.com".into())
|
|
||||||
},
|
|
||||||
Addr {
|
|
||||||
name: Some("John Smîth".into()),
|
|
||||||
address: Some("john@example.com".into())
|
|
||||||
}
|
|
||||||
]
|
]
|
||||||
}
|
)
|
||||||
])
|
])
|
||||||
);
|
);
|
||||||
|
|
||||||
@@ -89,57 +91,52 @@ fn test_api() {
|
|||||||
message.get_date().unwrap().to_iso8601(),
|
message.get_date().unwrap().to_iso8601(),
|
||||||
"2021-11-20T14:22:01-08:00"
|
"2021-11-20T14:22:01-08:00"
|
||||||
);
|
);
|
||||||
|
|
||||||
assert_eq!(
|
assert_eq!(
|
||||||
message.get_subject().unwrap(),
|
message.get_subject().unwrap(),
|
||||||
"Why not both importing AND exporting? ☺"
|
"Why not both importing AND exporting? ☺"
|
||||||
);
|
);
|
||||||
|
|
||||||
assert_eq!(
|
assert_eq!(
|
||||||
message.get_html_body(0).unwrap().to_string(),
|
message.get_html_body(0).unwrap(),
|
||||||
concat!(
|
concat!(
|
||||||
"<html><p>I was thinking about quitting the “exporting” to ",
|
"<html><p>I was thinking about quitting the “exporting” to ",
|
||||||
"focus just on the “importing”,</p><p>but then I thought,",
|
"focus just on the “importing”,</p><p>but then I thought,",
|
||||||
" why not do both? ☺</p></html>"
|
" why not do both? ☺</p></html>"
|
||||||
)
|
)
|
||||||
);
|
);
|
||||||
|
|
||||||
assert_eq!(
|
assert_eq!(
|
||||||
message.get_text_body(0).unwrap().to_string(),
|
message.get_text_body(0).unwrap(),
|
||||||
concat!(
|
concat!(
|
||||||
"I was thinking about quitting the “exporting” to focus just on the",
|
"I was thinking about quitting the “exporting” to focus just on the",
|
||||||
" “importing”,\nbut then I thought, why not do both? ☺\n"
|
" “importing”,\nbut then I thought, why not do both? ☺\n"
|
||||||
)
|
)
|
||||||
);
|
);
|
||||||
let nested_message = match message.get_attachment(0).unwrap() {
|
|
||||||
MessagePart::Message(v) => v,
|
let nested_message = message.get_attachment(0).unwrap().unwrap_message();
|
||||||
_ => unreachable!(),
|
|
||||||
};
|
|
||||||
assert_eq!(
|
assert_eq!(
|
||||||
nested_message.get_subject().unwrap(),
|
nested_message.get_subject().unwrap(),
|
||||||
"Exporting my book about coffee tables"
|
"Exporting my book about coffee tables"
|
||||||
);
|
);
|
||||||
|
|
||||||
assert_eq!(
|
assert_eq!(
|
||||||
nested_message.get_text_body(0).unwrap().to_string(),
|
nested_message.get_text_body(0).unwrap(),
|
||||||
"ℌ𝔢𝔩𝔭 𝔪𝔢 𝔢𝔵𝔭𝔬𝔯𝔱 𝔪𝔶 𝔟𝔬𝔬𝔨 𝔭𝔩𝔢𝔞𝔰𝔢!"
|
"ℌ𝔢𝔩𝔭 𝔪𝔢 𝔢𝔵𝔭𝔬𝔯𝔱 𝔪𝔶 𝔟𝔬𝔬𝔨 𝔭𝔩𝔢𝔞𝔰𝔢!"
|
||||||
);
|
);
|
||||||
|
|
||||||
assert_eq!(
|
assert_eq!(
|
||||||
nested_message.get_html_body(0).unwrap().to_string(),
|
nested_message.get_html_body(0).unwrap(),
|
||||||
"<html><body>ℌ𝔢𝔩𝔭 𝔪𝔢 𝔢𝔵𝔭𝔬𝔯𝔱 𝔪𝔶 𝔟𝔬𝔬𝔨 𝔭𝔩𝔢𝔞𝔰𝔢!</body></html>"
|
"<html><body>ℌ𝔢𝔩𝔭 𝔪𝔢 𝔢𝔵𝔭𝔬𝔯𝔱 𝔪𝔶 𝔟𝔬𝔬𝔨 𝔭𝔩𝔢𝔞𝔰𝔢!</body></html>"
|
||||||
);
|
);
|
||||||
let nested_attachment = match nested_message.get_attachment(0).unwrap() {
|
|
||||||
MessagePart::Binary(v) => v,
|
let nested_attachment = nested_message.get_attachment(0).unwrap().unwrap_binary();
|
||||||
_ => unreachable!(),
|
|
||||||
};
|
|
||||||
assert_eq!(nested_attachment.len(), 42);
|
assert_eq!(nested_attachment.len(), 42);
|
||||||
|
|
||||||
assert_eq!(
|
assert_eq!(
|
||||||
nested_attachment
|
nested_attachment.get_attachment_name().unwrap(),
|
||||||
.get_header()
|
|
||||||
.unwrap()
|
|
||||||
.get_content_type()
|
|
||||||
.unwrap()
|
|
||||||
.get_attribute("name")
|
|
||||||
.unwrap(),
|
|
||||||
"Book about ☕ tables.gif"
|
"Book about ☕ tables.gif"
|
||||||
);
|
);
|
||||||
|
|
||||||
//println!("{}", serde_json::to_string_pretty(&message).unwrap());
|
|
||||||
//println!("{}", serde_yaml::to_string(&message).unwrap());
|
|
||||||
}
|
}
|
||||||
|
|||||||
+58
-47
@@ -42,71 +42,76 @@ QzMvhGqnm2V0WiClm///D0lfXHtJ6vLlK9w7rx7vQk5SQJbFtSms1y9evXid7QZacgOxmSxktNzd
|
|||||||
tSwwU+J/VICaCPFIYU3XAJhIOtjf5sfyAAAAJXRFWHRDb21tZW50AGNsaXAyZ2lmIHYuMC42IGJ5
|
tSwwU+J/VICaCPFIYU3XAJhIOtjf5sfyAAAAJXRFWHRDb21tZW50AGNsaXAyZ2lmIHYuMC42IGJ5
|
||||||
IFl2ZXMgUGlndWV0NnM7vAAAAABJRU5ErkJggg==
|
IFl2ZXMgUGlndWV0NnM7vAAAAABJRU5ErkJggg==
|
||||||
|
|
||||||
---- EXPECTED STRUCTURE ----
|
---- EXPECTED STRUCTURE ----{
|
||||||
{
|
"headers_rfc": {
|
||||||
"header": {
|
|
||||||
"date": {
|
|
||||||
"year": 2000,
|
|
||||||
"month": 5,
|
|
||||||
"day": 17,
|
|
||||||
"hour": 19,
|
|
||||||
"minute": 35,
|
|
||||||
"second": 5,
|
|
||||||
"tz_before_gmt": true,
|
|
||||||
"tz_hour": 4,
|
|
||||||
"tz_minute": 0
|
|
||||||
},
|
|
||||||
"from": {
|
"from": {
|
||||||
"Address": {
|
"Address": {
|
||||||
"name": "Doug Sauder",
|
"name": "Doug Sauder",
|
||||||
"address": "doug@example.com"
|
"address": "doug@example.com"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"message_id": "NDBBIAKOPKHFGPLCODIGKEKECHAA.doug@example.com",
|
"subject": {
|
||||||
"mime_version": "1.0",
|
"Text": "Test message from Microsoft Outlook 00"
|
||||||
"subject": "Test message from Microsoft Outlook 00",
|
},
|
||||||
|
"mime_version": {
|
||||||
|
"Text": "1.0"
|
||||||
|
},
|
||||||
"to": {
|
"to": {
|
||||||
"Address": {
|
"Address": {
|
||||||
"name": "Joe Blow",
|
"name": "Joe Blow",
|
||||||
"address": "jblow@example.com"
|
"address": "jblow@example.com"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"content_disposition": {
|
"message_id": {
|
||||||
"c_type": "attachment",
|
"Text": "NDBBIAKOPKHFGPLCODIGKEKECHAA.doug@example.com"
|
||||||
"attributes": {
|
|
||||||
"filename": "redball.png"
|
|
||||||
}
|
|
||||||
},
|
},
|
||||||
"content_transfer_encoding": "base64",
|
"date": {
|
||||||
"content_type": {
|
"DateTime": {
|
||||||
"c_type": "image",
|
"year": 2000,
|
||||||
"c_subtype": "png",
|
"month": 5,
|
||||||
"attributes": {
|
"day": 17,
|
||||||
"name": "redball.png"
|
"hour": 19,
|
||||||
|
"minute": 35,
|
||||||
|
"second": 5,
|
||||||
|
"tz_before_gmt": true,
|
||||||
|
"tz_hour": 4,
|
||||||
|
"tz_minute": 0
|
||||||
}
|
}
|
||||||
},
|
|
||||||
"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)"
|
|
||||||
]
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"html_body": [],
|
||||||
|
"text_body": [],
|
||||||
"attachments": [
|
"attachments": [
|
||||||
|
0
|
||||||
|
],
|
||||||
|
"parts": [
|
||||||
{
|
{
|
||||||
"Binary": {
|
"Binary": {
|
||||||
"contents": [
|
"headers_rfc": {
|
||||||
|
"content_type": {
|
||||||
|
"ContentType": {
|
||||||
|
"c_type": "image",
|
||||||
|
"c_subtype": "png",
|
||||||
|
"attributes": {
|
||||||
|
"name": "redball.png"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"content_transfer_encoding": {
|
||||||
|
"Text": "base64"
|
||||||
|
},
|
||||||
|
"content_disposition": {
|
||||||
|
"ContentType": {
|
||||||
|
"c_type": "attachment",
|
||||||
|
"c_subtype": null,
|
||||||
|
"attributes": {
|
||||||
|
"filename": "redball.png"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"is_encoding_problem": false,
|
||||||
|
"body": [
|
||||||
137,
|
137,
|
||||||
80,
|
80,
|
||||||
78,
|
78,
|
||||||
@@ -1563,5 +1568,11 @@ IFl2ZXMgUGlndWV0NnM7vAAAAABJRU5ErkJggg==
|
|||||||
]
|
]
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
]
|
],
|
||||||
|
"structure": {
|
||||||
|
"Part": 0
|
||||||
|
},
|
||||||
|
"offset_header": 0,
|
||||||
|
"offset_body": 578,
|
||||||
|
"offset_end": 2570
|
||||||
}
|
}
|
||||||
+57
-50
@@ -33,29 +33,8 @@ ihr seht, einige Tiere, welche also wohl noch ungl+APw-cklicher sein =
|
|||||||
m+APw-ssen als wir.+ACI-=20
|
m+APw-ssen als wir.+ACI-=20
|
||||||
|
|
||||||
|
|
||||||
---- EXPECTED STRUCTURE ----
|
---- EXPECTED STRUCTURE ----{
|
||||||
{
|
"headers_rfc": {
|
||||||
"header": {
|
|
||||||
"date": {
|
|
||||||
"year": 2000,
|
|
||||||
"month": 5,
|
|
||||||
"day": 17,
|
|
||||||
"hour": 19,
|
|
||||||
"minute": 18,
|
|
||||||
"second": 39,
|
|
||||||
"tz_before_gmt": true,
|
|
||||||
"tz_hour": 4,
|
|
||||||
"tz_minute": 0
|
|
||||||
},
|
|
||||||
"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)",
|
|
||||||
"to": {
|
"to": {
|
||||||
"AddressList": [
|
"AddressList": [
|
||||||
{
|
{
|
||||||
@@ -68,40 +47,68 @@ m+APw-ssen als wir.+ACI-=20
|
|||||||
}
|
}
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
"content_transfer_encoding": "quoted-printable",
|
"date": {
|
||||||
"content_type": {
|
"DateTime": {
|
||||||
"c_type": "text",
|
"year": 2000,
|
||||||
"c_subtype": "plain",
|
"month": 5,
|
||||||
"attributes": {
|
"day": 17,
|
||||||
"charset": "utf-7"
|
"hour": 19,
|
||||||
|
"minute": 18,
|
||||||
|
"second": 39,
|
||||||
|
"tz_before_gmt": true,
|
||||||
|
"tz_hour": 4,
|
||||||
|
"tz_minute": 0
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"others": {
|
"subject": {
|
||||||
"X-Priority": [
|
"Text": "Die Hasen und die Frösche (Microsoft Outlook 00)"
|
||||||
"3 (Normal)"
|
},
|
||||||
],
|
"from": {
|
||||||
"X-MimeOLE": [
|
"Address": {
|
||||||
"Produced By Microsoft MimeOLE V5.00.2314.1300"
|
"name": "Doug Sauder",
|
||||||
],
|
"address": "doug@example.com"
|
||||||
"X-MSMail-Priority": [
|
}
|
||||||
"Normal"
|
},
|
||||||
],
|
"message_id": {
|
||||||
"Importance": [
|
"Text": "NDBBIAKOPKHFGPLCODIGMEKCCHAA.doug@example.com"
|
||||||
"Normal"
|
},
|
||||||
],
|
"mime_version": {
|
||||||
"X-Mailer": [
|
"Text": "1.0"
|
||||||
"Microsoft Outlook IMO, Build 9.0.2416 (9.0.2910.0)"
|
|
||||||
]
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"html_body": [
|
"html_body": [
|
||||||
{
|
0
|
||||||
"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>"
|
|
||||||
}
|
|
||||||
],
|
],
|
||||||
"text_body": [
|
"text_body": [
|
||||||
|
0
|
||||||
|
],
|
||||||
|
"attachments": [],
|
||||||
|
"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": {
|
||||||
|
"headers_rfc": {
|
||||||
|
"content_type": {
|
||||||
|
"ContentType": {
|
||||||
|
"c_type": "text",
|
||||||
|
"c_subtype": "plain",
|
||||||
|
"attributes": {
|
||||||
|
"charset": "utf-7"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"content_transfer_encoding": {
|
||||||
|
"Text": "quoted-printable"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"is_encoding_problem": false,
|
||||||
|
"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
|
||||||
}
|
}
|
||||||
+50
-37
@@ -35,19 +35,20 @@ wir." <br>
|
|||||||
</font></html>
|
</font></html>
|
||||||
|
|
||||||
|
|
||||||
---- EXPECTED STRUCTURE ----
|
---- EXPECTED STRUCTURE ----{
|
||||||
{
|
"headers_rfc": {
|
||||||
"header": {
|
|
||||||
"date": {
|
"date": {
|
||||||
"year": 2000,
|
"DateTime": {
|
||||||
"month": 5,
|
"year": 2000,
|
||||||
"day": 19,
|
"month": 5,
|
||||||
"hour": 0,
|
"day": 19,
|
||||||
"minute": 31,
|
"hour": 0,
|
||||||
"second": 0,
|
"minute": 31,
|
||||||
"tz_before_gmt": true,
|
"second": 0,
|
||||||
"tz_hour": 4,
|
"tz_before_gmt": true,
|
||||||
"tz_minute": 0
|
"tz_hour": 4,
|
||||||
|
"tz_minute": 0
|
||||||
|
}
|
||||||
},
|
},
|
||||||
"from": {
|
"from": {
|
||||||
"Address": {
|
"Address": {
|
||||||
@@ -55,43 +56,55 @@ wir." <br>
|
|||||||
"address": "dwsauder@example.com"
|
"address": "dwsauder@example.com"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"message_id": "4.2.0.58.20000519003052.00a89c40@pop.example.com",
|
"message_id": {
|
||||||
"mime_version": "1.0",
|
"Text": "4.2.0.58.20000519003052.00a89c40@pop.example.com"
|
||||||
"subject": "Die Hasen und die Frösche",
|
},
|
||||||
"to": {
|
"to": {
|
||||||
"Address": {
|
"Address": {
|
||||||
"name": "Heinz Müller",
|
"name": "Heinz Müller",
|
||||||
"address": "mueller@example.com"
|
"address": "mueller@example.com"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"content_transfer_encoding": "quoted-printable",
|
"mime_version": {
|
||||||
"content_type": {
|
"Text": "1.0"
|
||||||
"c_type": "text",
|
|
||||||
"c_subtype": "html",
|
|
||||||
"attributes": {
|
|
||||||
"charset": "iso-8859-1"
|
|
||||||
}
|
|
||||||
},
|
},
|
||||||
"others": {
|
"subject": {
|
||||||
"X-Mailer": [
|
"Text": "Die Hasen und die Frösche"
|
||||||
"QUALCOMM Windows Eudora Pro Version 4.2.0.58"
|
|
||||||
],
|
|
||||||
"X-Sender": [
|
|
||||||
"dwsauder@pop.example.com (Unverified)"
|
|
||||||
],
|
|
||||||
"X-Priority": [
|
|
||||||
"2 (High)"
|
|
||||||
]
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"html_body": [
|
"html_body": [
|
||||||
{
|
0
|
||||||
"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; "wir leben", sprach ein Redner, "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." <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"Halt", rief nun eben dieser Sprecher, "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." <br>\n<br>\n</font></html>\n\n"
|
|
||||||
}
|
|
||||||
],
|
],
|
||||||
"text_body": [
|
"text_body": [
|
||||||
|
0
|
||||||
|
],
|
||||||
|
"attachments": [],
|
||||||
|
"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": {
|
||||||
|
"headers_rfc": {
|
||||||
|
"content_type": {
|
||||||
|
"ContentType": {
|
||||||
|
"c_type": "text",
|
||||||
|
"c_subtype": "html",
|
||||||
|
"attributes": {
|
||||||
|
"charset": "iso-8859-1"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"content_transfer_encoding": {
|
||||||
|
"Text": "quoted-printable"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"is_encoding_problem": false,
|
||||||
|
"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; "wir leben", sprach ein Redner, "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." <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"Halt", rief nun eben dieser Sprecher, "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." <br>\n<br>\n</font></html>\n\n"
|
||||||
|
}
|
||||||
}
|
}
|
||||||
]
|
],
|
||||||
|
"structure": {
|
||||||
|
"Part": 0
|
||||||
|
},
|
||||||
|
"offset_header": 0,
|
||||||
|
"offset_body": 500,
|
||||||
|
"offset_end": 1499
|
||||||
}
|
}
|
||||||
+84
-54
@@ -62,19 +62,26 @@ wir." <br>
|
|||||||
--=====================_714967308==_.ALT--
|
--=====================_714967308==_.ALT--
|
||||||
|
|
||||||
|
|
||||||
---- EXPECTED STRUCTURE ----
|
---- EXPECTED STRUCTURE ----{
|
||||||
{
|
"headers_rfc": {
|
||||||
"header": {
|
|
||||||
"date": {
|
"date": {
|
||||||
"year": 2000,
|
"DateTime": {
|
||||||
"month": 5,
|
"year": 2000,
|
||||||
"day": 19,
|
"month": 5,
|
||||||
"hour": 0,
|
"day": 19,
|
||||||
"minute": 29,
|
"hour": 0,
|
||||||
"second": 55,
|
"minute": 29,
|
||||||
"tz_before_gmt": true,
|
"second": 55,
|
||||||
"tz_hour": 4,
|
"tz_before_gmt": true,
|
||||||
"tz_minute": 0
|
"tz_hour": 4,
|
||||||
|
"tz_minute": 0
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"subject": {
|
||||||
|
"Text": "Die Hasen und die Frösche"
|
||||||
|
},
|
||||||
|
"mime_version": {
|
||||||
|
"Text": "1.0"
|
||||||
},
|
},
|
||||||
"from": {
|
"from": {
|
||||||
"Address": {
|
"Address": {
|
||||||
@@ -82,9 +89,9 @@ wir." <br>
|
|||||||
"address": "dwsauder@example.com"
|
"address": "dwsauder@example.com"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"message_id": "4.2.0.58.20000519002557.00a88870@pop.example.com",
|
"message_id": {
|
||||||
"mime_version": "1.0",
|
"Text": "4.2.0.58.20000519002557.00a88870@pop.example.com"
|
||||||
"subject": "Die Hasen und die Frösche",
|
},
|
||||||
"to": {
|
"to": {
|
||||||
"Address": {
|
"Address": {
|
||||||
"name": "Heinz Müller",
|
"name": "Heinz Müller",
|
||||||
@@ -92,52 +99,75 @@ wir." <br>
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"content_type": {
|
"content_type": {
|
||||||
"c_type": "multipart",
|
"ContentType": {
|
||||||
"c_subtype": "alternative",
|
"c_type": "multipart",
|
||||||
"attributes": {
|
"c_subtype": "alternative",
|
||||||
"boundary": "=====================_714967308==_.ALT"
|
"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": [
|
"html_body": [
|
||||||
{
|
1
|
||||||
"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; "wir leben", sprach ein Redner, "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." <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"Halt", rief nun eben dieser Sprecher, "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." <br>\n<br>\n</font></html>\n"
|
|
||||||
}
|
|
||||||
],
|
],
|
||||||
"text_body": [
|
"text_body": [
|
||||||
|
0
|
||||||
|
],
|
||||||
|
"attachments": [],
|
||||||
|
"parts": [
|
||||||
{
|
{
|
||||||
"header": {
|
"Text": {
|
||||||
"content_transfer_encoding": "quoted-printable",
|
"headers_rfc": {
|
||||||
"content_type": {
|
"content_transfer_encoding": {
|
||||||
"c_type": "text",
|
"Text": "quoted-printable"
|
||||||
"c_subtype": "plain",
|
},
|
||||||
"attributes": {
|
"content_type": {
|
||||||
"charset": "iso-8859-1"
|
"ContentType": {
|
||||||
|
"c_type": "text",
|
||||||
|
"c_subtype": "plain",
|
||||||
|
"attributes": {
|
||||||
|
"charset": "iso-8859-1"
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
},
|
||||||
},
|
"is_encoding_problem": false,
|
||||||
"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_rfc": {
|
||||||
|
"content_transfer_encoding": {
|
||||||
|
"Text": "quoted-printable"
|
||||||
|
},
|
||||||
|
"content_type": {
|
||||||
|
"ContentType": {
|
||||||
|
"c_type": "text",
|
||||||
|
"c_subtype": "html",
|
||||||
|
"attributes": {
|
||||||
|
"charset": "iso-8859-1"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"is_encoding_problem": false,
|
||||||
|
"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; "wir leben", sprach ein Redner, "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." <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"Halt", rief nun eben dieser Sprecher, "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." <br>\n<br>\n</font></html>\n"
|
||||||
|
}
|
||||||
}
|
}
|
||||||
]
|
],
|
||||||
|
"structure": {
|
||||||
|
"List": [
|
||||||
|
{
|
||||||
|
"Part": 0
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"Part": 1
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"offset_header": 0,
|
||||||
|
"offset_body": 498,
|
||||||
|
"offset_end": 2623
|
||||||
}
|
}
|
||||||
+49
-38
@@ -17,62 +17,73 @@ A HARE one day ridiculed the short feet and slow pace of the Tortoise, who repli
|
|||||||
Slow but steady wins the race.
|
Slow but steady wins the race.
|
||||||
|
|
||||||
|
|
||||||
---- EXPECTED STRUCTURE ----
|
---- EXPECTED STRUCTURE ----{
|
||||||
{
|
"headers_rfc": {
|
||||||
"header": {
|
|
||||||
"date": {
|
|
||||||
"year": 2000,
|
|
||||||
"month": 5,
|
|
||||||
"day": 19,
|
|
||||||
"hour": 1,
|
|
||||||
"minute": 13,
|
|
||||||
"second": 19,
|
|
||||||
"tz_before_gmt": true,
|
|
||||||
"tz_hour": 4,
|
|
||||||
"tz_minute": 0
|
|
||||||
},
|
|
||||||
"from": {
|
"from": {
|
||||||
"Address": {
|
"Address": {
|
||||||
"name": "Doug Sauder",
|
"name": "Doug Sauder",
|
||||||
"address": "dwsauder@example.com"
|
"address": "dwsauder@example.com"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"message_id": "4.2.0.58.20000519011207.00a8cd70@pop.example.com",
|
"message_id": {
|
||||||
"mime_version": "1.0",
|
"Text": "4.2.0.58.20000519011207.00a8cd70@pop.example.com"
|
||||||
"subject": "The Hare and the Tortoise",
|
},
|
||||||
"to": {
|
"to": {
|
||||||
"Address": {
|
"Address": {
|
||||||
"name": "Joe Blow",
|
"name": "Joe Blow",
|
||||||
"address": "blow@example.com"
|
"address": "blow@example.com"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"content_type": {
|
"subject": {
|
||||||
"c_type": "text",
|
"Text": "The Hare and the Tortoise"
|
||||||
"c_subtype": "plain",
|
|
||||||
"attributes": {
|
|
||||||
"charset": "us-ascii"
|
|
||||||
}
|
|
||||||
},
|
},
|
||||||
"others": {
|
"mime_version": {
|
||||||
"X-Priority": [
|
"Text": "1.0"
|
||||||
"5 (Lowest)"
|
},
|
||||||
],
|
"date": {
|
||||||
"X-Sender": [
|
"DateTime": {
|
||||||
"dwsauder@pop.example.com (Unverified)"
|
"year": 2000,
|
||||||
],
|
"month": 5,
|
||||||
"X-Mailer": [
|
"day": 19,
|
||||||
"QUALCOMM Windows Eudora Pro Version 4.2.0.58"
|
"hour": 1,
|
||||||
]
|
"minute": 13,
|
||||||
|
"second": 19,
|
||||||
|
"tz_before_gmt": true,
|
||||||
|
"tz_hour": 4,
|
||||||
|
"tz_minute": 0
|
||||||
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"html_body": [
|
"html_body": [
|
||||||
{
|
0
|
||||||
"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>"
|
|
||||||
}
|
|
||||||
],
|
],
|
||||||
"text_body": [
|
"text_body": [
|
||||||
|
0
|
||||||
|
],
|
||||||
|
"attachments": [],
|
||||||
|
"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": {
|
||||||
|
"headers_rfc": {
|
||||||
|
"content_type": {
|
||||||
|
"ContentType": {
|
||||||
|
"c_type": "text",
|
||||||
|
"c_subtype": "plain",
|
||||||
|
"attributes": {
|
||||||
|
"charset": "us-ascii"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"is_encoding_problem": false,
|
||||||
|
"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
|
||||||
}
|
}
|
||||||
+53
-46
@@ -31,69 +31,76 @@ 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 =
|
ihr seht, einige Tiere, welche also wohl noch ungl+APw-cklicher sein =
|
||||||
m+APw-ssen als wir.+ACI-=20
|
m+APw-ssen als wir.+ACI-=20
|
||||||
|
|
||||||
---- EXPECTED STRUCTURE ----
|
---- EXPECTED STRUCTURE ----{
|
||||||
{
|
"headers_rfc": {
|
||||||
"header": {
|
|
||||||
"date": {
|
|
||||||
"year": 2000,
|
|
||||||
"month": 5,
|
|
||||||
"day": 17,
|
|
||||||
"hour": 19,
|
|
||||||
"minute": 20,
|
|
||||||
"second": 24,
|
|
||||||
"tz_before_gmt": true,
|
|
||||||
"tz_hour": 4,
|
|
||||||
"tz_minute": 0
|
|
||||||
},
|
|
||||||
"from": {
|
"from": {
|
||||||
"Address": {
|
"Address": {
|
||||||
"name": "Doug Sauder",
|
"name": "Doug Sauder",
|
||||||
"address": "doug@example.com"
|
"address": "doug@example.com"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"message_id": "NDBBIAKOPKHFGPLCODIGCEKDCHAA.doug@example.com",
|
"date": {
|
||||||
"mime_version": "1.0",
|
"DateTime": {
|
||||||
"subject": "Die Hasen und die Frösche (Microsoft Outlook 00)",
|
"year": 2000,
|
||||||
|
"month": 5,
|
||||||
|
"day": 17,
|
||||||
|
"hour": 19,
|
||||||
|
"minute": 20,
|
||||||
|
"second": 24,
|
||||||
|
"tz_before_gmt": true,
|
||||||
|
"tz_hour": 4,
|
||||||
|
"tz_minute": 0
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"subject": {
|
||||||
|
"Text": "Die Hasen und die Frösche (Microsoft Outlook 00)"
|
||||||
|
},
|
||||||
|
"mime_version": {
|
||||||
|
"Text": "1.0"
|
||||||
|
},
|
||||||
"to": {
|
"to": {
|
||||||
"Address": {
|
"Address": {
|
||||||
"name": "Heinz Müller",
|
"name": "Heinz Müller",
|
||||||
"address": "mueller@example.com"
|
"address": "mueller@example.com"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"content_transfer_encoding": "quoted-printable",
|
"message_id": {
|
||||||
"content_type": {
|
"Text": "NDBBIAKOPKHFGPLCODIGCEKDCHAA.doug@example.com"
|
||||||
"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"
|
|
||||||
]
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"html_body": [
|
"html_body": [
|
||||||
{
|
0
|
||||||
"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>"
|
|
||||||
}
|
|
||||||
],
|
],
|
||||||
"text_body": [
|
"text_body": [
|
||||||
|
0
|
||||||
|
],
|
||||||
|
"attachments": [],
|
||||||
|
"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": {
|
||||||
|
"headers_rfc": {
|
||||||
|
"content_transfer_encoding": {
|
||||||
|
"Text": "quoted-printable"
|
||||||
|
},
|
||||||
|
"content_type": {
|
||||||
|
"ContentType": {
|
||||||
|
"c_type": "text",
|
||||||
|
"c_subtype": "plain",
|
||||||
|
"attributes": {
|
||||||
|
"charset": "utf-7"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"is_encoding_problem": false,
|
||||||
|
"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
|
||||||
}
|
}
|
||||||
+83
-56
@@ -82,19 +82,23 @@ IFl2ZXMgUGlndWV0NnM7vAAAAABJRU5ErkJggg==
|
|||||||
|
|
||||||
------=_NextPart_000_0004_01BFC037.28F2FA90--
|
------=_NextPart_000_0004_01BFC037.28F2FA90--
|
||||||
|
|
||||||
---- EXPECTED STRUCTURE ----
|
---- EXPECTED STRUCTURE ----{
|
||||||
{
|
"headers_rfc": {
|
||||||
"header": {
|
|
||||||
"date": {
|
"date": {
|
||||||
"year": 2000,
|
"DateTime": {
|
||||||
"month": 5,
|
"year": 2000,
|
||||||
"day": 17,
|
"month": 5,
|
||||||
"hour": 19,
|
"day": 17,
|
||||||
"minute": 36,
|
"hour": 19,
|
||||||
"second": 13,
|
"minute": 36,
|
||||||
"tz_before_gmt": true,
|
"second": 13,
|
||||||
"tz_hour": 4,
|
"tz_before_gmt": true,
|
||||||
"tz_minute": 0
|
"tz_hour": 4,
|
||||||
|
"tz_minute": 0
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"message_id": {
|
||||||
|
"Text": "NDBBIAKOPKHFGPLCODIGOEKECHAA.doug@example.com"
|
||||||
},
|
},
|
||||||
"from": {
|
"from": {
|
||||||
"Address": {
|
"Address": {
|
||||||
@@ -102,9 +106,9 @@ IFl2ZXMgUGlndWV0NnM7vAAAAABJRU5ErkJggg==
|
|||||||
"address": "doug@example.com"
|
"address": "doug@example.com"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"message_id": "NDBBIAKOPKHFGPLCODIGOEKECHAA.doug@example.com",
|
"mime_version": {
|
||||||
"mime_version": "1.0",
|
"Text": "1.0"
|
||||||
"subject": "Test message from Microsoft Outlook 00",
|
},
|
||||||
"to": {
|
"to": {
|
||||||
"Address": {
|
"Address": {
|
||||||
"name": "Joe Blow",
|
"name": "Joe Blow",
|
||||||
@@ -112,50 +116,52 @@ IFl2ZXMgUGlndWV0NnM7vAAAAABJRU5ErkJggg==
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"content_type": {
|
"content_type": {
|
||||||
"c_type": "multipart",
|
"ContentType": {
|
||||||
"c_subtype": "mixed",
|
"c_type": "multipart",
|
||||||
"attributes": {
|
"c_subtype": "mixed",
|
||||||
"boundary": "----=_NextPart_000_0004_01BFC037.28F2FA90"
|
"attributes": {
|
||||||
|
"boundary": "----=_NextPart_000_0004_01BFC037.28F2FA90"
|
||||||
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"others": {
|
"subject": {
|
||||||
"Importance": [
|
"Text": "Test message from Microsoft Outlook 00"
|
||||||
"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)"
|
|
||||||
]
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"html_body": [],
|
||||||
|
"text_body": [],
|
||||||
"attachments": [
|
"attachments": [
|
||||||
|
0,
|
||||||
|
1
|
||||||
|
],
|
||||||
|
"parts": [
|
||||||
{
|
{
|
||||||
"Binary": {
|
"Binary": {
|
||||||
"header": {
|
"headers_rfc": {
|
||||||
"content_disposition": {
|
"content_disposition": {
|
||||||
"c_type": "attachment",
|
"ContentType": {
|
||||||
"attributes": {
|
"c_type": "attachment",
|
||||||
"filename": "blueball.png"
|
"c_subtype": null,
|
||||||
|
"attributes": {
|
||||||
|
"filename": "blueball.png"
|
||||||
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"content_transfer_encoding": "base64",
|
"content_transfer_encoding": {
|
||||||
|
"Text": "base64"
|
||||||
|
},
|
||||||
"content_type": {
|
"content_type": {
|
||||||
"c_type": "image",
|
"ContentType": {
|
||||||
"c_subtype": "png",
|
"c_type": "image",
|
||||||
"attributes": {
|
"c_subtype": "png",
|
||||||
"name": "blueball.png"
|
"attributes": {
|
||||||
|
"name": "blueball.png"
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"contents": [
|
"is_encoding_problem": false,
|
||||||
|
"body": [
|
||||||
137,
|
137,
|
||||||
80,
|
80,
|
||||||
78,
|
78,
|
||||||
@@ -1486,23 +1492,31 @@ IFl2ZXMgUGlndWV0NnM7vAAAAABJRU5ErkJggg==
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"Binary": {
|
"Binary": {
|
||||||
"header": {
|
"headers_rfc": {
|
||||||
"content_disposition": {
|
"content_disposition": {
|
||||||
"c_type": "attachment",
|
"ContentType": {
|
||||||
"attributes": {
|
"c_type": "attachment",
|
||||||
"filename": "redball.png"
|
"c_subtype": null,
|
||||||
|
"attributes": {
|
||||||
|
"filename": "redball.png"
|
||||||
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"content_transfer_encoding": "base64",
|
|
||||||
"content_type": {
|
"content_type": {
|
||||||
"c_type": "image",
|
"ContentType": {
|
||||||
"c_subtype": "png",
|
"c_type": "image",
|
||||||
"attributes": {
|
"c_subtype": "png",
|
||||||
"name": "redball.png"
|
"attributes": {
|
||||||
|
"name": "redball.png"
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
},
|
||||||
|
"content_transfer_encoding": {
|
||||||
|
"Text": "base64"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"contents": [
|
"is_encoding_problem": false,
|
||||||
|
"body": [
|
||||||
137,
|
137,
|
||||||
80,
|
80,
|
||||||
78,
|
78,
|
||||||
@@ -2959,5 +2973,18 @@ IFl2ZXMgUGlndWV0NnM7vAAAAABJRU5ErkJggg==
|
|||||||
]
|
]
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
]
|
],
|
||||||
|
"structure": {
|
||||||
|
"List": [
|
||||||
|
{
|
||||||
|
"Part": 0
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"Part": 1
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"offset_header": 0,
|
||||||
|
"offset_body": 524,
|
||||||
|
"offset_end": 4807
|
||||||
}
|
}
|
||||||
+52
-45
@@ -30,19 +30,10 @@ ein wenig aufschieben, denn auch uns f=FCrchten, wie ihr seht, einige =
|
|||||||
Tiere, welche also wohl noch ungl=FCcklicher sein m=FCssen als wir."=20
|
Tiere, welche also wohl noch ungl=FCcklicher sein m=FCssen als wir."=20
|
||||||
|
|
||||||
|
|
||||||
---- EXPECTED STRUCTURE ----
|
---- EXPECTED STRUCTURE ----{
|
||||||
{
|
"headers_rfc": {
|
||||||
"header": {
|
"message_id": {
|
||||||
"date": {
|
"Text": "NDBBIAKOPKHFGPLCODIGIEKCCHAA.doug@example.com"
|
||||||
"year": 2000,
|
|
||||||
"month": 5,
|
|
||||||
"day": 17,
|
|
||||||
"hour": 19,
|
|
||||||
"minute": 15,
|
|
||||||
"second": 35,
|
|
||||||
"tz_before_gmt": true,
|
|
||||||
"tz_hour": 4,
|
|
||||||
"tz_minute": 0
|
|
||||||
},
|
},
|
||||||
"from": {
|
"from": {
|
||||||
"Address": {
|
"Address": {
|
||||||
@@ -50,49 +41,65 @@ Tiere, welche also wohl noch ungl=FCcklicher sein m=FCssen als wir."=20
|
|||||||
"address": "doug@example.com"
|
"address": "doug@example.com"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"message_id": "NDBBIAKOPKHFGPLCODIGIEKCCHAA.doug@example.com",
|
"subject": {
|
||||||
"mime_version": "1.0",
|
"Text": "Die Hasen und die Frösche (Microsoft Outlook 00)"
|
||||||
"subject": "Die Hasen und die Frösche (Microsoft Outlook 00)",
|
},
|
||||||
|
"date": {
|
||||||
|
"DateTime": {
|
||||||
|
"year": 2000,
|
||||||
|
"month": 5,
|
||||||
|
"day": 17,
|
||||||
|
"hour": 19,
|
||||||
|
"minute": 15,
|
||||||
|
"second": 35,
|
||||||
|
"tz_before_gmt": true,
|
||||||
|
"tz_hour": 4,
|
||||||
|
"tz_minute": 0
|
||||||
|
}
|
||||||
|
},
|
||||||
"to": {
|
"to": {
|
||||||
"Address": {
|
"Address": {
|
||||||
"name": "Jürgen Schmürgen",
|
"name": "Jürgen Schmürgen",
|
||||||
"address": "schmuergen@example.com"
|
"address": "schmuergen@example.com"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"content_transfer_encoding": "quoted-printable",
|
"mime_version": {
|
||||||
"content_type": {
|
"Text": "1.0"
|
||||||
"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": [
|
"html_body": [
|
||||||
{
|
0
|
||||||
"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>"
|
|
||||||
}
|
|
||||||
],
|
],
|
||||||
"text_body": [
|
"text_body": [
|
||||||
|
0
|
||||||
|
],
|
||||||
|
"attachments": [],
|
||||||
|
"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": {
|
||||||
|
"headers_rfc": {
|
||||||
|
"content_transfer_encoding": {
|
||||||
|
"Text": "quoted-printable"
|
||||||
|
},
|
||||||
|
"content_type": {
|
||||||
|
"ContentType": {
|
||||||
|
"c_type": "text",
|
||||||
|
"c_subtype": "plain",
|
||||||
|
"attributes": {
|
||||||
|
"charset": "iso-8859-1"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"is_encoding_problem": false,
|
||||||
|
"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
|
||||||
}
|
}
|
||||||
+138
-92
@@ -134,100 +134,111 @@ IFl2ZXMgUGlndWV0NnM7vAAAAABJRU5ErkJggg==
|
|||||||
|
|
||||||
------=_NextPart_000_0002_01BFC036.AE309650--
|
------=_NextPart_000_0002_01BFC036.AE309650--
|
||||||
|
|
||||||
---- EXPECTED STRUCTURE ----
|
---- EXPECTED STRUCTURE ----{
|
||||||
{
|
"headers_rfc": {
|
||||||
"header": {
|
|
||||||
"date": {
|
|
||||||
"year": 2000,
|
|
||||||
"month": 5,
|
|
||||||
"day": 17,
|
|
||||||
"hour": 19,
|
|
||||||
"minute": 32,
|
|
||||||
"second": 47,
|
|
||||||
"tz_before_gmt": true,
|
|
||||||
"tz_hour": 4,
|
|
||||||
"tz_minute": 0
|
|
||||||
},
|
|
||||||
"from": {
|
"from": {
|
||||||
"Address": {
|
"Address": {
|
||||||
"name": "Doug Sauder",
|
"name": "Doug Sauder",
|
||||||
"address": "doug@example.com"
|
"address": "doug@example.com"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"message_id": "NDBBIAKOPKHFGPLCODIGGEKECHAA.doug@example.com",
|
"message_id": {
|
||||||
"mime_version": "1.0",
|
"Text": "NDBBIAKOPKHFGPLCODIGGEKECHAA.doug@example.com"
|
||||||
"subject": "Test message from Microsoft Outlook 00",
|
},
|
||||||
|
"date": {
|
||||||
|
"DateTime": {
|
||||||
|
"year": 2000,
|
||||||
|
"month": 5,
|
||||||
|
"day": 17,
|
||||||
|
"hour": 19,
|
||||||
|
"minute": 32,
|
||||||
|
"second": 47,
|
||||||
|
"tz_before_gmt": true,
|
||||||
|
"tz_hour": 4,
|
||||||
|
"tz_minute": 0
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"mime_version": {
|
||||||
|
"Text": "1.0"
|
||||||
|
},
|
||||||
|
"content_type": {
|
||||||
|
"ContentType": {
|
||||||
|
"c_type": "multipart",
|
||||||
|
"c_subtype": "mixed",
|
||||||
|
"attributes": {
|
||||||
|
"boundary": "----=_NextPart_000_0002_01BFC036.AE309650"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
"to": {
|
"to": {
|
||||||
"Address": {
|
"Address": {
|
||||||
"name": "Heinz Müller",
|
"name": "Heinz Müller",
|
||||||
"address": "mueller@example.com"
|
"address": "mueller@example.com"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"content_type": {
|
"subject": {
|
||||||
"c_type": "multipart",
|
"Text": "Test message from Microsoft Outlook 00"
|
||||||
"c_subtype": "mixed",
|
|
||||||
"attributes": {
|
|
||||||
"boundary": "----=_NextPart_000_0002_01BFC036.AE309650"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"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)"
|
|
||||||
]
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"html_body": [
|
"html_body": [
|
||||||
{
|
0
|
||||||
"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>"
|
|
||||||
}
|
|
||||||
],
|
],
|
||||||
"text_body": [
|
"text_body": [
|
||||||
{
|
0
|
||||||
"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"
|
|
||||||
}
|
|
||||||
],
|
],
|
||||||
"attachments": [
|
"attachments": [
|
||||||
|
1,
|
||||||
|
2,
|
||||||
|
3
|
||||||
|
],
|
||||||
|
"parts": [
|
||||||
{
|
{
|
||||||
"Binary": {
|
"Text": {
|
||||||
"header": {
|
"headers_rfc": {
|
||||||
"content_disposition": {
|
"content_transfer_encoding": {
|
||||||
"c_type": "attachment",
|
"Text": "quoted-printable"
|
||||||
"attributes": {
|
|
||||||
"filename": "blueball.png"
|
|
||||||
}
|
|
||||||
},
|
},
|
||||||
"content_transfer_encoding": "base64",
|
|
||||||
"content_type": {
|
"content_type": {
|
||||||
"c_type": "image",
|
"ContentType": {
|
||||||
"c_subtype": "png",
|
"c_type": "text",
|
||||||
"attributes": {
|
"c_subtype": "plain",
|
||||||
"name": "blueball.png"
|
"attributes": {
|
||||||
|
"charset": "iso-8859-1"
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"contents": [
|
"is_encoding_problem": false,
|
||||||
|
"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_rfc": {
|
||||||
|
"content_type": {
|
||||||
|
"ContentType": {
|
||||||
|
"c_type": "image",
|
||||||
|
"c_subtype": "png",
|
||||||
|
"attributes": {
|
||||||
|
"name": "blueball.png"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"content_disposition": {
|
||||||
|
"ContentType": {
|
||||||
|
"c_type": "attachment",
|
||||||
|
"c_subtype": null,
|
||||||
|
"attributes": {
|
||||||
|
"filename": "blueball.png"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"content_transfer_encoding": {
|
||||||
|
"Text": "base64"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"is_encoding_problem": false,
|
||||||
|
"body": [
|
||||||
137,
|
137,
|
||||||
80,
|
80,
|
||||||
78,
|
78,
|
||||||
@@ -1558,23 +1569,31 @@ IFl2ZXMgUGlndWV0NnM7vAAAAABJRU5ErkJggg==
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"Binary": {
|
"Binary": {
|
||||||
"header": {
|
"headers_rfc": {
|
||||||
"content_disposition": {
|
"content_disposition": {
|
||||||
"c_type": "attachment",
|
"ContentType": {
|
||||||
"attributes": {
|
"c_type": "attachment",
|
||||||
"filename": "greenball.png"
|
"c_subtype": null,
|
||||||
|
"attributes": {
|
||||||
|
"filename": "greenball.png"
|
||||||
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"content_transfer_encoding": "base64",
|
|
||||||
"content_type": {
|
"content_type": {
|
||||||
"c_type": "image",
|
"ContentType": {
|
||||||
"c_subtype": "png",
|
"c_type": "image",
|
||||||
"attributes": {
|
"c_subtype": "png",
|
||||||
"name": "greenball.png"
|
"attributes": {
|
||||||
|
"name": "greenball.png"
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
},
|
||||||
|
"content_transfer_encoding": {
|
||||||
|
"Text": "base64"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"contents": [
|
"is_encoding_problem": false,
|
||||||
|
"body": [
|
||||||
137,
|
137,
|
||||||
80,
|
80,
|
||||||
78,
|
78,
|
||||||
@@ -2878,23 +2897,31 @@ IFl2ZXMgUGlndWV0NnM7vAAAAABJRU5ErkJggg==
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"Binary": {
|
"Binary": {
|
||||||
"header": {
|
"headers_rfc": {
|
||||||
"content_disposition": {
|
"content_type": {
|
||||||
"c_type": "attachment",
|
"ContentType": {
|
||||||
"attributes": {
|
"c_type": "image",
|
||||||
"filename": "redball.png"
|
"c_subtype": "png",
|
||||||
|
"attributes": {
|
||||||
|
"name": "redball.png"
|
||||||
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"content_transfer_encoding": "base64",
|
"content_disposition": {
|
||||||
"content_type": {
|
"ContentType": {
|
||||||
"c_type": "image",
|
"c_type": "attachment",
|
||||||
"c_subtype": "png",
|
"c_subtype": null,
|
||||||
"attributes": {
|
"attributes": {
|
||||||
"name": "redball.png"
|
"filename": "redball.png"
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
},
|
||||||
|
"content_transfer_encoding": {
|
||||||
|
"Text": "base64"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"contents": [
|
"is_encoding_problem": false,
|
||||||
|
"body": [
|
||||||
137,
|
137,
|
||||||
80,
|
80,
|
||||||
78,
|
78,
|
||||||
@@ -4351,5 +4378,24 @@ IFl2ZXMgUGlndWV0NnM7vAAAAABJRU5ErkJggg==
|
|||||||
]
|
]
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
]
|
],
|
||||||
|
"structure": {
|
||||||
|
"List": [
|
||||||
|
{
|
||||||
|
"Part": 0
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"Part": 1
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"Part": 2
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"Part": 3
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"offset_header": 0,
|
||||||
|
"offset_body": 547,
|
||||||
|
"offset_end": 7745
|
||||||
}
|
}
|
||||||
+55
-45
@@ -35,67 +35,77 @@ welche also wohl noch ungl=FCcklicher sein m=FCssen als wir."
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
---- EXPECTED STRUCTURE ----
|
---- EXPECTED STRUCTURE ----{
|
||||||
{
|
"headers_rfc": {
|
||||||
"header": {
|
|
||||||
"date": {
|
|
||||||
"year": 2000,
|
|
||||||
"month": 5,
|
|
||||||
"day": 19,
|
|
||||||
"hour": 1,
|
|
||||||
"minute": 6,
|
|
||||||
"second": 18,
|
|
||||||
"tz_before_gmt": true,
|
|
||||||
"tz_hour": 4,
|
|
||||||
"tz_minute": 0
|
|
||||||
},
|
|
||||||
"from": {
|
"from": {
|
||||||
"Address": {
|
"Address": {
|
||||||
"name": "Doug Sauder",
|
"name": "Doug Sauder",
|
||||||
"address": "dwsauder@example.com"
|
"address": "dwsauder@example.com"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"message_id": "4.2.0.58.20000519010441.00a8d140@pop.example.com",
|
"message_id": {
|
||||||
"mime_version": "1.0",
|
"Text": "4.2.0.58.20000519010441.00a8d140@pop.example.com"
|
||||||
"subject": "Die Hasen und die Frösche",
|
},
|
||||||
|
"subject": {
|
||||||
|
"Text": "Die Hasen und die Frösche"
|
||||||
|
},
|
||||||
|
"date": {
|
||||||
|
"DateTime": {
|
||||||
|
"year": 2000,
|
||||||
|
"month": 5,
|
||||||
|
"day": 19,
|
||||||
|
"hour": 1,
|
||||||
|
"minute": 6,
|
||||||
|
"second": 18,
|
||||||
|
"tz_before_gmt": true,
|
||||||
|
"tz_hour": 4,
|
||||||
|
"tz_minute": 0
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"mime_version": {
|
||||||
|
"Text": "1.0"
|
||||||
|
},
|
||||||
"to": {
|
"to": {
|
||||||
"Address": {
|
"Address": {
|
||||||
"name": "Jürgen Schmürgen",
|
"name": "Jürgen Schmürgen",
|
||||||
"address": "jschmuergen@example.com"
|
"address": "jschmuergen@example.com"
|
||||||
}
|
}
|
||||||
},
|
|
||||||
"content_transfer_encoding": "quoted-printable",
|
|
||||||
"content_type": {
|
|
||||||
"c_type": "text",
|
|
||||||
"c_subtype": "plain",
|
|
||||||
"attributes": {
|
|
||||||
"charset": "iso-8859-1",
|
|
||||||
"format": "flowed"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"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)"
|
|
||||||
]
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"html_body": [
|
"html_body": [
|
||||||
{
|
0
|
||||||
"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>"
|
|
||||||
}
|
|
||||||
],
|
],
|
||||||
"text_body": [
|
"text_body": [
|
||||||
|
0
|
||||||
|
],
|
||||||
|
"attachments": [],
|
||||||
|
"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": {
|
||||||
|
"headers_rfc": {
|
||||||
|
"content_transfer_encoding": {
|
||||||
|
"Text": "quoted-printable"
|
||||||
|
},
|
||||||
|
"content_type": {
|
||||||
|
"ContentType": {
|
||||||
|
"c_type": "text",
|
||||||
|
"c_subtype": "plain",
|
||||||
|
"attributes": {
|
||||||
|
"charset": "iso-8859-1",
|
||||||
|
"format": "flowed"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"is_encoding_problem": false,
|
||||||
|
"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
|
||||||
}
|
}
|
||||||
+55
-42
@@ -20,19 +20,16 @@ In einem nahen Teich wollten sie sich nun ers
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
---- EXPECTED STRUCTURE ----
|
---- EXPECTED STRUCTURE ----{
|
||||||
{
|
"headers_rfc": {
|
||||||
"header": {
|
"subject": {
|
||||||
"date": {
|
"Text": "Die Hasen und die Fr�sche"
|
||||||
"year": 2000,
|
},
|
||||||
"month": 5,
|
"to": {
|
||||||
"day": 19,
|
"Address": {
|
||||||
"hour": 1,
|
"name": "Heinz M�ller",
|
||||||
"minute": 10,
|
"address": "mueller@example.com"
|
||||||
"second": 27,
|
}
|
||||||
"tz_before_gmt": true,
|
|
||||||
"tz_hour": 4,
|
|
||||||
"tz_minute": 0
|
|
||||||
},
|
},
|
||||||
"from": {
|
"from": {
|
||||||
"Address": {
|
"Address": {
|
||||||
@@ -40,43 +37,59 @@ In einem nahen Teich wollten sie sich nun ers
|
|||||||
"address": "dwsauder@example.com"
|
"address": "dwsauder@example.com"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"message_id": "4.2.0.58.20000519010842.00a8c7f0@pop.example.com",
|
"date": {
|
||||||
"mime_version": "1.0",
|
"DateTime": {
|
||||||
"subject": "Die Hasen und die Fr�sche",
|
"year": 2000,
|
||||||
"to": {
|
"month": 5,
|
||||||
"Address": {
|
"day": 19,
|
||||||
"name": "Heinz M�ller",
|
"hour": 1,
|
||||||
"address": "mueller@example.com"
|
"minute": 10,
|
||||||
|
"second": 27,
|
||||||
|
"tz_before_gmt": true,
|
||||||
|
"tz_hour": 4,
|
||||||
|
"tz_minute": 0
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"content_transfer_encoding": "8bit",
|
"mime_version": {
|
||||||
"content_type": {
|
"Text": "1.0"
|
||||||
"c_type": "text",
|
|
||||||
"c_subtype": "plain",
|
|
||||||
"attributes": {
|
|
||||||
"charset": "iso-8859-1"
|
|
||||||
}
|
|
||||||
},
|
},
|
||||||
"others": {
|
"message_id": {
|
||||||
"X-Sender": [
|
"Text": "4.2.0.58.20000519010842.00a8c7f0@pop.example.com"
|
||||||
"dwsauder@pop.example.com (Unverified)"
|
|
||||||
],
|
|
||||||
"X-Mailer": [
|
|
||||||
"QUALCOMM Windows Eudora Pro Version 4.2.0.58"
|
|
||||||
],
|
|
||||||
"X-Priority": [
|
|
||||||
"1 (Highest)"
|
|
||||||
]
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"html_body": [
|
"html_body": [
|
||||||
{
|
0
|
||||||
"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>"
|
|
||||||
}
|
|
||||||
],
|
],
|
||||||
"text_body": [
|
"text_body": [
|
||||||
|
0
|
||||||
|
],
|
||||||
|
"attachments": [],
|
||||||
|
"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": {
|
||||||
|
"headers_rfc": {
|
||||||
|
"content_type": {
|
||||||
|
"ContentType": {
|
||||||
|
"c_type": "text",
|
||||||
|
"c_subtype": "plain",
|
||||||
|
"attributes": {
|
||||||
|
"charset": "iso-8859-1"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"content_transfer_encoding": {
|
||||||
|
"Text": "8bit"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"is_encoding_problem": false,
|
||||||
|
"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
|
||||||
}
|
}
|
||||||
+57
-41
@@ -28,19 +28,32 @@ In einem nahen Teich wollten sie sich nun ers=E4ufen; sie eilten ihm zu;=
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
---- EXPECTED STRUCTURE ----
|
---- EXPECTED STRUCTURE ----{
|
||||||
{
|
"headers_rfc": {
|
||||||
"header": {
|
"mime_version": {
|
||||||
|
"Text": "1.0"
|
||||||
|
},
|
||||||
|
"message_id": {
|
||||||
|
"Text": "4.2.0.58.20000519001217.00a85b60@pop.example.com"
|
||||||
|
},
|
||||||
|
"to": {
|
||||||
|
"Address": {
|
||||||
|
"name": "Jürgen Schmürgen",
|
||||||
|
"address": "jschmuergen@example.com"
|
||||||
|
}
|
||||||
|
},
|
||||||
"date": {
|
"date": {
|
||||||
"year": 2000,
|
"DateTime": {
|
||||||
"month": 5,
|
"year": 2000,
|
||||||
"day": 19,
|
"month": 5,
|
||||||
"hour": 0,
|
"day": 19,
|
||||||
"minute": 17,
|
"hour": 0,
|
||||||
"second": 39,
|
"minute": 17,
|
||||||
"tz_before_gmt": true,
|
"second": 39,
|
||||||
"tz_hour": 4,
|
"tz_before_gmt": true,
|
||||||
"tz_minute": 0
|
"tz_hour": 4,
|
||||||
|
"tz_minute": 0
|
||||||
|
}
|
||||||
},
|
},
|
||||||
"from": {
|
"from": {
|
||||||
"Address": {
|
"Address": {
|
||||||
@@ -48,40 +61,43 @@ In einem nahen Teich wollten sie sich nun ers=E4ufen; sie eilten ihm zu;=
|
|||||||
"address": "dwsauder@example.com"
|
"address": "dwsauder@example.com"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"message_id": "4.2.0.58.20000519001217.00a85b60@pop.example.com",
|
"subject": {
|
||||||
"mime_version": "1.0",
|
"Text": "Die Hasen und die Frösche"
|
||||||
"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"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"others": {
|
|
||||||
"X-Mailer": [
|
|
||||||
"QUALCOMM Windows Eudora Pro Version 4.2.0.58"
|
|
||||||
],
|
|
||||||
"X-Sender": [
|
|
||||||
"dwsauder@pop.example.com (Unverified)"
|
|
||||||
]
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"html_body": [
|
"html_body": [
|
||||||
{
|
0
|
||||||
"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>"
|
|
||||||
}
|
|
||||||
],
|
],
|
||||||
"text_body": [
|
"text_body": [
|
||||||
|
0
|
||||||
|
],
|
||||||
|
"attachments": [],
|
||||||
|
"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": {
|
||||||
|
"headers_rfc": {
|
||||||
|
"content_transfer_encoding": {
|
||||||
|
"Text": "quoted-printable"
|
||||||
|
},
|
||||||
|
"content_type": {
|
||||||
|
"ContentType": {
|
||||||
|
"c_type": "text",
|
||||||
|
"c_subtype": "plain",
|
||||||
|
"attributes": {
|
||||||
|
"charset": "iso-8859-1"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"is_encoding_problem": false,
|
||||||
|
"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
|
||||||
}
|
}
|
||||||
+56
-49
@@ -29,19 +29,29 @@ sie aufs schnellste untertauchten.=20
|
|||||||
ein wenig aufschieben, denn auch uns f=FCrchten, wie ihr seht, einige =
|
ein wenig aufschieben, denn auch uns f=FCrchten, wie ihr seht, einige =
|
||||||
Tiere, welche also wohl noch ungl=FCcklicher sein m=FCssen als wir."=20
|
Tiere, welche also wohl noch ungl=FCcklicher sein m=FCssen als wir."=20
|
||||||
|
|
||||||
---- EXPECTED STRUCTURE ----
|
---- EXPECTED STRUCTURE ----{
|
||||||
{
|
"headers_rfc": {
|
||||||
"header": {
|
"to": {
|
||||||
|
"Address": {
|
||||||
|
"name": "Heinz Müller",
|
||||||
|
"address": "mueller@example.com"
|
||||||
|
}
|
||||||
|
},
|
||||||
"date": {
|
"date": {
|
||||||
"year": 2000,
|
"DateTime": {
|
||||||
"month": 5,
|
"year": 2000,
|
||||||
"day": 17,
|
"month": 5,
|
||||||
"hour": 19,
|
"day": 17,
|
||||||
"minute": 30,
|
"hour": 19,
|
||||||
"second": 20,
|
"minute": 30,
|
||||||
"tz_before_gmt": true,
|
"second": 20,
|
||||||
"tz_hour": 4,
|
"tz_before_gmt": true,
|
||||||
"tz_minute": 0
|
"tz_hour": 4,
|
||||||
|
"tz_minute": 0
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"message_id": {
|
||||||
|
"Text": "NDBBIAKOPKHFGPLCODIGCEKECHAA.doug@example.com"
|
||||||
},
|
},
|
||||||
"from": {
|
"from": {
|
||||||
"Address": {
|
"Address": {
|
||||||
@@ -49,49 +59,46 @@ Tiere, welche also wohl noch ungl=FCcklicher sein m=FCssen als wir."=20
|
|||||||
"address": "doug@example.com"
|
"address": "doug@example.com"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"message_id": "NDBBIAKOPKHFGPLCODIGCEKECHAA.doug@example.com",
|
"mime_version": {
|
||||||
"mime_version": "1.0",
|
"Text": "1.0"
|
||||||
"subject": "Die Hasen und die Frösche (Microsoft Outlook 00)",
|
|
||||||
"to": {
|
|
||||||
"Address": {
|
|
||||||
"name": "Heinz Müller",
|
|
||||||
"address": "mueller@example.com"
|
|
||||||
}
|
|
||||||
},
|
},
|
||||||
"content_transfer_encoding": "quoted-printable",
|
"subject": {
|
||||||
"content_type": {
|
"Text": "Die Hasen und die Frösche (Microsoft Outlook 00)"
|
||||||
"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": [
|
"html_body": [
|
||||||
{
|
0
|
||||||
"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>"
|
|
||||||
}
|
|
||||||
],
|
],
|
||||||
"text_body": [
|
"text_body": [
|
||||||
|
0
|
||||||
|
],
|
||||||
|
"attachments": [],
|
||||||
|
"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": {
|
||||||
|
"headers_rfc": {
|
||||||
|
"content_transfer_encoding": {
|
||||||
|
"Text": "quoted-printable"
|
||||||
|
},
|
||||||
|
"content_type": {
|
||||||
|
"ContentType": {
|
||||||
|
"c_type": "text",
|
||||||
|
"c_subtype": "plain",
|
||||||
|
"attributes": {
|
||||||
|
"charset": "Windows-1252"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"is_encoding_problem": false,
|
||||||
|
"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
|
||||||
}
|
}
|
||||||
+52
-45
@@ -30,19 +30,29 @@ wenig aufschieben, denn auch uns f
|
|||||||
welche also wohl noch unglücklicher sein müssen als wir."
|
welche also wohl noch unglücklicher sein müssen als wir."
|
||||||
|
|
||||||
|
|
||||||
---- EXPECTED STRUCTURE ----
|
---- EXPECTED STRUCTURE ----{
|
||||||
{
|
"headers_rfc": {
|
||||||
"header": {
|
"message_id": {
|
||||||
|
"Text": "NDBBIAKOPKHFGPLCODIGEEKCCHAA.doug@example.com"
|
||||||
|
},
|
||||||
|
"mime_version": {
|
||||||
|
"Text": "1.0"
|
||||||
|
},
|
||||||
"date": {
|
"date": {
|
||||||
"year": 2000,
|
"DateTime": {
|
||||||
"month": 5,
|
"year": 2000,
|
||||||
"day": 17,
|
"month": 5,
|
||||||
"hour": 19,
|
"day": 17,
|
||||||
"minute": 13,
|
"hour": 19,
|
||||||
"second": 51,
|
"minute": 13,
|
||||||
"tz_before_gmt": true,
|
"second": 51,
|
||||||
"tz_hour": 4,
|
"tz_before_gmt": true,
|
||||||
"tz_minute": 0
|
"tz_hour": 4,
|
||||||
|
"tz_minute": 0
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"subject": {
|
||||||
|
"Text": "Die Hasen und die Frösche (Microsoft Outlook 00)"
|
||||||
},
|
},
|
||||||
"from": {
|
"from": {
|
||||||
"Address": {
|
"Address": {
|
||||||
@@ -50,49 +60,46 @@ welche also wohl noch ungl
|
|||||||
"address": "doug@example.com"
|
"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": {
|
"to": {
|
||||||
"Address": {
|
"Address": {
|
||||||
"name": "Jürgen Schmürgen",
|
"name": "Jürgen Schmürgen",
|
||||||
"address": "schmuergen@example.com"
|
"address": "schmuergen@example.com"
|
||||||
}
|
}
|
||||||
},
|
|
||||||
"content_transfer_encoding": "8bit",
|
|
||||||
"content_type": {
|
|
||||||
"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)"
|
|
||||||
],
|
|
||||||
"Importance": [
|
|
||||||
"Normal"
|
|
||||||
],
|
|
||||||
"X-Priority": [
|
|
||||||
"3 (Normal)"
|
|
||||||
],
|
|
||||||
"X-MSMail-Priority": [
|
|
||||||
"Normal"
|
|
||||||
],
|
|
||||||
"X-MimeOLE": [
|
|
||||||
"Produced By Microsoft MimeOLE V5.00.2314.1300"
|
|
||||||
]
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"html_body": [
|
"html_body": [
|
||||||
{
|
0
|
||||||
"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>"
|
|
||||||
}
|
|
||||||
],
|
],
|
||||||
"text_body": [
|
"text_body": [
|
||||||
|
0
|
||||||
|
],
|
||||||
|
"attachments": [],
|
||||||
|
"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": {
|
||||||
|
"headers_rfc": {
|
||||||
|
"content_transfer_encoding": {
|
||||||
|
"Text": "8bit"
|
||||||
|
},
|
||||||
|
"content_type": {
|
||||||
|
"ContentType": {
|
||||||
|
"c_type": "text",
|
||||||
|
"c_subtype": "plain",
|
||||||
|
"attributes": {
|
||||||
|
"charset": "iso-8859-1"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"is_encoding_problem": false,
|
||||||
|
"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
|
||||||
}
|
}
|
||||||
+89
-65
@@ -71,88 +71,112 @@ race. =20
|
|||||||
|
|
||||||
------=_NextPart_000_0005_01BFC037.799BEF60--
|
------=_NextPart_000_0005_01BFC037.799BEF60--
|
||||||
|
|
||||||
---- EXPECTED STRUCTURE ----
|
---- EXPECTED STRUCTURE ----{
|
||||||
{
|
"headers_rfc": {
|
||||||
"header": {
|
|
||||||
"date": {
|
|
||||||
"year": 2000,
|
|
||||||
"month": 5,
|
|
||||||
"day": 17,
|
|
||||||
"hour": 19,
|
|
||||||
"minute": 38,
|
|
||||||
"second": 28,
|
|
||||||
"tz_before_gmt": true,
|
|
||||||
"tz_hour": 4,
|
|
||||||
"tz_minute": 0
|
|
||||||
},
|
|
||||||
"from": {
|
"from": {
|
||||||
"Address": {
|
"Address": {
|
||||||
"name": "Doug Sauder",
|
"name": "Doug Sauder",
|
||||||
"address": "doug@example.com"
|
"address": "doug@example.com"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"message_id": "NDBBIAKOPKHFGPLCODIGCEKFCHAA.doug@example.com",
|
"message_id": {
|
||||||
"mime_version": "1.0",
|
"Text": "NDBBIAKOPKHFGPLCODIGCEKFCHAA.doug@example.com"
|
||||||
"subject": "Test message from Microsoft Outlook 00",
|
},
|
||||||
|
"mime_version": {
|
||||||
|
"Text": "1.0"
|
||||||
|
},
|
||||||
|
"subject": {
|
||||||
|
"Text": "Test message from Microsoft Outlook 00"
|
||||||
|
},
|
||||||
|
"date": {
|
||||||
|
"DateTime": {
|
||||||
|
"year": 2000,
|
||||||
|
"month": 5,
|
||||||
|
"day": 17,
|
||||||
|
"hour": 19,
|
||||||
|
"minute": 38,
|
||||||
|
"second": 28,
|
||||||
|
"tz_before_gmt": true,
|
||||||
|
"tz_hour": 4,
|
||||||
|
"tz_minute": 0
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"content_type": {
|
||||||
|
"ContentType": {
|
||||||
|
"c_type": "multipart",
|
||||||
|
"c_subtype": "alternative",
|
||||||
|
"attributes": {
|
||||||
|
"boundary": "----=_NextPart_000_0005_01BFC037.799BEF60"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
"to": {
|
"to": {
|
||||||
"Address": {
|
"Address": {
|
||||||
"name": "Joe Blow",
|
"name": "Joe Blow",
|
||||||
"address": "jblow@example.com"
|
"address": "jblow@example.com"
|
||||||
}
|
}
|
||||||
},
|
|
||||||
"content_type": {
|
|
||||||
"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": [
|
"html_body": [
|
||||||
{
|
1
|
||||||
"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> <BR>A HARE \none day ridiculed the short feet and slow pace of the Tortoise, who replied, \nlaughing: \"Though you be swift as the wind, I will beat you in a \nrace.\" 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. On the day appointed for the race the two started \ntogether. The Tortoise never for a moment stopped, but went on with a slow \nbut steady pace straight to the end of the course. The Hare, lying down by \nthe wayside, fell fast asleep. 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. <BR> <BR>Slow but steady wins the race. \n<BR></FONT></DIV></BODY></HTML>\n"
|
|
||||||
}
|
|
||||||
],
|
],
|
||||||
"text_body": [
|
"text_body": [
|
||||||
|
0
|
||||||
|
],
|
||||||
|
"attachments": [],
|
||||||
|
"parts": [
|
||||||
{
|
{
|
||||||
"header": {
|
"Text": {
|
||||||
"content_transfer_encoding": "quoted-printable",
|
"headers_rfc": {
|
||||||
"content_type": {
|
"content_type": {
|
||||||
"c_type": "text",
|
"ContentType": {
|
||||||
"c_subtype": "plain",
|
"c_type": "text",
|
||||||
"attributes": {
|
"c_subtype": "plain",
|
||||||
"charset": "iso-8859-1"
|
"attributes": {
|
||||||
|
"charset": "iso-8859-1"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"content_transfer_encoding": {
|
||||||
|
"Text": "quoted-printable"
|
||||||
}
|
}
|
||||||
}
|
},
|
||||||
},
|
"is_encoding_problem": false,
|
||||||
"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_rfc": {
|
||||||
|
"content_type": {
|
||||||
|
"ContentType": {
|
||||||
|
"c_type": "text",
|
||||||
|
"c_subtype": "html",
|
||||||
|
"attributes": {
|
||||||
|
"charset": "iso-8859-1"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"content_transfer_encoding": {
|
||||||
|
"Text": "quoted-printable"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"is_encoding_problem": false,
|
||||||
|
"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> <BR>A HARE \none day ridiculed the short feet and slow pace of the Tortoise, who replied, \nlaughing: \"Though you be swift as the wind, I will beat you in a \nrace.\" 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. On the day appointed for the race the two started \ntogether. The Tortoise never for a moment stopped, but went on with a slow \nbut steady pace straight to the end of the course. The Hare, lying down by \nthe wayside, fell fast asleep. 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. <BR> <BR>Slow but steady wins the race. \n<BR></FONT></DIV></BODY></HTML>\n"
|
||||||
|
}
|
||||||
}
|
}
|
||||||
]
|
],
|
||||||
|
"structure": {
|
||||||
|
"List": [
|
||||||
|
{
|
||||||
|
"Part": 0
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"Part": 1
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"offset_header": 0,
|
||||||
|
"offset_body": 530,
|
||||||
|
"offset_end": 2901
|
||||||
}
|
}
|
||||||
+237
-111
@@ -197,29 +197,27 @@ bGlwMmdpZiB2LjAuNiBieSBZdmVzIFBpZ3VldDZzO7wAAAAASUVORK5CYII=
|
|||||||
--=====================_715392540==_--
|
--=====================_715392540==_--
|
||||||
|
|
||||||
|
|
||||||
---- EXPECTED STRUCTURE ----
|
---- EXPECTED STRUCTURE ----{
|
||||||
{
|
"headers_rfc": {
|
||||||
"header": {
|
"mime_version": {
|
||||||
"date": {
|
"Text": "1.0"
|
||||||
"year": 2000,
|
|
||||||
"month": 5,
|
|
||||||
"day": 19,
|
|
||||||
"hour": 0,
|
|
||||||
"minute": 36,
|
|
||||||
"second": 58,
|
|
||||||
"tz_before_gmt": true,
|
|
||||||
"tz_hour": 4,
|
|
||||||
"tz_minute": 0
|
|
||||||
},
|
},
|
||||||
"from": {
|
"date": {
|
||||||
"Address": {
|
"DateTime": {
|
||||||
"name": "Doug Sauder",
|
"year": 2000,
|
||||||
"address": "dwsauder@example.com"
|
"month": 5,
|
||||||
|
"day": 19,
|
||||||
|
"hour": 0,
|
||||||
|
"minute": 36,
|
||||||
|
"second": 58,
|
||||||
|
"tz_before_gmt": true,
|
||||||
|
"tz_hour": 4,
|
||||||
|
"tz_minute": 0
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"message_id": "4.2.0.58.20000519003556.00a918e0@pop.example.com",
|
"message_id": {
|
||||||
"mime_version": "1.0",
|
"Text": "4.2.0.58.20000519003556.00a918e0@pop.example.com"
|
||||||
"subject": "Die Hasen und die Frösche",
|
},
|
||||||
"to": {
|
"to": {
|
||||||
"Address": {
|
"Address": {
|
||||||
"name": "Heinz Müller",
|
"name": "Heinz Müller",
|
||||||
@@ -227,75 +225,138 @@ bGlwMmdpZiB2LjAuNiBieSBZdmVzIFBpZ3VldDZzO7wAAAAASUVORK5CYII=
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"content_type": {
|
"content_type": {
|
||||||
"c_type": "multipart",
|
"ContentType": {
|
||||||
"c_subtype": "mixed",
|
"c_type": "multipart",
|
||||||
"attributes": {
|
"c_subtype": "mixed",
|
||||||
"boundary": "=====================_715392540==_"
|
"attributes": {
|
||||||
|
"boundary": "=====================_715392540==_"
|
||||||
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"others": {
|
"from": {
|
||||||
"X-Sender": [
|
"Address": {
|
||||||
"dwsauder@pop.example.com (Unverified)"
|
"name": "Doug Sauder",
|
||||||
],
|
"address": "dwsauder@example.com"
|
||||||
"X-Mailer": [
|
}
|
||||||
"QUALCOMM Windows Eudora Pro Version 4.2.0.58"
|
},
|
||||||
],
|
"subject": {
|
||||||
"X-Priority": [
|
"Text": "Die Hasen und die Frösche"
|
||||||
"2 (High)"
|
|
||||||
]
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"html_body": [
|
"html_body": [
|
||||||
{
|
3
|
||||||
"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; "wir leben", sprach ein Redner, "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." <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"Halt", rief nun eben dieser Sprecher, "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." <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"
|
|
||||||
}
|
|
||||||
],
|
],
|
||||||
"text_body": [
|
"text_body": [
|
||||||
{
|
2
|
||||||
"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"
|
|
||||||
}
|
|
||||||
],
|
],
|
||||||
"attachments": [
|
"attachments": [
|
||||||
|
4,
|
||||||
|
5,
|
||||||
|
6,
|
||||||
|
7
|
||||||
|
],
|
||||||
|
"parts": [
|
||||||
{
|
{
|
||||||
"Binary": {
|
"Multipart": {
|
||||||
"header": {
|
"headers_rfc": {
|
||||||
"content_disposition": {
|
|
||||||
"c_type": "inline",
|
|
||||||
"attributes": {
|
|
||||||
"filename": "2aa3ed95.png"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"content_id": "4.2.0.58.20000519003556.00a918e0@pop.example.com.2",
|
|
||||||
"content_transfer_encoding": "base64",
|
|
||||||
"content_type": {
|
"content_type": {
|
||||||
"c_type": "image",
|
"ContentType": {
|
||||||
"c_subtype": "png",
|
"c_type": "multipart",
|
||||||
"attributes": {
|
"c_subtype": "related",
|
||||||
"name": "2aa3ed95.png"
|
"attributes": {
|
||||||
|
"type": "multipart/alternative",
|
||||||
|
"boundary": "=====================_715392540==_.REL"
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"Multipart": {
|
||||||
|
"headers_rfc": {
|
||||||
|
"content_type": {
|
||||||
|
"ContentType": {
|
||||||
|
"c_type": "multipart",
|
||||||
|
"c_subtype": "alternative",
|
||||||
|
"attributes": {
|
||||||
|
"boundary": "=====================_715392550==_.ALT"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"Text": {
|
||||||
|
"headers_rfc": {
|
||||||
|
"content_type": {
|
||||||
|
"ContentType": {
|
||||||
|
"c_type": "text",
|
||||||
|
"c_subtype": "plain",
|
||||||
|
"attributes": {
|
||||||
|
"charset": "iso-8859-1"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"content_transfer_encoding": {
|
||||||
|
"Text": "quoted-printable"
|
||||||
|
}
|
||||||
},
|
},
|
||||||
"contents": [
|
"is_encoding_problem": false,
|
||||||
|
"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_rfc": {
|
||||||
|
"content_type": {
|
||||||
|
"ContentType": {
|
||||||
|
"c_type": "text",
|
||||||
|
"c_subtype": "html",
|
||||||
|
"attributes": {
|
||||||
|
"charset": "iso-8859-1"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"content_transfer_encoding": {
|
||||||
|
"Text": "quoted-printable"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"is_encoding_problem": false,
|
||||||
|
"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; "wir leben", sprach ein Redner, "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." <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"Halt", rief nun eben dieser Sprecher, "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." <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_rfc": {
|
||||||
|
"content_disposition": {
|
||||||
|
"ContentType": {
|
||||||
|
"c_type": "inline",
|
||||||
|
"c_subtype": null,
|
||||||
|
"attributes": {
|
||||||
|
"filename": "2aa3ed95.png"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"content_transfer_encoding": {
|
||||||
|
"Text": "base64"
|
||||||
|
},
|
||||||
|
"content_type": {
|
||||||
|
"ContentType": {
|
||||||
|
"c_type": "image",
|
||||||
|
"c_subtype": "png",
|
||||||
|
"attributes": {
|
||||||
|
"name": "2aa3ed95.png"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"content_id": {
|
||||||
|
"Text": "4.2.0.58.20000519003556.00a918e0@pop.example.com.2"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"is_encoding_problem": false,
|
||||||
|
"body": [
|
||||||
137,
|
137,
|
||||||
80,
|
80,
|
||||||
78,
|
78,
|
||||||
@@ -1626,24 +1687,34 @@ bGlwMmdpZiB2LjAuNiBieSBZdmVzIFBpZ3VldDZzO7wAAAAASUVORK5CYII=
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"Binary": {
|
"Binary": {
|
||||||
"header": {
|
"headers_rfc": {
|
||||||
"content_disposition": {
|
"content_type": {
|
||||||
"c_type": "inline",
|
"ContentType": {
|
||||||
"attributes": {
|
"c_type": "image",
|
||||||
"filename": "2aa3edd1.png"
|
"c_subtype": "png",
|
||||||
|
"attributes": {
|
||||||
|
"name": "2aa3edd1.png"
|
||||||
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"content_id": "4.2.0.58.20000519003556.00a918e0@pop.example.com.3",
|
"content_disposition": {
|
||||||
"content_transfer_encoding": "base64",
|
"ContentType": {
|
||||||
"content_type": {
|
"c_type": "inline",
|
||||||
"c_type": "image",
|
"c_subtype": null,
|
||||||
"c_subtype": "png",
|
"attributes": {
|
||||||
"attributes": {
|
"filename": "2aa3edd1.png"
|
||||||
"name": "2aa3edd1.png"
|
}
|
||||||
}
|
}
|
||||||
|
},
|
||||||
|
"content_transfer_encoding": {
|
||||||
|
"Text": "base64"
|
||||||
|
},
|
||||||
|
"content_id": {
|
||||||
|
"Text": "4.2.0.58.20000519003556.00a918e0@pop.example.com.3"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"contents": [
|
"is_encoding_problem": false,
|
||||||
|
"body": [
|
||||||
137,
|
137,
|
||||||
80,
|
80,
|
||||||
78,
|
78,
|
||||||
@@ -3102,23 +3173,31 @@ bGlwMmdpZiB2LjAuNiBieSBZdmVzIFBpZ3VldDZzO7wAAAAASUVORK5CYII=
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"Binary": {
|
"Binary": {
|
||||||
"header": {
|
"headers_rfc": {
|
||||||
"content_disposition": {
|
"content_disposition": {
|
||||||
"c_type": "attachment",
|
"ContentType": {
|
||||||
"attributes": {
|
"c_type": "attachment",
|
||||||
"filename": "blueball.png"
|
"c_subtype": null,
|
||||||
|
"attributes": {
|
||||||
|
"filename": "blueball.png"
|
||||||
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"content_transfer_encoding": "base64",
|
|
||||||
"content_type": {
|
"content_type": {
|
||||||
"c_type": "image",
|
"ContentType": {
|
||||||
"c_subtype": "png",
|
"c_type": "image",
|
||||||
"attributes": {
|
"c_subtype": "png",
|
||||||
"name": "blueball.png"
|
"attributes": {
|
||||||
|
"name": "blueball.png"
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
},
|
||||||
|
"content_transfer_encoding": {
|
||||||
|
"Text": "base64"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"contents": [
|
"is_encoding_problem": false,
|
||||||
|
"body": [
|
||||||
137,
|
137,
|
||||||
80,
|
80,
|
||||||
78,
|
78,
|
||||||
@@ -4449,23 +4528,31 @@ bGlwMmdpZiB2LjAuNiBieSBZdmVzIFBpZ3VldDZzO7wAAAAASUVORK5CYII=
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"Binary": {
|
"Binary": {
|
||||||
"header": {
|
"headers_rfc": {
|
||||||
"content_disposition": {
|
"content_type": {
|
||||||
"c_type": "attachment",
|
"ContentType": {
|
||||||
"attributes": {
|
"c_type": "image",
|
||||||
"filename": "greenball.png"
|
"c_subtype": "png",
|
||||||
|
"attributes": {
|
||||||
|
"name": "greenball.png"
|
||||||
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"content_transfer_encoding": "base64",
|
"content_transfer_encoding": {
|
||||||
"content_type": {
|
"Text": "base64"
|
||||||
"c_type": "image",
|
},
|
||||||
"c_subtype": "png",
|
"content_disposition": {
|
||||||
"attributes": {
|
"ContentType": {
|
||||||
"name": "greenball.png"
|
"c_type": "attachment",
|
||||||
|
"c_subtype": null,
|
||||||
|
"attributes": {
|
||||||
|
"filename": "greenball.png"
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"contents": [
|
"is_encoding_problem": false,
|
||||||
|
"body": [
|
||||||
137,
|
137,
|
||||||
80,
|
80,
|
||||||
78,
|
78,
|
||||||
@@ -5767,5 +5854,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
|
||||||
}
|
}
|
||||||
+107
-70
@@ -94,19 +94,16 @@ JB@ac)(GTFLiL)!d09'8!!!:
|
|||||||
--=====================_716373961==_--
|
--=====================_716373961==_--
|
||||||
|
|
||||||
|
|
||||||
---- EXPECTED STRUCTURE ----
|
---- EXPECTED STRUCTURE ----{
|
||||||
{
|
"headers_rfc": {
|
||||||
"header": {
|
"content_type": {
|
||||||
"date": {
|
"ContentType": {
|
||||||
"year": 2000,
|
"c_type": "multipart",
|
||||||
"month": 5,
|
"c_subtype": "mixed",
|
||||||
"day": 19,
|
"attributes": {
|
||||||
"hour": 0,
|
"boundary": "=====================_716373961==_"
|
||||||
"minute": 53,
|
}
|
||||||
"second": 25,
|
}
|
||||||
"tz_before_gmt": true,
|
|
||||||
"tz_hour": 4,
|
|
||||||
"tz_minute": 0
|
|
||||||
},
|
},
|
||||||
"from": {
|
"from": {
|
||||||
"Address": {
|
"Address": {
|
||||||
@@ -114,70 +111,90 @@ JB@ac)(GTFLiL)!d09'8!!!:
|
|||||||
"address": "dwsauder@example.com"
|
"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": {
|
"to": {
|
||||||
"Address": {
|
"Address": {
|
||||||
"name": "Jürgen Schmürgen",
|
"name": "Jürgen Schmürgen",
|
||||||
"address": "jschmuergen@example.com"
|
"address": "jschmuergen@example.com"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"content_type": {
|
"mime_version": {
|
||||||
"c_type": "multipart",
|
"Text": "1.0"
|
||||||
"c_subtype": "mixed",
|
},
|
||||||
"attributes": {
|
"message_id": {
|
||||||
"boundary": "=====================_716373961==_"
|
"Text": "4.2.0.58.20000519005150.00a85230@pop.example.com"
|
||||||
|
},
|
||||||
|
"date": {
|
||||||
|
"DateTime": {
|
||||||
|
"year": 2000,
|
||||||
|
"month": 5,
|
||||||
|
"day": 19,
|
||||||
|
"hour": 0,
|
||||||
|
"minute": 53,
|
||||||
|
"second": 25,
|
||||||
|
"tz_before_gmt": true,
|
||||||
|
"tz_hour": 4,
|
||||||
|
"tz_minute": 0
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"others": {
|
"subject": {
|
||||||
"X-Mailer": [
|
"Text": "Die Hasen und die Frösche"
|
||||||
"QUALCOMM Windows Eudora Pro Version 4.2.0.58"
|
|
||||||
],
|
|
||||||
"X-Sender": [
|
|
||||||
"dwsauder@pop.example.com (Unverified)"
|
|
||||||
]
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"html_body": [
|
"html_body": [
|
||||||
{
|
0
|
||||||
"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>"
|
|
||||||
}
|
|
||||||
],
|
],
|
||||||
"text_body": [
|
"text_body": [
|
||||||
{
|
0
|
||||||
"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"
|
|
||||||
}
|
|
||||||
],
|
],
|
||||||
"attachments": [
|
"attachments": [
|
||||||
|
1,
|
||||||
|
2
|
||||||
|
],
|
||||||
|
"parts": [
|
||||||
{
|
{
|
||||||
"Binary": {
|
"Text": {
|
||||||
"header": {
|
"headers_rfc": {
|
||||||
"content_disposition": {
|
"content_transfer_encoding": {
|
||||||
"c_type": "attachment",
|
"Text": "quoted-printable"
|
||||||
"attributes": {
|
|
||||||
"filename": "blueball.png"
|
|
||||||
}
|
|
||||||
},
|
},
|
||||||
"content_type": {
|
"content_type": {
|
||||||
"c_type": "application",
|
"ContentType": {
|
||||||
"c_subtype": "mac-binhex40",
|
"c_type": "text",
|
||||||
"attributes": {
|
"c_subtype": "plain",
|
||||||
"name": "blueball.png"
|
"attributes": {
|
||||||
|
"charset": "iso-8859-1"
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"contents": [
|
"is_encoding_problem": false,
|
||||||
|
"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_rfc": {
|
||||||
|
"content_disposition": {
|
||||||
|
"ContentType": {
|
||||||
|
"c_type": "attachment",
|
||||||
|
"c_subtype": null,
|
||||||
|
"attributes": {
|
||||||
|
"filename": "blueball.png"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"content_type": {
|
||||||
|
"ContentType": {
|
||||||
|
"c_type": "application",
|
||||||
|
"c_subtype": "mac-binhex40",
|
||||||
|
"attributes": {
|
||||||
|
"name": "blueball.png"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"is_encoding_problem": false,
|
||||||
|
"body": [
|
||||||
13,
|
13,
|
||||||
10,
|
10,
|
||||||
40,
|
40,
|
||||||
@@ -2106,29 +2123,34 @@ JB@ac)(GTFLiL)!d09'8!!!:
|
|||||||
33,
|
33,
|
||||||
58,
|
58,
|
||||||
13,
|
13,
|
||||||
10,
|
10
|
||||||
13
|
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"Binary": {
|
"Binary": {
|
||||||
"header": {
|
"headers_rfc": {
|
||||||
"content_disposition": {
|
"content_disposition": {
|
||||||
"c_type": "attachment",
|
"ContentType": {
|
||||||
"attributes": {
|
"c_type": "attachment",
|
||||||
"filename": "HasenundFr�sche.txt"
|
"c_subtype": null,
|
||||||
|
"attributes": {
|
||||||
|
"filename": "HasenundFr�sche.txt"
|
||||||
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"content_type": {
|
"content_type": {
|
||||||
"c_type": "application",
|
"ContentType": {
|
||||||
"c_subtype": "mac-binhex40",
|
"c_type": "application",
|
||||||
"attributes": {
|
"c_subtype": "mac-binhex40",
|
||||||
"name": "HasenundFr�sche.txt"
|
"attributes": {
|
||||||
|
"name": "HasenundFr�sche.txt"
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"contents": [
|
"is_encoding_problem": false,
|
||||||
|
"body": [
|
||||||
13,
|
13,
|
||||||
10,
|
10,
|
||||||
40,
|
40,
|
||||||
@@ -3259,10 +3281,25 @@ JB@ac)(GTFLiL)!d09'8!!!:
|
|||||||
33,
|
33,
|
||||||
58,
|
58,
|
||||||
13,
|
13,
|
||||||
10,
|
10
|
||||||
13
|
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
]
|
],
|
||||||
|
"structure": {
|
||||||
|
"List": [
|
||||||
|
{
|
||||||
|
"Part": 0
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"Part": 1
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"Part": 2
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"offset_header": 0,
|
||||||
|
"offset_body": 491,
|
||||||
|
"offset_end": 4869
|
||||||
}
|
}
|
||||||
+113
-74
@@ -101,90 +101,107 @@ end
|
|||||||
--=====================_716177458==_--
|
--=====================_716177458==_--
|
||||||
|
|
||||||
|
|
||||||
---- EXPECTED STRUCTURE ----
|
---- EXPECTED STRUCTURE ----{
|
||||||
{
|
"headers_rfc": {
|
||||||
"header": {
|
|
||||||
"date": {
|
|
||||||
"year": 2000,
|
|
||||||
"month": 5,
|
|
||||||
"day": 19,
|
|
||||||
"hour": 0,
|
|
||||||
"minute": 50,
|
|
||||||
"second": 8,
|
|
||||||
"tz_before_gmt": true,
|
|
||||||
"tz_hour": 4,
|
|
||||||
"tz_minute": 0
|
|
||||||
},
|
|
||||||
"from": {
|
"from": {
|
||||||
"Address": {
|
"Address": {
|
||||||
"name": "Doug Sauder",
|
"name": "Doug Sauder",
|
||||||
"address": "dwsauder@example.com"
|
"address": "dwsauder@example.com"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"message_id": "4.2.0.58.20000519004755.00a86100@pop.example.com",
|
"mime_version": {
|
||||||
"mime_version": "1.0",
|
"Text": "1.0"
|
||||||
"subject": "The Hare and the Tortoise",
|
},
|
||||||
|
"date": {
|
||||||
|
"DateTime": {
|
||||||
|
"year": 2000,
|
||||||
|
"month": 5,
|
||||||
|
"day": 19,
|
||||||
|
"hour": 0,
|
||||||
|
"minute": 50,
|
||||||
|
"second": 8,
|
||||||
|
"tz_before_gmt": true,
|
||||||
|
"tz_hour": 4,
|
||||||
|
"tz_minute": 0
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"message_id": {
|
||||||
|
"Text": "4.2.0.58.20000519004755.00a86100@pop.example.com"
|
||||||
|
},
|
||||||
"to": {
|
"to": {
|
||||||
"Address": {
|
"Address": {
|
||||||
"name": "J�rgen Schm�rgen",
|
"name": "J�rgen Schm�rgen",
|
||||||
"address": "jschmuergen@example.com"
|
"address": "jschmuergen@example.com"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"content_type": {
|
"subject": {
|
||||||
"c_type": "multipart",
|
"Text": "The Hare and the Tortoise"
|
||||||
"c_subtype": "mixed",
|
|
||||||
"attributes": {
|
|
||||||
"boundary": "=====================_716177458==_"
|
|
||||||
}
|
|
||||||
},
|
},
|
||||||
"others": {
|
"content_type": {
|
||||||
"X-Sender": [
|
"ContentType": {
|
||||||
"dwsauder@pop.example.com (Unverified)"
|
"c_type": "multipart",
|
||||||
],
|
"c_subtype": "mixed",
|
||||||
"X-Mailer": [
|
"attributes": {
|
||||||
"QUALCOMM Windows Eudora Pro Version 4.2.0.58"
|
"boundary": "=====================_716177458==_"
|
||||||
]
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"html_body": [
|
"html_body": [
|
||||||
{
|
0
|
||||||
"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>"
|
|
||||||
}
|
|
||||||
],
|
],
|
||||||
"text_body": [
|
"text_body": [
|
||||||
{
|
0
|
||||||
"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"
|
|
||||||
}
|
|
||||||
],
|
],
|
||||||
"attachments": [
|
"attachments": [
|
||||||
|
1,
|
||||||
|
2
|
||||||
|
],
|
||||||
|
"parts": [
|
||||||
{
|
{
|
||||||
"Binary": {
|
"Text": {
|
||||||
"header": {
|
"headers_rfc": {
|
||||||
"content_disposition": {
|
|
||||||
"c_type": "attachment",
|
|
||||||
"attributes": {
|
|
||||||
"filename": "greenball.png"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"content_transfer_encoding": "x-uuencode",
|
|
||||||
"content_type": {
|
"content_type": {
|
||||||
"c_type": "image",
|
"ContentType": {
|
||||||
"c_subtype": "png",
|
"c_type": "text",
|
||||||
"attributes": {
|
"c_subtype": "plain",
|
||||||
"name": "greenball.png"
|
"attributes": {
|
||||||
|
"charset": "us-ascii"
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"contents": [
|
"is_encoding_problem": false,
|
||||||
|
"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"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"Binary": {
|
||||||
|
"headers_rfc": {
|
||||||
|
"content_disposition": {
|
||||||
|
"ContentType": {
|
||||||
|
"c_type": "attachment",
|
||||||
|
"c_subtype": null,
|
||||||
|
"attributes": {
|
||||||
|
"filename": "greenball.png"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"content_transfer_encoding": {
|
||||||
|
"Text": "x-uuencode"
|
||||||
|
},
|
||||||
|
"content_type": {
|
||||||
|
"ContentType": {
|
||||||
|
"c_type": "image",
|
||||||
|
"c_subtype": "png",
|
||||||
|
"attributes": {
|
||||||
|
"name": "greenball.png"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"is_encoding_problem": false,
|
||||||
|
"body": [
|
||||||
13,
|
13,
|
||||||
10,
|
10,
|
||||||
98,
|
98,
|
||||||
@@ -2038,30 +2055,37 @@ end
|
|||||||
110,
|
110,
|
||||||
100,
|
100,
|
||||||
13,
|
13,
|
||||||
10,
|
10
|
||||||
13
|
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"Binary": {
|
"Binary": {
|
||||||
"header": {
|
"headers_rfc": {
|
||||||
"content_disposition": {
|
"content_disposition": {
|
||||||
"c_type": "attachment",
|
"ContentType": {
|
||||||
"attributes": {
|
"c_type": "attachment",
|
||||||
"filename": "blueball.png"
|
"c_subtype": null,
|
||||||
|
"attributes": {
|
||||||
|
"filename": "blueball.png"
|
||||||
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"content_transfer_encoding": "x-uuencode",
|
|
||||||
"content_type": {
|
"content_type": {
|
||||||
"c_type": "image",
|
"ContentType": {
|
||||||
"c_subtype": "png",
|
"c_type": "image",
|
||||||
"attributes": {
|
"c_subtype": "png",
|
||||||
"name": "blueball.png"
|
"attributes": {
|
||||||
|
"name": "blueball.png"
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
},
|
||||||
|
"content_transfer_encoding": {
|
||||||
|
"Text": "x-uuencode"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"contents": [
|
"is_encoding_problem": false,
|
||||||
|
"body": [
|
||||||
13,
|
13,
|
||||||
10,
|
10,
|
||||||
98,
|
98,
|
||||||
@@ -3953,10 +3977,25 @@ end
|
|||||||
110,
|
110,
|
||||||
100,
|
100,
|
||||||
13,
|
13,
|
||||||
10,
|
10
|
||||||
13
|
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
]
|
],
|
||||||
|
"structure": {
|
||||||
|
"List": [
|
||||||
|
{
|
||||||
|
"Part": 0
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"Part": 1
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"Part": 2
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"offset_header": 0,
|
||||||
|
"offset_body": 436,
|
||||||
|
"offset_end": 5444
|
||||||
}
|
}
|
||||||
+166
-87
@@ -137,106 +137,149 @@ IFl2ZXMgUGlndWV0NnM7vAAAAABJRU5ErkJggg==
|
|||||||
--=====================_715157131==_.REL--
|
--=====================_715157131==_.REL--
|
||||||
|
|
||||||
|
|
||||||
---- EXPECTED STRUCTURE ----
|
---- EXPECTED STRUCTURE ----{
|
||||||
{
|
"headers_rfc": {
|
||||||
"header": {
|
|
||||||
"date": {
|
|
||||||
"year": 2000,
|
|
||||||
"month": 5,
|
|
||||||
"day": 19,
|
|
||||||
"hour": 0,
|
|
||||||
"minute": 33,
|
|
||||||
"second": 1,
|
|
||||||
"tz_before_gmt": true,
|
|
||||||
"tz_hour": 4,
|
|
||||||
"tz_minute": 0
|
|
||||||
},
|
|
||||||
"from": {
|
"from": {
|
||||||
"Address": {
|
"Address": {
|
||||||
"name": "Doug Sauder",
|
"name": "Doug Sauder",
|
||||||
"address": "dwsauder@example.com"
|
"address": "dwsauder@example.com"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"message_id": "4.2.0.58.20000519003143.00a8d550@pop.example.com",
|
"subject": {
|
||||||
"mime_version": "1.0",
|
"Text": "Die Hasen und die Frösche"
|
||||||
"subject": "Die Hasen und die Frösche",
|
},
|
||||||
|
"content_type": {
|
||||||
|
"ContentType": {
|
||||||
|
"c_type": "multipart",
|
||||||
|
"c_subtype": "related",
|
||||||
|
"attributes": {
|
||||||
|
"type": "multipart/alternative",
|
||||||
|
"boundary": "=====================_715157131==_.REL"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"mime_version": {
|
||||||
|
"Text": "1.0"
|
||||||
|
},
|
||||||
|
"date": {
|
||||||
|
"DateTime": {
|
||||||
|
"year": 2000,
|
||||||
|
"month": 5,
|
||||||
|
"day": 19,
|
||||||
|
"hour": 0,
|
||||||
|
"minute": 33,
|
||||||
|
"second": 1,
|
||||||
|
"tz_before_gmt": true,
|
||||||
|
"tz_hour": 4,
|
||||||
|
"tz_minute": 0
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"message_id": {
|
||||||
|
"Text": "4.2.0.58.20000519003143.00a8d550@pop.example.com"
|
||||||
|
},
|
||||||
"to": {
|
"to": {
|
||||||
"Address": {
|
"Address": {
|
||||||
"name": "Heinz Müller",
|
"name": "Heinz Müller",
|
||||||
"address": "mueller@example.com"
|
"address": "mueller@example.com"
|
||||||
}
|
}
|
||||||
},
|
|
||||||
"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"
|
|
||||||
]
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"html_body": [
|
"html_body": [
|
||||||
{
|
2
|
||||||
"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; "wir leben", sprach ein Redner, "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." <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"Halt", rief nun eben dieser Sprecher, "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." <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"
|
|
||||||
}
|
|
||||||
],
|
],
|
||||||
"text_body": [
|
"text_body": [
|
||||||
{
|
1
|
||||||
"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"
|
|
||||||
}
|
|
||||||
],
|
],
|
||||||
"attachments": [
|
"attachments": [
|
||||||
|
3,
|
||||||
|
4
|
||||||
|
],
|
||||||
|
"parts": [
|
||||||
{
|
{
|
||||||
"Binary": {
|
"Multipart": {
|
||||||
"header": {
|
"headers_rfc": {
|
||||||
"content_disposition": {
|
"content_type": {
|
||||||
"c_type": "inline",
|
"ContentType": {
|
||||||
"attributes": {
|
"c_type": "multipart",
|
||||||
"filename": "blueball.png"
|
"c_subtype": "alternative",
|
||||||
|
"attributes": {
|
||||||
|
"boundary": "=====================_715157141==_.ALT"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"Text": {
|
||||||
|
"headers_rfc": {
|
||||||
|
"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": {
|
||||||
"content_transfer_encoding": "base64",
|
"Text": "quoted-printable"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"is_encoding_problem": false,
|
||||||
|
"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_rfc": {
|
||||||
|
"content_transfer_encoding": {
|
||||||
|
"Text": "quoted-printable"
|
||||||
|
},
|
||||||
"content_type": {
|
"content_type": {
|
||||||
"c_type": "image",
|
"ContentType": {
|
||||||
"c_subtype": "png",
|
"c_type": "text",
|
||||||
"attributes": {
|
"c_subtype": "html",
|
||||||
"name": "blueball.png"
|
"attributes": {
|
||||||
|
"charset": "iso-8859-1"
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"contents": [
|
"is_encoding_problem": false,
|
||||||
|
"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; "wir leben", sprach ein Redner, "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." <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"Halt", rief nun eben dieser Sprecher, "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." <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_rfc": {
|
||||||
|
"content_type": {
|
||||||
|
"ContentType": {
|
||||||
|
"c_type": "image",
|
||||||
|
"c_subtype": "png",
|
||||||
|
"attributes": {
|
||||||
|
"name": "blueball.png"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"content_id": {
|
||||||
|
"Text": "4.2.0.58.20000519003143.00a8d550@pop.example.com.0"
|
||||||
|
},
|
||||||
|
"content_transfer_encoding": {
|
||||||
|
"Text": "base64"
|
||||||
|
},
|
||||||
|
"content_disposition": {
|
||||||
|
"ContentType": {
|
||||||
|
"c_type": "inline",
|
||||||
|
"c_subtype": null,
|
||||||
|
"attributes": {
|
||||||
|
"filename": "blueball.png"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"is_encoding_problem": false,
|
||||||
|
"body": [
|
||||||
137,
|
137,
|
||||||
80,
|
80,
|
||||||
78,
|
78,
|
||||||
@@ -1567,24 +1610,34 @@ IFl2ZXMgUGlndWV0NnM7vAAAAABJRU5ErkJggg==
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"Binary": {
|
"Binary": {
|
||||||
"header": {
|
"headers_rfc": {
|
||||||
|
"content_id": {
|
||||||
|
"Text": "4.2.0.58.20000519003143.00a8d550@pop.example.com.1"
|
||||||
|
},
|
||||||
"content_disposition": {
|
"content_disposition": {
|
||||||
"c_type": "inline",
|
"ContentType": {
|
||||||
"attributes": {
|
"c_type": "inline",
|
||||||
"filename": "redball.png"
|
"c_subtype": null,
|
||||||
|
"attributes": {
|
||||||
|
"filename": "redball.png"
|
||||||
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"content_id": "4.2.0.58.20000519003143.00a8d550@pop.example.com.1",
|
"content_transfer_encoding": {
|
||||||
"content_transfer_encoding": "base64",
|
"Text": "base64"
|
||||||
|
},
|
||||||
"content_type": {
|
"content_type": {
|
||||||
"c_type": "image",
|
"ContentType": {
|
||||||
"c_subtype": "png",
|
"c_type": "image",
|
||||||
"attributes": {
|
"c_subtype": "png",
|
||||||
"name": "redball.png"
|
"attributes": {
|
||||||
|
"name": "redball.png"
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"contents": [
|
"is_encoding_problem": false,
|
||||||
|
"body": [
|
||||||
137,
|
137,
|
||||||
80,
|
80,
|
||||||
78,
|
78,
|
||||||
@@ -3041,5 +3094,31 @@ IFl2ZXMgUGlndWV0NnM7vAAAAABJRU5ErkJggg==
|
|||||||
]
|
]
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
]
|
],
|
||||||
|
"structure": {
|
||||||
|
"List": [
|
||||||
|
{
|
||||||
|
"MultiPart": [
|
||||||
|
0,
|
||||||
|
[
|
||||||
|
{
|
||||||
|
"Part": 1
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"Part": 2
|
||||||
|
}
|
||||||
|
]
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"Part": 3
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"Part": 4
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"offset_header": 0,
|
||||||
|
"offset_body": 522,
|
||||||
|
"offset_end": 7391
|
||||||
}
|
}
|
||||||
+159
-90
@@ -143,19 +143,32 @@ IFl2ZXMgUGlndWV0NnM7vAAAAABJRU5ErkJggg==
|
|||||||
|
|
||||||
------=_NextPart_000_0008_01BFC037.FDD8EE90--
|
------=_NextPart_000_0008_01BFC037.FDD8EE90--
|
||||||
|
|
||||||
---- EXPECTED STRUCTURE ----
|
---- EXPECTED STRUCTURE ----{
|
||||||
{
|
"headers_rfc": {
|
||||||
"header": {
|
"content_type": {
|
||||||
|
"ContentType": {
|
||||||
|
"c_type": "multipart",
|
||||||
|
"c_subtype": "mixed",
|
||||||
|
"attributes": {
|
||||||
|
"boundary": "----=_NextPart_000_0008_01BFC037.FDD8EE90"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
"date": {
|
"date": {
|
||||||
"year": 2000,
|
"DateTime": {
|
||||||
"month": 5,
|
"year": 2000,
|
||||||
"day": 17,
|
"month": 5,
|
||||||
"hour": 19,
|
"day": 17,
|
||||||
"minute": 42,
|
"hour": 19,
|
||||||
"second": 10,
|
"minute": 42,
|
||||||
"tz_before_gmt": true,
|
"second": 10,
|
||||||
"tz_hour": 4,
|
"tz_before_gmt": true,
|
||||||
"tz_minute": 0
|
"tz_hour": 4,
|
||||||
|
"tz_minute": 0
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"mime_version": {
|
||||||
|
"Text": "1.0"
|
||||||
},
|
},
|
||||||
"from": {
|
"from": {
|
||||||
"Address": {
|
"Address": {
|
||||||
@@ -163,90 +176,112 @@ IFl2ZXMgUGlndWV0NnM7vAAAAABJRU5ErkJggg==
|
|||||||
"address": "doug@example.com"
|
"address": "doug@example.com"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"message_id": "NDBBIAKOPKHFGPLCODIGGEKFCHAA.doug@example.com",
|
"subject": {
|
||||||
"mime_version": "1.0",
|
"Text": "Test message from Microsoft Outlook 00"
|
||||||
"subject": "Test message from Microsoft Outlook 00",
|
},
|
||||||
|
"message_id": {
|
||||||
|
"Text": "NDBBIAKOPKHFGPLCODIGGEKFCHAA.doug@example.com"
|
||||||
|
},
|
||||||
"to": {
|
"to": {
|
||||||
"Address": {
|
"Address": {
|
||||||
"name": "Joe Blow",
|
"name": "Joe Blow",
|
||||||
"address": "jblow@example.com"
|
"address": "jblow@example.com"
|
||||||
}
|
}
|
||||||
},
|
|
||||||
"content_type": {
|
|
||||||
"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)"
|
|
||||||
]
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"html_body": [
|
"html_body": [
|
||||||
{
|
2
|
||||||
"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> <BR>A HARE \none day ridiculed the short feet and slow pace of the Tortoise, who replied, \nlaughing: \"Though you be swift as the wind, I will beat you in a \nrace.\" 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. On the day appointed for the race the two started \ntogether. The Tortoise never for a moment stopped, but went on with a slow \nbut steady pace straight to the end of the course. The Hare, lying down by \nthe wayside, fell fast asleep. 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. <BR> <BR>Slow but steady wins the race. \n<BR></FONT></DIV></BODY></HTML>\n"
|
|
||||||
}
|
|
||||||
],
|
],
|
||||||
"text_body": [
|
"text_body": [
|
||||||
{
|
1
|
||||||
"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"
|
|
||||||
}
|
|
||||||
],
|
],
|
||||||
"attachments": [
|
"attachments": [
|
||||||
|
3,
|
||||||
|
4
|
||||||
|
],
|
||||||
|
"parts": [
|
||||||
{
|
{
|
||||||
"Binary": {
|
"Multipart": {
|
||||||
"header": {
|
"headers_rfc": {
|
||||||
"content_disposition": {
|
"content_type": {
|
||||||
"c_type": "attachment",
|
"ContentType": {
|
||||||
"attributes": {
|
"c_type": "multipart",
|
||||||
"filename": "greenball.png"
|
"c_subtype": "alternative",
|
||||||
|
"attributes": {
|
||||||
|
"boundary": "----=_NextPart_001_0009_01BFC037.FDD8EE90"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"Text": {
|
||||||
|
"headers_rfc": {
|
||||||
|
"content_type": {
|
||||||
|
"ContentType": {
|
||||||
|
"c_type": "text",
|
||||||
|
"c_subtype": "plain",
|
||||||
|
"attributes": {
|
||||||
|
"charset": "iso-8859-1"
|
||||||
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"content_transfer_encoding": "base64",
|
"content_transfer_encoding": {
|
||||||
|
"Text": "quoted-printable"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"is_encoding_problem": false,
|
||||||
|
"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_rfc": {
|
||||||
|
"content_transfer_encoding": {
|
||||||
|
"Text": "quoted-printable"
|
||||||
|
},
|
||||||
"content_type": {
|
"content_type": {
|
||||||
"c_type": "image",
|
"ContentType": {
|
||||||
"c_subtype": "png",
|
"c_type": "text",
|
||||||
"attributes": {
|
"c_subtype": "html",
|
||||||
"name": "greenball.png"
|
"attributes": {
|
||||||
|
"charset": "iso-8859-1"
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"contents": [
|
"is_encoding_problem": false,
|
||||||
|
"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> <BR>A HARE \none day ridiculed the short feet and slow pace of the Tortoise, who replied, \nlaughing: \"Though you be swift as the wind, I will beat you in a \nrace.\" 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. On the day appointed for the race the two started \ntogether. The Tortoise never for a moment stopped, but went on with a slow \nbut steady pace straight to the end of the course. The Hare, lying down by \nthe wayside, fell fast asleep. 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. <BR> <BR>Slow but steady wins the race. \n<BR></FONT></DIV></BODY></HTML>\n"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"Binary": {
|
||||||
|
"headers_rfc": {
|
||||||
|
"content_transfer_encoding": {
|
||||||
|
"Text": "base64"
|
||||||
|
},
|
||||||
|
"content_disposition": {
|
||||||
|
"ContentType": {
|
||||||
|
"c_type": "attachment",
|
||||||
|
"c_subtype": null,
|
||||||
|
"attributes": {
|
||||||
|
"filename": "greenball.png"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"content_type": {
|
||||||
|
"ContentType": {
|
||||||
|
"c_type": "image",
|
||||||
|
"c_subtype": "png",
|
||||||
|
"attributes": {
|
||||||
|
"name": "greenball.png"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"is_encoding_problem": false,
|
||||||
|
"body": [
|
||||||
137,
|
137,
|
||||||
80,
|
80,
|
||||||
78,
|
78,
|
||||||
@@ -1550,23 +1585,31 @@ IFl2ZXMgUGlndWV0NnM7vAAAAABJRU5ErkJggg==
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"Binary": {
|
"Binary": {
|
||||||
"header": {
|
"headers_rfc": {
|
||||||
"content_disposition": {
|
"content_transfer_encoding": {
|
||||||
"c_type": "attachment",
|
"Text": "base64"
|
||||||
"attributes": {
|
},
|
||||||
"filename": "redball.png"
|
"content_type": {
|
||||||
|
"ContentType": {
|
||||||
|
"c_type": "image",
|
||||||
|
"c_subtype": "png",
|
||||||
|
"attributes": {
|
||||||
|
"name": "redball.png"
|
||||||
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"content_transfer_encoding": "base64",
|
"content_disposition": {
|
||||||
"content_type": {
|
"ContentType": {
|
||||||
"c_type": "image",
|
"c_type": "attachment",
|
||||||
"c_subtype": "png",
|
"c_subtype": null,
|
||||||
"attributes": {
|
"attributes": {
|
||||||
"name": "redball.png"
|
"filename": "redball.png"
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"contents": [
|
"is_encoding_problem": false,
|
||||||
|
"body": [
|
||||||
137,
|
137,
|
||||||
80,
|
80,
|
||||||
78,
|
78,
|
||||||
@@ -3023,5 +3066,31 @@ IFl2ZXMgUGlndWV0NnM7vAAAAABJRU5ErkJggg==
|
|||||||
]
|
]
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
]
|
],
|
||||||
|
"structure": {
|
||||||
|
"List": [
|
||||||
|
{
|
||||||
|
"MultiPart": [
|
||||||
|
0,
|
||||||
|
[
|
||||||
|
{
|
||||||
|
"Part": 1
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"Part": 2
|
||||||
|
}
|
||||||
|
]
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"Part": 3
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"Part": 4
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"offset_header": 0,
|
||||||
|
"offset_body": 524,
|
||||||
|
"offset_end": 7240
|
||||||
}
|
}
|
||||||
+57
-50
@@ -30,19 +30,32 @@ wenig aufschieben, denn auch uns f
|
|||||||
welche also wohl noch unglücklicher sein müssen als wir."
|
welche also wohl noch unglücklicher sein müssen als wir."
|
||||||
|
|
||||||
|
|
||||||
---- EXPECTED STRUCTURE ----
|
---- EXPECTED STRUCTURE ----{
|
||||||
{
|
"headers_rfc": {
|
||||||
"header": {
|
"to": {
|
||||||
|
"Address": {
|
||||||
|
"name": "J�rgen Schm�rgen",
|
||||||
|
"address": "schmuergen@example.com"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"message_id": {
|
||||||
|
"Text": "NDBBIAKOPKHFGPLCODIGIEKBCHAA.doug@example.com"
|
||||||
|
},
|
||||||
|
"subject": {
|
||||||
|
"Text": "Die Hasen und die Fr�sche (Microsoft Outlook 00)"
|
||||||
|
},
|
||||||
"date": {
|
"date": {
|
||||||
"year": 2000,
|
"DateTime": {
|
||||||
"month": 5,
|
"year": 2000,
|
||||||
"day": 17,
|
"month": 5,
|
||||||
"hour": 19,
|
"day": 17,
|
||||||
"minute": 8,
|
"hour": 19,
|
||||||
"second": 29,
|
"minute": 8,
|
||||||
"tz_before_gmt": true,
|
"second": 29,
|
||||||
"tz_hour": 4,
|
"tz_before_gmt": true,
|
||||||
"tz_minute": 0
|
"tz_hour": 4,
|
||||||
|
"tz_minute": 0
|
||||||
|
}
|
||||||
},
|
},
|
||||||
"from": {
|
"from": {
|
||||||
"Address": {
|
"Address": {
|
||||||
@@ -50,49 +63,43 @@ welche also wohl noch ungl
|
|||||||
"address": "doug@example.com"
|
"address": "doug@example.com"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"message_id": "NDBBIAKOPKHFGPLCODIGIEKBCHAA.doug@example.com",
|
"mime_version": {
|
||||||
"mime_version": "1.0",
|
"Text": "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"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"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)"
|
|
||||||
]
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"html_body": [
|
"html_body": [
|
||||||
{
|
0
|
||||||
"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>"
|
|
||||||
}
|
|
||||||
],
|
],
|
||||||
"text_body": [
|
"text_body": [
|
||||||
|
0
|
||||||
|
],
|
||||||
|
"attachments": [],
|
||||||
|
"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": {
|
||||||
|
"headers_rfc": {
|
||||||
|
"content_type": {
|
||||||
|
"ContentType": {
|
||||||
|
"c_type": "text",
|
||||||
|
"c_subtype": "plain",
|
||||||
|
"attributes": {
|
||||||
|
"charset": "iso-8859-1"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"content_transfer_encoding": {
|
||||||
|
"Text": "8bit"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"is_encoding_problem": false,
|
||||||
|
"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
|
||||||
}
|
}
|
||||||
+199
-97
@@ -187,19 +187,35 @@ IFl2ZXMgUGlndWV0NnM7vAAAAABJRU5ErkJggg==
|
|||||||
|
|
||||||
------=_NextPart_000_0010_01BFC038.B91BC650--
|
------=_NextPart_000_0010_01BFC038.B91BC650--
|
||||||
|
|
||||||
---- EXPECTED STRUCTURE ----
|
---- EXPECTED STRUCTURE ----{
|
||||||
{
|
"headers_rfc": {
|
||||||
"header": {
|
|
||||||
"date": {
|
"date": {
|
||||||
"year": 2000,
|
"DateTime": {
|
||||||
"month": 5,
|
"year": 2000,
|
||||||
"day": 17,
|
"month": 5,
|
||||||
"hour": 19,
|
"day": 17,
|
||||||
"minute": 47,
|
"hour": 19,
|
||||||
"second": 24,
|
"minute": 47,
|
||||||
"tz_before_gmt": true,
|
"second": 24,
|
||||||
"tz_hour": 4,
|
"tz_before_gmt": true,
|
||||||
"tz_minute": 0
|
"tz_hour": 4,
|
||||||
|
"tz_minute": 0
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"mime_version": {
|
||||||
|
"Text": "1.0"
|
||||||
|
},
|
||||||
|
"message_id": {
|
||||||
|
"Text": "NDBBIAKOPKHFGPLCODIGOEKFCHAA.doug@example.com"
|
||||||
|
},
|
||||||
|
"content_type": {
|
||||||
|
"ContentType": {
|
||||||
|
"c_type": "multipart",
|
||||||
|
"c_subtype": "mixed",
|
||||||
|
"attributes": {
|
||||||
|
"boundary": "----=_NextPart_000_0010_01BFC038.B91BC650"
|
||||||
|
}
|
||||||
|
}
|
||||||
},
|
},
|
||||||
"from": {
|
"from": {
|
||||||
"Address": {
|
"Address": {
|
||||||
@@ -207,85 +223,119 @@ IFl2ZXMgUGlndWV0NnM7vAAAAABJRU5ErkJggg==
|
|||||||
"address": "doug@example.com"
|
"address": "doug@example.com"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"message_id": "NDBBIAKOPKHFGPLCODIGOEKFCHAA.doug@example.com",
|
"subject": {
|
||||||
"mime_version": "1.0",
|
"Text": "Test message from Microsoft Outlook 00"
|
||||||
"subject": "Test message from Microsoft Outlook 00",
|
},
|
||||||
"to": {
|
"to": {
|
||||||
"Address": {
|
"Address": {
|
||||||
"name": "Joe Blow",
|
"name": "Joe Blow",
|
||||||
"address": "jblow@example.com"
|
"address": "jblow@example.com"
|
||||||
}
|
}
|
||||||
},
|
|
||||||
"content_type": {
|
|
||||||
"c_type": "multipart",
|
|
||||||
"c_subtype": "mixed",
|
|
||||||
"attributes": {
|
|
||||||
"boundary": "----=_NextPart_000_0010_01BFC038.B91BC650"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"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"
|
|
||||||
]
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"html_body": [
|
"html_body": [
|
||||||
{
|
3
|
||||||
"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> <BR>A HARE \none day ridiculed the short feet and slow pace of the Tortoise, who replied, \nlaughing: \"Though you be swift as the wind, I will beat you in a \nrace.\" 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. On the day appointed for the race the two started \ntogether. The Tortoise never for a moment stopped, but went on with a slow \nbut steady pace straight to the end of the course. The Hare, lying down by \nthe wayside, fell fast asleep. 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. <BR> <BR>Slow but steady wins the race. \n</FONT></DIV>\n<DIV><FONT face=Arial size=2><BR> </DIV></FONT></BODY></HTML>\n"
|
|
||||||
}
|
|
||||||
],
|
],
|
||||||
"text_body": [
|
"text_body": [
|
||||||
{
|
2
|
||||||
"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"
|
|
||||||
}
|
|
||||||
],
|
],
|
||||||
"attachments": [
|
"attachments": [
|
||||||
|
4,
|
||||||
|
5,
|
||||||
|
6
|
||||||
|
],
|
||||||
|
"parts": [
|
||||||
{
|
{
|
||||||
"Binary": {
|
"Multipart": {
|
||||||
"header": {
|
"headers_rfc": {
|
||||||
"content_id": "938014623@17052000-0f9b",
|
|
||||||
"content_transfer_encoding": "base64",
|
|
||||||
"content_type": {
|
"content_type": {
|
||||||
"c_type": "image",
|
"ContentType": {
|
||||||
"c_subtype": "png",
|
"c_type": "multipart",
|
||||||
"attributes": {
|
"c_subtype": "related",
|
||||||
"name": "blueball.png"
|
"attributes": {
|
||||||
|
"boundary": "----=_NextPart_001_0011_01BFC038.B91BC650"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"Multipart": {
|
||||||
|
"headers_rfc": {
|
||||||
|
"content_type": {
|
||||||
|
"ContentType": {
|
||||||
|
"c_type": "multipart",
|
||||||
|
"c_subtype": "alternative",
|
||||||
|
"attributes": {
|
||||||
|
"boundary": "----=_NextPart_002_0012_01BFC038.B91BC650"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"Text": {
|
||||||
|
"headers_rfc": {
|
||||||
|
"content_type": {
|
||||||
|
"ContentType": {
|
||||||
|
"c_type": "text",
|
||||||
|
"c_subtype": "plain",
|
||||||
|
"attributes": {
|
||||||
|
"charset": "iso-8859-1"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"content_transfer_encoding": {
|
||||||
|
"Text": "quoted-printable"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"is_encoding_problem": false,
|
||||||
|
"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_rfc": {
|
||||||
|
"content_transfer_encoding": {
|
||||||
|
"Text": "quoted-printable"
|
||||||
|
},
|
||||||
|
"content_type": {
|
||||||
|
"ContentType": {
|
||||||
|
"c_type": "text",
|
||||||
|
"c_subtype": "html",
|
||||||
|
"attributes": {
|
||||||
|
"charset": "iso-8859-1"
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"contents": [
|
"is_encoding_problem": false,
|
||||||
|
"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> <BR>A HARE \none day ridiculed the short feet and slow pace of the Tortoise, who replied, \nlaughing: \"Though you be swift as the wind, I will beat you in a \nrace.\" 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. On the day appointed for the race the two started \ntogether. The Tortoise never for a moment stopped, but went on with a slow \nbut steady pace straight to the end of the course. The Hare, lying down by \nthe wayside, fell fast asleep. 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. <BR> <BR>Slow but steady wins the race. \n</FONT></DIV>\n<DIV><FONT face=Arial size=2><BR> </DIV></FONT></BODY></HTML>\n"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"Binary": {
|
||||||
|
"headers_rfc": {
|
||||||
|
"content_type": {
|
||||||
|
"ContentType": {
|
||||||
|
"c_type": "image",
|
||||||
|
"c_subtype": "png",
|
||||||
|
"attributes": {
|
||||||
|
"name": "blueball.png"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"content_transfer_encoding": {
|
||||||
|
"Text": "base64"
|
||||||
|
},
|
||||||
|
"content_id": {
|
||||||
|
"Text": "938014623@17052000-0f9b"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"is_encoding_problem": false,
|
||||||
|
"body": [
|
||||||
137,
|
137,
|
||||||
80,
|
80,
|
||||||
78,
|
78,
|
||||||
@@ -1616,23 +1666,31 @@ IFl2ZXMgUGlndWV0NnM7vAAAAABJRU5ErkJggg==
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"Binary": {
|
"Binary": {
|
||||||
"header": {
|
"headers_rfc": {
|
||||||
|
"content_transfer_encoding": {
|
||||||
|
"Text": "base64"
|
||||||
|
},
|
||||||
"content_disposition": {
|
"content_disposition": {
|
||||||
"c_type": "attachment",
|
"ContentType": {
|
||||||
"attributes": {
|
"c_type": "attachment",
|
||||||
"filename": "greenball.png"
|
"c_subtype": null,
|
||||||
|
"attributes": {
|
||||||
|
"filename": "greenball.png"
|
||||||
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"content_transfer_encoding": "base64",
|
|
||||||
"content_type": {
|
"content_type": {
|
||||||
"c_type": "image",
|
"ContentType": {
|
||||||
"c_subtype": "png",
|
"c_type": "image",
|
||||||
"attributes": {
|
"c_subtype": "png",
|
||||||
"name": "greenball.png"
|
"attributes": {
|
||||||
|
"name": "greenball.png"
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"contents": [
|
"is_encoding_problem": false,
|
||||||
|
"body": [
|
||||||
137,
|
137,
|
||||||
80,
|
80,
|
||||||
78,
|
78,
|
||||||
@@ -2936,23 +2994,31 @@ IFl2ZXMgUGlndWV0NnM7vAAAAABJRU5ErkJggg==
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"Binary": {
|
"Binary": {
|
||||||
"header": {
|
"headers_rfc": {
|
||||||
"content_disposition": {
|
"content_type": {
|
||||||
"c_type": "attachment",
|
"ContentType": {
|
||||||
"attributes": {
|
"c_type": "image",
|
||||||
"filename": "redball.png"
|
"c_subtype": "png",
|
||||||
|
"attributes": {
|
||||||
|
"name": "redball.png"
|
||||||
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"content_transfer_encoding": "base64",
|
"content_transfer_encoding": {
|
||||||
"content_type": {
|
"Text": "base64"
|
||||||
"c_type": "image",
|
},
|
||||||
"c_subtype": "png",
|
"content_disposition": {
|
||||||
"attributes": {
|
"ContentType": {
|
||||||
"name": "redball.png"
|
"c_type": "attachment",
|
||||||
|
"c_subtype": null,
|
||||||
|
"attributes": {
|
||||||
|
"filename": "redball.png"
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"contents": [
|
"is_encoding_problem": false,
|
||||||
|
"body": [
|
||||||
137,
|
137,
|
||||||
80,
|
80,
|
||||||
78,
|
78,
|
||||||
@@ -4409,5 +4475,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
|
||||||
}
|
}
|
||||||
+50
-43
@@ -29,19 +29,23 @@ IHdlbGNoZSBhbHNvIHdvaGwgbm9jaCB1bmds/GNrbGljaGVyIHNlaW4gbfxzc2VuIGFscyB3aXIu
|
|||||||
IiANCg==
|
IiANCg==
|
||||||
|
|
||||||
|
|
||||||
---- EXPECTED STRUCTURE ----
|
---- EXPECTED STRUCTURE ----{
|
||||||
{
|
"headers_rfc": {
|
||||||
"header": {
|
|
||||||
"date": {
|
"date": {
|
||||||
"year": 2000,
|
"DateTime": {
|
||||||
"month": 5,
|
"year": 2000,
|
||||||
"day": 17,
|
"month": 5,
|
||||||
"hour": 19,
|
"day": 17,
|
||||||
"minute": 11,
|
"hour": 19,
|
||||||
"second": 50,
|
"minute": 11,
|
||||||
"tz_before_gmt": true,
|
"second": 50,
|
||||||
"tz_hour": 4,
|
"tz_before_gmt": true,
|
||||||
"tz_minute": 0
|
"tz_hour": 4,
|
||||||
|
"tz_minute": 0
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"mime_version": {
|
||||||
|
"Text": "1.0"
|
||||||
},
|
},
|
||||||
"from": {
|
"from": {
|
||||||
"Address": {
|
"Address": {
|
||||||
@@ -49,49 +53,52 @@ IiANCg==
|
|||||||
"address": "doug@example.com"
|
"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": {
|
"to": {
|
||||||
"Address": {
|
"Address": {
|
||||||
"name": "J�rgen Schm�rgen",
|
"name": "J�rgen Schm�rgen",
|
||||||
"address": "schmuergen@example.com"
|
"address": "schmuergen@example.com"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"content_transfer_encoding": "base64",
|
"subject": {
|
||||||
"content_type": {
|
"Text": "Die Hasen und die Fr�sche (Microsoft Outlook 00)"
|
||||||
"c_type": "text",
|
|
||||||
"c_subtype": "plain",
|
|
||||||
"attributes": {
|
|
||||||
"charset": "iso-8859-1"
|
|
||||||
}
|
|
||||||
},
|
},
|
||||||
"others": {
|
"message_id": {
|
||||||
"X-Mailer": [
|
"Text": "NDBBIAKOPKHFGPLCODIGAEKCCHAA.doug@example.com"
|
||||||
"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": [
|
"html_body": [
|
||||||
{
|
0
|
||||||
"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>"
|
|
||||||
}
|
|
||||||
],
|
],
|
||||||
"text_body": [
|
"text_body": [
|
||||||
|
0
|
||||||
|
],
|
||||||
|
"attachments": [],
|
||||||
|
"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": {
|
||||||
|
"headers_rfc": {
|
||||||
|
"content_transfer_encoding": {
|
||||||
|
"Text": "base64"
|
||||||
|
},
|
||||||
|
"content_type": {
|
||||||
|
"ContentType": {
|
||||||
|
"c_type": "text",
|
||||||
|
"c_subtype": "plain",
|
||||||
|
"attributes": {
|
||||||
|
"charset": "iso-8859-1"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"is_encoding_problem": false,
|
||||||
|
"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
|
||||||
}
|
}
|
||||||
+137
-84
@@ -107,19 +107,22 @@ In einem nahen Teich wollten sie sich nun ers=E4ufen; sie eilten ihm zu;=
|
|||||||
--=====================_716541962==_--
|
--=====================_716541962==_--
|
||||||
|
|
||||||
|
|
||||||
---- EXPECTED STRUCTURE ----
|
---- EXPECTED STRUCTURE ----{
|
||||||
{
|
"headers_rfc": {
|
||||||
"header": {
|
"content_type": {
|
||||||
"date": {
|
"ContentType": {
|
||||||
"year": 2000,
|
"c_type": "multipart",
|
||||||
"month": 5,
|
"c_subtype": "mixed",
|
||||||
"day": 19,
|
"attributes": {
|
||||||
"hour": 0,
|
"boundary": "=====================_716541962==_"
|
||||||
"minute": 56,
|
}
|
||||||
"second": 13,
|
}
|
||||||
"tz_before_gmt": true,
|
},
|
||||||
"tz_hour": 4,
|
"message_id": {
|
||||||
"tz_minute": 0
|
"Text": "4.2.0.58.20000519005505.00a853a0@pop.example.com"
|
||||||
|
},
|
||||||
|
"subject": {
|
||||||
|
"Text": "Die Hasen und die Frösche"
|
||||||
},
|
},
|
||||||
"from": {
|
"from": {
|
||||||
"Address": {
|
"Address": {
|
||||||
@@ -127,71 +130,88 @@ In einem nahen Teich wollten sie sich nun ers=E4ufen; sie eilten ihm zu;=
|
|||||||
"address": "dwsauder@example.com"
|
"address": "dwsauder@example.com"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"message_id": "4.2.0.58.20000519005505.00a853a0@pop.example.com",
|
"mime_version": {
|
||||||
"mime_version": "1.0",
|
"Text": "1.0"
|
||||||
"subject": "Die Hasen und die Frösche",
|
},
|
||||||
|
"date": {
|
||||||
|
"DateTime": {
|
||||||
|
"year": 2000,
|
||||||
|
"month": 5,
|
||||||
|
"day": 19,
|
||||||
|
"hour": 0,
|
||||||
|
"minute": 56,
|
||||||
|
"second": 13,
|
||||||
|
"tz_before_gmt": true,
|
||||||
|
"tz_hour": 4,
|
||||||
|
"tz_minute": 0
|
||||||
|
}
|
||||||
|
},
|
||||||
"to": {
|
"to": {
|
||||||
"Address": {
|
"Address": {
|
||||||
"name": "Jürgen Schmürgen",
|
"name": "Jürgen Schmürgen",
|
||||||
"address": "jschmuergen@example.com"
|
"address": "jschmuergen@example.com"
|
||||||
}
|
}
|
||||||
},
|
|
||||||
"content_type": {
|
|
||||||
"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"
|
|
||||||
]
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"html_body": [
|
"html_body": [
|
||||||
{
|
0
|
||||||
"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>"
|
|
||||||
}
|
|
||||||
],
|
],
|
||||||
"text_body": [
|
"text_body": [
|
||||||
{
|
0
|
||||||
"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"
|
|
||||||
}
|
|
||||||
],
|
],
|
||||||
"attachments": [
|
"attachments": [
|
||||||
|
1,
|
||||||
|
2,
|
||||||
|
3
|
||||||
|
],
|
||||||
|
"parts": [
|
||||||
{
|
{
|
||||||
"Binary": {
|
"Text": {
|
||||||
"header": {
|
"headers_rfc": {
|
||||||
"content_disposition": {
|
"content_transfer_encoding": {
|
||||||
"c_type": "attachment",
|
"Text": "quoted-printable"
|
||||||
"attributes": {
|
|
||||||
"filename": "blueball.png"
|
|
||||||
}
|
|
||||||
},
|
},
|
||||||
"content_transfer_encoding": "base64",
|
|
||||||
"content_type": {
|
"content_type": {
|
||||||
"c_type": "image",
|
"ContentType": {
|
||||||
"c_subtype": "png",
|
"c_type": "text",
|
||||||
"attributes": {
|
"c_subtype": "plain",
|
||||||
"name": "blueball.png"
|
"attributes": {
|
||||||
|
"charset": "iso-8859-1"
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"contents": [
|
"is_encoding_problem": false,
|
||||||
|
"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_rfc": {
|
||||||
|
"content_disposition": {
|
||||||
|
"ContentType": {
|
||||||
|
"c_type": "attachment",
|
||||||
|
"c_subtype": null,
|
||||||
|
"attributes": {
|
||||||
|
"filename": "blueball.png"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"content_type": {
|
||||||
|
"ContentType": {
|
||||||
|
"c_type": "image",
|
||||||
|
"c_subtype": "png",
|
||||||
|
"attributes": {
|
||||||
|
"name": "blueball.png"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"content_transfer_encoding": {
|
||||||
|
"Text": "base64"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"is_encoding_problem": false,
|
||||||
|
"body": [
|
||||||
137,
|
137,
|
||||||
80,
|
80,
|
||||||
78,
|
78,
|
||||||
@@ -1522,44 +1542,77 @@ In einem nahen Teich wollten sie sich nun ers=E4ufen; sie eilten ihm zu;=
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"Text": {
|
"Text": {
|
||||||
"header": {
|
"headers_rfc": {
|
||||||
"content_disposition": {
|
"content_type": {
|
||||||
"c_type": "attachment",
|
"ContentType": {
|
||||||
"attributes": {
|
"c_type": "text",
|
||||||
"filename": "farmerandstork.txt"
|
"c_subtype": "plain",
|
||||||
|
"attributes": {
|
||||||
|
"charset": "us-ascii"
|
||||||
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"content_type": {
|
"content_disposition": {
|
||||||
"c_type": "text",
|
"ContentType": {
|
||||||
"c_subtype": "plain",
|
"c_type": "attachment",
|
||||||
"attributes": {
|
"c_subtype": null,
|
||||||
"charset": "us-ascii"
|
"attributes": {
|
||||||
|
"filename": "farmerandstork.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"
|
"is_encoding_problem": false,
|
||||||
|
"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"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"Text": {
|
"Text": {
|
||||||
"header": {
|
"headers_rfc": {
|
||||||
"content_disposition": {
|
"content_type": {
|
||||||
"c_type": "attachment",
|
"ContentType": {
|
||||||
"attributes": {
|
"c_type": "text",
|
||||||
"filename": "HasenundFr�sche.txt"
|
"c_subtype": "plain",
|
||||||
|
"attributes": {
|
||||||
|
"charset": "iso-8859-1"
|
||||||
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"content_transfer_encoding": "quoted-printable",
|
"content_transfer_encoding": {
|
||||||
"content_type": {
|
"Text": "quoted-printable"
|
||||||
"c_type": "text",
|
},
|
||||||
"c_subtype": "plain",
|
"content_disposition": {
|
||||||
"attributes": {
|
"ContentType": {
|
||||||
"charset": "iso-8859-1"
|
"c_type": "attachment",
|
||||||
|
"c_subtype": null,
|
||||||
|
"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"
|
"is_encoding_problem": false,
|
||||||
|
"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
|
||||||
}
|
}
|
||||||
+119
-75
@@ -108,19 +108,30 @@ IFl2ZXMgUGlndWV0NnM7vAAAAABJRU5ErkJggg==
|
|||||||
--=====================_715429112==_.REL--
|
--=====================_715429112==_.REL--
|
||||||
|
|
||||||
|
|
||||||
---- EXPECTED STRUCTURE ----
|
---- EXPECTED STRUCTURE ----{
|
||||||
{
|
"headers_rfc": {
|
||||||
"header": {
|
"content_type": {
|
||||||
|
"ContentType": {
|
||||||
|
"c_type": "multipart",
|
||||||
|
"c_subtype": "related",
|
||||||
|
"attributes": {
|
||||||
|
"boundary": "=====================_715429112==_.REL",
|
||||||
|
"type": "text/html"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
"date": {
|
"date": {
|
||||||
"year": 2000,
|
"DateTime": {
|
||||||
"month": 5,
|
"year": 2000,
|
||||||
"day": 19,
|
"month": 5,
|
||||||
"hour": 0,
|
"day": 19,
|
||||||
"minute": 37,
|
"hour": 0,
|
||||||
"second": 39,
|
"minute": 37,
|
||||||
"tz_before_gmt": true,
|
"second": 39,
|
||||||
"tz_hour": 4,
|
"tz_before_gmt": true,
|
||||||
"tz_minute": 0
|
"tz_hour": 4,
|
||||||
|
"tz_minute": 0
|
||||||
|
}
|
||||||
},
|
},
|
||||||
"from": {
|
"from": {
|
||||||
"Address": {
|
"Address": {
|
||||||
@@ -128,76 +139,83 @@ IFl2ZXMgUGlndWV0NnM7vAAAAABJRU5ErkJggg==
|
|||||||
"address": "dwsauder@example.com"
|
"address": "dwsauder@example.com"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"message_id": "4.2.0.58.20000519003735.00a8d7e0@pop.example.com",
|
"mime_version": {
|
||||||
"mime_version": "1.0",
|
"Text": "1.0"
|
||||||
"subject": "Die Hasen und die Frösche",
|
},
|
||||||
"to": {
|
"to": {
|
||||||
"Address": {
|
"Address": {
|
||||||
"name": "Heinz Müller",
|
"name": "Heinz Müller",
|
||||||
"address": "mueller@example.com"
|
"address": "mueller@example.com"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"content_type": {
|
"message_id": {
|
||||||
"c_type": "multipart",
|
"Text": "4.2.0.58.20000519003735.00a8d7e0@pop.example.com"
|
||||||
"c_subtype": "related",
|
|
||||||
"attributes": {
|
|
||||||
"type": "text/html",
|
|
||||||
"boundary": "=====================_715429112==_.REL"
|
|
||||||
}
|
|
||||||
},
|
},
|
||||||
"others": {
|
"subject": {
|
||||||
"X-Priority": [
|
"Text": "Die Hasen und die Frösche"
|
||||||
"2 (High)"
|
|
||||||
],
|
|
||||||
"X-Mailer": [
|
|
||||||
"QUALCOMM Windows Eudora Pro Version 4.2.0.58"
|
|
||||||
],
|
|
||||||
"X-Sender": [
|
|
||||||
"dwsauder@pop.example.com (Unverified)"
|
|
||||||
]
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"html_body": [
|
"html_body": [
|
||||||
{
|
0
|
||||||
"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; "wir leben", sprach ein Redner, "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." <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"Halt", rief nun eben dieser Sprecher, "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." <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"
|
|
||||||
}
|
|
||||||
],
|
],
|
||||||
"text_body": [
|
"text_body": [
|
||||||
{
|
0
|
||||||
"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"
|
|
||||||
}
|
|
||||||
],
|
],
|
||||||
"attachments": [
|
"attachments": [
|
||||||
|
1,
|
||||||
|
2
|
||||||
|
],
|
||||||
|
"parts": [
|
||||||
{
|
{
|
||||||
"Binary": {
|
"Html": {
|
||||||
"header": {
|
"headers_rfc": {
|
||||||
"content_disposition": {
|
"content_type": {
|
||||||
"c_type": "inline",
|
"ContentType": {
|
||||||
"attributes": {
|
"c_type": "text",
|
||||||
"filename": "2aa48eb6.png"
|
"c_subtype": "html",
|
||||||
|
"attributes": {
|
||||||
|
"charset": "iso-8859-1"
|
||||||
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"content_id": "4.2.0.58.20000519003735.00a8d7e0@pop.example.com.2",
|
"content_transfer_encoding": {
|
||||||
"content_transfer_encoding": "base64",
|
"Text": "quoted-printable"
|
||||||
"content_type": {
|
|
||||||
"c_type": "image",
|
|
||||||
"c_subtype": "png",
|
|
||||||
"attributes": {
|
|
||||||
"name": "2aa48eb6.png"
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"contents": [
|
"is_encoding_problem": false,
|
||||||
|
"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; "wir leben", sprach ein Redner, "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." <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"Halt", rief nun eben dieser Sprecher, "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." <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": {
|
||||||
|
"headers_rfc": {
|
||||||
|
"content_id": {
|
||||||
|
"Text": "4.2.0.58.20000519003735.00a8d7e0@pop.example.com.2"
|
||||||
|
},
|
||||||
|
"content_type": {
|
||||||
|
"ContentType": {
|
||||||
|
"c_type": "image",
|
||||||
|
"c_subtype": "png",
|
||||||
|
"attributes": {
|
||||||
|
"name": "2aa48eb6.png"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"content_disposition": {
|
||||||
|
"ContentType": {
|
||||||
|
"c_type": "inline",
|
||||||
|
"c_subtype": null,
|
||||||
|
"attributes": {
|
||||||
|
"filename": "2aa48eb6.png"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"content_transfer_encoding": {
|
||||||
|
"Text": "base64"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"is_encoding_problem": false,
|
||||||
|
"body": [
|
||||||
137,
|
137,
|
||||||
80,
|
80,
|
||||||
78,
|
78,
|
||||||
@@ -1528,24 +1546,34 @@ IFl2ZXMgUGlndWV0NnM7vAAAAABJRU5ErkJggg==
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"Binary": {
|
"Binary": {
|
||||||
"header": {
|
"headers_rfc": {
|
||||||
"content_disposition": {
|
"content_disposition": {
|
||||||
"c_type": "inline",
|
"ContentType": {
|
||||||
"attributes": {
|
"c_type": "inline",
|
||||||
"filename": "2aa48ec0.png"
|
"c_subtype": null,
|
||||||
|
"attributes": {
|
||||||
|
"filename": "2aa48ec0.png"
|
||||||
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"content_id": "4.2.0.58.20000519003735.00a8d7e0@pop.example.com.3",
|
"content_id": {
|
||||||
"content_transfer_encoding": "base64",
|
"Text": "4.2.0.58.20000519003735.00a8d7e0@pop.example.com.3"
|
||||||
|
},
|
||||||
"content_type": {
|
"content_type": {
|
||||||
"c_type": "image",
|
"ContentType": {
|
||||||
"c_subtype": "png",
|
"c_type": "image",
|
||||||
"attributes": {
|
"c_subtype": "png",
|
||||||
"name": "2aa48ec0.png"
|
"attributes": {
|
||||||
|
"name": "2aa48ec0.png"
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
},
|
||||||
|
"content_transfer_encoding": {
|
||||||
|
"Text": "base64"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"contents": [
|
"is_encoding_problem": false,
|
||||||
|
"body": [
|
||||||
137,
|
137,
|
||||||
80,
|
80,
|
||||||
78,
|
78,
|
||||||
@@ -3002,5 +3030,21 @@ IFl2ZXMgUGlndWV0NnM7vAAAAABJRU5ErkJggg==
|
|||||||
]
|
]
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
]
|
],
|
||||||
|
"structure": {
|
||||||
|
"List": [
|
||||||
|
{
|
||||||
|
"Part": 0
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"Part": 1
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"Part": 2
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"offset_header": 0,
|
||||||
|
"offset_body": 510,
|
||||||
|
"offset_end": 6227
|
||||||
}
|
}
|
||||||
+194
-103
@@ -170,95 +170,131 @@ bGlwMmdpZiB2LjAuNiBieSBZdmVzIFBpZ3VldDZzO7wAAAAASUVORK5CYII=
|
|||||||
--=====================_715462801==_--
|
--=====================_715462801==_--
|
||||||
|
|
||||||
|
|
||||||
---- EXPECTED STRUCTURE ----
|
---- EXPECTED STRUCTURE ----{
|
||||||
{
|
"headers_rfc": {
|
||||||
"header": {
|
"content_type": {
|
||||||
"date": {
|
"ContentType": {
|
||||||
"year": 2000,
|
"c_type": "multipart",
|
||||||
"month": 5,
|
"c_subtype": "mixed",
|
||||||
"day": 19,
|
"attributes": {
|
||||||
"hour": 0,
|
"boundary": "=====================_715462801==_"
|
||||||
"minute": 38,
|
}
|
||||||
"second": 13,
|
|
||||||
"tz_before_gmt": true,
|
|
||||||
"tz_hour": 4,
|
|
||||||
"tz_minute": 0
|
|
||||||
},
|
|
||||||
"from": {
|
|
||||||
"Address": {
|
|
||||||
"name": "Doug Sauder",
|
|
||||||
"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",
|
|
||||||
"to": {
|
"to": {
|
||||||
"Address": {
|
"Address": {
|
||||||
"name": "Heinz Müller",
|
"name": "Heinz Müller",
|
||||||
"address": "mueller@example.com"
|
"address": "mueller@example.com"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"content_type": {
|
"subject": {
|
||||||
"c_type": "multipart",
|
"Text": "Die Hasen und die Frösche"
|
||||||
"c_subtype": "mixed",
|
},
|
||||||
"attributes": {
|
"date": {
|
||||||
"boundary": "=====================_715462801==_"
|
"DateTime": {
|
||||||
|
"year": 2000,
|
||||||
|
"month": 5,
|
||||||
|
"day": 19,
|
||||||
|
"hour": 0,
|
||||||
|
"minute": 38,
|
||||||
|
"second": 13,
|
||||||
|
"tz_before_gmt": true,
|
||||||
|
"tz_hour": 4,
|
||||||
|
"tz_minute": 0
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"others": {
|
"mime_version": {
|
||||||
"X-Sender": [
|
"Text": "1.0"
|
||||||
"dwsauder@pop.example.com (Unverified)"
|
},
|
||||||
],
|
"message_id": {
|
||||||
"X-Priority": [
|
"Text": "4.2.0.58.20000519003809.00a85140@pop.example.com"
|
||||||
"2 (High)"
|
},
|
||||||
],
|
"from": {
|
||||||
"X-Mailer": [
|
"Address": {
|
||||||
"QUALCOMM Windows Eudora Pro Version 4.2.0.58"
|
"name": "Doug Sauder",
|
||||||
]
|
"address": "dwsauder@example.com"
|
||||||
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"html_body": [
|
"html_body": [
|
||||||
{
|
1
|
||||||
"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; "wir leben", sprach ein Redner, "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." <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"Halt", rief nun eben dieser Sprecher, "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." <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"
|
|
||||||
}
|
|
||||||
],
|
],
|
||||||
"text_body": [
|
"text_body": [
|
||||||
{
|
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"
|
|
||||||
}
|
|
||||||
],
|
],
|
||||||
"attachments": [
|
"attachments": [
|
||||||
|
2,
|
||||||
|
3,
|
||||||
|
4,
|
||||||
|
5
|
||||||
|
],
|
||||||
|
"parts": [
|
||||||
{
|
{
|
||||||
"Binary": {
|
"Multipart": {
|
||||||
"header": {
|
"headers_rfc": {
|
||||||
"content_disposition": {
|
|
||||||
"c_type": "inline",
|
|
||||||
"attributes": {
|
|
||||||
"filename": "2aa51367.png"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"content_id": "4.2.0.58.20000519003809.00a85140@pop.example.com.2",
|
|
||||||
"content_transfer_encoding": "base64",
|
|
||||||
"content_type": {
|
"content_type": {
|
||||||
"c_type": "image",
|
"ContentType": {
|
||||||
"c_subtype": "png",
|
"c_type": "multipart",
|
||||||
"attributes": {
|
"c_subtype": "related",
|
||||||
"name": "2aa51367.png"
|
"attributes": {
|
||||||
|
"boundary": "=====================_715462801==_.REL",
|
||||||
|
"type": "text/html"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"Html": {
|
||||||
|
"headers_rfc": {
|
||||||
|
"content_transfer_encoding": {
|
||||||
|
"Text": "quoted-printable"
|
||||||
|
},
|
||||||
|
"content_type": {
|
||||||
|
"ContentType": {
|
||||||
|
"c_type": "text",
|
||||||
|
"c_subtype": "html",
|
||||||
|
"attributes": {
|
||||||
|
"charset": "iso-8859-1"
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"contents": [
|
"is_encoding_problem": false,
|
||||||
|
"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; "wir leben", sprach ein Redner, "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." <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"Halt", rief nun eben dieser Sprecher, "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." <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_rfc": {
|
||||||
|
"content_transfer_encoding": {
|
||||||
|
"Text": "base64"
|
||||||
|
},
|
||||||
|
"content_type": {
|
||||||
|
"ContentType": {
|
||||||
|
"c_type": "image",
|
||||||
|
"c_subtype": "png",
|
||||||
|
"attributes": {
|
||||||
|
"name": "2aa51367.png"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"content_id": {
|
||||||
|
"Text": "4.2.0.58.20000519003809.00a85140@pop.example.com.2"
|
||||||
|
},
|
||||||
|
"content_disposition": {
|
||||||
|
"ContentType": {
|
||||||
|
"c_type": "inline",
|
||||||
|
"c_subtype": null,
|
||||||
|
"attributes": {
|
||||||
|
"filename": "2aa51367.png"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"is_encoding_problem": false,
|
||||||
|
"body": [
|
||||||
137,
|
137,
|
||||||
80,
|
80,
|
||||||
78,
|
78,
|
||||||
@@ -1589,24 +1625,34 @@ bGlwMmdpZiB2LjAuNiBieSBZdmVzIFBpZ3VldDZzO7wAAAAASUVORK5CYII=
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"Binary": {
|
"Binary": {
|
||||||
"header": {
|
"headers_rfc": {
|
||||||
"content_disposition": {
|
"content_type": {
|
||||||
"c_type": "inline",
|
"ContentType": {
|
||||||
"attributes": {
|
"c_type": "image",
|
||||||
"filename": "2aa51371.png"
|
"c_subtype": "png",
|
||||||
|
"attributes": {
|
||||||
|
"name": "2aa51371.png"
|
||||||
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"content_id": "4.2.0.58.20000519003809.00a85140@pop.example.com.3",
|
"content_id": {
|
||||||
"content_transfer_encoding": "base64",
|
"Text": "4.2.0.58.20000519003809.00a85140@pop.example.com.3"
|
||||||
"content_type": {
|
},
|
||||||
"c_type": "image",
|
"content_transfer_encoding": {
|
||||||
"c_subtype": "png",
|
"Text": "base64"
|
||||||
"attributes": {
|
},
|
||||||
"name": "2aa51371.png"
|
"content_disposition": {
|
||||||
|
"ContentType": {
|
||||||
|
"c_type": "inline",
|
||||||
|
"c_subtype": null,
|
||||||
|
"attributes": {
|
||||||
|
"filename": "2aa51371.png"
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"contents": [
|
"is_encoding_problem": false,
|
||||||
|
"body": [
|
||||||
137,
|
137,
|
||||||
80,
|
80,
|
||||||
78,
|
78,
|
||||||
@@ -3065,23 +3111,31 @@ bGlwMmdpZiB2LjAuNiBieSBZdmVzIFBpZ3VldDZzO7wAAAAASUVORK5CYII=
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"Binary": {
|
"Binary": {
|
||||||
"header": {
|
"headers_rfc": {
|
||||||
"content_disposition": {
|
"content_disposition": {
|
||||||
"c_type": "attachment",
|
"ContentType": {
|
||||||
"attributes": {
|
"c_type": "attachment",
|
||||||
"filename": "blueball.png"
|
"c_subtype": null,
|
||||||
|
"attributes": {
|
||||||
|
"filename": "blueball.png"
|
||||||
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"content_transfer_encoding": "base64",
|
|
||||||
"content_type": {
|
"content_type": {
|
||||||
"c_type": "image",
|
"ContentType": {
|
||||||
"c_subtype": "png",
|
"c_type": "image",
|
||||||
"attributes": {
|
"c_subtype": "png",
|
||||||
"name": "blueball.png"
|
"attributes": {
|
||||||
|
"name": "blueball.png"
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
},
|
||||||
|
"content_transfer_encoding": {
|
||||||
|
"Text": "base64"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"contents": [
|
"is_encoding_problem": false,
|
||||||
|
"body": [
|
||||||
137,
|
137,
|
||||||
80,
|
80,
|
||||||
78,
|
78,
|
||||||
@@ -4412,23 +4466,31 @@ bGlwMmdpZiB2LjAuNiBieSBZdmVzIFBpZ3VldDZzO7wAAAAASUVORK5CYII=
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"Binary": {
|
"Binary": {
|
||||||
"header": {
|
"headers_rfc": {
|
||||||
"content_disposition": {
|
"content_type": {
|
||||||
"c_type": "attachment",
|
"ContentType": {
|
||||||
"attributes": {
|
"c_type": "image",
|
||||||
"filename": "greenball.png"
|
"c_subtype": "png",
|
||||||
|
"attributes": {
|
||||||
|
"name": "greenball.png"
|
||||||
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"content_transfer_encoding": "base64",
|
"content_transfer_encoding": {
|
||||||
"content_type": {
|
"Text": "base64"
|
||||||
"c_type": "image",
|
},
|
||||||
"c_subtype": "png",
|
"content_disposition": {
|
||||||
"attributes": {
|
"ContentType": {
|
||||||
"name": "greenball.png"
|
"c_type": "attachment",
|
||||||
|
"c_subtype": null,
|
||||||
|
"attributes": {
|
||||||
|
"filename": "greenball.png"
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"contents": [
|
"is_encoding_problem": false,
|
||||||
|
"body": [
|
||||||
137,
|
137,
|
||||||
80,
|
80,
|
||||||
78,
|
78,
|
||||||
@@ -5730,5 +5792,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
|
||||||
}
|
}
|
||||||
+116
-75
@@ -83,19 +83,41 @@ Birds of a feather flock together.
|
|||||||
--=====================_716740438==_--
|
--=====================_716740438==_--
|
||||||
|
|
||||||
|
|
||||||
---- EXPECTED STRUCTURE ----
|
---- EXPECTED STRUCTURE ----{
|
||||||
{
|
"headers_rfc": {
|
||||||
"header": {
|
"subject": {
|
||||||
|
"Text": "Die Hasen und die Frösche"
|
||||||
|
},
|
||||||
|
"content_type": {
|
||||||
|
"ContentType": {
|
||||||
|
"c_type": "multipart",
|
||||||
|
"c_subtype": "mixed",
|
||||||
|
"attributes": {
|
||||||
|
"boundary": "=====================_716740438==_"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"mime_version": {
|
||||||
|
"Text": "1.0"
|
||||||
|
},
|
||||||
"date": {
|
"date": {
|
||||||
"year": 2000,
|
"DateTime": {
|
||||||
"month": 5,
|
"year": 2000,
|
||||||
"day": 19,
|
"month": 5,
|
||||||
"hour": 0,
|
"day": 19,
|
||||||
"minute": 59,
|
"hour": 0,
|
||||||
"second": 31,
|
"minute": 59,
|
||||||
"tz_before_gmt": true,
|
"second": 31,
|
||||||
"tz_hour": 4,
|
"tz_before_gmt": true,
|
||||||
"tz_minute": 0
|
"tz_hour": 4,
|
||||||
|
"tz_minute": 0
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"to": {
|
||||||
|
"Address": {
|
||||||
|
"name": "Heinz Müller",
|
||||||
|
"address": "mueller@example.com"
|
||||||
|
}
|
||||||
},
|
},
|
||||||
"from": {
|
"from": {
|
||||||
"Address": {
|
"Address": {
|
||||||
@@ -103,94 +125,113 @@ Birds of a feather flock together.
|
|||||||
"address": "dwsauder@example.com"
|
"address": "dwsauder@example.com"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"message_id": "4.2.0.58.20000519005818.00a86aa0@pop.example.com",
|
"message_id": {
|
||||||
"mime_version": "1.0",
|
"Text": "4.2.0.58.20000519005818.00a86aa0@pop.example.com"
|
||||||
"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": "=====================_716740438==_"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"others": {
|
|
||||||
"X-Sender": [
|
|
||||||
"dwsauder@pop.example.com (Unverified)"
|
|
||||||
],
|
|
||||||
"X-Mailer": [
|
|
||||||
"QUALCOMM Windows Eudora Pro Version 4.2.0.58"
|
|
||||||
]
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"html_body": [
|
"html_body": [
|
||||||
{
|
0
|
||||||
"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>"
|
|
||||||
}
|
|
||||||
],
|
],
|
||||||
"text_body": [
|
"text_body": [
|
||||||
{
|
0
|
||||||
"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"
|
|
||||||
}
|
|
||||||
],
|
],
|
||||||
"attachments": [
|
"attachments": [
|
||||||
|
1,
|
||||||
|
2
|
||||||
|
],
|
||||||
|
"parts": [
|
||||||
{
|
{
|
||||||
"Text": {
|
"Text": {
|
||||||
"header": {
|
"headers_rfc": {
|
||||||
"content_disposition": {
|
"content_transfer_encoding": {
|
||||||
"c_type": "attachment",
|
"Text": "quoted-printable"
|
||||||
"attributes": {
|
|
||||||
"filename": "HasenundFr�sche.txt"
|
|
||||||
}
|
|
||||||
},
|
},
|
||||||
"content_transfer_encoding": "x-uuencode",
|
|
||||||
"content_type": {
|
"content_type": {
|
||||||
"c_type": "text",
|
"ContentType": {
|
||||||
"c_subtype": "plain",
|
"c_type": "text",
|
||||||
"attributes": {
|
"c_subtype": "plain",
|
||||||
"x-mac-creator": "74747874",
|
"attributes": {
|
||||||
"name": "HasenundFr�sche.txt",
|
"charset": "iso-8859-1"
|
||||||
"x-mac-type": "54455854"
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"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"
|
"is_encoding_problem": false,
|
||||||
|
"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": {
|
"Text": {
|
||||||
"header": {
|
"headers_rfc": {
|
||||||
"content_disposition": {
|
"content_disposition": {
|
||||||
"c_type": "attachment",
|
"ContentType": {
|
||||||
"attributes": {
|
"c_type": "attachment",
|
||||||
"filename": "farmerandstork.txt"
|
"c_subtype": null,
|
||||||
|
"attributes": {
|
||||||
|
"filename": "HasenundFr�sche.txt"
|
||||||
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"content_transfer_encoding": {
|
||||||
|
"Text": "x-uuencode"
|
||||||
|
},
|
||||||
"content_type": {
|
"content_type": {
|
||||||
"c_type": "text",
|
"ContentType": {
|
||||||
"c_subtype": "plain",
|
"c_type": "text",
|
||||||
"attributes": {
|
"c_subtype": "plain",
|
||||||
"charset": "us-ascii"
|
"attributes": {
|
||||||
|
"x-mac-type": "54455854",
|
||||||
|
"name": "HasenundFr�sche.txt",
|
||||||
|
"x-mac-creator": "74747874"
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"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"
|
"is_encoding_problem": false,
|
||||||
|
"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"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"Text": {
|
||||||
|
"headers_rfc": {
|
||||||
|
"content_disposition": {
|
||||||
|
"ContentType": {
|
||||||
|
"c_type": "attachment",
|
||||||
|
"c_subtype": null,
|
||||||
|
"attributes": {
|
||||||
|
"filename": "farmerandstork.txt"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"content_type": {
|
||||||
|
"ContentType": {
|
||||||
|
"c_type": "text",
|
||||||
|
"c_subtype": "plain",
|
||||||
|
"attributes": {
|
||||||
|
"charset": "us-ascii"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"is_encoding_problem": false,
|
||||||
|
"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"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
]
|
],
|
||||||
|
"structure": {
|
||||||
|
"List": [
|
||||||
|
{
|
||||||
|
"Part": 0
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"Part": 1
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"Part": 2
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"offset_header": 0,
|
||||||
|
"offset_body": 462,
|
||||||
|
"offset_end": 3739
|
||||||
}
|
}
|
||||||
+57
-50
@@ -30,19 +30,32 @@ ein wenig aufschieben, denn auch uns f=FCrchten, wie ihr seht, einige =
|
|||||||
Tiere, welche also wohl noch ungl=FCcklicher sein m=FCssen als wir."=20
|
Tiere, welche also wohl noch ungl=FCcklicher sein m=FCssen als wir."=20
|
||||||
|
|
||||||
|
|
||||||
---- EXPECTED STRUCTURE ----
|
---- EXPECTED STRUCTURE ----{
|
||||||
{
|
"headers_rfc": {
|
||||||
"header": {
|
"message_id": {
|
||||||
|
"Text": "NDBBIAKOPKHFGPLCODIGMEKBCHAA.doug@example.com"
|
||||||
|
},
|
||||||
|
"mime_version": {
|
||||||
|
"Text": "1.0"
|
||||||
|
},
|
||||||
"date": {
|
"date": {
|
||||||
"year": 2000,
|
"DateTime": {
|
||||||
"month": 5,
|
"year": 2000,
|
||||||
"day": 17,
|
"month": 5,
|
||||||
"hour": 19,
|
"day": 17,
|
||||||
"minute": 10,
|
"hour": 19,
|
||||||
"second": 31,
|
"minute": 10,
|
||||||
"tz_before_gmt": true,
|
"second": 31,
|
||||||
"tz_hour": 4,
|
"tz_before_gmt": true,
|
||||||
"tz_minute": 0
|
"tz_hour": 4,
|
||||||
|
"tz_minute": 0
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"to": {
|
||||||
|
"Address": {
|
||||||
|
"name": "J�rgen Schm�rgen",
|
||||||
|
"address": "schmuergen@example.com"
|
||||||
|
}
|
||||||
},
|
},
|
||||||
"from": {
|
"from": {
|
||||||
"Address": {
|
"Address": {
|
||||||
@@ -50,49 +63,43 @@ Tiere, welche also wohl noch ungl=FCcklicher sein m=FCssen als wir."=20
|
|||||||
"address": "doug@example.com"
|
"address": "doug@example.com"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"message_id": "NDBBIAKOPKHFGPLCODIGMEKBCHAA.doug@example.com",
|
"subject": {
|
||||||
"mime_version": "1.0",
|
"Text": "Die Hasen und die Fr�sche (Microsoft Outlook 00)"
|
||||||
"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"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"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)"
|
|
||||||
]
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"html_body": [
|
"html_body": [
|
||||||
{
|
0
|
||||||
"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>"
|
|
||||||
}
|
|
||||||
],
|
],
|
||||||
"text_body": [
|
"text_body": [
|
||||||
|
0
|
||||||
|
],
|
||||||
|
"attachments": [],
|
||||||
|
"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": {
|
||||||
|
"headers_rfc": {
|
||||||
|
"content_type": {
|
||||||
|
"ContentType": {
|
||||||
|
"c_type": "text",
|
||||||
|
"c_subtype": "plain",
|
||||||
|
"attributes": {
|
||||||
|
"charset": "iso-8859-1"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"content_transfer_encoding": {
|
||||||
|
"Text": "quoted-printable"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"is_encoding_problem": false,
|
||||||
|
"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
|
||||||
}
|
}
|
||||||
+154
-87
@@ -155,29 +155,8 @@ IFl2ZXMgUGlndWV0NnM7vAAAAABJRU5ErkJggg==
|
|||||||
|
|
||||||
------=_NextPart_000_000C_01BFC038.5A5C8E60--
|
------=_NextPart_000_000C_01BFC038.5A5C8E60--
|
||||||
|
|
||||||
---- EXPECTED STRUCTURE ----
|
---- EXPECTED STRUCTURE ----{
|
||||||
{
|
"headers_rfc": {
|
||||||
"header": {
|
|
||||||
"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"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"message_id": "NDBBIAKOPKHFGPLCODIGKEKFCHAA.doug@example.com",
|
|
||||||
"mime_version": "1.0",
|
|
||||||
"subject": "Test message from Microsoft Outlook 00",
|
|
||||||
"to": {
|
"to": {
|
||||||
"Address": {
|
"Address": {
|
||||||
"name": "Joe Blow",
|
"name": "Joe Blow",
|
||||||
@@ -185,75 +164,130 @@ IFl2ZXMgUGlndWV0NnM7vAAAAABJRU5ErkJggg==
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"content_type": {
|
"content_type": {
|
||||||
"c_type": "multipart",
|
"ContentType": {
|
||||||
"c_subtype": "related",
|
"c_type": "multipart",
|
||||||
"attributes": {
|
"c_subtype": "related",
|
||||||
"boundary": "----=_NextPart_000_000C_01BFC038.5A5C8E60"
|
"attributes": {
|
||||||
|
"boundary": "----=_NextPart_000_000C_01BFC038.5A5C8E60"
|
||||||
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"others": {
|
"message_id": {
|
||||||
"X-Mailer": [
|
"Text": "NDBBIAKOPKHFGPLCODIGKEKFCHAA.doug@example.com"
|
||||||
"Microsoft Outlook IMO, Build 9.0.2416 (9.0.2910.0)"
|
},
|
||||||
],
|
"from": {
|
||||||
"X-MSMail-Priority": [
|
"Address": {
|
||||||
"Normal"
|
"name": "Doug Sauder",
|
||||||
],
|
"address": "doug@example.com"
|
||||||
"X-MimeOLE": [
|
}
|
||||||
"Produced By Microsoft MimeOLE V5.00.2314.1300"
|
},
|
||||||
],
|
"subject": {
|
||||||
"X-Priority": [
|
"Text": "Test message from Microsoft Outlook 00"
|
||||||
"3 (Normal)"
|
},
|
||||||
],
|
"mime_version": {
|
||||||
"Importance": [
|
"Text": "1.0"
|
||||||
"Normal"
|
},
|
||||||
]
|
"date": {
|
||||||
|
"DateTime": {
|
||||||
|
"year": 2000,
|
||||||
|
"month": 5,
|
||||||
|
"day": 17,
|
||||||
|
"hour": 19,
|
||||||
|
"minute": 44,
|
||||||
|
"second": 45,
|
||||||
|
"tz_before_gmt": true,
|
||||||
|
"tz_hour": 4,
|
||||||
|
"tz_minute": 0
|
||||||
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"html_body": [
|
"html_body": [
|
||||||
{
|
2
|
||||||
"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> <BR>A HARE \none day ridiculed the short feet and slow pace of the Tortoise, who replied, \nlaughing: \"Though you be swift as the wind, I will beat you in a \nrace.\" 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. On the day appointed for the race the two started \ntogether. The Tortoise never for a moment stopped, but went on with a slow \nbut steady pace straight to the end of the course. The Hare, lying down by \nthe wayside, fell fast asleep. 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. </FONT></DIV>\n<DIV><FONT face=Arial size=2></FONT> </DIV>\n<DIV><FONT face=Arial size=2><IMG align=baseline alt=\"blue ball\" border=0 \nhspace=0 src=\"cid:823504223@17052000-0f8d\"><BR> <BR>Slow but steady wins \nthe race. </FONT></DIV>\n<DIV> </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"
|
|
||||||
}
|
|
||||||
],
|
],
|
||||||
"text_body": [
|
"text_body": [
|
||||||
{
|
1
|
||||||
"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"
|
|
||||||
}
|
|
||||||
],
|
],
|
||||||
"attachments": [
|
"attachments": [
|
||||||
|
3,
|
||||||
|
4
|
||||||
|
],
|
||||||
|
"parts": [
|
||||||
{
|
{
|
||||||
"Binary": {
|
"Multipart": {
|
||||||
"header": {
|
"headers_rfc": {
|
||||||
"content_id": "823504223@17052000-0f8d",
|
|
||||||
"content_transfer_encoding": "base64",
|
|
||||||
"content_type": {
|
"content_type": {
|
||||||
"c_type": "image",
|
"ContentType": {
|
||||||
"c_subtype": "png",
|
"c_type": "multipart",
|
||||||
"attributes": {
|
"c_subtype": "alternative",
|
||||||
"name": "blueball.png"
|
"attributes": {
|
||||||
|
"boundary": "----=_NextPart_001_000D_01BFC038.5A5C8E60"
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"Text": {
|
||||||
|
"headers_rfc": {
|
||||||
|
"content_type": {
|
||||||
|
"ContentType": {
|
||||||
|
"c_type": "text",
|
||||||
|
"c_subtype": "plain",
|
||||||
|
"attributes": {
|
||||||
|
"charset": "iso-8859-1"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"content_transfer_encoding": {
|
||||||
|
"Text": "quoted-printable"
|
||||||
|
}
|
||||||
},
|
},
|
||||||
"contents": [
|
"is_encoding_problem": false,
|
||||||
|
"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_rfc": {
|
||||||
|
"content_type": {
|
||||||
|
"ContentType": {
|
||||||
|
"c_type": "text",
|
||||||
|
"c_subtype": "html",
|
||||||
|
"attributes": {
|
||||||
|
"charset": "iso-8859-1"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"content_transfer_encoding": {
|
||||||
|
"Text": "quoted-printable"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"is_encoding_problem": false,
|
||||||
|
"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> <BR>A HARE \none day ridiculed the short feet and slow pace of the Tortoise, who replied, \nlaughing: \"Though you be swift as the wind, I will beat you in a \nrace.\" 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. On the day appointed for the race the two started \ntogether. The Tortoise never for a moment stopped, but went on with a slow \nbut steady pace straight to the end of the course. The Hare, lying down by \nthe wayside, fell fast asleep. 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. </FONT></DIV>\n<DIV><FONT face=Arial size=2></FONT> </DIV>\n<DIV><FONT face=Arial size=2><IMG align=baseline alt=\"blue ball\" border=0 \nhspace=0 src=\"cid:823504223@17052000-0f8d\"><BR> <BR>Slow but steady wins \nthe race. </FONT></DIV>\n<DIV> </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": {
|
||||||
|
"headers_rfc": {
|
||||||
|
"content_transfer_encoding": {
|
||||||
|
"Text": "base64"
|
||||||
|
},
|
||||||
|
"content_type": {
|
||||||
|
"ContentType": {
|
||||||
|
"c_type": "image",
|
||||||
|
"c_subtype": "png",
|
||||||
|
"attributes": {
|
||||||
|
"name": "blueball.png"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"content_id": {
|
||||||
|
"Text": "823504223@17052000-0f8d"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"is_encoding_problem": false,
|
||||||
|
"body": [
|
||||||
137,
|
137,
|
||||||
80,
|
80,
|
||||||
78,
|
78,
|
||||||
@@ -1584,18 +1618,25 @@ IFl2ZXMgUGlndWV0NnM7vAAAAABJRU5ErkJggg==
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"Binary": {
|
"Binary": {
|
||||||
"header": {
|
"headers_rfc": {
|
||||||
"content_id": "823504223@17052000-0f94",
|
|
||||||
"content_transfer_encoding": "base64",
|
|
||||||
"content_type": {
|
"content_type": {
|
||||||
"c_type": "image",
|
"ContentType": {
|
||||||
"c_subtype": "png",
|
"c_type": "image",
|
||||||
"attributes": {
|
"c_subtype": "png",
|
||||||
"name": "redball.png"
|
"attributes": {
|
||||||
|
"name": "redball.png"
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
},
|
||||||
|
"content_id": {
|
||||||
|
"Text": "823504223@17052000-0f94"
|
||||||
|
},
|
||||||
|
"content_transfer_encoding": {
|
||||||
|
"Text": "base64"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"contents": [
|
"is_encoding_problem": false,
|
||||||
|
"body": [
|
||||||
137,
|
137,
|
||||||
80,
|
80,
|
||||||
78,
|
78,
|
||||||
@@ -3052,5 +3093,31 @@ IFl2ZXMgUGlndWV0NnM7vAAAAABJRU5ErkJggg==
|
|||||||
]
|
]
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
]
|
],
|
||||||
|
"structure": {
|
||||||
|
"List": [
|
||||||
|
{
|
||||||
|
"MultiPart": [
|
||||||
|
0,
|
||||||
|
[
|
||||||
|
{
|
||||||
|
"Part": 1
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"Part": 2
|
||||||
|
}
|
||||||
|
]
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"Part": 3
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"Part": 4
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"offset_header": 0,
|
||||||
|
"offset_body": 526,
|
||||||
|
"offset_end": 7631
|
||||||
}
|
}
|
||||||
+57
-44
@@ -26,19 +26,22 @@ reached the goal, and was comfortably dozing after her fatigue.
|
|||||||
|
|
||||||
Slow but steady wins the race.
|
Slow but steady wins the race.
|
||||||
|
|
||||||
---- EXPECTED STRUCTURE ----
|
---- EXPECTED STRUCTURE ----{
|
||||||
{
|
"headers_rfc": {
|
||||||
"header": {
|
"message_id": {
|
||||||
"date": {
|
"Text": "392362D8.B650789F@example.com"
|
||||||
"year": 2000,
|
},
|
||||||
"month": 5,
|
"mime_version": {
|
||||||
"day": 17,
|
"Text": "1.0"
|
||||||
"hour": 23,
|
},
|
||||||
"minute": 26,
|
"to": {
|
||||||
"second": 16,
|
"Address": {
|
||||||
"tz_before_gmt": true,
|
"name": "Joe Blow",
|
||||||
"tz_hour": 4,
|
"address": "blow@example.com"
|
||||||
"tz_minute": 0
|
}
|
||||||
|
},
|
||||||
|
"subject": {
|
||||||
|
"Text": "Test message from Netscape Communicator 4.7"
|
||||||
},
|
},
|
||||||
"from": {
|
"from": {
|
||||||
"Address": {
|
"Address": {
|
||||||
@@ -46,43 +49,53 @@ Slow but steady wins the race.
|
|||||||
"address": "dwsauder@example.com"
|
"address": "dwsauder@example.com"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"message_id": "392362D8.B650789F@example.com",
|
"date": {
|
||||||
"mime_version": "1.0",
|
"DateTime": {
|
||||||
"subject": "Test message from Netscape Communicator 4.7",
|
"year": 2000,
|
||||||
"to": {
|
"month": 5,
|
||||||
"Address": {
|
"day": 17,
|
||||||
"name": "Joe Blow",
|
"hour": 23,
|
||||||
"address": "blow@example.com"
|
"minute": 26,
|
||||||
|
"second": 16,
|
||||||
|
"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"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"others": {
|
|
||||||
"X-Mailer": [
|
|
||||||
"Mozilla 4.7 [en] (WinNT; I)"
|
|
||||||
],
|
|
||||||
"X-Accept-Language": [
|
|
||||||
"en"
|
|
||||||
],
|
|
||||||
"X-Priority": [
|
|
||||||
"1 (Highest)"
|
|
||||||
]
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"html_body": [
|
"html_body": [
|
||||||
{
|
0
|
||||||
"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>"
|
|
||||||
}
|
|
||||||
],
|
],
|
||||||
"text_body": [
|
"text_body": [
|
||||||
|
0
|
||||||
|
],
|
||||||
|
"attachments": [],
|
||||||
|
"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": {
|
||||||
|
"headers_rfc": {
|
||||||
|
"content_transfer_encoding": {
|
||||||
|
"Text": "7bit"
|
||||||
|
},
|
||||||
|
"content_type": {
|
||||||
|
"ContentType": {
|
||||||
|
"c_type": "text",
|
||||||
|
"c_subtype": "plain",
|
||||||
|
"attributes": {
|
||||||
|
"charset": "us-ascii"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"is_encoding_problem": false,
|
||||||
|
"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
|
||||||
}
|
}
|
||||||
+144
-89
@@ -110,19 +110,31 @@ Slow but steady wins the race.
|
|||||||
--------------0BBC657DDC74A0B8454627FD--
|
--------------0BBC657DDC74A0B8454627FD--
|
||||||
|
|
||||||
|
|
||||||
---- EXPECTED STRUCTURE ----
|
---- EXPECTED STRUCTURE ----{
|
||||||
{
|
"headers_rfc": {
|
||||||
"header": {
|
"mime_version": {
|
||||||
"date": {
|
"Text": "1.0"
|
||||||
"year": 2000,
|
},
|
||||||
"month": 5,
|
"to": {
|
||||||
"day": 17,
|
"Address": {
|
||||||
"hour": 23,
|
"name": "Joe Blow",
|
||||||
"minute": 28,
|
"address": "blow@example.com"
|
||||||
"second": 27,
|
}
|
||||||
"tz_before_gmt": true,
|
},
|
||||||
"tz_hour": 4,
|
"message_id": {
|
||||||
"tz_minute": 0
|
"Text": "3923635B.85C58444@example.com"
|
||||||
|
},
|
||||||
|
"subject": {
|
||||||
|
"Text": "Test message from Netscape Communicator 4.7"
|
||||||
|
},
|
||||||
|
"content_type": {
|
||||||
|
"ContentType": {
|
||||||
|
"c_type": "multipart",
|
||||||
|
"c_subtype": "mixed",
|
||||||
|
"attributes": {
|
||||||
|
"boundary": "------------0BBC657DDC74A0B8454627FD"
|
||||||
|
}
|
||||||
|
}
|
||||||
},
|
},
|
||||||
"from": {
|
"from": {
|
||||||
"Address": {
|
"Address": {
|
||||||
@@ -130,75 +142,83 @@ Slow but steady wins the race.
|
|||||||
"address": "dwsauder@example.com"
|
"address": "dwsauder@example.com"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"message_id": "3923635B.85C58444@example.com",
|
"date": {
|
||||||
"mime_version": "1.0",
|
"DateTime": {
|
||||||
"subject": "Test message from Netscape Communicator 4.7",
|
"year": 2000,
|
||||||
"to": {
|
"month": 5,
|
||||||
"Address": {
|
"day": 17,
|
||||||
"name": "Joe Blow",
|
"hour": 23,
|
||||||
"address": "blow@example.com"
|
"minute": 28,
|
||||||
|
"second": 27,
|
||||||
|
"tz_before_gmt": true,
|
||||||
|
"tz_hour": 4,
|
||||||
|
"tz_minute": 0
|
||||||
}
|
}
|
||||||
},
|
|
||||||
"content_type": {
|
|
||||||
"c_type": "multipart",
|
|
||||||
"c_subtype": "mixed",
|
|
||||||
"attributes": {
|
|
||||||
"boundary": "------------0BBC657DDC74A0B8454627FD"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"others": {
|
|
||||||
"X-Mailer": [
|
|
||||||
"Mozilla 4.7 [en] (WinNT; I)"
|
|
||||||
],
|
|
||||||
"X-Accept-Language": [
|
|
||||||
"en"
|
|
||||||
]
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"html_body": [
|
"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>"
|
|
||||||
},
|
|
||||||
0,
|
0,
|
||||||
1
|
1,
|
||||||
|
2
|
||||||
],
|
],
|
||||||
"text_body": [
|
"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,
|
0,
|
||||||
1
|
1,
|
||||||
|
2
|
||||||
],
|
],
|
||||||
"attachments": [
|
"attachments": [
|
||||||
|
1,
|
||||||
|
2,
|
||||||
|
3
|
||||||
|
],
|
||||||
|
"parts": [
|
||||||
{
|
{
|
||||||
"InlineBinary": {
|
"Text": {
|
||||||
"header": {
|
"headers_rfc": {
|
||||||
"content_disposition": {
|
"content_type": {
|
||||||
"c_type": "inline",
|
"ContentType": {
|
||||||
"attributes": {
|
"c_type": "text",
|
||||||
"filename": "blueball.png"
|
"c_subtype": "plain",
|
||||||
|
"attributes": {
|
||||||
|
"charset": "us-ascii"
|
||||||
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"content_transfer_encoding": "base64",
|
"content_transfer_encoding": {
|
||||||
|
"Text": "7bit"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"is_encoding_problem": false,
|
||||||
|
"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."
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"InlineBinary": {
|
||||||
|
"headers_rfc": {
|
||||||
|
"content_disposition": {
|
||||||
|
"ContentType": {
|
||||||
|
"c_type": "inline",
|
||||||
|
"c_subtype": null,
|
||||||
|
"attributes": {
|
||||||
|
"filename": "blueball.png"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"content_transfer_encoding": {
|
||||||
|
"Text": "base64"
|
||||||
|
},
|
||||||
"content_type": {
|
"content_type": {
|
||||||
"c_type": "image",
|
"ContentType": {
|
||||||
"c_subtype": "png",
|
"c_type": "image",
|
||||||
"attributes": {
|
"c_subtype": "png",
|
||||||
"name": "blueball.png"
|
"attributes": {
|
||||||
|
"name": "blueball.png"
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"contents": [
|
"is_encoding_problem": false,
|
||||||
|
"body": [
|
||||||
137,
|
137,
|
||||||
80,
|
80,
|
||||||
78,
|
78,
|
||||||
@@ -1529,23 +1549,31 @@ Slow but steady wins the race.
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"InlineBinary": {
|
"InlineBinary": {
|
||||||
"header": {
|
"headers_rfc": {
|
||||||
"content_disposition": {
|
"content_disposition": {
|
||||||
"c_type": "inline",
|
"ContentType": {
|
||||||
"attributes": {
|
"c_type": "inline",
|
||||||
"filename": "greenball.png"
|
"c_subtype": null,
|
||||||
|
"attributes": {
|
||||||
|
"filename": "greenball.png"
|
||||||
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"content_transfer_encoding": "base64",
|
"content_transfer_encoding": {
|
||||||
|
"Text": "base64"
|
||||||
|
},
|
||||||
"content_type": {
|
"content_type": {
|
||||||
"c_type": "image",
|
"ContentType": {
|
||||||
"c_subtype": "png",
|
"c_type": "image",
|
||||||
"attributes": {
|
"c_subtype": "png",
|
||||||
"name": "greenball.png"
|
"attributes": {
|
||||||
|
"name": "greenball.png"
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"contents": [
|
"is_encoding_problem": false,
|
||||||
|
"body": [
|
||||||
137,
|
137,
|
||||||
80,
|
80,
|
||||||
78,
|
78,
|
||||||
@@ -2849,25 +2877,52 @@ Slow but steady wins the race.
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"Text": {
|
"Text": {
|
||||||
"header": {
|
"headers_rfc": {
|
||||||
"content_disposition": {
|
"content_type": {
|
||||||
"c_type": "inline",
|
"ContentType": {
|
||||||
"attributes": {
|
"c_type": "text",
|
||||||
"filename": "hareandtoroise.txt"
|
"c_subtype": "plain",
|
||||||
|
"attributes": {
|
||||||
|
"charset": "us-ascii",
|
||||||
|
"name": "hareandtoroise.txt"
|
||||||
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"content_transfer_encoding": "7bit",
|
"content_transfer_encoding": {
|
||||||
"content_type": {
|
"Text": "7bit"
|
||||||
"c_type": "text",
|
},
|
||||||
"c_subtype": "plain",
|
"content_disposition": {
|
||||||
"attributes": {
|
"ContentType": {
|
||||||
"name": "hareandtoroise.txt",
|
"c_type": "inline",
|
||||||
"charset": "us-ascii"
|
"c_subtype": null,
|
||||||
|
"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"
|
"is_encoding_problem": false,
|
||||||
|
"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": {
|
||||||
|
"List": [
|
||||||
|
{
|
||||||
|
"Part": 0
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"Part": 1
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"Part": 2
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"Part": 3
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"offset_header": 0,
|
||||||
|
"offset_body": 378,
|
||||||
|
"offset_end": 6290
|
||||||
}
|
}
|
||||||
+130
-73
@@ -95,84 +95,113 @@ mWkOvwAAACV0RVh0Q29tbWVudABjbGlwMmdpZiB2LjAuNiBieSBZdmVzIFBp
|
|||||||
Z3VldDZzO7wAAAAASUVORK5CYII=
|
Z3VldDZzO7wAAAAASUVORK5CYII=
|
||||||
---1463757054-952513540-958744548=:8452--
|
---1463757054-952513540-958744548=:8452--
|
||||||
|
|
||||||
---- EXPECTED STRUCTURE ----
|
---- EXPECTED STRUCTURE ----{
|
||||||
{
|
"headers_rfc": {
|
||||||
"header": {
|
|
||||||
"date": {
|
|
||||||
"year": 2000,
|
|
||||||
"month": 5,
|
|
||||||
"day": 19,
|
|
||||||
"hour": 9,
|
|
||||||
"minute": 55,
|
|
||||||
"second": 48,
|
|
||||||
"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.0005190951410.8452-102000@penguin.example.com",
|
|
||||||
"mime_version": "1.0",
|
|
||||||
"subject": "Test message from PINE",
|
|
||||||
"to": {
|
"to": {
|
||||||
"Address": {
|
"Address": {
|
||||||
"name": "Joe Blow",
|
"name": "Joe Blow",
|
||||||
"address": "blow@example.com"
|
"address": "blow@example.com"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"date": {
|
||||||
|
"DateTime": {
|
||||||
|
"year": 2000,
|
||||||
|
"month": 5,
|
||||||
|
"day": 19,
|
||||||
|
"hour": 9,
|
||||||
|
"minute": 55,
|
||||||
|
"second": 48,
|
||||||
|
"tz_before_gmt": true,
|
||||||
|
"tz_hour": 4,
|
||||||
|
"tz_minute": 0
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"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": {
|
"content_type": {
|
||||||
"c_type": "multipart",
|
"ContentType": {
|
||||||
"c_subtype": "mixed",
|
"c_type": "multipart",
|
||||||
"attributes": {
|
"c_subtype": "mixed",
|
||||||
"boundary": "-1463757054-952513540-958744548=:8452"
|
"attributes": {
|
||||||
|
"boundary": "-1463757054-952513540-958744548=:8452"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"from": {
|
||||||
|
"Address": {
|
||||||
|
"name": "Doug Sauder",
|
||||||
|
"address": "doug@penguin.example.com"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"html_body": [
|
"html_body": [
|
||||||
{
|
0
|
||||||
"contents": "<html><body>This is a test message from PINE MUA.<br/><br/></body></html>"
|
|
||||||
}
|
|
||||||
],
|
],
|
||||||
"text_body": [
|
"text_body": [
|
||||||
{
|
0
|
||||||
"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"
|
|
||||||
}
|
|
||||||
],
|
],
|
||||||
"attachments": [
|
"attachments": [
|
||||||
|
1,
|
||||||
|
2
|
||||||
|
],
|
||||||
|
"parts": [
|
||||||
{
|
{
|
||||||
"Binary": {
|
"Text": {
|
||||||
"header": {
|
"headers_rfc": {
|
||||||
"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",
|
|
||||||
"content_type": {
|
"content_type": {
|
||||||
"c_type": "application",
|
"ContentType": {
|
||||||
"c_subtype": "octet-stream",
|
"c_type": "text",
|
||||||
"attributes": {
|
"c_subtype": "plain",
|
||||||
"name": "redball.png"
|
"attributes": {
|
||||||
|
"charset": "US-ASCII"
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"contents": [
|
"is_encoding_problem": false,
|
||||||
|
"body": "This is a test message from PINE MUA.\r\n\r\n"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"Binary": {
|
||||||
|
"headers_rfc": {
|
||||||
|
"content_id": {
|
||||||
|
"Text": "Pine.LNX.4.21.0005190955480.8452@penguin.example.com"
|
||||||
|
},
|
||||||
|
"content_description": {
|
||||||
|
"Text": "A PNG graphic file"
|
||||||
|
},
|
||||||
|
"content_disposition": {
|
||||||
|
"ContentType": {
|
||||||
|
"c_type": "attachment",
|
||||||
|
"c_subtype": null,
|
||||||
|
"attributes": {
|
||||||
|
"filename": "redball.png"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"content_type": {
|
||||||
|
"ContentType": {
|
||||||
|
"c_type": "application",
|
||||||
|
"c_subtype": "octet-stream",
|
||||||
|
"attributes": {
|
||||||
|
"name": "redball.png"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"content_transfer_encoding": {
|
||||||
|
"Text": "BASE64"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"is_encoding_problem": false,
|
||||||
|
"body": [
|
||||||
137,
|
137,
|
||||||
80,
|
80,
|
||||||
78,
|
78,
|
||||||
@@ -1631,25 +1660,37 @@ Z3VldDZzO7wAAAAASUVORK5CYII=
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"Binary": {
|
"Binary": {
|
||||||
"header": {
|
"headers_rfc": {
|
||||||
"content_description": "A PNG graphic file",
|
"content_transfer_encoding": {
|
||||||
"content_disposition": {
|
"Text": "BASE64"
|
||||||
"c_type": "attachment",
|
},
|
||||||
"attributes": {
|
"content_id": {
|
||||||
"filename": "blueball.png"
|
"Text": "Pine.LNX.4.21.0005190955481.8452@penguin.example.com"
|
||||||
|
},
|
||||||
|
"content_description": {
|
||||||
|
"Text": "A PNG graphic file"
|
||||||
|
},
|
||||||
|
"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_disposition": {
|
||||||
"content_transfer_encoding": "BASE64",
|
"ContentType": {
|
||||||
"content_type": {
|
"c_type": "attachment",
|
||||||
"c_type": "application",
|
"c_subtype": null,
|
||||||
"c_subtype": "octet-stream",
|
"attributes": {
|
||||||
"attributes": {
|
"filename": "blueball.png"
|
||||||
"name": "blueball.png"
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"contents": [
|
"is_encoding_problem": false,
|
||||||
|
"body": [
|
||||||
137,
|
137,
|
||||||
80,
|
80,
|
||||||
78,
|
78,
|
||||||
@@ -2978,5 +3019,21 @@ Z3VldDZzO7wAAAAASUVORK5CYII=
|
|||||||
]
|
]
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
]
|
],
|
||||||
|
"structure": {
|
||||||
|
"List": [
|
||||||
|
{
|
||||||
|
"Part": 0
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"Part": 1
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"Part": 2
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"offset_header": 0,
|
||||||
|
"offset_body": 336,
|
||||||
|
"offset_end": 5169
|
||||||
}
|
}
|
||||||
+169
-91
@@ -132,19 +132,28 @@ eSBZdmVzIFBpZ3VldDZzO7wAAAAASUVORK5CYII=
|
|||||||
--------------C78F594988075E36AE03C243--
|
--------------C78F594988075E36AE03C243--
|
||||||
|
|
||||||
|
|
||||||
---- EXPECTED STRUCTURE ----
|
---- EXPECTED STRUCTURE ----{
|
||||||
{
|
"headers_rfc": {
|
||||||
"header": {
|
"mime_version": {
|
||||||
"date": {
|
"Text": "1.0"
|
||||||
"year": 2000,
|
},
|
||||||
"month": 5,
|
"subject": {
|
||||||
"day": 17,
|
"Text": "Test message from Netscape Communicator 4.7"
|
||||||
"hour": 23,
|
},
|
||||||
"minute": 8,
|
"content_type": {
|
||||||
"second": 29,
|
"ContentType": {
|
||||||
"tz_before_gmt": true,
|
"c_type": "multipart",
|
||||||
"tz_hour": 4,
|
"c_subtype": "mixed",
|
||||||
"tz_minute": 0
|
"attributes": {
|
||||||
|
"boundary": "------------C78F594988075E36AE03C243"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"to": {
|
||||||
|
"Address": {
|
||||||
|
"name": "Joe Blow",
|
||||||
|
"address": "blow@example.com"
|
||||||
|
}
|
||||||
},
|
},
|
||||||
"from": {
|
"from": {
|
||||||
"Address": {
|
"Address": {
|
||||||
@@ -152,85 +161,120 @@ eSBZdmVzIFBpZ3VldDZzO7wAAAAASUVORK5CYII=
|
|||||||
"address": "dwsauder@example.com"
|
"address": "dwsauder@example.com"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"message_id": "39235EAD.E48E2160@example.com",
|
"date": {
|
||||||
"mime_version": "1.0",
|
"DateTime": {
|
||||||
"subject": "Test message from Netscape Communicator 4.7",
|
"year": 2000,
|
||||||
"to": {
|
"month": 5,
|
||||||
"Address": {
|
"day": 17,
|
||||||
"name": "Joe Blow",
|
"hour": 23,
|
||||||
"address": "blow@example.com"
|
"minute": 8,
|
||||||
|
"second": 29,
|
||||||
|
"tz_before_gmt": true,
|
||||||
|
"tz_hour": 4,
|
||||||
|
"tz_minute": 0
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"content_type": {
|
"message_id": {
|
||||||
"c_type": "multipart",
|
"Text": "39235EAD.E48E2160@example.com"
|
||||||
"c_subtype": "mixed",
|
|
||||||
"attributes": {
|
|
||||||
"boundary": "------------C78F594988075E36AE03C243"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"others": {
|
|
||||||
"X-Accept-Language": [
|
|
||||||
"en"
|
|
||||||
],
|
|
||||||
"X-Mailer": [
|
|
||||||
"Mozilla 4.7 [en] (WinNT; I)"
|
|
||||||
]
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"html_body": [
|
"html_body": [
|
||||||
{
|
2,
|
||||||
"header": {
|
3,
|
||||||
"content_transfer_encoding": "7bit",
|
4
|
||||||
"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ösche</b>\r\n<p>Die Hasen klagten einst über ihre miß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 ärger\r\nals der Tod selbst. Auf, laßt uns ein für allemal sterben.\"\r\n<p>In einem nahen Teich wollten sie sich nun ersäufen; sie eilten\r\nihm zu; allein das außerordentliche Getöse und ihre wunderbare\r\nGestalt erschreckte eine Menge Frösche, die am Ufer saßen, so\r\nsehr, daß sie aufs schnellste untertauchten.\r\n<p>\"Halt\", rief nun eben dieser Sprecher, \"wir wollen das Ersäufen\r\nnoch ein wenig aufschieben, denn auch uns fürchten, wie ihr seht,\r\neinige Tiere, welche also wohl noch unglücklicher sein müssen\r\nals wir.\"\r\n<br> \r\n<br> </html>\r\n\r"
|
|
||||||
},
|
|
||||||
0,
|
|
||||||
1
|
|
||||||
],
|
],
|
||||||
"text_body": [
|
"text_body": [
|
||||||
{
|
1,
|
||||||
"header": {
|
3,
|
||||||
"content_transfer_encoding": "quoted-printable",
|
4
|
||||||
"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
|
|
||||||
],
|
],
|
||||||
"attachments": [
|
"attachments": [
|
||||||
|
3,
|
||||||
|
4
|
||||||
|
],
|
||||||
|
"parts": [
|
||||||
{
|
{
|
||||||
"InlineBinary": {
|
"Multipart": {
|
||||||
"header": {
|
"headers_rfc": {
|
||||||
"content_disposition": {
|
|
||||||
"c_type": "inline",
|
|
||||||
"attributes": {
|
|
||||||
"filename": "greenball.png"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"content_transfer_encoding": "base64",
|
|
||||||
"content_type": {
|
"content_type": {
|
||||||
"c_type": "image",
|
"ContentType": {
|
||||||
"c_subtype": "png",
|
"c_type": "multipart",
|
||||||
"attributes": {
|
"c_subtype": "alternative",
|
||||||
"name": "greenball.png"
|
"attributes": {
|
||||||
|
"boundary": "------------D74AE2393FB01D1B284AE257"
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"Text": {
|
||||||
|
"headers_rfc": {
|
||||||
|
"content_type": {
|
||||||
|
"ContentType": {
|
||||||
|
"c_type": "text",
|
||||||
|
"c_subtype": "plain",
|
||||||
|
"attributes": {
|
||||||
|
"charset": "iso-8859-1"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"content_transfer_encoding": {
|
||||||
|
"Text": "quoted-printable"
|
||||||
|
}
|
||||||
},
|
},
|
||||||
"contents": [
|
"is_encoding_problem": false,
|
||||||
|
"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_rfc": {
|
||||||
|
"content_type": {
|
||||||
|
"ContentType": {
|
||||||
|
"c_type": "text",
|
||||||
|
"c_subtype": "html",
|
||||||
|
"attributes": {
|
||||||
|
"charset": "us-ascii"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"content_transfer_encoding": {
|
||||||
|
"Text": "7bit"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"is_encoding_problem": false,
|
||||||
|
"body": "<!doctype html public \"-//w3c//dtd html 4.0 transitional//en\">\r\n<html>\r\n<b>Die Hasen und die Frösche</b>\r\n<p>Die Hasen klagten einst über ihre miß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 ärger\r\nals der Tod selbst. Auf, laßt uns ein für allemal sterben.\"\r\n<p>In einem nahen Teich wollten sie sich nun ersäufen; sie eilten\r\nihm zu; allein das außerordentliche Getöse und ihre wunderbare\r\nGestalt erschreckte eine Menge Frösche, die am Ufer saßen, so\r\nsehr, daß sie aufs schnellste untertauchten.\r\n<p>\"Halt\", rief nun eben dieser Sprecher, \"wir wollen das Ersäufen\r\nnoch ein wenig aufschieben, denn auch uns fürchten, wie ihr seht,\r\neinige Tiere, welche also wohl noch unglücklicher sein müssen\r\nals wir.\"\r\n<br> \r\n<br> </html>\r\n"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"InlineBinary": {
|
||||||
|
"headers_rfc": {
|
||||||
|
"content_disposition": {
|
||||||
|
"ContentType": {
|
||||||
|
"c_type": "inline",
|
||||||
|
"c_subtype": null,
|
||||||
|
"attributes": {
|
||||||
|
"filename": "greenball.png"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"content_type": {
|
||||||
|
"ContentType": {
|
||||||
|
"c_type": "image",
|
||||||
|
"c_subtype": "png",
|
||||||
|
"attributes": {
|
||||||
|
"name": "greenball.png"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"content_transfer_encoding": {
|
||||||
|
"Text": "base64"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"is_encoding_problem": false,
|
||||||
|
"body": [
|
||||||
137,
|
137,
|
||||||
80,
|
80,
|
||||||
78,
|
78,
|
||||||
@@ -1534,23 +1578,31 @@ eSBZdmVzIFBpZ3VldDZzO7wAAAAASUVORK5CYII=
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"InlineBinary": {
|
"InlineBinary": {
|
||||||
"header": {
|
"headers_rfc": {
|
||||||
"content_disposition": {
|
"content_type": {
|
||||||
"c_type": "inline",
|
"ContentType": {
|
||||||
"attributes": {
|
"c_type": "image",
|
||||||
"filename": "blueball.png"
|
"c_subtype": "png",
|
||||||
|
"attributes": {
|
||||||
|
"name": "blueball.png"
|
||||||
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"content_transfer_encoding": "base64",
|
"content_transfer_encoding": {
|
||||||
"content_type": {
|
"Text": "base64"
|
||||||
"c_type": "image",
|
},
|
||||||
"c_subtype": "png",
|
"content_disposition": {
|
||||||
"attributes": {
|
"ContentType": {
|
||||||
"name": "blueball.png"
|
"c_type": "inline",
|
||||||
|
"c_subtype": null,
|
||||||
|
"attributes": {
|
||||||
|
"filename": "blueball.png"
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"contents": [
|
"is_encoding_problem": false,
|
||||||
|
"body": [
|
||||||
137,
|
137,
|
||||||
80,
|
80,
|
||||||
78,
|
78,
|
||||||
@@ -2879,5 +2931,31 @@ eSBZdmVzIFBpZ3VldDZzO7wAAAAASUVORK5CYII=
|
|||||||
]
|
]
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
]
|
],
|
||||||
|
"structure": {
|
||||||
|
"List": [
|
||||||
|
{
|
||||||
|
"MultiPart": [
|
||||||
|
0,
|
||||||
|
[
|
||||||
|
{
|
||||||
|
"Part": 1
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"Part": 2
|
||||||
|
}
|
||||||
|
]
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"Part": 3
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"Part": 4
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"offset_header": 0,
|
||||||
|
"offset_body": 378,
|
||||||
|
"offset_end": 6606
|
||||||
}
|
}
|
||||||
+51
-38
@@ -32,19 +32,10 @@ n
|
|||||||
wenig aufschieben, denn auch uns f=FCrchten, wie ihr seht, einige Tiere,
|
wenig aufschieben, denn auch uns f=FCrchten, wie ihr seht, einige Tiere,
|
||||||
welche also wohl noch ungl=FCcklicher sein m=FCssen als wir."
|
welche also wohl noch ungl=FCcklicher sein m=FCssen als wir."
|
||||||
|
|
||||||
---- EXPECTED STRUCTURE ----
|
---- EXPECTED STRUCTURE ----{
|
||||||
{
|
"headers_rfc": {
|
||||||
"header": {
|
"message_id": {
|
||||||
"date": {
|
"Text": "392363E1.2AC47AB3@example.com"
|
||||||
"year": 2000,
|
|
||||||
"month": 5,
|
|
||||||
"day": 17,
|
|
||||||
"hour": 23,
|
|
||||||
"minute": 30,
|
|
||||||
"second": 41,
|
|
||||||
"tz_before_gmt": true,
|
|
||||||
"tz_hour": 4,
|
|
||||||
"tz_minute": 0
|
|
||||||
},
|
},
|
||||||
"from": {
|
"from": {
|
||||||
"Address": {
|
"Address": {
|
||||||
@@ -52,43 +43,65 @@ welche also wohl noch ungl=FCcklicher sein m=FCssen als wir."
|
|||||||
"address": "dwsauder@example.com"
|
"address": "dwsauder@example.com"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"message_id": "392363E1.2AC47AB3@example.com",
|
"mime_version": {
|
||||||
"mime_version": "1.0",
|
"Text": "1.0"
|
||||||
"subject": "Test message from Netscape Communicator 4.7",
|
},
|
||||||
|
"subject": {
|
||||||
|
"Text": "Test message from Netscape Communicator 4.7"
|
||||||
|
},
|
||||||
"to": {
|
"to": {
|
||||||
"Address": {
|
"Address": {
|
||||||
"name": "Joe Blow",
|
"name": "Joe Blow",
|
||||||
"address": "blow@example.com"
|
"address": "blow@example.com"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"content_transfer_encoding": "quoted-printable",
|
"date": {
|
||||||
"content_type": {
|
"DateTime": {
|
||||||
"c_type": "text",
|
"year": 2000,
|
||||||
"c_subtype": "plain",
|
"month": 5,
|
||||||
"attributes": {
|
"day": 17,
|
||||||
"charset": "UTF-8"
|
"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)"
|
|
||||||
]
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"html_body": [
|
"html_body": [
|
||||||
{
|
0
|
||||||
"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>"
|
|
||||||
}
|
|
||||||
],
|
],
|
||||||
"text_body": [
|
"text_body": [
|
||||||
|
0
|
||||||
|
],
|
||||||
|
"attachments": [],
|
||||||
|
"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": {
|
||||||
|
"headers_rfc": {
|
||||||
|
"content_transfer_encoding": {
|
||||||
|
"Text": "quoted-printable"
|
||||||
|
},
|
||||||
|
"content_type": {
|
||||||
|
"ContentType": {
|
||||||
|
"c_type": "text",
|
||||||
|
"c_subtype": "plain",
|
||||||
|
"attributes": {
|
||||||
|
"charset": "UTF-8"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"is_encoding_problem": false,
|
||||||
|
"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
|
||||||
}
|
}
|
||||||
+57
-41
@@ -25,60 +25,76 @@ schnellste untertauchten.
|
|||||||
wenig aufschieben, denn auch uns f+vGM-hten, wie ihr seht, einige Tiere,
|
wenig aufschieben, denn auch uns f+vGM-hten, wie ihr seht, einige Tiere,
|
||||||
welche also wohl noch ungl+uKs-licher sein m+vLM-en als wir."
|
welche also wohl noch ungl+uKs-licher sein m+vLM-en als wir."
|
||||||
|
|
||||||
---- EXPECTED STRUCTURE ----
|
---- EXPECTED STRUCTURE ----{
|
||||||
{
|
"headers_rfc": {
|
||||||
"header": {
|
|
||||||
"date": {
|
|
||||||
"year": 2000,
|
|
||||||
"month": 5,
|
|
||||||
"day": 17,
|
|
||||||
"hour": 23,
|
|
||||||
"minute": 33,
|
|
||||||
"second": 43,
|
|
||||||
"tz_before_gmt": true,
|
|
||||||
"tz_hour": 4,
|
|
||||||
"tz_minute": 0
|
|
||||||
},
|
|
||||||
"from": {
|
|
||||||
"Address": {
|
|
||||||
"name": "Doug Sauder",
|
|
||||||
"address": "dwsauder@example.com"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"message_id": "39236497.12FA2A89@example.com",
|
|
||||||
"mime_version": "1.0",
|
|
||||||
"subject": "Die Hasen und die Fr+APY-sche",
|
|
||||||
"to": {
|
"to": {
|
||||||
"Address": {
|
"Address": {
|
||||||
"name": "Heinz M+APw-ller",
|
"name": "Heinz M+APw-ller",
|
||||||
"address": "mueller@example.com"
|
"address": "mueller@example.com"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"content_transfer_encoding": "7bit",
|
"date": {
|
||||||
"content_type": {
|
"DateTime": {
|
||||||
"c_type": "text",
|
"year": 2000,
|
||||||
"c_subtype": "plain",
|
"month": 5,
|
||||||
"attributes": {
|
"day": 17,
|
||||||
"charset": "UTF-7"
|
"hour": 23,
|
||||||
|
"minute": 33,
|
||||||
|
"second": 43,
|
||||||
|
"tz_before_gmt": true,
|
||||||
|
"tz_hour": 4,
|
||||||
|
"tz_minute": 0
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"others": {
|
"mime_version": {
|
||||||
"X-Accept-Language": [
|
"Text": "1.0"
|
||||||
"en"
|
},
|
||||||
],
|
"subject": {
|
||||||
"X-Mailer": [
|
"Text": "Die Hasen und die Fr+APY-sche"
|
||||||
"Mozilla 4.7 [en] (WinNT; I)"
|
},
|
||||||
]
|
"message_id": {
|
||||||
|
"Text": "39236497.12FA2A89@example.com"
|
||||||
|
},
|
||||||
|
"from": {
|
||||||
|
"Address": {
|
||||||
|
"name": "Doug Sauder",
|
||||||
|
"address": "dwsauder@example.com"
|
||||||
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"html_body": [
|
"html_body": [
|
||||||
{
|
0
|
||||||
"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>"
|
|
||||||
}
|
|
||||||
],
|
],
|
||||||
"text_body": [
|
"text_body": [
|
||||||
|
0
|
||||||
|
],
|
||||||
|
"attachments": [],
|
||||||
|
"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": {
|
||||||
|
"headers_rfc": {
|
||||||
|
"content_type": {
|
||||||
|
"ContentType": {
|
||||||
|
"c_type": "text",
|
||||||
|
"c_subtype": "plain",
|
||||||
|
"attributes": {
|
||||||
|
"charset": "UTF-7"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"content_transfer_encoding": {
|
||||||
|
"Text": "7bit"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"is_encoding_problem": false,
|
||||||
|
"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
|
||||||
}
|
}
|
||||||
+235
-105
@@ -211,19 +211,26 @@ YII=
|
|||||||
--------------A1E83A41894D3755390B838A--
|
--------------A1E83A41894D3755390B838A--
|
||||||
|
|
||||||
|
|
||||||
---- EXPECTED STRUCTURE ----
|
---- EXPECTED STRUCTURE ----{
|
||||||
{
|
"headers_rfc": {
|
||||||
"header": {
|
"to": {
|
||||||
|
"Address": {
|
||||||
|
"name": "Heinz Müller",
|
||||||
|
"address": "mueller@example.com"
|
||||||
|
}
|
||||||
|
},
|
||||||
"date": {
|
"date": {
|
||||||
"year": 2000,
|
"DateTime": {
|
||||||
"month": 5,
|
"year": 2000,
|
||||||
"day": 17,
|
"month": 5,
|
||||||
"hour": 23,
|
"day": 17,
|
||||||
"minute": 13,
|
"hour": 23,
|
||||||
"second": 9,
|
"minute": 13,
|
||||||
"tz_before_gmt": true,
|
"second": 9,
|
||||||
"tz_hour": 4,
|
"tz_before_gmt": true,
|
||||||
"tz_minute": 0
|
"tz_hour": 4,
|
||||||
|
"tz_minute": 0
|
||||||
|
}
|
||||||
},
|
},
|
||||||
"from": {
|
"from": {
|
||||||
"Address": {
|
"Address": {
|
||||||
@@ -231,83 +238,140 @@ YII=
|
|||||||
"address": "dwsauder@example.com"
|
"address": "dwsauder@example.com"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"message_id": "39235FC5.276CCE00@example.com",
|
"subject": {
|
||||||
"mime_version": "1.0",
|
"Text": "Die Hasen und die Frösche (Netscape Messenger 4.7)"
|
||||||
"subject": "Die Hasen und die Frösche (Netscape Messenger 4.7)",
|
},
|
||||||
"to": {
|
"mime_version": {
|
||||||
"Address": {
|
"Text": "1.0"
|
||||||
"name": "Heinz Müller",
|
|
||||||
"address": "mueller@example.com"
|
|
||||||
}
|
|
||||||
},
|
},
|
||||||
"content_type": {
|
"content_type": {
|
||||||
"c_type": "multipart",
|
"ContentType": {
|
||||||
"c_subtype": "mixed",
|
"c_type": "multipart",
|
||||||
"attributes": {
|
"c_subtype": "mixed",
|
||||||
"boundary": "------------A1E83A41894D3755390B838A"
|
"attributes": {
|
||||||
|
"boundary": "------------A1E83A41894D3755390B838A"
|
||||||
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"others": {
|
"message_id": {
|
||||||
"X-Accept-Language": [
|
"Text": "39235FC5.276CCE00@example.com"
|
||||||
"en"
|
|
||||||
],
|
|
||||||
"X-Mailer": [
|
|
||||||
"Mozilla 4.7 [en] (WinNT; I)"
|
|
||||||
]
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"html_body": [
|
"html_body": [
|
||||||
{
|
3,
|
||||||
"header": {
|
6,
|
||||||
"content_transfer_encoding": "7bit",
|
7
|
||||||
"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ösche</b>\r\n<p>Die Hasen klagten einst über ihre miß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 ärger\r\nals der Tod selbst. Auf, laßt uns ein für allemal sterben.\"\r\n<p>In einem nahen Teich wollten sie sich nun ersäufen; sie eilten\r\nihm zu; allein das außerordentliche Getöse und ihre wunderbare\r\nGestalt erschreckte eine Menge Frösche, die am Ufer saßen, so\r\nsehr, daß sie aufs schnellste untertauchten.\r\n<p>\"Halt\", rief nun eben dieser Sprecher, \"wir wollen das Ersäufen\r\nnoch ein wenig aufschieben, denn auch uns fürchten, wie ihr seht,\r\neinige Tiere, welche also wohl noch unglücklicher sein müssen\r\nals wir.\"\r\n<p><img SRC=\"cid:part2.39235FC5.E71D8178@example.com\" height=27 width=27>\r\n<br> \r\n<br> </html>\r\n\r"
|
|
||||||
},
|
|
||||||
2,
|
|
||||||
3
|
|
||||||
],
|
],
|
||||||
"text_body": [
|
"text_body": [
|
||||||
{
|
1,
|
||||||
"header": {
|
6,
|
||||||
"content_transfer_encoding": "quoted-printable",
|
7
|
||||||
"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
|
|
||||||
],
|
],
|
||||||
"attachments": [
|
"attachments": [
|
||||||
|
4,
|
||||||
|
5,
|
||||||
|
6,
|
||||||
|
7
|
||||||
|
],
|
||||||
|
"parts": [
|
||||||
{
|
{
|
||||||
"Binary": {
|
"Multipart": {
|
||||||
"header": {
|
"headers_rfc": {
|
||||||
"content_disposition": {
|
"content_type": {
|
||||||
"c_type": "inline",
|
"ContentType": {
|
||||||
"attributes": {
|
"c_type": "multipart",
|
||||||
"filename": "C:TEMPnsmailEG.png"
|
"c_subtype": "alternative",
|
||||||
|
"attributes": {
|
||||||
|
"boundary": "------------F03F94BA73D3B9E8C1B94D92"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"Text": {
|
||||||
|
"headers_rfc": {
|
||||||
|
"content_type": {
|
||||||
|
"ContentType": {
|
||||||
|
"c_type": "text",
|
||||||
|
"c_subtype": "plain",
|
||||||
|
"attributes": {
|
||||||
|
"charset": "iso-8859-1"
|
||||||
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"content_id": "part1.39235FC5.E71D8178@example.com",
|
"content_transfer_encoding": {
|
||||||
"content_transfer_encoding": "base64",
|
"Text": "quoted-printable"
|
||||||
"content_type": {
|
|
||||||
"c_type": "image",
|
|
||||||
"c_subtype": "png"
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"contents": [
|
"is_encoding_problem": false,
|
||||||
|
"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": {
|
||||||
|
"headers_rfc": {
|
||||||
|
"content_type": {
|
||||||
|
"ContentType": {
|
||||||
|
"c_type": "multipart",
|
||||||
|
"c_subtype": "related",
|
||||||
|
"attributes": {
|
||||||
|
"boundary": "------------C02FA3D0A04E95F295FB25EB"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"Html": {
|
||||||
|
"headers_rfc": {
|
||||||
|
"content_type": {
|
||||||
|
"ContentType": {
|
||||||
|
"c_type": "text",
|
||||||
|
"c_subtype": "html",
|
||||||
|
"attributes": {
|
||||||
|
"charset": "us-ascii"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"content_transfer_encoding": {
|
||||||
|
"Text": "7bit"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"is_encoding_problem": false,
|
||||||
|
"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ösche</b>\r\n<p>Die Hasen klagten einst über ihre miß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 ärger\r\nals der Tod selbst. Auf, laßt uns ein für allemal sterben.\"\r\n<p>In einem nahen Teich wollten sie sich nun ersäufen; sie eilten\r\nihm zu; allein das außerordentliche Getöse und ihre wunderbare\r\nGestalt erschreckte eine Menge Frösche, die am Ufer saßen, so\r\nsehr, daß sie aufs schnellste untertauchten.\r\n<p>\"Halt\", rief nun eben dieser Sprecher, \"wir wollen das Ersäufen\r\nnoch ein wenig aufschieben, denn auch uns fürchten, wie ihr seht,\r\neinige Tiere, welche also wohl noch unglücklicher sein müssen\r\nals wir.\"\r\n<p><img SRC=\"cid:part2.39235FC5.E71D8178@example.com\" height=27 width=27>\r\n<br> \r\n<br> </html>\r\n"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"Binary": {
|
||||||
|
"headers_rfc": {
|
||||||
|
"content_id": {
|
||||||
|
"Text": "part1.39235FC5.E71D8178@example.com"
|
||||||
|
},
|
||||||
|
"content_type": {
|
||||||
|
"ContentType": {
|
||||||
|
"c_type": "image",
|
||||||
|
"c_subtype": "png",
|
||||||
|
"attributes": null
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"content_disposition": {
|
||||||
|
"ContentType": {
|
||||||
|
"c_type": "inline",
|
||||||
|
"c_subtype": null,
|
||||||
|
"attributes": {
|
||||||
|
"filename": "C:TEMPnsmailEG.png"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"content_transfer_encoding": {
|
||||||
|
"Text": "base64"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"is_encoding_problem": false,
|
||||||
|
"body": [
|
||||||
137,
|
137,
|
||||||
80,
|
80,
|
||||||
78,
|
78,
|
||||||
@@ -1638,21 +1702,32 @@ YII=
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"Binary": {
|
"Binary": {
|
||||||
"header": {
|
"headers_rfc": {
|
||||||
"content_disposition": {
|
"content_type": {
|
||||||
"c_type": "inline",
|
"ContentType": {
|
||||||
"attributes": {
|
"c_type": "image",
|
||||||
"filename": "C:TEMPnsmail39.png"
|
"c_subtype": "png",
|
||||||
|
"attributes": null
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"content_id": "part2.39235FC5.E71D8178@example.com",
|
"content_id": {
|
||||||
"content_transfer_encoding": "base64",
|
"Text": "part2.39235FC5.E71D8178@example.com"
|
||||||
"content_type": {
|
},
|
||||||
"c_type": "image",
|
"content_transfer_encoding": {
|
||||||
"c_subtype": "png"
|
"Text": "base64"
|
||||||
|
},
|
||||||
|
"content_disposition": {
|
||||||
|
"ContentType": {
|
||||||
|
"c_type": "inline",
|
||||||
|
"c_subtype": null,
|
||||||
|
"attributes": {
|
||||||
|
"filename": "C:TEMPnsmail39.png"
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"contents": [
|
"is_encoding_problem": false,
|
||||||
|
"body": [
|
||||||
137,
|
137,
|
||||||
80,
|
80,
|
||||||
78,
|
78,
|
||||||
@@ -3111,23 +3186,31 @@ YII=
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"InlineBinary": {
|
"InlineBinary": {
|
||||||
"header": {
|
"headers_rfc": {
|
||||||
"content_disposition": {
|
"content_disposition": {
|
||||||
"c_type": "inline",
|
"ContentType": {
|
||||||
"attributes": {
|
"c_type": "inline",
|
||||||
"filename": "redball.png"
|
"c_subtype": null,
|
||||||
|
"attributes": {
|
||||||
|
"filename": "redball.png"
|
||||||
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"content_transfer_encoding": "base64",
|
"content_transfer_encoding": {
|
||||||
|
"Text": "base64"
|
||||||
|
},
|
||||||
"content_type": {
|
"content_type": {
|
||||||
"c_type": "image",
|
"ContentType": {
|
||||||
"c_subtype": "png",
|
"c_type": "image",
|
||||||
"attributes": {
|
"c_subtype": "png",
|
||||||
"name": "redball.png"
|
"attributes": {
|
||||||
|
"name": "redball.png"
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"contents": [
|
"is_encoding_problem": false,
|
||||||
|
"body": [
|
||||||
137,
|
137,
|
||||||
80,
|
80,
|
||||||
78,
|
78,
|
||||||
@@ -4586,23 +4669,31 @@ YII=
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"InlineBinary": {
|
"InlineBinary": {
|
||||||
"header": {
|
"headers_rfc": {
|
||||||
|
"content_transfer_encoding": {
|
||||||
|
"Text": "base64"
|
||||||
|
},
|
||||||
"content_disposition": {
|
"content_disposition": {
|
||||||
"c_type": "inline",
|
"ContentType": {
|
||||||
"attributes": {
|
"c_type": "inline",
|
||||||
"filename": "greenball.png"
|
"c_subtype": null,
|
||||||
|
"attributes": {
|
||||||
|
"filename": "greenball.png"
|
||||||
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"content_transfer_encoding": "base64",
|
|
||||||
"content_type": {
|
"content_type": {
|
||||||
"c_type": "image",
|
"ContentType": {
|
||||||
"c_subtype": "png",
|
"c_type": "image",
|
||||||
"attributes": {
|
"c_subtype": "png",
|
||||||
"name": "greenball.png"
|
"attributes": {
|
||||||
|
"name": "greenball.png"
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"contents": [
|
"is_encoding_problem": false,
|
||||||
|
"body": [
|
||||||
137,
|
137,
|
||||||
80,
|
80,
|
||||||
78,
|
78,
|
||||||
@@ -5904,5 +5995,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
|
||||||
}
|
}
|
||||||
+58
-34
@@ -25,52 +25,76 @@ lche also wohl noch ungl=FCcklicher sein m=FCssen als wir."=20
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
---- EXPECTED STRUCTURE ----
|
---- EXPECTED STRUCTURE ----{
|
||||||
{
|
"headers_rfc": {
|
||||||
"header": {
|
|
||||||
"date": {
|
|
||||||
"year": 2000,
|
|
||||||
"month": 5,
|
|
||||||
"day": 19,
|
|
||||||
"hour": 10,
|
|
||||||
"minute": 18,
|
|
||||||
"second": 3,
|
|
||||||
"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.0005191014500.8452-100000@penguin.example.com",
|
|
||||||
"mime_version": "1.0",
|
|
||||||
"subject": "Die Hasen und die Frösche",
|
|
||||||
"to": {
|
"to": {
|
||||||
"Address": {
|
"Address": {
|
||||||
"name": "Jürgen Schmürgen",
|
"name": "Jürgen Schmürgen",
|
||||||
"address": "schmuergen@example.com"
|
"address": "schmuergen@example.com"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"content_transfer_encoding": "QUOTED-PRINTABLE",
|
"message_id": {
|
||||||
"content_type": {
|
"Text": "Pine.LNX.4.21.0005191014500.8452-100000@penguin.example.com"
|
||||||
"c_type": "text",
|
},
|
||||||
"c_subtype": "plain",
|
"mime_version": {
|
||||||
"attributes": {
|
"Text": "1.0"
|
||||||
"charset": "iso-8859-1"
|
},
|
||||||
|
"date": {
|
||||||
|
"DateTime": {
|
||||||
|
"year": 2000,
|
||||||
|
"month": 5,
|
||||||
|
"day": 19,
|
||||||
|
"hour": 10,
|
||||||
|
"minute": 18,
|
||||||
|
"second": 3,
|
||||||
|
"tz_before_gmt": true,
|
||||||
|
"tz_hour": 4,
|
||||||
|
"tz_minute": 0
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"subject": {
|
||||||
|
"Text": "Die Hasen und die Frösche"
|
||||||
|
},
|
||||||
|
"from": {
|
||||||
|
"Address": {
|
||||||
|
"name": "Doug Sauder",
|
||||||
|
"address": "doug@penguin.example.com"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"html_body": [
|
"html_body": [
|
||||||
{
|
0
|
||||||
"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>"
|
|
||||||
}
|
|
||||||
],
|
],
|
||||||
"text_body": [
|
"text_body": [
|
||||||
|
0
|
||||||
|
],
|
||||||
|
"attachments": [],
|
||||||
|
"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": {
|
||||||
|
"headers_rfc": {
|
||||||
|
"content_transfer_encoding": {
|
||||||
|
"Text": "QUOTED-PRINTABLE"
|
||||||
|
},
|
||||||
|
"content_type": {
|
||||||
|
"ContentType": {
|
||||||
|
"c_type": "text",
|
||||||
|
"c_subtype": "plain",
|
||||||
|
"attributes": {
|
||||||
|
"charset": "iso-8859-1"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"is_encoding_problem": false,
|
||||||
|
"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
|
||||||
}
|
}
|
||||||
+93
-62
@@ -50,19 +50,16 @@ eSBZdmVzIFBpZ3VldDZzO7wAAAAASUVORK5CYII=
|
|||||||
--------------E7889DDF0F75D34163841C59--
|
--------------E7889DDF0F75D34163841C59--
|
||||||
|
|
||||||
|
|
||||||
---- EXPECTED STRUCTURE ----
|
---- EXPECTED STRUCTURE ----{
|
||||||
{
|
"headers_rfc": {
|
||||||
"header": {
|
"content_type": {
|
||||||
"date": {
|
"ContentType": {
|
||||||
"year": 2000,
|
"c_type": "multipart",
|
||||||
"month": 5,
|
"c_subtype": "mixed",
|
||||||
"day": 17,
|
"attributes": {
|
||||||
"hour": 23,
|
"boundary": "------------E7889DDF0F75D34163841C59"
|
||||||
"minute": 42,
|
}
|
||||||
"second": 31,
|
}
|
||||||
"tz_before_gmt": true,
|
|
||||||
"tz_hour": 4,
|
|
||||||
"tz_minute": 0
|
|
||||||
},
|
},
|
||||||
"from": {
|
"from": {
|
||||||
"Address": {
|
"Address": {
|
||||||
@@ -70,73 +67,94 @@ eSBZdmVzIFBpZ3VldDZzO7wAAAAASUVORK5CYII=
|
|||||||
"address": "dwsauder@example.com"
|
"address": "dwsauder@example.com"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"message_id": "392366A7.21929EA7@example.com",
|
"message_id": {
|
||||||
"mime_version": "1.0",
|
"Text": "392366A7.21929EA7@example.com"
|
||||||
"subject": "Test message from Netscape Communicator 4.7",
|
},
|
||||||
|
"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"
|
||||||
|
},
|
||||||
"to": {
|
"to": {
|
||||||
"Address": {
|
"Address": {
|
||||||
"name": "Joe Blow",
|
"name": "Joe Blow",
|
||||||
"address": "blow@example.com"
|
"address": "blow@example.com"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"content_type": {
|
"subject": {
|
||||||
"c_type": "multipart",
|
"Text": "Test message from Netscape Communicator 4.7"
|
||||||
"c_subtype": "mixed",
|
|
||||||
"attributes": {
|
|
||||||
"boundary": "------------E7889DDF0F75D34163841C59"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"others": {
|
|
||||||
"X-Mailer": [
|
|
||||||
"Mozilla 4.7 [en] (WinNT; I)"
|
|
||||||
],
|
|
||||||
"X-Accept-Language": [
|
|
||||||
"en"
|
|
||||||
]
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"html_body": [
|
"html_body": [
|
||||||
{
|
0,
|
||||||
"contents": "<html><body> </body></html>"
|
1
|
||||||
},
|
|
||||||
0
|
|
||||||
],
|
],
|
||||||
"text_body": [
|
"text_body": [
|
||||||
{
|
0,
|
||||||
"header": {
|
1
|
||||||
"content_transfer_encoding": "7bit",
|
|
||||||
"content_type": {
|
|
||||||
"c_type": "text",
|
|
||||||
"c_subtype": "plain",
|
|
||||||
"attributes": {
|
|
||||||
"charset": "us-ascii"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"contents": " \r"
|
|
||||||
},
|
|
||||||
0
|
|
||||||
],
|
],
|
||||||
"attachments": [
|
"attachments": [
|
||||||
|
1
|
||||||
|
],
|
||||||
|
"parts": [
|
||||||
{
|
{
|
||||||
"InlineBinary": {
|
"Text": {
|
||||||
"header": {
|
"headers_rfc": {
|
||||||
"content_disposition": {
|
"content_transfer_encoding": {
|
||||||
"c_type": "inline",
|
"Text": "7bit"
|
||||||
"attributes": {
|
|
||||||
"filename": "blueball.png"
|
|
||||||
}
|
|
||||||
},
|
},
|
||||||
"content_transfer_encoding": "base64",
|
|
||||||
"content_type": {
|
"content_type": {
|
||||||
"c_type": "image",
|
"ContentType": {
|
||||||
"c_subtype": "png",
|
"c_type": "text",
|
||||||
"attributes": {
|
"c_subtype": "plain",
|
||||||
"name": "blueball.png"
|
"attributes": {
|
||||||
|
"charset": "us-ascii"
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"contents": [
|
"is_encoding_problem": false,
|
||||||
|
"body": " "
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"InlineBinary": {
|
||||||
|
"headers_rfc": {
|
||||||
|
"content_transfer_encoding": {
|
||||||
|
"Text": "base64"
|
||||||
|
},
|
||||||
|
"content_type": {
|
||||||
|
"ContentType": {
|
||||||
|
"c_type": "image",
|
||||||
|
"c_subtype": "png",
|
||||||
|
"attributes": {
|
||||||
|
"name": "blueball.png"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"content_disposition": {
|
||||||
|
"ContentType": {
|
||||||
|
"c_type": "inline",
|
||||||
|
"c_subtype": null,
|
||||||
|
"attributes": {
|
||||||
|
"filename": "blueball.png"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"is_encoding_problem": false,
|
||||||
|
"body": [
|
||||||
137,
|
137,
|
||||||
80,
|
80,
|
||||||
78,
|
78,
|
||||||
@@ -1465,5 +1483,18 @@ eSBZdmVzIFBpZ3VldDZzO7wAAAAASUVORK5CYII=
|
|||||||
]
|
]
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
]
|
],
|
||||||
|
"structure": {
|
||||||
|
"List": [
|
||||||
|
{
|
||||||
|
"Part": 0
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"Part": 1
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"offset_header": 0,
|
||||||
|
"offset_body": 378,
|
||||||
|
"offset_end": 2585
|
||||||
}
|
}
|
||||||
+51
-35
@@ -16,60 +16,76 @@ A HARE one day ridiculed the short feet and slow pace of the Tortoise, who repli
|
|||||||
|
|
||||||
Slow but steady wins the race.
|
Slow but steady wins the race.
|
||||||
|
|
||||||
---- EXPECTED STRUCTURE ----
|
---- EXPECTED STRUCTURE ----{
|
||||||
{
|
"headers_rfc": {
|
||||||
"header": {
|
|
||||||
"date": {
|
|
||||||
"year": 2000,
|
|
||||||
"month": 5,
|
|
||||||
"day": 17,
|
|
||||||
"hour": 23,
|
|
||||||
"minute": 24,
|
|
||||||
"second": 11,
|
|
||||||
"tz_before_gmt": true,
|
|
||||||
"tz_hour": 4,
|
|
||||||
"tz_minute": 0
|
|
||||||
},
|
|
||||||
"from": {
|
"from": {
|
||||||
"Address": {
|
"Address": {
|
||||||
"name": "Doug Sauder",
|
"name": "Doug Sauder",
|
||||||
"address": "dwsauder@example.com"
|
"address": "dwsauder@example.com"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"message_id": "3923625B.59F0C3AC@example.com",
|
"mime_version": {
|
||||||
"mime_version": "1.0",
|
"Text": "1.0"
|
||||||
"subject": "Test message from Netscape Communicator 4.7",
|
},
|
||||||
|
"message_id": {
|
||||||
|
"Text": "3923625B.59F0C3AC@example.com"
|
||||||
|
},
|
||||||
"to": {
|
"to": {
|
||||||
"Address": {
|
"Address": {
|
||||||
"name": "Joe Blow",
|
"name": "Joe Blow",
|
||||||
"address": "blow@example.com"
|
"address": "blow@example.com"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"content_transfer_encoding": "7bit",
|
"date": {
|
||||||
"content_type": {
|
"DateTime": {
|
||||||
"c_type": "text",
|
"year": 2000,
|
||||||
"c_subtype": "plain",
|
"month": 5,
|
||||||
"attributes": {
|
"day": 17,
|
||||||
"charset": "us-ascii"
|
"hour": 23,
|
||||||
|
"minute": 24,
|
||||||
|
"second": 11,
|
||||||
|
"tz_before_gmt": true,
|
||||||
|
"tz_hour": 4,
|
||||||
|
"tz_minute": 0
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"others": {
|
"subject": {
|
||||||
"X-Mailer": [
|
"Text": "Test message from Netscape Communicator 4.7"
|
||||||
"Mozilla 4.7 [en] (WinNT; I)"
|
|
||||||
],
|
|
||||||
"X-Accept-Language": [
|
|
||||||
"en"
|
|
||||||
]
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"html_body": [
|
"html_body": [
|
||||||
{
|
0
|
||||||
"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>"
|
|
||||||
}
|
|
||||||
],
|
],
|
||||||
"text_body": [
|
"text_body": [
|
||||||
|
0
|
||||||
|
],
|
||||||
|
"attachments": [],
|
||||||
|
"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": {
|
||||||
|
"headers_rfc": {
|
||||||
|
"content_type": {
|
||||||
|
"ContentType": {
|
||||||
|
"c_type": "text",
|
||||||
|
"c_subtype": "plain",
|
||||||
|
"attributes": {
|
||||||
|
"charset": "us-ascii"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"content_transfer_encoding": {
|
||||||
|
"Text": "7bit"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"is_encoding_problem": false,
|
||||||
|
"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
|
||||||
}
|
}
|
||||||
+192
-97
@@ -170,19 +170,19 @@ eSBZdmVzIFBpZ3VldDZzO7wAAAAASUVORK5CYII=
|
|||||||
--------------B7133A01A6B323BF00DBC9A7--
|
--------------B7133A01A6B323BF00DBC9A7--
|
||||||
|
|
||||||
|
|
||||||
---- EXPECTED STRUCTURE ----
|
---- EXPECTED STRUCTURE ----{
|
||||||
{
|
"headers_rfc": {
|
||||||
"header": {
|
"subject": {
|
||||||
"date": {
|
"Text": "Test message from Netscape Communicator 4.7"
|
||||||
"year": 2000,
|
},
|
||||||
"month": 5,
|
"content_type": {
|
||||||
"day": 17,
|
"ContentType": {
|
||||||
"hour": 23,
|
"c_type": "multipart",
|
||||||
"minute": 18,
|
"c_subtype": "mixed",
|
||||||
"second": 27,
|
"attributes": {
|
||||||
"tz_before_gmt": true,
|
"boundary": "------------B7133A01A6B323BF00DBC9A7"
|
||||||
"tz_hour": 4,
|
}
|
||||||
"tz_minute": 0
|
}
|
||||||
},
|
},
|
||||||
"from": {
|
"from": {
|
||||||
"Address": {
|
"Address": {
|
||||||
@@ -190,73 +190,112 @@ eSBZdmVzIFBpZ3VldDZzO7wAAAAASUVORK5CYII=
|
|||||||
"address": "dwsauder@example.com"
|
"address": "dwsauder@example.com"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"message_id": "39236103.FFE674FC@example.com",
|
"message_id": {
|
||||||
"mime_version": "1.0",
|
"Text": "39236103.FFE674FC@example.com"
|
||||||
"subject": "Test message from Netscape Communicator 4.7",
|
},
|
||||||
|
"date": {
|
||||||
|
"DateTime": {
|
||||||
|
"year": 2000,
|
||||||
|
"month": 5,
|
||||||
|
"day": 17,
|
||||||
|
"hour": 23,
|
||||||
|
"minute": 18,
|
||||||
|
"second": 27,
|
||||||
|
"tz_before_gmt": true,
|
||||||
|
"tz_hour": 4,
|
||||||
|
"tz_minute": 0
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"mime_version": {
|
||||||
|
"Text": "1.0"
|
||||||
|
},
|
||||||
"to": {
|
"to": {
|
||||||
"Address": {
|
"Address": {
|
||||||
"name": "Jürgen Schmürgen",
|
"name": "Jürgen Schmürgen",
|
||||||
"address": "schmuergen@example.com"
|
"address": "schmuergen@example.com"
|
||||||
}
|
}
|
||||||
},
|
|
||||||
"content_type": {
|
|
||||||
"c_type": "multipart",
|
|
||||||
"c_subtype": "mixed",
|
|
||||||
"attributes": {
|
|
||||||
"boundary": "------------B7133A01A6B323BF00DBC9A7"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"others": {
|
|
||||||
"X-Accept-Language": [
|
|
||||||
"en"
|
|
||||||
],
|
|
||||||
"X-Mailer": [
|
|
||||||
"Mozilla 4.7 [en] (WinNT; I)"
|
|
||||||
]
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"html_body": [
|
"html_body": [
|
||||||
{
|
1,
|
||||||
"header": {
|
4,
|
||||||
"content_transfer_encoding": "7bit",
|
5
|
||||||
"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ösche</font></b>\r\n<p>Die Hasen klagten einst über ihre miß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 ärger\r\nals der Tod selbst. Auf, laßt uns ein für allemal sterben.\"\r\n<p>In einem nahen Teich wollten sie sich nun ersäufen; sie eilten\r\nihm zu; allein das außerordentliche Getöse und ihre wunderbare\r\nGestalt erschreckte eine Menge Frösche, die am Ufer saßen, so\r\nsehr, daß sie aufs schnellste untertauchten.\r\n<p>\"Halt\", rief nun eben dieser Sprecher, \"wir wollen das Ersäufen\r\nnoch ein wenig aufschieben, denn auch uns fürchten, wie ihr seht,\r\neinige Tiere, welche also wohl noch unglücklicher sein mü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"
|
|
||||||
},
|
|
||||||
2,
|
|
||||||
3
|
|
||||||
],
|
],
|
||||||
"text_body": [
|
"text_body": [
|
||||||
{
|
1,
|
||||||
"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.\""
|
4,
|
||||||
},
|
5
|
||||||
2,
|
|
||||||
3
|
|
||||||
],
|
],
|
||||||
"attachments": [
|
"attachments": [
|
||||||
|
2,
|
||||||
|
3,
|
||||||
|
4,
|
||||||
|
5
|
||||||
|
],
|
||||||
|
"parts": [
|
||||||
{
|
{
|
||||||
"Binary": {
|
"Multipart": {
|
||||||
"header": {
|
"headers_rfc": {
|
||||||
"content_disposition": {
|
"content_type": {
|
||||||
"c_type": "inline",
|
"ContentType": {
|
||||||
"attributes": {
|
"c_type": "multipart",
|
||||||
"filename": "C:TEMPnsmailV0.png"
|
"c_subtype": "related",
|
||||||
|
"attributes": {
|
||||||
|
"boundary": "------------8E6A06810565BCAB5E1F7D97"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"Html": {
|
||||||
|
"headers_rfc": {
|
||||||
|
"content_type": {
|
||||||
|
"ContentType": {
|
||||||
|
"c_type": "text",
|
||||||
|
"c_subtype": "html",
|
||||||
|
"attributes": {
|
||||||
|
"charset": "us-ascii"
|
||||||
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"content_id": "part1.39236103.1B697A54@example.com",
|
"content_transfer_encoding": {
|
||||||
"content_transfer_encoding": "base64",
|
"Text": "7bit"
|
||||||
"content_type": {
|
|
||||||
"c_type": "image",
|
|
||||||
"c_subtype": "png"
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"contents": [
|
"is_encoding_problem": false,
|
||||||
|
"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ösche</font></b>\r\n<p>Die Hasen klagten einst über ihre miß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 ärger\r\nals der Tod selbst. Auf, laßt uns ein für allemal sterben.\"\r\n<p>In einem nahen Teich wollten sie sich nun ersäufen; sie eilten\r\nihm zu; allein das außerordentliche Getöse und ihre wunderbare\r\nGestalt erschreckte eine Menge Frösche, die am Ufer saßen, so\r\nsehr, daß sie aufs schnellste untertauchten.\r\n<p>\"Halt\", rief nun eben dieser Sprecher, \"wir wollen das Ersäufen\r\nnoch ein wenig aufschieben, denn auch uns fürchten, wie ihr seht,\r\neinige Tiere, welche also wohl noch unglücklicher sein mü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"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"Binary": {
|
||||||
|
"headers_rfc": {
|
||||||
|
"content_type": {
|
||||||
|
"ContentType": {
|
||||||
|
"c_type": "image",
|
||||||
|
"c_subtype": "png",
|
||||||
|
"attributes": null
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"content_id": {
|
||||||
|
"Text": "part1.39236103.1B697A54@example.com"
|
||||||
|
},
|
||||||
|
"content_disposition": {
|
||||||
|
"ContentType": {
|
||||||
|
"c_type": "inline",
|
||||||
|
"c_subtype": null,
|
||||||
|
"attributes": {
|
||||||
|
"filename": "C:TEMPnsmailV0.png"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"content_transfer_encoding": {
|
||||||
|
"Text": "base64"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"is_encoding_problem": false,
|
||||||
|
"body": [
|
||||||
137,
|
137,
|
||||||
80,
|
80,
|
||||||
78,
|
78,
|
||||||
@@ -1587,21 +1626,32 @@ eSBZdmVzIFBpZ3VldDZzO7wAAAAASUVORK5CYII=
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"Binary": {
|
"Binary": {
|
||||||
"header": {
|
"headers_rfc": {
|
||||||
"content_disposition": {
|
"content_transfer_encoding": {
|
||||||
"c_type": "inline",
|
"Text": "base64"
|
||||||
"attributes": {
|
},
|
||||||
"filename": "C:TEMPnsmailNM.png"
|
"content_type": {
|
||||||
|
"ContentType": {
|
||||||
|
"c_type": "image",
|
||||||
|
"c_subtype": "png",
|
||||||
|
"attributes": null
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"content_id": "part2.39236103.1B697A54@example.com",
|
"content_id": {
|
||||||
"content_transfer_encoding": "base64",
|
"Text": "part2.39236103.1B697A54@example.com"
|
||||||
"content_type": {
|
},
|
||||||
"c_type": "image",
|
"content_disposition": {
|
||||||
"c_subtype": "png"
|
"ContentType": {
|
||||||
|
"c_type": "inline",
|
||||||
|
"c_subtype": null,
|
||||||
|
"attributes": {
|
||||||
|
"filename": "C:TEMPnsmailNM.png"
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"contents": [
|
"is_encoding_problem": false,
|
||||||
|
"body": [
|
||||||
137,
|
137,
|
||||||
80,
|
80,
|
||||||
78,
|
78,
|
||||||
@@ -3060,23 +3110,31 @@ eSBZdmVzIFBpZ3VldDZzO7wAAAAASUVORK5CYII=
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"InlineBinary": {
|
"InlineBinary": {
|
||||||
"header": {
|
"headers_rfc": {
|
||||||
"content_disposition": {
|
"content_type": {
|
||||||
"c_type": "inline",
|
"ContentType": {
|
||||||
"attributes": {
|
"c_type": "image",
|
||||||
"filename": "greenball.png"
|
"c_subtype": "png",
|
||||||
|
"attributes": {
|
||||||
|
"name": "greenball.png"
|
||||||
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"content_transfer_encoding": "base64",
|
"content_disposition": {
|
||||||
"content_type": {
|
"ContentType": {
|
||||||
"c_type": "image",
|
"c_type": "inline",
|
||||||
"c_subtype": "png",
|
"c_subtype": null,
|
||||||
"attributes": {
|
"attributes": {
|
||||||
"name": "greenball.png"
|
"filename": "greenball.png"
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
},
|
||||||
|
"content_transfer_encoding": {
|
||||||
|
"Text": "base64"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"contents": [
|
"is_encoding_problem": false,
|
||||||
|
"body": [
|
||||||
137,
|
137,
|
||||||
80,
|
80,
|
||||||
78,
|
78,
|
||||||
@@ -4380,23 +4438,31 @@ eSBZdmVzIFBpZ3VldDZzO7wAAAAASUVORK5CYII=
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"InlineBinary": {
|
"InlineBinary": {
|
||||||
"header": {
|
"headers_rfc": {
|
||||||
"content_disposition": {
|
"content_disposition": {
|
||||||
"c_type": "inline",
|
"ContentType": {
|
||||||
"attributes": {
|
"c_type": "inline",
|
||||||
"filename": "blueball.png"
|
"c_subtype": null,
|
||||||
|
"attributes": {
|
||||||
|
"filename": "blueball.png"
|
||||||
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"content_transfer_encoding": "base64",
|
|
||||||
"content_type": {
|
"content_type": {
|
||||||
"c_type": "image",
|
"ContentType": {
|
||||||
"c_subtype": "png",
|
"c_type": "image",
|
||||||
"attributes": {
|
"c_subtype": "png",
|
||||||
"name": "blueball.png"
|
"attributes": {
|
||||||
|
"name": "blueball.png"
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
},
|
||||||
|
"content_transfer_encoding": {
|
||||||
|
"Text": "base64"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"contents": [
|
"is_encoding_problem": false,
|
||||||
|
"body": [
|
||||||
137,
|
137,
|
||||||
80,
|
80,
|
||||||
78,
|
78,
|
||||||
@@ -5725,5 +5791,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
|
||||||
}
|
}
|
||||||
+52
-36
@@ -27,19 +27,23 @@ schnellste untertauchten. =
|
|||||||
n wenig aufschieben, denn auch uns f=FCrchten, wie ihr seht, einige Tiere=
|
n wenig aufschieben, denn auch uns f=FCrchten, wie ihr seht, einige Tiere=
|
||||||
, welche also wohl noch ungl=FCcklicher sein m=FCssen als wir."
|
, welche also wohl noch ungl=FCcklicher sein m=FCssen als wir."
|
||||||
|
|
||||||
---- EXPECTED STRUCTURE ----
|
---- EXPECTED STRUCTURE ----{
|
||||||
{
|
"headers_rfc": {
|
||||||
"header": {
|
|
||||||
"date": {
|
"date": {
|
||||||
"year": 2000,
|
"DateTime": {
|
||||||
"month": 5,
|
"year": 2000,
|
||||||
"day": 17,
|
"month": 5,
|
||||||
"hour": 23,
|
"day": 17,
|
||||||
"minute": 41,
|
"hour": 23,
|
||||||
"second": 7,
|
"minute": 41,
|
||||||
"tz_before_gmt": true,
|
"second": 7,
|
||||||
"tz_hour": 4,
|
"tz_before_gmt": true,
|
||||||
"tz_minute": 0
|
"tz_hour": 4,
|
||||||
|
"tz_minute": 0
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"message_id": {
|
||||||
|
"Text": "39236653.CAA8A090@example.com"
|
||||||
},
|
},
|
||||||
"from": {
|
"from": {
|
||||||
"Address": {
|
"Address": {
|
||||||
@@ -47,40 +51,52 @@ n wenig aufschieben, denn auch uns f=FCrchten, wie ihr seht, einige Tiere=
|
|||||||
"address": "dwsauder@example.com"
|
"address": "dwsauder@example.com"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"message_id": "39236653.CAA8A090@example.com",
|
"mime_version": {
|
||||||
"mime_version": "1.0",
|
"Text": "1.0"
|
||||||
"subject": "Die Hasen und die Frösche",
|
},
|
||||||
|
"subject": {
|
||||||
|
"Text": "Die Hasen und die Frösche"
|
||||||
|
},
|
||||||
"to": {
|
"to": {
|
||||||
"Address": {
|
"Address": {
|
||||||
"name": "Jürgen Schmürgen",
|
"name": "Jürgen Schmürgen",
|
||||||
"address": "schmuergen@example.com"
|
"address": "schmuergen@example.com"
|
||||||
}
|
}
|
||||||
},
|
|
||||||
"content_transfer_encoding": "quoted-printable",
|
|
||||||
"content_type": {
|
|
||||||
"c_type": "text",
|
|
||||||
"c_subtype": "plain",
|
|
||||||
"attributes": {
|
|
||||||
"charset": "iso-8859-1"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"others": {
|
|
||||||
"X-Accept-Language": [
|
|
||||||
"en"
|
|
||||||
],
|
|
||||||
"X-Mailer": [
|
|
||||||
"Mozilla 4.7 [en] (WinNT; I)"
|
|
||||||
]
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"html_body": [
|
"html_body": [
|
||||||
{
|
0
|
||||||
"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>"
|
|
||||||
}
|
|
||||||
],
|
],
|
||||||
"text_body": [
|
"text_body": [
|
||||||
|
0
|
||||||
|
],
|
||||||
|
"attachments": [],
|
||||||
|
"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": {
|
||||||
|
"headers_rfc": {
|
||||||
|
"content_type": {
|
||||||
|
"ContentType": {
|
||||||
|
"c_type": "text",
|
||||||
|
"c_subtype": "plain",
|
||||||
|
"attributes": {
|
||||||
|
"charset": "iso-8859-1"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"content_transfer_encoding": {
|
||||||
|
"Text": "quoted-printable"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"is_encoding_problem": false,
|
||||||
|
"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
|
||||||
}
|
}
|
||||||
+97
-56
@@ -56,84 +56,112 @@ JXRFWHRDb21tZW50AGNsaXAyZ2lmIHYuMC42IGJ5IFl2ZXMgUGlndWV0NnM7
|
|||||||
vAAAAABJRU5ErkJggg==
|
vAAAAABJRU5ErkJggg==
|
||||||
---1463757054-170444605-958746196=:8452--
|
---1463757054-170444605-958746196=:8452--
|
||||||
|
|
||||||
---- EXPECTED STRUCTURE ----
|
---- EXPECTED STRUCTURE ----{
|
||||||
{
|
"headers_rfc": {
|
||||||
"header": {
|
|
||||||
"date": {
|
|
||||||
"year": 2000,
|
|
||||||
"month": 5,
|
|
||||||
"day": 19,
|
|
||||||
"hour": 10,
|
|
||||||
"minute": 23,
|
|
||||||
"second": 16,
|
|
||||||
"tz_before_gmt": true,
|
|
||||||
"tz_hour": 4,
|
|
||||||
"tz_minute": 0
|
|
||||||
},
|
|
||||||
"from": {
|
"from": {
|
||||||
"Address": {
|
"Address": {
|
||||||
"name": "Doug Sauder",
|
"name": "Doug Sauder",
|
||||||
"address": "doug@penguin.example.com"
|
"address": "doug@penguin.example.com"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"message_id": "Pine.LNX.4.21.0005191019440.8452-101000@penguin.example.com",
|
"date": {
|
||||||
"mime_version": "1.0",
|
"DateTime": {
|
||||||
"subject": "PNG graphic",
|
"year": 2000,
|
||||||
|
"month": 5,
|
||||||
|
"day": 19,
|
||||||
|
"hour": 10,
|
||||||
|
"minute": 23,
|
||||||
|
"second": 16,
|
||||||
|
"tz_before_gmt": true,
|
||||||
|
"tz_hour": 4,
|
||||||
|
"tz_minute": 0
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"mime_version": {
|
||||||
|
"Text": "1.0"
|
||||||
|
},
|
||||||
|
"subject": {
|
||||||
|
"Text": "PNG graphic"
|
||||||
|
},
|
||||||
|
"content_type": {
|
||||||
|
"ContentType": {
|
||||||
|
"c_type": "multipart",
|
||||||
|
"c_subtype": "mixed",
|
||||||
|
"attributes": {
|
||||||
|
"boundary": "-1463757054-170444605-958746196=:8452"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"message_id": {
|
||||||
|
"Text": "Pine.LNX.4.21.0005191019440.8452-101000@penguin.example.com"
|
||||||
|
},
|
||||||
"to": {
|
"to": {
|
||||||
"Address": {
|
"Address": {
|
||||||
"name": "Heinz Müller",
|
"name": "Heinz Müller",
|
||||||
"address": "mueller@example.com"
|
"address": "mueller@example.com"
|
||||||
}
|
}
|
||||||
},
|
|
||||||
"content_type": {
|
|
||||||
"c_type": "multipart",
|
|
||||||
"c_subtype": "mixed",
|
|
||||||
"attributes": {
|
|
||||||
"boundary": "-1463757054-170444605-958746196=:8452"
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"html_body": [
|
"html_body": [
|
||||||
{
|
0
|
||||||
"contents": "<html><body></body></html>"
|
|
||||||
}
|
|
||||||
],
|
],
|
||||||
"text_body": [
|
"text_body": [
|
||||||
{
|
0
|
||||||
"header": {
|
|
||||||
"content_type": {
|
|
||||||
"c_type": "text",
|
|
||||||
"c_subtype": "plain",
|
|
||||||
"attributes": {
|
|
||||||
"charset": "US-ASCII"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"contents": "\r"
|
|
||||||
}
|
|
||||||
],
|
],
|
||||||
"attachments": [
|
"attachments": [
|
||||||
|
1
|
||||||
|
],
|
||||||
|
"parts": [
|
||||||
{
|
{
|
||||||
"Binary": {
|
"Text": {
|
||||||
"header": {
|
"headers_rfc": {
|
||||||
"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",
|
|
||||||
"content_type": {
|
"content_type": {
|
||||||
"c_type": "application",
|
"ContentType": {
|
||||||
"c_subtype": "octet-stream",
|
"c_type": "text",
|
||||||
"attributes": {
|
"c_subtype": "plain",
|
||||||
"name": "redball.png"
|
"attributes": {
|
||||||
|
"charset": "US-ASCII"
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"contents": [
|
"is_encoding_problem": false,
|
||||||
|
"body": "\n"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"Binary": {
|
||||||
|
"headers_rfc": {
|
||||||
|
"content_transfer_encoding": {
|
||||||
|
"Text": "BASE64"
|
||||||
|
},
|
||||||
|
"content_description": {
|
||||||
|
"Text": "red ball"
|
||||||
|
},
|
||||||
|
"content_id": {
|
||||||
|
"Text": "Pine.LNX.4.21.0005191023160.8452@penguin.example.com"
|
||||||
|
},
|
||||||
|
"content_disposition": {
|
||||||
|
"ContentType": {
|
||||||
|
"c_type": "attachment",
|
||||||
|
"c_subtype": null,
|
||||||
|
"attributes": {
|
||||||
|
"filename": "redball.png"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"content_type": {
|
||||||
|
"ContentType": {
|
||||||
|
"c_type": "application",
|
||||||
|
"c_subtype": "octet-stream",
|
||||||
|
"attributes": {
|
||||||
|
"name": "redball.png"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"is_encoding_problem": false,
|
||||||
|
"body": [
|
||||||
137,
|
137,
|
||||||
80,
|
80,
|
||||||
78,
|
78,
|
||||||
@@ -1590,5 +1618,18 @@ vAAAAABJRU5ErkJggg==
|
|||||||
]
|
]
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
]
|
],
|
||||||
|
"structure": {
|
||||||
|
"List": [
|
||||||
|
{
|
||||||
|
"Part": 0
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"Part": 1
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"offset_header": 0,
|
||||||
|
"offset_body": 351,
|
||||||
|
"offset_end": 2999
|
||||||
}
|
}
|
||||||
+93
-62
@@ -57,19 +57,35 @@ Birds of a feather flock together.
|
|||||||
--------------77060D866A66DC8D0921E051--
|
--------------77060D866A66DC8D0921E051--
|
||||||
|
|
||||||
|
|
||||||
---- EXPECTED STRUCTURE ----
|
---- EXPECTED STRUCTURE ----{
|
||||||
{
|
"headers_rfc": {
|
||||||
"header": {
|
"message_id": {
|
||||||
|
"Text": "3923686C.99FB5E36@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"
|
||||||
|
},
|
||||||
"date": {
|
"date": {
|
||||||
"year": 2000,
|
"DateTime": {
|
||||||
"month": 5,
|
"year": 2000,
|
||||||
"day": 17,
|
"month": 5,
|
||||||
"hour": 23,
|
"day": 17,
|
||||||
"minute": 50,
|
"hour": 23,
|
||||||
"second": 4,
|
"minute": 50,
|
||||||
"tz_before_gmt": true,
|
"second": 4,
|
||||||
"tz_hour": 4,
|
"tz_before_gmt": true,
|
||||||
"tz_minute": 0
|
"tz_hour": 4,
|
||||||
|
"tz_minute": 0
|
||||||
|
}
|
||||||
},
|
},
|
||||||
"from": {
|
"from": {
|
||||||
"Address": {
|
"Address": {
|
||||||
@@ -77,73 +93,88 @@ Birds of a feather flock together.
|
|||||||
"address": "dwsauder@example.com"
|
"address": "dwsauder@example.com"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"message_id": "3923686C.99FB5E36@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": {
|
"content_type": {
|
||||||
"c_type": "multipart",
|
"ContentType": {
|
||||||
"c_subtype": "mixed",
|
"c_type": "multipart",
|
||||||
"attributes": {
|
"c_subtype": "mixed",
|
||||||
"boundary": "------------77060D866A66DC8D0921E051"
|
"attributes": {
|
||||||
|
"boundary": "------------77060D866A66DC8D0921E051"
|
||||||
|
}
|
||||||
}
|
}
|
||||||
},
|
|
||||||
"others": {
|
|
||||||
"X-Accept-Language": [
|
|
||||||
"en"
|
|
||||||
],
|
|
||||||
"X-Mailer": [
|
|
||||||
"Mozilla 4.7 [en] (WinNT; I)"
|
|
||||||
]
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"html_body": [
|
"html_body": [
|
||||||
{
|
0
|
||||||
"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>"
|
|
||||||
}
|
|
||||||
],
|
],
|
||||||
"text_body": [
|
"text_body": [
|
||||||
{
|
0
|
||||||
"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"
|
|
||||||
}
|
|
||||||
],
|
],
|
||||||
"attachments": [
|
"attachments": [
|
||||||
|
1
|
||||||
|
],
|
||||||
|
"parts": [
|
||||||
{
|
{
|
||||||
"Text": {
|
"Text": {
|
||||||
"header": {
|
"headers_rfc": {
|
||||||
"content_disposition": {
|
"content_type": {
|
||||||
"c_type": "inline",
|
"ContentType": {
|
||||||
"attributes": {
|
"c_type": "text",
|
||||||
"filename": "farmerandstork.txt"
|
"c_subtype": "plain",
|
||||||
|
"attributes": {
|
||||||
|
"charset": "us-ascii"
|
||||||
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"content_transfer_encoding": "7bit",
|
"content_transfer_encoding": {
|
||||||
|
"Text": "7bit"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"is_encoding_problem": false,
|
||||||
|
"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."
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"Text": {
|
||||||
|
"headers_rfc": {
|
||||||
|
"content_disposition": {
|
||||||
|
"ContentType": {
|
||||||
|
"c_type": "inline",
|
||||||
|
"c_subtype": null,
|
||||||
|
"attributes": {
|
||||||
|
"filename": "farmerandstork.txt"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"content_transfer_encoding": {
|
||||||
|
"Text": "7bit"
|
||||||
|
},
|
||||||
"content_type": {
|
"content_type": {
|
||||||
"c_type": "text",
|
"ContentType": {
|
||||||
"c_subtype": "plain",
|
"c_type": "text",
|
||||||
"attributes": {
|
"c_subtype": "plain",
|
||||||
"charset": "us-ascii",
|
"attributes": {
|
||||||
"name": "farmerandstork.txt"
|
"charset": "us-ascii",
|
||||||
|
"name": "farmerandstork.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"
|
"is_encoding_problem": false,
|
||||||
|
"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"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
]
|
],
|
||||||
|
"structure": {
|
||||||
|
"List": [
|
||||||
|
{
|
||||||
|
"Part": 0
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"Part": 1
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"offset_header": 0,
|
||||||
|
"offset_body": 378,
|
||||||
|
"offset_end": 2368
|
||||||
}
|
}
|
||||||
+88
-55
@@ -60,19 +60,10 @@ als wir."
|
|||||||
|
|
||||||
--------------9D454F23DA86BCD63FA3805F--
|
--------------9D454F23DA86BCD63FA3805F--
|
||||||
|
|
||||||
---- EXPECTED STRUCTURE ----
|
---- EXPECTED STRUCTURE ----{
|
||||||
{
|
"headers_rfc": {
|
||||||
"header": {
|
"subject": {
|
||||||
"date": {
|
"Text": "Die Hasen und die Frösche (Netscape Communicator 4.7)"
|
||||||
"year": 2000,
|
|
||||||
"month": 5,
|
|
||||||
"day": 17,
|
|
||||||
"hour": 22,
|
|
||||||
"minute": 47,
|
|
||||||
"second": 43,
|
|
||||||
"tz_before_gmt": true,
|
|
||||||
"tz_hour": 4,
|
|
||||||
"tz_minute": 0
|
|
||||||
},
|
},
|
||||||
"from": {
|
"from": {
|
||||||
"Address": {
|
"Address": {
|
||||||
@@ -80,59 +71,101 @@ als wir."
|
|||||||
"address": "dwsauder@example.com"
|
"address": "dwsauder@example.com"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"message_id": "392359CF.DFF4527@example.com",
|
"date": {
|
||||||
"mime_version": "1.0",
|
"DateTime": {
|
||||||
"subject": "Die Hasen und die Frösche (Netscape Communicator 4.7)",
|
"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"
|
||||||
|
},
|
||||||
|
"content_type": {
|
||||||
|
"ContentType": {
|
||||||
|
"c_type": "multipart",
|
||||||
|
"c_subtype": "alternative",
|
||||||
|
"attributes": {
|
||||||
|
"boundary": "------------9D454F23DA86BCD63FA3805F"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"message_id": {
|
||||||
|
"Text": "392359CF.DFF4527@example.com"
|
||||||
|
},
|
||||||
"to": {
|
"to": {
|
||||||
"Address": {
|
"Address": {
|
||||||
"name": "Heinz Müller",
|
"name": "Heinz Müller",
|
||||||
"address": "mueller@example.com"
|
"address": "mueller@example.com"
|
||||||
}
|
}
|
||||||
},
|
|
||||||
"content_type": {
|
|
||||||
"c_type": "multipart",
|
|
||||||
"c_subtype": "alternative",
|
|
||||||
"attributes": {
|
|
||||||
"boundary": "------------9D454F23DA86BCD63FA3805F"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"others": {
|
|
||||||
"X-Accept-Language": [
|
|
||||||
"en"
|
|
||||||
],
|
|
||||||
"X-Mailer": [
|
|
||||||
"Mozilla 4.7 [en] (WinNT; I)"
|
|
||||||
]
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"html_body": [
|
"html_body": [
|
||||||
{
|
1
|
||||||
"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ösche</b>\r\n<p>Die Hasen klagten einst über ihre miß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 ärger\r\nals der Tod selbst. Auf, laßt uns ein für allemal sterben.\"\r\n<p>In einem nahen Teich wollten sie sich nun ersäufen; sie eilten\r\nihm zu; allein das außerordentliche Getöse und ihre wunderbare\r\nGestalt erschreckte eine Menge Frösche, die am Ufer saßen, so\r\nsehr, daß sie aufs schnellste untertauchten.\r\n<p>\"Halt\", rief nun eben dieser Sprecher, \"wir wollen das Ersäufen\r\nnoch ein wenig aufschieben, denn auch uns fürchten, wie ihr seht,\r\neinige Tiere, welche also wohl noch unglücklicher sein müssen\r\nals wir.\"\r\n<br> \r\n<br> </html>\r\n\r"
|
|
||||||
}
|
|
||||||
],
|
],
|
||||||
"text_body": [
|
"text_body": [
|
||||||
|
0
|
||||||
|
],
|
||||||
|
"attachments": [],
|
||||||
|
"parts": [
|
||||||
{
|
{
|
||||||
"header": {
|
"Text": {
|
||||||
"content_transfer_encoding": "quoted-printable",
|
"headers_rfc": {
|
||||||
"content_type": {
|
"content_transfer_encoding": {
|
||||||
"c_type": "text",
|
"Text": "quoted-printable"
|
||||||
"c_subtype": "plain",
|
},
|
||||||
"attributes": {
|
"content_type": {
|
||||||
"charset": "iso-8859-1"
|
"ContentType": {
|
||||||
|
"c_type": "text",
|
||||||
|
"c_subtype": "plain",
|
||||||
|
"attributes": {
|
||||||
|
"charset": "iso-8859-1"
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
},
|
||||||
},
|
"is_encoding_problem": false,
|
||||||
"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_rfc": {
|
||||||
|
"content_type": {
|
||||||
|
"ContentType": {
|
||||||
|
"c_type": "text",
|
||||||
|
"c_subtype": "html",
|
||||||
|
"attributes": {
|
||||||
|
"charset": "us-ascii"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"content_transfer_encoding": {
|
||||||
|
"Text": "7bit"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"is_encoding_problem": false,
|
||||||
|
"body": "<!doctype html public \"-//w3c//dtd html 4.0 transitional//en\">\r\n<html>\r\n<b>Die Hasen und die Frösche</b>\r\n<p>Die Hasen klagten einst über ihre miß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 ärger\r\nals der Tod selbst. Auf, laßt uns ein für allemal sterben.\"\r\n<p>In einem nahen Teich wollten sie sich nun ersäufen; sie eilten\r\nihm zu; allein das außerordentliche Getöse und ihre wunderbare\r\nGestalt erschreckte eine Menge Frösche, die am Ufer saßen, so\r\nsehr, daß sie aufs schnellste untertauchten.\r\n<p>\"Halt\", rief nun eben dieser Sprecher, \"wir wollen das Ersäufen\r\nnoch ein wenig aufschieben, denn auch uns fürchten, wie ihr seht,\r\neinige Tiere, welche also wohl noch unglücklicher sein müssen\r\nals wir.\"\r\n<br> \r\n<br> </html>\r\n"
|
||||||
|
}
|
||||||
}
|
}
|
||||||
]
|
],
|
||||||
|
"structure": {
|
||||||
|
"List": [
|
||||||
|
{
|
||||||
|
"Part": 0
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"Part": 1
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"offset_header": 0,
|
||||||
|
"offset_body": 440,
|
||||||
|
"offset_end": 2482
|
||||||
}
|
}
|
||||||
+143
-88
@@ -136,19 +136,41 @@ xW62p+lT+Yi747sD/wEUVMzYmWkOvwAAACV0RVh0Q29tbWVudABjbGlwMmdpZiB2LjAuNiBi
|
|||||||
eSBZdmVzIFBpZ3VldDZzO7wAAAAASUVORK5CYII=
|
eSBZdmVzIFBpZ3VldDZzO7wAAAAASUVORK5CYII=
|
||||||
--------------A1FCDEE154E03D875E5D6779--
|
--------------A1FCDEE154E03D875E5D6779--
|
||||||
|
|
||||||
---- EXPECTED STRUCTURE ----
|
---- EXPECTED STRUCTURE ----{
|
||||||
{
|
"headers_rfc": {
|
||||||
"header": {
|
"message_id": {
|
||||||
|
"Text": "39235E1C.1DC7EA90@example.com"
|
||||||
|
},
|
||||||
|
"to": {
|
||||||
|
"Address": {
|
||||||
|
"name": "Joe Blow",
|
||||||
|
"address": "blow@example.com"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"mime_version": {
|
||||||
|
"Text": "1.0"
|
||||||
|
},
|
||||||
|
"content_type": {
|
||||||
|
"ContentType": {
|
||||||
|
"c_type": "multipart",
|
||||||
|
"c_subtype": "mixed",
|
||||||
|
"attributes": {
|
||||||
|
"boundary": "------------A1FCDEE154E03D875E5D6779"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
"date": {
|
"date": {
|
||||||
"year": 2000,
|
"DateTime": {
|
||||||
"month": 5,
|
"year": 2000,
|
||||||
"day": 17,
|
"month": 5,
|
||||||
"hour": 23,
|
"day": 17,
|
||||||
"minute": 6,
|
"hour": 23,
|
||||||
"second": 4,
|
"minute": 6,
|
||||||
"tz_before_gmt": true,
|
"second": 4,
|
||||||
"tz_hour": 4,
|
"tz_before_gmt": true,
|
||||||
"tz_minute": 0
|
"tz_hour": 4,
|
||||||
|
"tz_minute": 0
|
||||||
|
}
|
||||||
},
|
},
|
||||||
"from": {
|
"from": {
|
||||||
"Address": {
|
"Address": {
|
||||||
@@ -156,77 +178,75 @@ eSBZdmVzIFBpZ3VldDZzO7wAAAAASUVORK5CYII=
|
|||||||
"address": "dwsauder@example.com"
|
"address": "dwsauder@example.com"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"message_id": "39235E1C.1DC7EA90@example.com",
|
"subject": {
|
||||||
"mime_version": "1.0",
|
"Text": "Test message from Netscape Communicator 4.7"
|
||||||
"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": "------------A1FCDEE154E03D875E5D6779"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"others": {
|
|
||||||
"X-Mailer": [
|
|
||||||
"Mozilla 4.7 [en] (WinNT; I)"
|
|
||||||
],
|
|
||||||
"X-Accept-Language": [
|
|
||||||
"en"
|
|
||||||
]
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"html_body": [
|
"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>"
|
|
||||||
},
|
|
||||||
0,
|
0,
|
||||||
1,
|
1,
|
||||||
2
|
2,
|
||||||
|
3
|
||||||
],
|
],
|
||||||
"text_body": [
|
"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,
|
0,
|
||||||
1,
|
1,
|
||||||
2
|
2,
|
||||||
|
3
|
||||||
],
|
],
|
||||||
"attachments": [
|
"attachments": [
|
||||||
|
1,
|
||||||
|
2,
|
||||||
|
3
|
||||||
|
],
|
||||||
|
"parts": [
|
||||||
{
|
{
|
||||||
"InlineBinary": {
|
"Text": {
|
||||||
"header": {
|
"headers_rfc": {
|
||||||
"content_disposition": {
|
"content_type": {
|
||||||
"c_type": "inline",
|
"ContentType": {
|
||||||
"attributes": {
|
"c_type": "text",
|
||||||
"filename": "redball.png"
|
"c_subtype": "plain",
|
||||||
|
"attributes": {
|
||||||
|
"charset": "iso-8859-1"
|
||||||
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"content_transfer_encoding": "base64",
|
"content_transfer_encoding": {
|
||||||
|
"Text": "quoted-printable"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"is_encoding_problem": false,
|
||||||
|
"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_rfc": {
|
||||||
"content_type": {
|
"content_type": {
|
||||||
"c_type": "image",
|
"ContentType": {
|
||||||
"c_subtype": "png",
|
"c_type": "image",
|
||||||
"attributes": {
|
"c_subtype": "png",
|
||||||
"name": "redball.png"
|
"attributes": {
|
||||||
|
"name": "redball.png"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"content_transfer_encoding": {
|
||||||
|
"Text": "base64"
|
||||||
|
},
|
||||||
|
"content_disposition": {
|
||||||
|
"ContentType": {
|
||||||
|
"c_type": "inline",
|
||||||
|
"c_subtype": null,
|
||||||
|
"attributes": {
|
||||||
|
"filename": "redball.png"
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"contents": [
|
"is_encoding_problem": false,
|
||||||
|
"body": [
|
||||||
137,
|
137,
|
||||||
80,
|
80,
|
||||||
78,
|
78,
|
||||||
@@ -1685,23 +1705,31 @@ eSBZdmVzIFBpZ3VldDZzO7wAAAAASUVORK5CYII=
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"InlineBinary": {
|
"InlineBinary": {
|
||||||
"header": {
|
"headers_rfc": {
|
||||||
"content_disposition": {
|
"content_type": {
|
||||||
"c_type": "inline",
|
"ContentType": {
|
||||||
"attributes": {
|
"c_type": "image",
|
||||||
"filename": "greenball.png"
|
"c_subtype": "png",
|
||||||
|
"attributes": {
|
||||||
|
"name": "greenball.png"
|
||||||
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"content_transfer_encoding": "base64",
|
"content_transfer_encoding": {
|
||||||
"content_type": {
|
"Text": "base64"
|
||||||
"c_type": "image",
|
},
|
||||||
"c_subtype": "png",
|
"content_disposition": {
|
||||||
"attributes": {
|
"ContentType": {
|
||||||
"name": "greenball.png"
|
"c_type": "inline",
|
||||||
|
"c_subtype": null,
|
||||||
|
"attributes": {
|
||||||
|
"filename": "greenball.png"
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"contents": [
|
"is_encoding_problem": false,
|
||||||
|
"body": [
|
||||||
137,
|
137,
|
||||||
80,
|
80,
|
||||||
78,
|
78,
|
||||||
@@ -3005,23 +3033,31 @@ eSBZdmVzIFBpZ3VldDZzO7wAAAAASUVORK5CYII=
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"InlineBinary": {
|
"InlineBinary": {
|
||||||
"header": {
|
"headers_rfc": {
|
||||||
|
"content_transfer_encoding": {
|
||||||
|
"Text": "base64"
|
||||||
|
},
|
||||||
"content_disposition": {
|
"content_disposition": {
|
||||||
"c_type": "inline",
|
"ContentType": {
|
||||||
"attributes": {
|
"c_type": "inline",
|
||||||
"filename": "blueball.png"
|
"c_subtype": null,
|
||||||
|
"attributes": {
|
||||||
|
"filename": "blueball.png"
|
||||||
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"content_transfer_encoding": "base64",
|
|
||||||
"content_type": {
|
"content_type": {
|
||||||
"c_type": "image",
|
"ContentType": {
|
||||||
"c_subtype": "png",
|
"c_type": "image",
|
||||||
"attributes": {
|
"c_subtype": "png",
|
||||||
"name": "blueball.png"
|
"attributes": {
|
||||||
|
"name": "blueball.png"
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"contents": [
|
"is_encoding_problem": false,
|
||||||
|
"body": [
|
||||||
137,
|
137,
|
||||||
80,
|
80,
|
||||||
78,
|
78,
|
||||||
@@ -4350,5 +4386,24 @@ eSBZdmVzIFBpZ3VldDZzO7wAAAAASUVORK5CYII=
|
|||||||
]
|
]
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
]
|
],
|
||||||
|
"structure": {
|
||||||
|
"List": [
|
||||||
|
{
|
||||||
|
"Part": 0
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"Part": 1
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"Part": 2
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"Part": 3
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"offset_header": 0,
|
||||||
|
"offset_body": 378,
|
||||||
|
"offset_end": 7534
|
||||||
}
|
}
|
||||||
+95
-54
@@ -41,29 +41,29 @@ LCBlaW5pZ2UgVGllcmUsIHdlbGNoZSBhbHNvIHdvaGwgbm9jaCB1bmds/GNr
|
|||||||
bGljaGVyIHNlaW4gbfxzc2VuIGFscyB3aXIuIiANDQoNDQo=
|
bGljaGVyIHNlaW4gbfxzc2VuIGFscyB3aXIuIiANDQoNDQo=
|
||||||
---1463757054-891160829-958746372=:8452--
|
---1463757054-891160829-958746372=:8452--
|
||||||
|
|
||||||
---- EXPECTED STRUCTURE ----
|
---- EXPECTED STRUCTURE ----{
|
||||||
{
|
"headers_rfc": {
|
||||||
"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": {
|
"from": {
|
||||||
"Address": {
|
"Address": {
|
||||||
"name": "Doug Sauder",
|
"name": "Doug Sauder",
|
||||||
"address": "doug@penguin.example.com"
|
"address": "doug@penguin.example.com"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"message_id": "Pine.LNX.4.21.0005191024380.8452-200000@penguin.example.com",
|
"mime_version": {
|
||||||
"mime_version": "1.0",
|
"Text": "1.0"
|
||||||
"subject": "Die Hasen und die Frösche",
|
},
|
||||||
|
"content_type": {
|
||||||
|
"ContentType": {
|
||||||
|
"c_type": "multipart",
|
||||||
|
"c_subtype": "mixed",
|
||||||
|
"attributes": {
|
||||||
|
"boundary": "-1463757054-891160829-958746372=:8452"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"message_id": {
|
||||||
|
"Text": "Pine.LNX.4.21.0005191024380.8452-200000@penguin.example.com"
|
||||||
|
},
|
||||||
"to": {
|
"to": {
|
||||||
"AddressList": [
|
"AddressList": [
|
||||||
{
|
{
|
||||||
@@ -76,57 +76,98 @@ bGljaGVyIHNlaW4gbfxzc2VuIGFscyB3aXIuIiANDQoNDQo=
|
|||||||
}
|
}
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
"content_type": {
|
"subject": {
|
||||||
"c_type": "multipart",
|
"Text": "Die Hasen und die Frösche"
|
||||||
"c_subtype": "mixed",
|
},
|
||||||
"attributes": {
|
"date": {
|
||||||
"boundary": "-1463757054-891160829-958746372=:8452"
|
"DateTime": {
|
||||||
|
"year": 2000,
|
||||||
|
"month": 5,
|
||||||
|
"day": 19,
|
||||||
|
"hour": 10,
|
||||||
|
"minute": 26,
|
||||||
|
"second": 12,
|
||||||
|
"tz_before_gmt": true,
|
||||||
|
"tz_hour": 4,
|
||||||
|
"tz_minute": 0
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"html_body": [
|
"html_body": [
|
||||||
{
|
0
|
||||||
"contents": "<html><body></body></html>"
|
|
||||||
}
|
|
||||||
],
|
],
|
||||||
"text_body": [
|
"text_body": [
|
||||||
{
|
0
|
||||||
"header": {
|
|
||||||
"content_type": {
|
|
||||||
"c_type": "text",
|
|
||||||
"c_subtype": "plain",
|
|
||||||
"attributes": {
|
|
||||||
"charset": "US-ASCII"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"contents": "\r"
|
|
||||||
}
|
|
||||||
],
|
],
|
||||||
"attachments": [
|
"attachments": [
|
||||||
|
1
|
||||||
|
],
|
||||||
|
"parts": [
|
||||||
{
|
{
|
||||||
"Text": {
|
"Text": {
|
||||||
"header": {
|
"headers_rfc": {
|
||||||
"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",
|
|
||||||
"content_type": {
|
"content_type": {
|
||||||
"c_type": "text",
|
"ContentType": {
|
||||||
"c_subtype": "plain",
|
"c_type": "text",
|
||||||
"attributes": {
|
"c_subtype": "plain",
|
||||||
"charset": "iso-8859-1",
|
"attributes": {
|
||||||
"name": "HasenundFrösche.txt"
|
"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"
|
"is_encoding_problem": false,
|
||||||
|
"body": "\n"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"Text": {
|
||||||
|
"headers_rfc": {
|
||||||
|
"content_disposition": {
|
||||||
|
"ContentType": {
|
||||||
|
"c_type": "attachment",
|
||||||
|
"c_subtype": null,
|
||||||
|
"attributes": {
|
||||||
|
"filename": "HasenundFrösche.txt"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"content_id": {
|
||||||
|
"Text": "Pine.LNX.4.21.0005191026120.8452@penguin.example.com"
|
||||||
|
},
|
||||||
|
"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"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"is_encoding_problem": false,
|
||||||
|
"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
|
||||||
}
|
}
|
||||||
+55
-39
@@ -31,60 +31,76 @@ welche also wohl noch ungl=FCcklicher sein m=FCssen als wir."
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
---- EXPECTED STRUCTURE ----
|
---- EXPECTED STRUCTURE ----{
|
||||||
{
|
"headers_rfc": {
|
||||||
"header": {
|
"message_id": {
|
||||||
"date": {
|
"Text": "3923561C.B7078DEF@example.com"
|
||||||
"year": 2000,
|
|
||||||
"month": 5,
|
|
||||||
"day": 17,
|
|
||||||
"hour": 22,
|
|
||||||
"minute": 31,
|
|
||||||
"second": 57,
|
|
||||||
"tz_before_gmt": true,
|
|
||||||
"tz_hour": 4,
|
|
||||||
"tz_minute": 0
|
|
||||||
},
|
},
|
||||||
"from": {
|
"date": {
|
||||||
"Address": {
|
"DateTime": {
|
||||||
"name": "Doug Sauder",
|
"year": 2000,
|
||||||
"address": "dwsauder@example.com"
|
"month": 5,
|
||||||
|
"day": 17,
|
||||||
|
"hour": 22,
|
||||||
|
"minute": 31,
|
||||||
|
"second": 57,
|
||||||
|
"tz_before_gmt": true,
|
||||||
|
"tz_hour": 4,
|
||||||
|
"tz_minute": 0
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"message_id": "3923561C.B7078DEF@example.com",
|
|
||||||
"mime_version": "1.0",
|
|
||||||
"subject": "Die Hasen und die Frösche (Netscape Communicator 4.7)",
|
|
||||||
"to": {
|
"to": {
|
||||||
"Address": {
|
"Address": {
|
||||||
"name": "Jürgen Schmürgen",
|
"name": "Jürgen Schmürgen",
|
||||||
"address": "schmuergen@example.com"
|
"address": "schmuergen@example.com"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"content_transfer_encoding": "quoted-printable",
|
"mime_version": {
|
||||||
"content_type": {
|
"Text": "1.0"
|
||||||
"c_type": "text",
|
|
||||||
"c_subtype": "plain",
|
|
||||||
"attributes": {
|
|
||||||
"charset": "iso-8859-1"
|
|
||||||
}
|
|
||||||
},
|
},
|
||||||
"others": {
|
"subject": {
|
||||||
"X-Accept-Language": [
|
"Text": "Die Hasen und die Frösche (Netscape Communicator 4.7)"
|
||||||
"en"
|
},
|
||||||
],
|
"from": {
|
||||||
"X-Mailer": [
|
"Address": {
|
||||||
"Mozilla 4.7 [en] (WinNT; I)"
|
"name": "Doug Sauder",
|
||||||
]
|
"address": "dwsauder@example.com"
|
||||||
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"html_body": [
|
"html_body": [
|
||||||
{
|
0
|
||||||
"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>"
|
|
||||||
}
|
|
||||||
],
|
],
|
||||||
"text_body": [
|
"text_body": [
|
||||||
|
0
|
||||||
|
],
|
||||||
|
"attachments": [],
|
||||||
|
"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": {
|
||||||
|
"headers_rfc": {
|
||||||
|
"content_transfer_encoding": {
|
||||||
|
"Text": "quoted-printable"
|
||||||
|
},
|
||||||
|
"content_type": {
|
||||||
|
"ContentType": {
|
||||||
|
"c_type": "text",
|
||||||
|
"c_subtype": "plain",
|
||||||
|
"attributes": {
|
||||||
|
"charset": "iso-8859-1"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"is_encoding_problem": false,
|
||||||
|
"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
|
||||||
}
|
}
|
||||||
+94
-63
@@ -59,29 +59,8 @@ n wenig aufschieben, denn auch uns f=FCrchten, wie ihr seht, einige Tiere=
|
|||||||
--------------CA611088711119FBDB3473B4--
|
--------------CA611088711119FBDB3473B4--
|
||||||
|
|
||||||
|
|
||||||
---- EXPECTED STRUCTURE ----
|
---- EXPECTED STRUCTURE ----{
|
||||||
{
|
"headers_rfc": {
|
||||||
"header": {
|
|
||||||
"date": {
|
|
||||||
"year": 2000,
|
|
||||||
"month": 5,
|
|
||||||
"day": 17,
|
|
||||||
"hour": 23,
|
|
||||||
"minute": 47,
|
|
||||||
"second": 8,
|
|
||||||
"tz_before_gmt": true,
|
|
||||||
"tz_hour": 4,
|
|
||||||
"tz_minute": 0
|
|
||||||
},
|
|
||||||
"from": {
|
|
||||||
"Address": {
|
|
||||||
"name": "Doug Sauder",
|
|
||||||
"address": "dwsauder@example.com"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"message_id": "392367BC.3D075C95@example.com",
|
|
||||||
"mime_version": "1.0",
|
|
||||||
"subject": "Test message from Netscape Communicator 4.7",
|
|
||||||
"to": {
|
"to": {
|
||||||
"Address": {
|
"Address": {
|
||||||
"name": "Joe Blow",
|
"name": "Joe Blow",
|
||||||
@@ -89,63 +68,115 @@ n wenig aufschieben, denn auch uns f=FCrchten, wie ihr seht, einige Tiere=
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"content_type": {
|
"content_type": {
|
||||||
"c_type": "multipart",
|
"ContentType": {
|
||||||
"c_subtype": "mixed",
|
"c_type": "multipart",
|
||||||
"attributes": {
|
"c_subtype": "mixed",
|
||||||
"boundary": "------------CA611088711119FBDB3473B4"
|
"attributes": {
|
||||||
|
"boundary": "------------CA611088711119FBDB3473B4"
|
||||||
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"others": {
|
"message_id": {
|
||||||
"X-Accept-Language": [
|
"Text": "392367BC.3D075C95@example.com"
|
||||||
"en"
|
},
|
||||||
],
|
"from": {
|
||||||
"X-Mailer": [
|
"Address": {
|
||||||
"Mozilla 4.7 [en] (WinNT; I)"
|
"name": "Doug Sauder",
|
||||||
]
|
"address": "dwsauder@example.com"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"date": {
|
||||||
|
"DateTime": {
|
||||||
|
"year": 2000,
|
||||||
|
"month": 5,
|
||||||
|
"day": 17,
|
||||||
|
"hour": 23,
|
||||||
|
"minute": 47,
|
||||||
|
"second": 8,
|
||||||
|
"tz_before_gmt": true,
|
||||||
|
"tz_hour": 4,
|
||||||
|
"tz_minute": 0
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"subject": {
|
||||||
|
"Text": "Test message from Netscape Communicator 4.7"
|
||||||
|
},
|
||||||
|
"mime_version": {
|
||||||
|
"Text": "1.0"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"html_body": [
|
"html_body": [
|
||||||
{
|
0
|
||||||
"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>"
|
|
||||||
}
|
|
||||||
],
|
],
|
||||||
"text_body": [
|
"text_body": [
|
||||||
{
|
0
|
||||||
"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"
|
|
||||||
}
|
|
||||||
],
|
],
|
||||||
"attachments": [
|
"attachments": [
|
||||||
|
1
|
||||||
|
],
|
||||||
|
"parts": [
|
||||||
{
|
{
|
||||||
"Text": {
|
"Text": {
|
||||||
"header": {
|
"headers_rfc": {
|
||||||
"content_disposition": {
|
"content_type": {
|
||||||
"c_type": "inline",
|
"ContentType": {
|
||||||
"attributes": {
|
"c_type": "text",
|
||||||
"filename": "HasenundFrösche.txt"
|
"c_subtype": "plain",
|
||||||
|
"attributes": {
|
||||||
|
"charset": "us-ascii"
|
||||||
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"content_transfer_encoding": "quoted-printable",
|
"content_transfer_encoding": {
|
||||||
|
"Text": "7bit"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"is_encoding_problem": false,
|
||||||
|
"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."
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"Text": {
|
||||||
|
"headers_rfc": {
|
||||||
"content_type": {
|
"content_type": {
|
||||||
"c_type": "text",
|
"ContentType": {
|
||||||
"c_subtype": "plain",
|
"c_type": "text",
|
||||||
"attributes": {
|
"c_subtype": "plain",
|
||||||
"name": "HasenundFrösche.txt",
|
"attributes": {
|
||||||
"charset": "iso-8859-1"
|
"name": "HasenundFrösche.txt",
|
||||||
|
"charset": "iso-8859-1"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"content_transfer_encoding": {
|
||||||
|
"Text": "quoted-printable"
|
||||||
|
},
|
||||||
|
"content_disposition": {
|
||||||
|
"ContentType": {
|
||||||
|
"c_type": "inline",
|
||||||
|
"c_subtype": null,
|
||||||
|
"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"
|
"is_encoding_problem": false,
|
||||||
|
"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
|
||||||
}
|
}
|
||||||
+140
-88
@@ -154,19 +154,19 @@ end
|
|||||||
--------------177483472E7788F4AD46AB1A--
|
--------------177483472E7788F4AD46AB1A--
|
||||||
|
|
||||||
|
|
||||||
---- EXPECTED STRUCTURE ----
|
---- EXPECTED STRUCTURE ----{
|
||||||
{
|
"headers_rfc": {
|
||||||
"header": {
|
"mime_version": {
|
||||||
"date": {
|
"Text": "1.0"
|
||||||
"year": 2000,
|
},
|
||||||
"month": 5,
|
"content_type": {
|
||||||
"day": 17,
|
"ContentType": {
|
||||||
"hour": 23,
|
"c_type": "multipart",
|
||||||
"minute": 44,
|
"c_subtype": "mixed",
|
||||||
"second": 12,
|
"attributes": {
|
||||||
"tz_before_gmt": true,
|
"boundary": "------------177483472E7788F4AD46AB1A"
|
||||||
"tz_hour": 4,
|
}
|
||||||
"tz_minute": 0
|
}
|
||||||
},
|
},
|
||||||
"from": {
|
"from": {
|
||||||
"Address": {
|
"Address": {
|
||||||
@@ -174,77 +174,97 @@ end
|
|||||||
"address": "dwsauder@example.com"
|
"address": "dwsauder@example.com"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"message_id": "3923670C.67D83A99@example.com",
|
"date": {
|
||||||
"mime_version": "1.0",
|
"DateTime": {
|
||||||
"subject": "Test message from Netscape Communicator 4.7",
|
"year": 2000,
|
||||||
|
"month": 5,
|
||||||
|
"day": 17,
|
||||||
|
"hour": 23,
|
||||||
|
"minute": 44,
|
||||||
|
"second": 12,
|
||||||
|
"tz_before_gmt": true,
|
||||||
|
"tz_hour": 4,
|
||||||
|
"tz_minute": 0
|
||||||
|
}
|
||||||
|
},
|
||||||
"to": {
|
"to": {
|
||||||
"Address": {
|
"Address": {
|
||||||
"name": "Joe Blow",
|
"name": "Joe Blow",
|
||||||
"address": "blow@example.com"
|
"address": "blow@example.com"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"content_type": {
|
"subject": {
|
||||||
"c_type": "multipart",
|
"Text": "Test message from Netscape Communicator 4.7"
|
||||||
"c_subtype": "mixed",
|
|
||||||
"attributes": {
|
|
||||||
"boundary": "------------177483472E7788F4AD46AB1A"
|
|
||||||
}
|
|
||||||
},
|
},
|
||||||
"others": {
|
"message_id": {
|
||||||
"X-Mailer": [
|
"Text": "3923670C.67D83A99@example.com"
|
||||||
"Mozilla 4.7 [en] (WinNT; I)"
|
|
||||||
],
|
|
||||||
"X-Accept-Language": [
|
|
||||||
"en"
|
|
||||||
]
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"html_body": [
|
"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>"
|
|
||||||
},
|
|
||||||
0,
|
0,
|
||||||
1,
|
1,
|
||||||
2
|
2,
|
||||||
|
3
|
||||||
],
|
],
|
||||||
"text_body": [
|
"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,
|
0,
|
||||||
1,
|
1,
|
||||||
2
|
2,
|
||||||
|
3
|
||||||
],
|
],
|
||||||
"attachments": [
|
"attachments": [
|
||||||
|
1,
|
||||||
|
2,
|
||||||
|
3
|
||||||
|
],
|
||||||
|
"parts": [
|
||||||
{
|
{
|
||||||
"InlineBinary": {
|
"Text": {
|
||||||
"header": {
|
"headers_rfc": {
|
||||||
"content_disposition": {
|
"content_type": {
|
||||||
"c_type": "inline",
|
"ContentType": {
|
||||||
"attributes": {
|
"c_type": "text",
|
||||||
"filename": "redball.png"
|
"c_subtype": "plain",
|
||||||
|
"attributes": {
|
||||||
|
"charset": "us-ascii"
|
||||||
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"content_transfer_encoding": "x-uuencode",
|
"content_transfer_encoding": {
|
||||||
|
"Text": "7bit"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"is_encoding_problem": false,
|
||||||
|
"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."
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"InlineBinary": {
|
||||||
|
"headers_rfc": {
|
||||||
|
"content_transfer_encoding": {
|
||||||
|
"Text": "x-uuencode"
|
||||||
|
},
|
||||||
"content_type": {
|
"content_type": {
|
||||||
"c_type": "image",
|
"ContentType": {
|
||||||
"c_subtype": "png",
|
"c_type": "image",
|
||||||
"attributes": {
|
"c_subtype": "png",
|
||||||
"name": "redball.png"
|
"attributes": {
|
||||||
|
"name": "redball.png"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"content_disposition": {
|
||||||
|
"ContentType": {
|
||||||
|
"c_type": "inline",
|
||||||
|
"c_subtype": null,
|
||||||
|
"attributes": {
|
||||||
|
"filename": "redball.png"
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"contents": [
|
"is_encoding_problem": false,
|
||||||
|
"body": [
|
||||||
98,
|
98,
|
||||||
101,
|
101,
|
||||||
103,
|
103,
|
||||||
@@ -2311,30 +2331,37 @@ end
|
|||||||
110,
|
110,
|
||||||
100,
|
100,
|
||||||
13,
|
13,
|
||||||
10,
|
10
|
||||||
13
|
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"InlineBinary": {
|
"InlineBinary": {
|
||||||
"header": {
|
"headers_rfc": {
|
||||||
"content_disposition": {
|
"content_transfer_encoding": {
|
||||||
"c_type": "inline",
|
"Text": "x-uuencode"
|
||||||
"attributes": {
|
},
|
||||||
"filename": "greenball.png"
|
"content_type": {
|
||||||
|
"ContentType": {
|
||||||
|
"c_type": "image",
|
||||||
|
"c_subtype": "png",
|
||||||
|
"attributes": {
|
||||||
|
"name": "greenball.png"
|
||||||
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"content_transfer_encoding": "x-uuencode",
|
"content_disposition": {
|
||||||
"content_type": {
|
"ContentType": {
|
||||||
"c_type": "image",
|
"c_type": "inline",
|
||||||
"c_subtype": "png",
|
"c_subtype": null,
|
||||||
"attributes": {
|
"attributes": {
|
||||||
"name": "greenball.png"
|
"filename": "greenball.png"
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"contents": [
|
"is_encoding_problem": false,
|
||||||
|
"body": [
|
||||||
98,
|
98,
|
||||||
101,
|
101,
|
||||||
103,
|
103,
|
||||||
@@ -4183,30 +4210,37 @@ end
|
|||||||
110,
|
110,
|
||||||
100,
|
100,
|
||||||
13,
|
13,
|
||||||
10,
|
10
|
||||||
13
|
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"InlineBinary": {
|
"InlineBinary": {
|
||||||
"header": {
|
"headers_rfc": {
|
||||||
"content_disposition": {
|
"content_disposition": {
|
||||||
"c_type": "inline",
|
"ContentType": {
|
||||||
"attributes": {
|
"c_type": "inline",
|
||||||
"filename": "blueball.png"
|
"c_subtype": null,
|
||||||
|
"attributes": {
|
||||||
|
"filename": "blueball.png"
|
||||||
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"content_transfer_encoding": "x-uuencode",
|
"content_transfer_encoding": {
|
||||||
|
"Text": "x-uuencode"
|
||||||
|
},
|
||||||
"content_type": {
|
"content_type": {
|
||||||
"c_type": "image",
|
"ContentType": {
|
||||||
"c_subtype": "png",
|
"c_type": "image",
|
||||||
"attributes": {
|
"c_subtype": "png",
|
||||||
"name": "blueball.png"
|
"attributes": {
|
||||||
|
"name": "blueball.png"
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"contents": [
|
"is_encoding_problem": false,
|
||||||
|
"body": [
|
||||||
98,
|
98,
|
||||||
101,
|
101,
|
||||||
103,
|
103,
|
||||||
@@ -6093,10 +6127,28 @@ end
|
|||||||
110,
|
110,
|
||||||
100,
|
100,
|
||||||
13,
|
13,
|
||||||
10,
|
10
|
||||||
13
|
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
]
|
],
|
||||||
|
"structure": {
|
||||||
|
"List": [
|
||||||
|
{
|
||||||
|
"Part": 0
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"Part": 1
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"Part": 2
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"Part": 3
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"offset_header": 0,
|
||||||
|
"offset_body": 378,
|
||||||
|
"offset_end": 7716
|
||||||
}
|
}
|
||||||
+45
-37
File diff suppressed because one or more lines are too long
+119
-75
@@ -108,19 +108,23 @@ IFl2ZXMgUGlndWV0NnM7vAAAAABJRU5ErkJggg==
|
|||||||
--=====================_715546120==_.REL--
|
--=====================_715546120==_.REL--
|
||||||
|
|
||||||
|
|
||||||
---- EXPECTED STRUCTURE ----
|
---- EXPECTED STRUCTURE ----{
|
||||||
{
|
"headers_rfc": {
|
||||||
"header": {
|
"mime_version": {
|
||||||
"date": {
|
"Text": "1.0"
|
||||||
"year": 2000,
|
},
|
||||||
"month": 5,
|
"content_type": {
|
||||||
"day": 19,
|
"ContentType": {
|
||||||
"hour": 0,
|
"c_type": "multipart",
|
||||||
"minute": 39,
|
"c_subtype": "related",
|
||||||
"second": 36,
|
"attributes": {
|
||||||
"tz_before_gmt": true,
|
"type": "text/html",
|
||||||
"tz_hour": 4,
|
"boundary": "=====================_715546120==_.REL"
|
||||||
"tz_minute": 0
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"message_id": {
|
||||||
|
"Text": "4.2.0.58.20000519003934.00a866f0@pop.example.com"
|
||||||
},
|
},
|
||||||
"from": {
|
"from": {
|
||||||
"Address": {
|
"Address": {
|
||||||
@@ -128,76 +132,90 @@ IFl2ZXMgUGlndWV0NnM7vAAAAABJRU5ErkJggg==
|
|||||||
"address": "dwsauder@example.com"
|
"address": "dwsauder@example.com"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"message_id": "4.2.0.58.20000519003934.00a866f0@pop.example.com",
|
"subject": {
|
||||||
"mime_version": "1.0",
|
"Text": "Die Hasen und die Frösche"
|
||||||
"subject": "Die Hasen und die Frösche",
|
},
|
||||||
"to": {
|
"to": {
|
||||||
"Address": {
|
"Address": {
|
||||||
"name": "Heinz Müller",
|
"name": "Heinz Müller",
|
||||||
"address": "mueller@example.com"
|
"address": "mueller@example.com"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"content_type": {
|
"date": {
|
||||||
"c_type": "multipart",
|
"DateTime": {
|
||||||
"c_subtype": "related",
|
"year": 2000,
|
||||||
"attributes": {
|
"month": 5,
|
||||||
"type": "text/html",
|
"day": 19,
|
||||||
"boundary": "=====================_715546120==_.REL"
|
"hour": 0,
|
||||||
|
"minute": 39,
|
||||||
|
"second": 36,
|
||||||
|
"tz_before_gmt": true,
|
||||||
|
"tz_hour": 4,
|
||||||
|
"tz_minute": 0
|
||||||
}
|
}
|
||||||
},
|
|
||||||
"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": [
|
"html_body": [
|
||||||
{
|
0
|
||||||
"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; "wir leben", sprach ein Redner, "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." <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"Halt", rief nun eben dieser Sprecher, "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." <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"
|
|
||||||
}
|
|
||||||
],
|
],
|
||||||
"text_body": [
|
"text_body": [
|
||||||
{
|
0
|
||||||
"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"
|
|
||||||
}
|
|
||||||
],
|
],
|
||||||
"attachments": [
|
"attachments": [
|
||||||
|
1,
|
||||||
|
2
|
||||||
|
],
|
||||||
|
"parts": [
|
||||||
{
|
{
|
||||||
"Binary": {
|
"Html": {
|
||||||
"header": {
|
"headers_rfc": {
|
||||||
"content_disposition": {
|
"content_transfer_encoding": {
|
||||||
"c_type": "inline",
|
"Text": "quoted-printable"
|
||||||
"attributes": {
|
|
||||||
"filename": "2aa658b6.png"
|
|
||||||
}
|
|
||||||
},
|
},
|
||||||
"content_id": "4.2.0.58.20000519003934.00a866f0@pop.example.com.2",
|
|
||||||
"content_transfer_encoding": "base64",
|
|
||||||
"content_type": {
|
"content_type": {
|
||||||
"c_type": "image",
|
"ContentType": {
|
||||||
"c_subtype": "png",
|
"c_type": "text",
|
||||||
"attributes": {
|
"c_subtype": "html",
|
||||||
"name": "2aa658b6.png"
|
"attributes": {
|
||||||
|
"charset": "iso-8859-1"
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"contents": [
|
"is_encoding_problem": false,
|
||||||
|
"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; "wir leben", sprach ein Redner, "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." <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"Halt", rief nun eben dieser Sprecher, "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." <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_rfc": {
|
||||||
|
"content_transfer_encoding": {
|
||||||
|
"Text": "base64"
|
||||||
|
},
|
||||||
|
"content_id": {
|
||||||
|
"Text": "4.2.0.58.20000519003934.00a866f0@pop.example.com.2"
|
||||||
|
},
|
||||||
|
"content_type": {
|
||||||
|
"ContentType": {
|
||||||
|
"c_type": "image",
|
||||||
|
"c_subtype": "png",
|
||||||
|
"attributes": {
|
||||||
|
"name": "2aa658b6.png"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"content_disposition": {
|
||||||
|
"ContentType": {
|
||||||
|
"c_type": "inline",
|
||||||
|
"c_subtype": null,
|
||||||
|
"attributes": {
|
||||||
|
"filename": "2aa658b6.png"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"is_encoding_problem": false,
|
||||||
|
"body": [
|
||||||
137,
|
137,
|
||||||
80,
|
80,
|
||||||
78,
|
78,
|
||||||
@@ -1528,24 +1546,34 @@ IFl2ZXMgUGlndWV0NnM7vAAAAABJRU5ErkJggg==
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"Binary": {
|
"Binary": {
|
||||||
"header": {
|
"headers_rfc": {
|
||||||
|
"content_id": {
|
||||||
|
"Text": "4.2.0.58.20000519003934.00a866f0@pop.example.com.3"
|
||||||
|
},
|
||||||
"content_disposition": {
|
"content_disposition": {
|
||||||
"c_type": "inline",
|
"ContentType": {
|
||||||
"attributes": {
|
"c_type": "inline",
|
||||||
"filename": "2aa658c0.png"
|
"c_subtype": null,
|
||||||
|
"attributes": {
|
||||||
|
"filename": "2aa658c0.png"
|
||||||
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"content_id": "4.2.0.58.20000519003934.00a866f0@pop.example.com.3",
|
|
||||||
"content_transfer_encoding": "base64",
|
|
||||||
"content_type": {
|
"content_type": {
|
||||||
"c_type": "image",
|
"ContentType": {
|
||||||
"c_subtype": "png",
|
"c_type": "image",
|
||||||
"attributes": {
|
"c_subtype": "png",
|
||||||
"name": "2aa658c0.png"
|
"attributes": {
|
||||||
|
"name": "2aa658c0.png"
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
},
|
||||||
|
"content_transfer_encoding": {
|
||||||
|
"Text": "base64"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"contents": [
|
"is_encoding_problem": false,
|
||||||
|
"body": [
|
||||||
137,
|
137,
|
||||||
80,
|
80,
|
||||||
78,
|
78,
|
||||||
@@ -3002,5 +3030,21 @@ IFl2ZXMgUGlndWV0NnM7vAAAAABJRU5ErkJggg==
|
|||||||
]
|
]
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
]
|
],
|
||||||
|
"structure": {
|
||||||
|
"List": [
|
||||||
|
{
|
||||||
|
"Part": 0
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"Part": 1
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"Part": 2
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"offset_header": 0,
|
||||||
|
"offset_body": 510,
|
||||||
|
"offset_end": 6227
|
||||||
}
|
}
|
||||||
+187
-96
@@ -160,95 +160,131 @@ bGlwMmdpZiB2LjAuNiBieSBZdmVzIFBpZ3VldDZzO7wAAAAASUVORK5CYII=
|
|||||||
--=====================_715515186==_--
|
--=====================_715515186==_--
|
||||||
|
|
||||||
|
|
||||||
---- EXPECTED STRUCTURE ----
|
---- EXPECTED STRUCTURE ----{
|
||||||
{
|
"headers_rfc": {
|
||||||
"header": {
|
|
||||||
"date": {
|
|
||||||
"year": 2000,
|
|
||||||
"month": 5,
|
|
||||||
"day": 19,
|
|
||||||
"hour": 0,
|
|
||||||
"minute": 39,
|
|
||||||
"second": 5,
|
|
||||||
"tz_before_gmt": true,
|
|
||||||
"tz_hour": 4,
|
|
||||||
"tz_minute": 0
|
|
||||||
},
|
|
||||||
"from": {
|
"from": {
|
||||||
"Address": {
|
"Address": {
|
||||||
"name": "Doug Sauder",
|
"name": "Doug Sauder",
|
||||||
"address": "dwsauder@example.com"
|
"address": "dwsauder@example.com"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"message_id": "4.2.0.58.20000519003903.00a859b0@pop.example.com",
|
"mime_version": {
|
||||||
"mime_version": "1.0",
|
"Text": "1.0"
|
||||||
"subject": "Die Hasen und die Frösche",
|
},
|
||||||
|
"content_type": {
|
||||||
|
"ContentType": {
|
||||||
|
"c_type": "multipart",
|
||||||
|
"c_subtype": "mixed",
|
||||||
|
"attributes": {
|
||||||
|
"boundary": "=====================_715515186==_"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
"to": {
|
"to": {
|
||||||
"Address": {
|
"Address": {
|
||||||
"name": "Heinz Müller",
|
"name": "Heinz Müller",
|
||||||
"address": "mueller@example.com"
|
"address": "mueller@example.com"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"content_type": {
|
"message_id": {
|
||||||
"c_type": "multipart",
|
"Text": "4.2.0.58.20000519003903.00a859b0@pop.example.com"
|
||||||
"c_subtype": "mixed",
|
|
||||||
"attributes": {
|
|
||||||
"boundary": "=====================_715515186==_"
|
|
||||||
}
|
|
||||||
},
|
},
|
||||||
"others": {
|
"subject": {
|
||||||
"X-Mailer": [
|
"Text": "Die Hasen und die Frösche"
|
||||||
"QUALCOMM Windows Eudora Pro Version 4.2.0.58"
|
},
|
||||||
],
|
"date": {
|
||||||
"X-Priority": [
|
"DateTime": {
|
||||||
"2 (High)"
|
"year": 2000,
|
||||||
],
|
"month": 5,
|
||||||
"X-Sender": [
|
"day": 19,
|
||||||
"dwsauder@pop.example.com (Unverified)"
|
"hour": 0,
|
||||||
]
|
"minute": 39,
|
||||||
|
"second": 5,
|
||||||
|
"tz_before_gmt": true,
|
||||||
|
"tz_hour": 4,
|
||||||
|
"tz_minute": 0
|
||||||
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"html_body": [
|
"html_body": [
|
||||||
{
|
1
|
||||||
"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>"
|
|
||||||
}
|
|
||||||
],
|
],
|
||||||
"text_body": [
|
"text_body": [
|
||||||
{
|
1
|
||||||
"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"
|
|
||||||
}
|
|
||||||
],
|
],
|
||||||
"attachments": [
|
"attachments": [
|
||||||
|
2,
|
||||||
|
3,
|
||||||
|
4,
|
||||||
|
5
|
||||||
|
],
|
||||||
|
"parts": [
|
||||||
{
|
{
|
||||||
"Binary": {
|
"Multipart": {
|
||||||
"header": {
|
"headers_rfc": {
|
||||||
"content_disposition": {
|
|
||||||
"c_type": "inline",
|
|
||||||
"attributes": {
|
|
||||||
"filename": "2aa5e03a.png"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"content_id": "4.2.0.58.20000519003903.00a859b0@pop.example.com.2",
|
|
||||||
"content_transfer_encoding": "base64",
|
|
||||||
"content_type": {
|
"content_type": {
|
||||||
"c_type": "image",
|
"ContentType": {
|
||||||
"c_subtype": "png",
|
"c_type": "multipart",
|
||||||
"attributes": {
|
"c_subtype": "related",
|
||||||
"name": "2aa5e03a.png"
|
"attributes": {
|
||||||
|
"boundary": "=====================_715515186==_.REL",
|
||||||
|
"type": "text/plain"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"Text": {
|
||||||
|
"headers_rfc": {
|
||||||
|
"content_transfer_encoding": {
|
||||||
|
"Text": "quoted-printable"
|
||||||
|
},
|
||||||
|
"content_type": {
|
||||||
|
"ContentType": {
|
||||||
|
"c_type": "text",
|
||||||
|
"c_subtype": "plain",
|
||||||
|
"attributes": {
|
||||||
|
"charset": "iso-8859-1"
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"contents": [
|
"is_encoding_problem": false,
|
||||||
|
"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_rfc": {
|
||||||
|
"content_disposition": {
|
||||||
|
"ContentType": {
|
||||||
|
"c_type": "inline",
|
||||||
|
"c_subtype": null,
|
||||||
|
"attributes": {
|
||||||
|
"filename": "2aa5e03a.png"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"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"
|
||||||
|
},
|
||||||
|
"content_transfer_encoding": {
|
||||||
|
"Text": "base64"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"is_encoding_problem": false,
|
||||||
|
"body": [
|
||||||
137,
|
137,
|
||||||
80,
|
80,
|
||||||
78,
|
78,
|
||||||
@@ -1579,24 +1615,34 @@ bGlwMmdpZiB2LjAuNiBieSBZdmVzIFBpZ3VldDZzO7wAAAAASUVORK5CYII=
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"Binary": {
|
"Binary": {
|
||||||
"header": {
|
"headers_rfc": {
|
||||||
"content_disposition": {
|
"content_disposition": {
|
||||||
"c_type": "inline",
|
"ContentType": {
|
||||||
"attributes": {
|
"c_type": "inline",
|
||||||
"filename": "2aa5e044.png"
|
"c_subtype": null,
|
||||||
|
"attributes": {
|
||||||
|
"filename": "2aa5e044.png"
|
||||||
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"content_id": "4.2.0.58.20000519003903.00a859b0@pop.example.com.3",
|
|
||||||
"content_transfer_encoding": "base64",
|
|
||||||
"content_type": {
|
"content_type": {
|
||||||
"c_type": "image",
|
"ContentType": {
|
||||||
"c_subtype": "png",
|
"c_type": "image",
|
||||||
"attributes": {
|
"c_subtype": "png",
|
||||||
"name": "2aa5e044.png"
|
"attributes": {
|
||||||
|
"name": "2aa5e044.png"
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
},
|
||||||
|
"content_transfer_encoding": {
|
||||||
|
"Text": "base64"
|
||||||
|
},
|
||||||
|
"content_id": {
|
||||||
|
"Text": "4.2.0.58.20000519003903.00a859b0@pop.example.com.3"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"contents": [
|
"is_encoding_problem": false,
|
||||||
|
"body": [
|
||||||
137,
|
137,
|
||||||
80,
|
80,
|
||||||
78,
|
78,
|
||||||
@@ -3055,23 +3101,31 @@ bGlwMmdpZiB2LjAuNiBieSBZdmVzIFBpZ3VldDZzO7wAAAAASUVORK5CYII=
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"Binary": {
|
"Binary": {
|
||||||
"header": {
|
"headers_rfc": {
|
||||||
|
"content_transfer_encoding": {
|
||||||
|
"Text": "base64"
|
||||||
|
},
|
||||||
"content_disposition": {
|
"content_disposition": {
|
||||||
"c_type": "attachment",
|
"ContentType": {
|
||||||
"attributes": {
|
"c_type": "attachment",
|
||||||
"filename": "blueball.png"
|
"c_subtype": null,
|
||||||
|
"attributes": {
|
||||||
|
"filename": "blueball.png"
|
||||||
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"content_transfer_encoding": "base64",
|
|
||||||
"content_type": {
|
"content_type": {
|
||||||
"c_type": "image",
|
"ContentType": {
|
||||||
"c_subtype": "png",
|
"c_type": "image",
|
||||||
"attributes": {
|
"c_subtype": "png",
|
||||||
"name": "blueball.png"
|
"attributes": {
|
||||||
|
"name": "blueball.png"
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"contents": [
|
"is_encoding_problem": false,
|
||||||
|
"body": [
|
||||||
137,
|
137,
|
||||||
80,
|
80,
|
||||||
78,
|
78,
|
||||||
@@ -4402,23 +4456,31 @@ bGlwMmdpZiB2LjAuNiBieSBZdmVzIFBpZ3VldDZzO7wAAAAASUVORK5CYII=
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"Binary": {
|
"Binary": {
|
||||||
"header": {
|
"headers_rfc": {
|
||||||
"content_disposition": {
|
"content_disposition": {
|
||||||
"c_type": "attachment",
|
"ContentType": {
|
||||||
"attributes": {
|
"c_type": "attachment",
|
||||||
"filename": "greenball.png"
|
"c_subtype": null,
|
||||||
|
"attributes": {
|
||||||
|
"filename": "greenball.png"
|
||||||
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"content_transfer_encoding": "base64",
|
"content_transfer_encoding": {
|
||||||
|
"Text": "base64"
|
||||||
|
},
|
||||||
"content_type": {
|
"content_type": {
|
||||||
"c_type": "image",
|
"ContentType": {
|
||||||
"c_subtype": "png",
|
"c_type": "image",
|
||||||
"attributes": {
|
"c_subtype": "png",
|
||||||
"name": "greenball.png"
|
"attributes": {
|
||||||
|
"name": "greenball.png"
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"contents": [
|
"is_encoding_problem": false,
|
||||||
|
"body": [
|
||||||
137,
|
137,
|
||||||
80,
|
80,
|
||||||
78,
|
78,
|
||||||
@@ -5720,5 +5782,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
|
||||||
}
|
}
|
||||||
+49
-41
@@ -26,19 +26,19 @@ wenig aufschieben, denn auch uns f
|
|||||||
welche also wohl noch unglücklicher sein müssen als wir."
|
welche also wohl noch unglücklicher sein müssen als wir."
|
||||||
|
|
||||||
|
|
||||||
---- EXPECTED STRUCTURE ----
|
---- EXPECTED STRUCTURE ----{
|
||||||
{
|
"headers_rfc": {
|
||||||
"header": {
|
"message_id": {
|
||||||
"date": {
|
"Text": "NDBBIAKOPKHFGPLCODIGOEKDCHAA.doug@example.com"
|
||||||
"year": 2000,
|
},
|
||||||
"month": 5,
|
"subject": {
|
||||||
"day": 17,
|
"Text": "Die Hasen und die Fr�sche (Microsoft Outlook 00)"
|
||||||
"hour": 19,
|
},
|
||||||
"minute": 28,
|
"to": {
|
||||||
"second": 40,
|
"Address": {
|
||||||
"tz_before_gmt": true,
|
"name": "Heinz M�ller",
|
||||||
"tz_hour": 4,
|
"address": "mueller@example.com"
|
||||||
"tz_minute": 0
|
}
|
||||||
},
|
},
|
||||||
"from": {
|
"from": {
|
||||||
"Address": {
|
"Address": {
|
||||||
@@ -46,40 +46,48 @@ welche also wohl noch ungl
|
|||||||
"address": "doug@example.com"
|
"address": "doug@example.com"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"message_id": "NDBBIAKOPKHFGPLCODIGOEKDCHAA.doug@example.com",
|
"date": {
|
||||||
"subject": "Die Hasen und die Fr�sche (Microsoft Outlook 00)",
|
"DateTime": {
|
||||||
"to": {
|
"year": 2000,
|
||||||
"Address": {
|
"month": 5,
|
||||||
"name": "Heinz M�ller",
|
"day": 17,
|
||||||
"address": "mueller@example.com"
|
"hour": 19,
|
||||||
|
"minute": 28,
|
||||||
|
"second": 40,
|
||||||
|
"tz_before_gmt": true,
|
||||||
|
"tz_hour": 4,
|
||||||
|
"tz_minute": 0
|
||||||
}
|
}
|
||||||
},
|
|
||||||
"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)"
|
|
||||||
]
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"html_body": [
|
"html_body": [
|
||||||
{
|
0
|
||||||
"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>"
|
|
||||||
}
|
|
||||||
],
|
],
|
||||||
"text_body": [
|
"text_body": [
|
||||||
|
0
|
||||||
|
],
|
||||||
|
"attachments": [],
|
||||||
|
"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": {
|
||||||
|
"headers_rfc": {
|
||||||
|
"content_type": {
|
||||||
|
"ContentType": {
|
||||||
|
"c_type": "text",
|
||||||
|
"c_subtype": "plain",
|
||||||
|
"attributes": null
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"is_encoding_problem": false,
|
||||||
|
"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
|
||||||
}
|
}
|
||||||
+55
-48
@@ -31,19 +31,16 @@ noch ein wenig aufschieben, denn auch uns f=C3=BCrchten, wie ihr seht, =
|
|||||||
einige Tiere, welche also wohl noch ungl=C3=BCcklicher sein m=C3=BCssen =
|
einige Tiere, welche also wohl noch ungl=C3=BCcklicher sein m=C3=BCssen =
|
||||||
als wir."=20
|
als wir."=20
|
||||||
|
|
||||||
---- EXPECTED STRUCTURE ----
|
---- EXPECTED STRUCTURE ----{
|
||||||
{
|
"headers_rfc": {
|
||||||
"header": {
|
"to": {
|
||||||
"date": {
|
"Address": {
|
||||||
"year": 2000,
|
"name": "Heinz Müller",
|
||||||
"month": 5,
|
"address": "mueller@example.com"
|
||||||
"day": 17,
|
}
|
||||||
"hour": 19,
|
},
|
||||||
"minute": 27,
|
"mime_version": {
|
||||||
"second": 4,
|
"Text": "1.0"
|
||||||
"tz_before_gmt": true,
|
|
||||||
"tz_hour": 4,
|
|
||||||
"tz_minute": 0
|
|
||||||
},
|
},
|
||||||
"from": {
|
"from": {
|
||||||
"Address": {
|
"Address": {
|
||||||
@@ -51,49 +48,59 @@ als wir."=20
|
|||||||
"address": "doug@example.com"
|
"address": "doug@example.com"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"message_id": "NDBBIAKOPKHFGPLCODIGKEKDCHAA.doug@example.com",
|
"date": {
|
||||||
"mime_version": "1.0",
|
"DateTime": {
|
||||||
"subject": "Die Hasen und die Frösche (Microsoft Outlook 00)",
|
"year": 2000,
|
||||||
"to": {
|
"month": 5,
|
||||||
"Address": {
|
"day": 17,
|
||||||
"name": "Heinz Müller",
|
"hour": 19,
|
||||||
"address": "mueller@example.com"
|
"minute": 27,
|
||||||
|
"second": 4,
|
||||||
|
"tz_before_gmt": true,
|
||||||
|
"tz_hour": 4,
|
||||||
|
"tz_minute": 0
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"content_transfer_encoding": "quoted-printable",
|
"message_id": {
|
||||||
"content_type": {
|
"Text": "NDBBIAKOPKHFGPLCODIGKEKDCHAA.doug@example.com"
|
||||||
"c_type": "text",
|
|
||||||
"c_subtype": "plain",
|
|
||||||
"attributes": {
|
|
||||||
"charset": "utf-8"
|
|
||||||
}
|
|
||||||
},
|
},
|
||||||
"others": {
|
"subject": {
|
||||||
"X-MimeOLE": [
|
"Text": "Die Hasen und die Frösche (Microsoft Outlook 00)"
|
||||||
"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)"
|
|
||||||
]
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"html_body": [
|
"html_body": [
|
||||||
{
|
0
|
||||||
"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>"
|
|
||||||
}
|
|
||||||
],
|
],
|
||||||
"text_body": [
|
"text_body": [
|
||||||
|
0
|
||||||
|
],
|
||||||
|
"attachments": [],
|
||||||
|
"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": {
|
||||||
|
"headers_rfc": {
|
||||||
|
"content_transfer_encoding": {
|
||||||
|
"Text": "quoted-printable"
|
||||||
|
},
|
||||||
|
"content_type": {
|
||||||
|
"ContentType": {
|
||||||
|
"c_type": "text",
|
||||||
|
"c_subtype": "plain",
|
||||||
|
"attributes": {
|
||||||
|
"charset": "utf-8"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"is_encoding_problem": false,
|
||||||
|
"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
|
||||||
}
|
}
|
||||||
+19
-8
@@ -9,15 +9,26 @@ Content-Type: text/plain
|
|||||||
Content-Type: text/html
|
Content-Type: text/html
|
||||||
--:foo--
|
--:foo--
|
||||||
|
|
||||||
---- EXPECTED STRUCTURE ----
|
---- EXPECTED STRUCTURE ----{
|
||||||
{
|
"headers_rfc": {
|
||||||
"header": {
|
|
||||||
"content_type": {
|
"content_type": {
|
||||||
"c_type": "multipart",
|
"ContentType": {
|
||||||
"c_subtype": "mixed",
|
"c_type": "multipart",
|
||||||
"attributes": {
|
"c_subtype": "mixed",
|
||||||
"boundary": ":foo"
|
"attributes": {
|
||||||
|
"boundary": ":foo"
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
},
|
||||||
|
"html_body": [],
|
||||||
|
"text_body": [],
|
||||||
|
"attachments": [],
|
||||||
|
"parts": [],
|
||||||
|
"structure": {
|
||||||
|
"List": []
|
||||||
|
},
|
||||||
|
"offset_header": 0,
|
||||||
|
"offset_body": 48,
|
||||||
|
"offset_end": 160
|
||||||
}
|
}
|
||||||
+55
-12
@@ -9,25 +9,68 @@ Content-Type: text/plain
|
|||||||
--a
|
--a
|
||||||
|
|
||||||
|
|
||||||
---- EXPECTED STRUCTURE ----
|
---- EXPECTED STRUCTURE ----{
|
||||||
{
|
"headers_rfc": {
|
||||||
"header": {
|
|
||||||
"content_type": {
|
"content_type": {
|
||||||
"c_type": "multipart",
|
"ContentType": {
|
||||||
"c_subtype": "mixed",
|
"c_type": "multipart",
|
||||||
"attributes": {
|
"c_subtype": "mixed",
|
||||||
"boundary": "ab"
|
"attributes": {
|
||||||
|
"boundary": "ab"
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"html_body": [
|
"html_body": [
|
||||||
{
|
1
|
||||||
"contents": "<html><body>Content-Type: text/plain<br/></body></html>"
|
|
||||||
}
|
|
||||||
],
|
],
|
||||||
"text_body": [
|
"text_body": [
|
||||||
|
1
|
||||||
|
],
|
||||||
|
"attachments": [],
|
||||||
|
"parts": [
|
||||||
{
|
{
|
||||||
"contents": "Content-Type: text/plain\n"
|
"Multipart": {
|
||||||
|
"headers_rfc": {
|
||||||
|
"content_type": {
|
||||||
|
"ContentType": {
|
||||||
|
"c_type": "multipart",
|
||||||
|
"c_subtype": "mixed",
|
||||||
|
"attributes": {
|
||||||
|
"boundary": "a"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"Text": {
|
||||||
|
"headers_rfc": {
|
||||||
|
"content_type": {
|
||||||
|
"ContentType": {
|
||||||
|
"c_type": "text",
|
||||||
|
"c_subtype": "plain",
|
||||||
|
"attributes": null
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"is_encoding_problem": false,
|
||||||
|
"body": "Content-Type: text/plain\n"
|
||||||
|
}
|
||||||
}
|
}
|
||||||
]
|
],
|
||||||
|
"structure": {
|
||||||
|
"MultiPart": [
|
||||||
|
0,
|
||||||
|
[
|
||||||
|
{
|
||||||
|
"Part": 1
|
||||||
|
}
|
||||||
|
]
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"offset_header": 0,
|
||||||
|
"offset_body": 46,
|
||||||
|
"offset_end": 132
|
||||||
}
|
}
|
||||||
+27
-13
@@ -2,22 +2,36 @@ Content-Type: multipart/mixed; boundary="ab"
|
|||||||
|
|
||||||
body
|
body
|
||||||
|
|
||||||
---- EXPECTED STRUCTURE ----
|
---- EXPECTED STRUCTURE ----{
|
||||||
{
|
"headers_rfc": {},
|
||||||
"header": {
|
"html_body": [],
|
||||||
"content_type": {
|
"text_body": [],
|
||||||
"c_type": "multipart",
|
|
||||||
"c_subtype": "mixed",
|
|
||||||
"attributes": {
|
|
||||||
"boundary": "ab"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"attachments": [
|
"attachments": [
|
||||||
|
0
|
||||||
|
],
|
||||||
|
"parts": [
|
||||||
{
|
{
|
||||||
"Text": {
|
"Text": {
|
||||||
"contents": "body\n"
|
"headers_rfc": {
|
||||||
|
"content_type": {
|
||||||
|
"ContentType": {
|
||||||
|
"c_type": "multipart",
|
||||||
|
"c_subtype": "mixed",
|
||||||
|
"attributes": {
|
||||||
|
"boundary": "ab"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"is_encoding_problem": false,
|
||||||
|
"body": "body\n"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
]
|
],
|
||||||
|
"structure": {
|
||||||
|
"Part": 0
|
||||||
|
},
|
||||||
|
"offset_header": 0,
|
||||||
|
"offset_body": 46,
|
||||||
|
"offset_end": 51
|
||||||
}
|
}
|
||||||
+50
-12
@@ -8,28 +8,66 @@ Content-Type: text/plain
|
|||||||
|
|
||||||
body
|
body
|
||||||
|
|
||||||
---- EXPECTED STRUCTURE ----
|
---- EXPECTED STRUCTURE ----{
|
||||||
{
|
"headers_rfc": {
|
||||||
"header": {
|
|
||||||
"content_type": {
|
"content_type": {
|
||||||
"c_type": "multipart",
|
"ContentType": {
|
||||||
"c_subtype": "mixed",
|
"c_type": "multipart",
|
||||||
"attributes": {
|
"c_subtype": "mixed",
|
||||||
"boundary": "a"
|
"attributes": {
|
||||||
|
"boundary": "a"
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"html_body": [],
|
||||||
|
"text_body": [],
|
||||||
"attachments": [
|
"attachments": [
|
||||||
|
1
|
||||||
|
],
|
||||||
|
"parts": [
|
||||||
|
{
|
||||||
|
"Multipart": {
|
||||||
|
"headers_rfc": {
|
||||||
|
"content_type": {
|
||||||
|
"ContentType": {
|
||||||
|
"c_type": "multipart",
|
||||||
|
"c_subtype": "mixed",
|
||||||
|
"attributes": {
|
||||||
|
"boundary": "a"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"Text": {
|
"Text": {
|
||||||
"header": {
|
"headers_rfc": {
|
||||||
"content_type": {
|
"content_type": {
|
||||||
"c_type": "text",
|
"ContentType": {
|
||||||
"c_subtype": "plain"
|
"c_type": "text",
|
||||||
|
"c_subtype": "plain",
|
||||||
|
"attributes": null
|
||||||
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"contents": "body\n"
|
"is_encoding_problem": true,
|
||||||
|
"body": "body\n"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
]
|
],
|
||||||
|
"structure": {
|
||||||
|
"MultiPart": [
|
||||||
|
0,
|
||||||
|
[
|
||||||
|
{
|
||||||
|
"Part": 1
|
||||||
|
}
|
||||||
|
]
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"offset_header": 0,
|
||||||
|
"offset_body": 45,
|
||||||
|
"offset_end": 129
|
||||||
}
|
}
|
||||||
+31
-9
@@ -8,22 +8,44 @@ Content-Type: text/plain
|
|||||||
|
|
||||||
body
|
body
|
||||||
|
|
||||||
---- EXPECTED STRUCTURE ----
|
---- EXPECTED STRUCTURE ----{
|
||||||
{
|
"headers_rfc": {
|
||||||
"header": {
|
|
||||||
"content_type": {
|
"content_type": {
|
||||||
"c_type": "multipart",
|
"ContentType": {
|
||||||
"c_subtype": "mixed",
|
"c_type": "multipart",
|
||||||
"attributes": {
|
"c_subtype": "mixed",
|
||||||
"boundary": "a"
|
"attributes": {
|
||||||
|
"boundary": "a"
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"html_body": [],
|
||||||
|
"text_body": [],
|
||||||
"attachments": [
|
"attachments": [
|
||||||
|
0
|
||||||
|
],
|
||||||
|
"parts": [
|
||||||
{
|
{
|
||||||
"Text": {
|
"Text": {
|
||||||
"contents": "Content-Type: multipart/mixed; boundary=\"a\"\n\n--ac\nContent-Type: text/plain\n\nbody\n"
|
"headers_rfc": {
|
||||||
|
"content_type": {
|
||||||
|
"ContentType": {
|
||||||
|
"c_type": "text",
|
||||||
|
"c_subtype": "plain",
|
||||||
|
"attributes": null
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"is_encoding_problem": true,
|
||||||
|
"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
|
||||||
}
|
}
|
||||||
+54
-17
@@ -12,31 +12,68 @@ Content-Type: text/html
|
|||||||
|
|
||||||
body2
|
body2
|
||||||
--a----
|
--a----
|
||||||
---- EXPECTED STRUCTURE ----
|
---- EXPECTED STRUCTURE ----{
|
||||||
{
|
"headers_rfc": {
|
||||||
"header": {
|
|
||||||
"content_type": {
|
"content_type": {
|
||||||
"c_type": "multipart",
|
"ContentType": {
|
||||||
"c_subtype": "mixed",
|
"c_type": "multipart",
|
||||||
"attributes": {
|
"c_subtype": "mixed",
|
||||||
"boundary": "a--"
|
"attributes": {
|
||||||
|
"boundary": "a--"
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"html_body": [
|
"html_body": [
|
||||||
{
|
1
|
||||||
"contents": "<html><body>body</body></html>"
|
|
||||||
}
|
|
||||||
],
|
],
|
||||||
"text_body": [
|
"text_body": [
|
||||||
|
1
|
||||||
|
],
|
||||||
|
"attachments": [],
|
||||||
|
"parts": [
|
||||||
{
|
{
|
||||||
"header": {
|
"Multipart": {
|
||||||
"content_type": {
|
"headers_rfc": {
|
||||||
"c_type": "text",
|
"content_type": {
|
||||||
"c_subtype": "plain"
|
"ContentType": {
|
||||||
|
"c_type": "multipart",
|
||||||
|
"c_subtype": "mixed",
|
||||||
|
"attributes": {
|
||||||
|
"boundary": "a----"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
},
|
}
|
||||||
"contents": "body"
|
},
|
||||||
|
{
|
||||||
|
"Text": {
|
||||||
|
"headers_rfc": {
|
||||||
|
"content_type": {
|
||||||
|
"ContentType": {
|
||||||
|
"c_type": "text",
|
||||||
|
"c_subtype": "plain",
|
||||||
|
"attributes": null
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"is_encoding_problem": false,
|
||||||
|
"body": "body"
|
||||||
|
}
|
||||||
}
|
}
|
||||||
]
|
],
|
||||||
|
"structure": {
|
||||||
|
"MultiPart": [
|
||||||
|
0,
|
||||||
|
[
|
||||||
|
{
|
||||||
|
"Part": 1
|
||||||
|
}
|
||||||
|
]
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"offset_header": 0,
|
||||||
|
"offset_body": 47,
|
||||||
|
"offset_end": 189
|
||||||
}
|
}
|
||||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user