Compare commits

...
20 Commits
Author SHA1 Message Date
Mauro D 2805e029ff v0.4.7 2022-06-03 06:40:21 +00:00
Mauro D 35b4846c7e Added get_header function. 2022-06-02 17:33:39 +00:00
Mauro D 75d9a9e96a Added get_raw_headers function. 2022-06-02 17:27:45 +00:00
Mauro D 1e8dfd31cf Handle clients sending malformed Return-Path fields. 2022-06-02 13:13:58 +00:00
Bryan Leong 0be5ed4a41 Add support for ks_c_5601 charsets (#20)
* Add mapping for ks_c_5601-1987 charset

* Add mapping for ks_c_5601-1989 charset
2022-06-02 11:12:00 +02:00
Mauro D 62057172d0 Into implementations for RfcHeader 2022-05-20 12:05:17 +00:00
Mauro D a963f0caa7 DateTime into i64. 2022-05-19 14:56:26 +00:00
Mauro D e2b33a90f3 Zero offset timezones should be positive (#17) 2022-04-08 08:20:43 +00:00
BryanLeong d157525b1c Zero offset timezones should be positive (#17) 2022-04-08 10:19:17 +02:00
Mauro D 9f1edeed33 Updated copyright notice. 2022-04-04 14:55:30 +00:00
Mauro D 509fb718f3 DateTime to_timestamp fix #15. 2022-03-19 18:07:41 +00:00
Alex Wennerberg eab28c0b2d Change date is_valid check to inclusive range (#15)
* Use inclusive range for is_valid check

* Remove year check
2022-03-19 19:03:15 +01:00
Mauro D 2cae61c6d2 Replaced overflowing_add with wrapping_add. 2022-03-15 14:35:57 +00:00
Mauro D da4a9d9a47 v0.4.5 2022-03-14 17:09:24 +00:00
Mauro D c3b36dd0d6 Fixed issue #14 2022-03-08 06:43:48 +00:00
Mauro D 2f380451f5 Unwrap header name. 2022-02-01 16:59:39 +00:00
Mauro D 1a2ac1d027 Fixed build with --no-default-features #12 2022-01-30 11:41:22 +00:00
Mauro D beb21b3d03 Fixed \r leftover in get_bytes_to_boundary 2022-01-30 01:35:49 +00:00
Mauro D c77f3e2cb4 Parsing header name succeeds on EOF. 2022-01-29 15:10:48 +00:00
Mauro D 94522f1179 HeaderName::as_str 2022-01-26 14:01:41 +00:00
114 changed files with 2156 additions and 1821 deletions
+17
View File
@@ -1,3 +1,20 @@
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 mail-parser 0.4.4
================================ ================================
- Support for multi-line headers. - Support for multi-line headers.
+1 -1
View File
@@ -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
+102 -30
View File
@@ -4,9 +4,9 @@ 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]] [[package]]
name = "bincode" name = "bincode"
@@ -24,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",
] ]
@@ -46,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",
@@ -56,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"
@@ -68,9 +81,10 @@ checksum = "7fb9b38af92608140b86b693604b9ffcc5824240a484d1ecd4795bacb2fe88f3"
[[package]] [[package]]
name = "mail-parser" name = "mail-parser"
version = "0.4.4" version = "0.4.7"
dependencies = [ dependencies = [
"bincode", "bincode",
"chrono",
"encoding_rs", "encoding_rs",
"serde", "serde",
"serde_json", "serde_json",
@@ -78,43 +92,62 @@ dependencies = [
] ]
[[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]] [[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"
+2 -1
View File
@@ -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.4.4" 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"
@@ -19,6 +19,7 @@ serde = { version = "1.0", features = ["derive"], optional=true}
serde_yaml = "0.8" serde_yaml = "0.8"
serde_json = "1.0" serde_json = "1.0"
bincode = "1.3.3" bincode = "1.3.3"
chrono = "0.4"
[features] [features]
default = ["serde_support", "full_encoding"] default = ["serde_support", "full_encoding"]
+1 -1
View File
@@ -277,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 -1
View File
@@ -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
View File
@@ -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
View File
@@ -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
View File
@@ -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
View File
@@ -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
+5 -5
View File
@@ -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 -1
View File
@@ -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
+10 -13
View File
@@ -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 -1
View File
@@ -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
View File
@@ -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
View File
@@ -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
View File
@@ -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
View File
@@ -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
View File
@@ -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
View File
@@ -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
+144 -59
View File
@@ -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
@@ -497,7 +497,7 @@ impl<'x> Group<'x> {
} }
pub type RfcHeaders<'x> = HashMap<RfcHeader, HeaderValue<'x>>; pub type RfcHeaders<'x> = HashMap<RfcHeader, HeaderValue<'x>>;
pub type RawHeaders<'x> = HashMap<HeaderName<'x>, Vec<HeaderOffset>>; pub type RawHeaders<'x> = Vec<(HeaderName<'x>, HeaderOffset)>;
/// Offset of a message element in the raw message. /// Offset of a message element in the raw message.
#[derive(Debug, PartialEq, Eq, Clone)] #[derive(Debug, PartialEq, Eq, Clone)]
@@ -515,12 +515,26 @@ pub enum HeaderName<'x> {
} }
impl<'x> HeaderName<'x> { impl<'x> HeaderName<'x> {
pub fn as_str(&self) -> &str {
match self {
HeaderName::Rfc(header) => header.as_str(),
HeaderName::Other(name) => name.as_ref(),
}
}
pub fn into_owned<'y>(&self) -> HeaderName<'y> { pub fn into_owned<'y>(&self) -> HeaderName<'y> {
match self { match self {
HeaderName::Rfc(header) => HeaderName::Rfc(*header), HeaderName::Rfc(header) => HeaderName::Rfc(*header),
HeaderName::Other(name) => HeaderName::Other(name.clone().into_owned().into()), HeaderName::Other(name) => HeaderName::Other(name.clone().into_owned().into()),
} }
} }
pub fn unwrap(self) -> String {
match self {
HeaderName::Rfc(header) => header.as_str().to_owned(),
HeaderName::Other(name) => name.into_owned(),
}
}
} }
/// A header field /// A header field
@@ -568,80 +582,86 @@ pub enum RfcHeader {
ListUnsubscribe = 36, ListUnsubscribe = 36,
} }
impl Display for RfcHeader { impl RfcHeader {
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { pub fn as_str(&self) -> &'static str {
match self { match self {
RfcHeader::Subject => write!(f, "Subject"), RfcHeader::Subject => "Subject",
RfcHeader::From => write!(f, "From"), RfcHeader::From => "From",
RfcHeader::To => write!(f, "To"), RfcHeader::To => "To",
RfcHeader::Cc => write!(f, "Cc"), RfcHeader::Cc => "Cc",
RfcHeader::Date => write!(f, "Date"), RfcHeader::Date => "Date",
RfcHeader::Bcc => write!(f, "Bcc"), RfcHeader::Bcc => "Bcc",
RfcHeader::ReplyTo => write!(f, "Reply-To"), RfcHeader::ReplyTo => "Reply-To",
RfcHeader::Sender => write!(f, "Sender"), RfcHeader::Sender => "Sender",
RfcHeader::Comments => write!(f, "Comments"), RfcHeader::Comments => "Comments",
RfcHeader::InReplyTo => write!(f, "In-Reply-To"), RfcHeader::InReplyTo => "In-Reply-To",
RfcHeader::Keywords => write!(f, "Keywords"), RfcHeader::Keywords => "Keywords",
RfcHeader::Received => write!(f, "Received"), RfcHeader::Received => "Received",
RfcHeader::MessageId => write!(f, "Message-ID"), RfcHeader::MessageId => "Message-ID",
RfcHeader::References => write!(f, "References"), RfcHeader::References => "References",
RfcHeader::ReturnPath => write!(f, "Return-Path"), RfcHeader::ReturnPath => "Return-Path",
RfcHeader::MimeVersion => write!(f, "MIME-Version"), RfcHeader::MimeVersion => "MIME-Version",
RfcHeader::ContentDescription => write!(f, "Content-Description"), RfcHeader::ContentDescription => "Content-Description",
RfcHeader::ContentId => write!(f, "Content-ID"), RfcHeader::ContentId => "Content-ID",
RfcHeader::ContentLanguage => write!(f, "Content-Language"), RfcHeader::ContentLanguage => "Content-Language",
RfcHeader::ContentLocation => write!(f, "Content-Location"), RfcHeader::ContentLocation => "Content-Location",
RfcHeader::ContentTransferEncoding => write!(f, "Content-Transfer-Encoding"), RfcHeader::ContentTransferEncoding => "Content-Transfer-Encoding",
RfcHeader::ContentType => write!(f, "Content-Type"), RfcHeader::ContentType => "Content-Type",
RfcHeader::ContentDisposition => write!(f, "Content-Disposition"), RfcHeader::ContentDisposition => "Content-Disposition",
RfcHeader::ResentTo => write!(f, "Resent-To"), RfcHeader::ResentTo => "Resent-To",
RfcHeader::ResentFrom => write!(f, "Resent-From"), RfcHeader::ResentFrom => "Resent-From",
RfcHeader::ResentBcc => write!(f, "Resent-Bcc"), RfcHeader::ResentBcc => "Resent-Bcc",
RfcHeader::ResentCc => write!(f, "Resent-Cc"), RfcHeader::ResentCc => "Resent-Cc",
RfcHeader::ResentSender => write!(f, "Resent-Sender"), RfcHeader::ResentSender => "Resent-Sender",
RfcHeader::ResentDate => write!(f, "Resent-Date"), RfcHeader::ResentDate => "Resent-Date",
RfcHeader::ResentMessageId => write!(f, "Resent-Message-ID"), RfcHeader::ResentMessageId => "Resent-Message-ID",
RfcHeader::ListArchive => write!(f, "List-Archive"), RfcHeader::ListArchive => "List-Archive",
RfcHeader::ListHelp => write!(f, "List-Help"), RfcHeader::ListHelp => "List-Help",
RfcHeader::ListId => write!(f, "List-ID"), RfcHeader::ListId => "List-ID",
RfcHeader::ListOwner => write!(f, "List-Owner"), RfcHeader::ListOwner => "List-Owner",
RfcHeader::ListPost => write!(f, "List-Post"), RfcHeader::ListPost => "List-Post",
RfcHeader::ListSubscribe => write!(f, "List-Subscribe"), RfcHeader::ListSubscribe => "List-Subscribe",
RfcHeader::ListUnsubscribe => write!(f, "List-Unsubscribe"), RfcHeader::ListUnsubscribe => "List-Unsubscribe",
} }
} }
} }
/// A parsed header value. impl Display for RfcHeader {
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
write!(f, "{}", self.as_str())
}
}
/// Parsed header value.
#[derive(Debug, PartialEq)] #[derive(Debug, PartialEq)]
#[cfg_attr(feature = "serde_support", derive(Serialize, Deserialize))] #[cfg_attr(feature = "serde_support", derive(Serialize, Deserialize))]
//#[cfg_attr(feature = "serde_support", serde(tag = "type"))] //#[cfg_attr(feature = "serde_support", serde(tag = "type"))]
pub enum HeaderValue<'x> { pub enum HeaderValue<'x> {
/// A single address /// Single address
Address(Addr<'x>), Address(Addr<'x>),
/// An address list /// Address list
AddressList(Vec<Addr<'x>>), AddressList(Vec<Addr<'x>>),
/// A group of addresses /// Group of addresses
Group(Group<'x>), Group(Group<'x>),
/// A list containing two or more address groups /// List containing two or more address groups
GroupList(Vec<Group<'x>>), GroupList(Vec<Group<'x>>),
/// A string /// String
Text(Cow<'x, str>), Text(Cow<'x, str>),
/// A list of strings /// List of strings
TextList(Vec<Cow<'x, str>>), TextList(Vec<Cow<'x, str>>),
/// A datetime /// Datetime
DateTime(DateTime), DateTime(DateTime),
/// A Content-Type or Content-Disposition header /// Content-Type or Content-Disposition header
ContentType(ContentType<'x>), ContentType(ContentType<'x>),
/// A collection of multiple header fields, for example /// Collection of multiple header fields, for example
/// Resent-To, References, etc. /// Resent-To, References, etc.
Collection(Vec<HeaderValue<'x>>), Collection(Vec<HeaderValue<'x>>),
Empty, Empty,
@@ -690,7 +710,11 @@ impl<'x> HeaderValue<'x> {
pub fn get_content_type(&self) -> &ContentType<'x> { pub fn get_content_type(&self) -> &ContentType<'x> {
match *self { match *self {
HeaderValue::ContentType(ref ct) => ct, HeaderValue::ContentType(ref ct) => ct,
_ => panic!("HeaderValue::get_content_type called on non-ContentType value"), HeaderValue::Collection(ref c) => c.last().unwrap().get_content_type(),
_ => panic!(
"HeaderValue::get_content_type called on non-ContentType: {:?}",
self
),
} }
} }
@@ -755,7 +779,7 @@ pub struct ContentType<'x> {
} }
/// An RFC5322 datetime. /// An RFC5322 datetime.
#[derive(Debug, PartialEq)] #[derive(Debug, PartialEq, Eq)]
#[cfg_attr(feature = "serde_support", derive(Serialize, Deserialize))] #[cfg_attr(feature = "serde_support", derive(Serialize, Deserialize))]
pub struct DateTime { pub struct DateTime {
pub year: u32, pub year: u32,
@@ -770,6 +794,11 @@ pub struct DateTime {
} }
impl<'x> Message<'x> { impl<'x> Message<'x> {
/// Returns a parsed RFC header.
pub fn get_header(&self, header: &RfcHeader) -> Option<&HeaderValue> {
self.headers_rfc.get(header)
}
/// Returns an iterator over the RFC headers of this message. /// Returns an iterator over the RFC headers of this message.
pub fn get_headers_rfc(&self) -> impl Iterator<Item = (&RfcHeader, &HeaderValue<'x>)> { pub fn get_headers_rfc(&self) -> impl Iterator<Item = (&RfcHeader, &HeaderValue<'x>)> {
self.headers_rfc.iter() self.headers_rfc.iter()
@@ -964,6 +993,22 @@ impl<'x> Message<'x> {
.unwrap_or(&HeaderValue::Empty) .unwrap_or(&HeaderValue::Empty)
} }
/// Returns the return address from either the Return-Path
/// or From header fields
pub fn get_return_address(&self) -> Option<&str> {
match self.headers_rfc.get(&RfcHeader::ReturnPath) {
Some(HeaderValue::Text(text)) => Some(text.as_ref()),
Some(HeaderValue::TextList(text_list)) => text_list.last().map(|t| t.as_ref()),
_ => match self.headers_rfc.get(&RfcHeader::From) {
Some(HeaderValue::Address(addr)) => addr.address.as_deref(),
Some(HeaderValue::AddressList(addr_list)) => {
addr_list.last().and_then(|a| a.address.as_deref())
}
_ => None,
},
}
}
/// Returns the Sender header field /// Returns the Sender header field
pub fn get_sender(&self) -> &HeaderValue<'x> { pub fn get_sender(&self) -> &HeaderValue<'x> {
self.headers_rfc self.headers_rfc
@@ -1002,15 +1047,35 @@ impl<'x> Message<'x> {
} }
} }
/// Returns all headers in raw format
pub fn get_raw_headers(&self) -> impl Iterator<Item = (&HeaderName, Cow<str>)> {
self.headers_raw.iter().map(move |(name, offset)| {
(
name,
String::from_utf8_lossy(&self.raw_message[offset.start..offset.end]),
)
})
}
pub fn _get_raw(&'x self, name: HeaderName) -> Option<Vec<Cow<'x, str>>> { pub fn _get_raw(&'x self, name: HeaderName) -> Option<Vec<Cow<'x, str>>> {
self.headers_raw let headers = self
.get(&name)? .headers_raw
.iter() .iter()
.map(|offset| { .filter_map(|(k, v)| {
String::from_utf8_lossy(self.raw_message.get(offset.start..offset.end).unwrap()) if k == &name {
Some(String::from_utf8_lossy(
self.raw_message.get(v.start..v.end).unwrap(),
))
} else {
None
}
}) })
.collect::<Vec<Cow<str>>>() .collect::<Vec<Cow<str>>>();
.into() if !headers.is_empty() {
Some(headers)
} else {
None
}
} }
/// Returns in raw format a header field not defined in the conformed RFCs /// Returns in raw format a header field not defined in the conformed RFCs
@@ -1484,6 +1549,7 @@ impl<'x> Part<'x, MessageAttachment<'x>> {
} }
} }
#[cfg(feature = "serde_support")]
impl<'x> Serialize for MessageAttachment<'x> { impl<'x> Serialize for MessageAttachment<'x> {
fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error> fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
where where
@@ -1498,6 +1564,7 @@ impl<'x> Serialize for MessageAttachment<'x> {
} }
} }
#[cfg(feature = "serde_support")]
impl<'x, 'de> Deserialize<'de> for MessageAttachment<'x> { impl<'x, 'de> Deserialize<'de> for MessageAttachment<'x> {
fn deserialize<D>(_deserializer: D) -> Result<Self, D::Error> fn deserialize<D>(_deserializer: D) -> Result<Self, D::Error>
where where
@@ -1506,3 +1573,21 @@ impl<'x, 'de> Deserialize<'de> for MessageAttachment<'x> {
panic!("Deserializing message attachments is not supported at this time.") panic!("Deserializing message attachments is not supported at this time.")
} }
} }
impl From<DateTime> for i64 {
fn from(value: DateTime) -> Self {
value.to_timestamp()
}
}
impl From<RfcHeader> for String {
fn from(header: RfcHeader) -> Self {
header.to_string()
}
}
impl From<RfcHeader> for Cow<'_, str> {
fn from(header: RfcHeader) -> Self {
Cow::Borrowed(header.as_str())
}
}
+1 -1
View File
@@ -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
View File
@@ -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
+84 -5
View File
@@ -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
@@ -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 {
@@ -195,6 +246,8 @@ pub static MONTH_MAP: &[u8; 31] = &[
#[cfg(test)] #[cfg(test)]
mod tests { mod tests {
use chrono::{FixedOffset, LocalResult, SecondsFormat, TimeZone, Utc};
use crate::{ use crate::{
parsers::{fields::date::parse_date, message::MessageStream}, parsers::{fields::date::parse_date, message::MessageStream},
HeaderValue, HeaderValue,
@@ -265,9 +318,35 @@ 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())) {
HeaderValue::DateTime(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)
);
}
}
} }
HeaderValue::Empty => { HeaderValue::Empty => {
//println!("{} -> None", input.0.escape_debug()); //println!("{} -> None", input.0.escape_debug());
+31 -4
View File
@@ -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
@@ -14,6 +14,8 @@ use crate::{parsers::message::MessageStream, HeaderValue};
pub fn parse_id<'x>(stream: &mut MessageStream<'x>) -> HeaderValue<'x> { pub fn parse_id<'x>(stream: &mut MessageStream<'x>) -> HeaderValue<'x> {
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 +33,15 @@ pub fn parse_id<'x>(stream: &mut MessageStream<'x>) -> HeaderValue<'x> {
_ => { _ => {
return match ids.len() { return match ids.len() {
1 => HeaderValue::Text(ids.pop().unwrap()), 1 => HeaderValue::Text(ids.pop().unwrap()),
0 => HeaderValue::Empty, 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), _ => HeaderValue::TextList(ids),
}; };
} }
@@ -52,13 +62,18 @@ pub fn parse_id<'x>(stream: &mut MessageStream<'x>) -> HeaderValue<'x> {
} }
} }
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;
} }
} }
@@ -102,6 +117,17 @@ 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 {
@@ -114,7 +140,8 @@ mod tests {
assert!(input.1.len() == 1, "Failed to parse '{:?}'", input.0); assert!(input.1.len() == 1, "Failed to parse '{:?}'", input.0);
assert_eq!(id, input.1[0], "Failed to parse '{:?}'", input.0); assert_eq!(id, input.1[0], "Failed to parse '{:?}'", input.0);
} }
_ => panic!("Unexpected result"), HeaderValue::Empty if input.1[0].is_empty() => {}
result => panic!("Unexpected result: {:?}", result),
} }
} }
} }
+1 -1
View File
@@ -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
View File
@@ -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
+51 -1
View File
@@ -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
@@ -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() {
@@ -103,4 +104,53 @@ mod tests {
); );
} }
} }
#[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()
)
);
}
} }
+1 -1
View File
@@ -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
View File
@@ -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
+33 -30
View File
@@ -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
@@ -49,13 +49,13 @@ pub fn parse_headers<'x>(
let from_offset = stream.pos; let from_offset = stream.pos;
let value = parser(stream); let value = parser(stream);
headers_raw headers_raw.push((
.entry(HeaderName::Rfc(name)) HeaderName::Rfc(name),
.or_insert_with(Vec::new) HeaderOffset {
.push(HeaderOffset {
start: from_offset, start: from_offset,
end: stream.pos, end: stream.pos,
}); },
));
if !value.is_empty() { if !value.is_empty() {
match headers_rfc.entry(name) { match headers_rfc.entry(name) {
@@ -77,13 +77,13 @@ pub fn parse_headers<'x>(
HeaderParserResult::Other(name) => { HeaderParserResult::Other(name) => {
let from_offset = stream.pos; let from_offset = stream.pos;
parse_and_ignore(stream); parse_and_ignore(stream);
headers_raw headers_raw.push((
.entry(HeaderName::Other(name)) HeaderName::Other(name),
.or_insert_with(Vec::new) HeaderOffset {
.push(HeaderOffset {
start: from_offset, start: from_offset,
end: stream.pos, end: stream.pos,
}); },
));
} }
HeaderParserResult::Lf => return true, HeaderParserResult::Lf => return true,
HeaderParserResult::Eof => return false, HeaderParserResult::Eof => return false,
@@ -105,24 +105,7 @@ pub fn parse_header_name(data: &[u8]) -> (usize, HeaderParserResult) {
match ch { match ch {
b':' => { b':' => {
if token_start != 0 { if token_start != 0 {
let field = &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..=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)),
);
} }
} }
b'\n' => { b'\n' => {
@@ -147,7 +130,27 @@ pub fn parse_header_name(data: &[u8]) -> (usize, HeaderParserResult) {
} }
} }
(bytes_read, 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 { impl From<RfcHeader> for u8 {
+1 -1
View File
@@ -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
+43 -36
View File
@@ -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
@@ -25,6 +25,16 @@ use super::{
mime::{get_bytes_to_boundary, seek_crlf_end, 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,
@@ -436,24 +446,22 @@ impl<'x> Message<'x> {
// If there is a single part in the message, move MIME headers // If there is a single part in the message, move MIME headers
// to the part // to the part
if is_message { if is_message {
for header_name in [ for header_name in MIME_HEADERS {
RfcHeader::ContentType, if let Some(value) = message.headers_rfc.remove(header_name) {
RfcHeader::ContentDisposition, text_part.headers_rfc.insert(*header_name, value);
RfcHeader::ContentId,
RfcHeader::ContentLanguage,
RfcHeader::ContentLocation,
RfcHeader::ContentTransferEncoding,
RfcHeader::ContentDescription,
] {
if let Some(value) = message.headers_rfc.remove(&header_name) {
text_part.headers_rfc.insert(header_name, value);
} }
if let Some(value) = }
message.headers_raw.get(&HeaderName::Rfc(header_name))
{ for (header_name, offset) in &message.headers_raw {
text_part match header_name {
.headers_raw HeaderName::Rfc(header_name)
.insert(HeaderName::Rfc(header_name), value.to_vec()); if MIME_HEADERS.contains(header_name) =>
{
text_part
.headers_raw
.push((HeaderName::Rfc(*header_name), offset.clone()));
}
_ => (),
} }
} }
} }
@@ -498,24 +506,22 @@ impl<'x> Message<'x> {
// If there is a single part in the message, move MIME headers // If there is a single part in the message, move MIME headers
// to the part // to the part
if is_message { if is_message {
for header_name in [ for header_name in MIME_HEADERS {
RfcHeader::ContentType, if let Some(value) = message.headers_rfc.remove(header_name) {
RfcHeader::ContentDisposition, binary_part.headers_rfc.insert(*header_name, value);
RfcHeader::ContentId,
RfcHeader::ContentLanguage,
RfcHeader::ContentLocation,
RfcHeader::ContentTransferEncoding,
RfcHeader::ContentDescription,
] {
if let Some(value) = message.headers_rfc.remove(&header_name) {
binary_part.headers_rfc.insert(header_name, value);
} }
if let Some(value) = }
message.headers_raw.get(&HeaderName::Rfc(header_name))
{ for (header_name, offset) in &message.headers_raw {
binary_part match header_name {
.headers_raw HeaderName::Rfc(header_name)
.insert(HeaderName::Rfc(header_name), value.to_vec()); if MIME_HEADERS.contains(header_name) =>
{
binary_part
.headers_raw
.push((HeaderName::Rfc(*header_name), offset.clone()));
}
_ => (),
} }
} }
} }
@@ -751,7 +757,7 @@ mod tests {
#[test] #[test]
fn generate_test_samples() { fn generate_test_samples() {
const SEPARATOR: &[u8] = "\n---- EXPECTED STRUCTURE ----\n".as_bytes(); const SEPARATOR: &[u8] = "\n---- EXPECTED STRUCTURE ----".as_bytes();
for test_suite in ["legacy", "malformed", "rfc", "thirdparty"] { 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"));
@@ -770,6 +776,7 @@ mod tests {
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() {
+6 -2
View File
@@ -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
@@ -62,7 +62,11 @@ pub fn get_bytes_to_boundary<'x>(
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,
+1 -1
View File
@@ -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
View File
@@ -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
View File
@@ -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
+21 -21
View File
@@ -44,9 +44,27 @@ IFl2ZXMgUGlndWV0NnM7vAAAAABJRU5ErkJggg==
---- EXPECTED STRUCTURE ----{ ---- EXPECTED STRUCTURE ----{
"headers_rfc": { "headers_rfc": {
"from": {
"Address": {
"name": "Doug Sauder",
"address": "doug@example.com"
}
},
"subject": {
"Text": "Test message from Microsoft Outlook 00"
},
"mime_version": { "mime_version": {
"Text": "1.0" "Text": "1.0"
}, },
"to": {
"Address": {
"name": "Joe Blow",
"address": "jblow@example.com"
}
},
"message_id": {
"Text": "NDBBIAKOPKHFGPLCODIGKEKECHAA.doug@example.com"
},
"date": { "date": {
"DateTime": { "DateTime": {
"year": 2000, "year": 2000,
@@ -59,24 +77,6 @@ IFl2ZXMgUGlndWV0NnM7vAAAAABJRU5ErkJggg==
"tz_hour": 4, "tz_hour": 4,
"tz_minute": 0 "tz_minute": 0
} }
},
"to": {
"Address": {
"name": "Joe Blow",
"address": "jblow@example.com"
}
},
"message_id": {
"Text": "NDBBIAKOPKHFGPLCODIGKEKECHAA.doug@example.com"
},
"from": {
"Address": {
"name": "Doug Sauder",
"address": "doug@example.com"
}
},
"subject": {
"Text": "Test message from Microsoft Outlook 00"
} }
}, },
"html_body": [], "html_body": [],
@@ -88,9 +88,6 @@ IFl2ZXMgUGlndWV0NnM7vAAAAABJRU5ErkJggg==
{ {
"Binary": { "Binary": {
"headers_rfc": { "headers_rfc": {
"content_transfer_encoding": {
"Text": "base64"
},
"content_type": { "content_type": {
"ContentType": { "ContentType": {
"c_type": "image", "c_type": "image",
@@ -100,6 +97,9 @@ IFl2ZXMgUGlndWV0NnM7vAAAAABJRU5ErkJggg==
} }
} }
}, },
"content_transfer_encoding": {
"Text": "base64"
},
"content_disposition": { "content_disposition": {
"ContentType": { "ContentType": {
"c_type": "attachment", "c_type": "attachment",
+18 -18
View File
@@ -35,18 +35,6 @@ m+APw-ssen als wir.+ACI-=20
---- EXPECTED STRUCTURE ----{ ---- EXPECTED STRUCTURE ----{
"headers_rfc": { "headers_rfc": {
"message_id": {
"Text": "NDBBIAKOPKHFGPLCODIGMEKCCHAA.doug@example.com"
},
"mime_version": {
"Text": "1.0"
},
"from": {
"Address": {
"name": "Doug Sauder",
"address": "doug@example.com"
}
},
"to": { "to": {
"AddressList": [ "AddressList": [
{ {
@@ -59,9 +47,6 @@ m+APw-ssen als wir.+ACI-=20
} }
] ]
}, },
"subject": {
"Text": "Die Hasen und die Frösche (Microsoft Outlook 00)"
},
"date": { "date": {
"DateTime": { "DateTime": {
"year": 2000, "year": 2000,
@@ -74,6 +59,21 @@ m+APw-ssen als wir.+ACI-=20
"tz_hour": 4, "tz_hour": 4,
"tz_minute": 0 "tz_minute": 0
} }
},
"subject": {
"Text": "Die Hasen und die Frösche (Microsoft Outlook 00)"
},
"from": {
"Address": {
"name": "Doug Sauder",
"address": "doug@example.com"
}
},
"message_id": {
"Text": "NDBBIAKOPKHFGPLCODIGMEKCCHAA.doug@example.com"
},
"mime_version": {
"Text": "1.0"
} }
}, },
"html_body": [ "html_body": [
@@ -87,9 +87,6 @@ m+APw-ssen als wir.+ACI-=20
{ {
"Text": { "Text": {
"headers_rfc": { "headers_rfc": {
"content_transfer_encoding": {
"Text": "quoted-printable"
},
"content_type": { "content_type": {
"ContentType": { "ContentType": {
"c_type": "text", "c_type": "text",
@@ -98,6 +95,9 @@ m+APw-ssen als wir.+ACI-=20
"charset": "utf-7" "charset": "utf-7"
} }
} }
},
"content_transfer_encoding": {
"Text": "quoted-printable"
} }
}, },
"is_encoding_problem": false, "is_encoding_problem": false,
+12 -12
View File
@@ -37,18 +37,6 @@ wir.&quot; <br>
---- EXPECTED STRUCTURE ----{ ---- EXPECTED STRUCTURE ----{
"headers_rfc": { "headers_rfc": {
"mime_version": {
"Text": "1.0"
},
"message_id": {
"Text": "4.2.0.58.20000519003052.00a89c40@pop.example.com"
},
"to": {
"Address": {
"name": "Heinz Müller",
"address": "mueller@example.com"
}
},
"date": { "date": {
"DateTime": { "DateTime": {
"year": 2000, "year": 2000,
@@ -68,6 +56,18 @@ wir.&quot; <br>
"address": "dwsauder@example.com" "address": "dwsauder@example.com"
} }
}, },
"message_id": {
"Text": "4.2.0.58.20000519003052.00a89c40@pop.example.com"
},
"to": {
"Address": {
"name": "Heinz Müller",
"address": "mueller@example.com"
}
},
"mime_version": {
"Text": "1.0"
},
"subject": { "subject": {
"Text": "Die Hasen und die Frösche" "Text": "Die Hasen und die Frösche"
} }
+8 -8
View File
@@ -77,11 +77,8 @@ wir.&quot; <br>
"tz_minute": 0 "tz_minute": 0
} }
}, },
"to": { "subject": {
"Address": { "Text": "Die Hasen und die Frösche"
"name": "Heinz Müller",
"address": "mueller@example.com"
}
}, },
"mime_version": { "mime_version": {
"Text": "1.0" "Text": "1.0"
@@ -92,12 +89,15 @@ wir.&quot; <br>
"address": "dwsauder@example.com" "address": "dwsauder@example.com"
} }
}, },
"subject": {
"Text": "Die Hasen und die Frösche"
},
"message_id": { "message_id": {
"Text": "4.2.0.58.20000519002557.00a88870@pop.example.com" "Text": "4.2.0.58.20000519002557.00a88870@pop.example.com"
}, },
"to": {
"Address": {
"name": "Heinz Müller",
"address": "mueller@example.com"
}
},
"content_type": { "content_type": {
"ContentType": { "ContentType": {
"c_type": "multipart", "c_type": "multipart",
+15 -15
View File
@@ -19,12 +19,27 @@ Slow but steady wins the race.
---- EXPECTED STRUCTURE ----{ ---- EXPECTED STRUCTURE ----{
"headers_rfc": { "headers_rfc": {
"from": {
"Address": {
"name": "Doug Sauder",
"address": "dwsauder@example.com"
}
},
"message_id": {
"Text": "4.2.0.58.20000519011207.00a8cd70@pop.example.com"
},
"to": { "to": {
"Address": { "Address": {
"name": "Joe Blow", "name": "Joe Blow",
"address": "blow@example.com" "address": "blow@example.com"
} }
}, },
"subject": {
"Text": "The Hare and the Tortoise"
},
"mime_version": {
"Text": "1.0"
},
"date": { "date": {
"DateTime": { "DateTime": {
"year": 2000, "year": 2000,
@@ -37,21 +52,6 @@ Slow but steady wins the race.
"tz_hour": 4, "tz_hour": 4,
"tz_minute": 0 "tz_minute": 0
} }
},
"subject": {
"Text": "The Hare and the Tortoise"
},
"mime_version": {
"Text": "1.0"
},
"message_id": {
"Text": "4.2.0.58.20000519011207.00a8cd70@pop.example.com"
},
"from": {
"Address": {
"name": "Doug Sauder",
"address": "dwsauder@example.com"
}
} }
}, },
"html_body": [ "html_body": [
+15 -15
View File
@@ -33,24 +33,12 @@ m+APw-ssen als wir.+ACI-=20
---- EXPECTED STRUCTURE ----{ ---- EXPECTED STRUCTURE ----{
"headers_rfc": { "headers_rfc": {
"to": {
"Address": {
"name": "Heinz Müller",
"address": "mueller@example.com"
}
},
"from": { "from": {
"Address": { "Address": {
"name": "Doug Sauder", "name": "Doug Sauder",
"address": "doug@example.com" "address": "doug@example.com"
} }
}, },
"message_id": {
"Text": "NDBBIAKOPKHFGPLCODIGCEKDCHAA.doug@example.com"
},
"subject": {
"Text": "Die Hasen und die Frösche (Microsoft Outlook 00)"
},
"date": { "date": {
"DateTime": { "DateTime": {
"year": 2000, "year": 2000,
@@ -64,8 +52,20 @@ m+APw-ssen als wir.+ACI-=20
"tz_minute": 0 "tz_minute": 0
} }
}, },
"subject": {
"Text": "Die Hasen und die Frösche (Microsoft Outlook 00)"
},
"mime_version": { "mime_version": {
"Text": "1.0" "Text": "1.0"
},
"to": {
"Address": {
"name": "Heinz Müller",
"address": "mueller@example.com"
}
},
"message_id": {
"Text": "NDBBIAKOPKHFGPLCODIGCEKDCHAA.doug@example.com"
} }
}, },
"html_body": [ "html_body": [
@@ -79,6 +79,9 @@ m+APw-ssen als wir.+ACI-=20
{ {
"Text": { "Text": {
"headers_rfc": { "headers_rfc": {
"content_transfer_encoding": {
"Text": "quoted-printable"
},
"content_type": { "content_type": {
"ContentType": { "ContentType": {
"c_type": "text", "c_type": "text",
@@ -87,9 +90,6 @@ m+APw-ssen als wir.+ACI-=20
"charset": "utf-7" "charset": "utf-7"
} }
} }
},
"content_transfer_encoding": {
"Text": "quoted-printable"
} }
}, },
"is_encoding_problem": false, "is_encoding_problem": false,
+25 -25
View File
@@ -84,24 +84,6 @@ IFl2ZXMgUGlndWV0NnM7vAAAAABJRU5ErkJggg==
---- EXPECTED STRUCTURE ----{ ---- EXPECTED STRUCTURE ----{
"headers_rfc": { "headers_rfc": {
"content_type": {
"ContentType": {
"c_type": "multipart",
"c_subtype": "mixed",
"attributes": {
"boundary": "----=_NextPart_000_0004_01BFC037.28F2FA90"
}
}
},
"from": {
"Address": {
"name": "Doug Sauder",
"address": "doug@example.com"
}
},
"subject": {
"Text": "Test message from Microsoft Outlook 00"
},
"date": { "date": {
"DateTime": { "DateTime": {
"year": 2000, "year": 2000,
@@ -115,17 +97,35 @@ IFl2ZXMgUGlndWV0NnM7vAAAAABJRU5ErkJggg==
"tz_minute": 0 "tz_minute": 0
} }
}, },
"message_id": {
"Text": "NDBBIAKOPKHFGPLCODIGOEKECHAA.doug@example.com"
},
"from": {
"Address": {
"name": "Doug Sauder",
"address": "doug@example.com"
}
},
"mime_version": {
"Text": "1.0"
},
"to": { "to": {
"Address": { "Address": {
"name": "Joe Blow", "name": "Joe Blow",
"address": "jblow@example.com" "address": "jblow@example.com"
} }
}, },
"message_id": { "content_type": {
"Text": "NDBBIAKOPKHFGPLCODIGOEKECHAA.doug@example.com" "ContentType": {
"c_type": "multipart",
"c_subtype": "mixed",
"attributes": {
"boundary": "----=_NextPart_000_0004_01BFC037.28F2FA90"
}
}
}, },
"mime_version": { "subject": {
"Text": "1.0" "Text": "Test message from Microsoft Outlook 00"
} }
}, },
"html_body": [], "html_body": [],
@@ -138,9 +138,6 @@ IFl2ZXMgUGlndWV0NnM7vAAAAABJRU5ErkJggg==
{ {
"Binary": { "Binary": {
"headers_rfc": { "headers_rfc": {
"content_transfer_encoding": {
"Text": "base64"
},
"content_disposition": { "content_disposition": {
"ContentType": { "ContentType": {
"c_type": "attachment", "c_type": "attachment",
@@ -150,6 +147,9 @@ IFl2ZXMgUGlndWV0NnM7vAAAAABJRU5ErkJggg==
} }
} }
}, },
"content_transfer_encoding": {
"Text": "base64"
},
"content_type": { "content_type": {
"ContentType": { "ContentType": {
"c_type": "image", "c_type": "image",
+15 -15
View File
@@ -32,10 +32,13 @@ Tiere, welche also wohl noch ungl=FCcklicher sein m=FCssen als wir."=20
---- EXPECTED STRUCTURE ----{ ---- EXPECTED STRUCTURE ----{
"headers_rfc": { "headers_rfc": {
"to": { "message_id": {
"Text": "NDBBIAKOPKHFGPLCODIGIEKCCHAA.doug@example.com"
},
"from": {
"Address": { "Address": {
"name": "Jürgen Schmürgen", "name": "Doug Sauder",
"address": "schmuergen@example.com" "address": "doug@example.com"
} }
}, },
"subject": { "subject": {
@@ -54,17 +57,14 @@ Tiere, welche also wohl noch ungl=FCcklicher sein m=FCssen als wir."=20
"tz_minute": 0 "tz_minute": 0
} }
}, },
"to": {
"Address": {
"name": "Jürgen Schmürgen",
"address": "schmuergen@example.com"
}
},
"mime_version": { "mime_version": {
"Text": "1.0" "Text": "1.0"
},
"message_id": {
"Text": "NDBBIAKOPKHFGPLCODIGIEKCCHAA.doug@example.com"
},
"from": {
"Address": {
"name": "Doug Sauder",
"address": "doug@example.com"
}
} }
}, },
"html_body": [ "html_body": [
@@ -78,6 +78,9 @@ Tiere, welche also wohl noch ungl=FCcklicher sein m=FCssen als wir."=20
{ {
"Text": { "Text": {
"headers_rfc": { "headers_rfc": {
"content_transfer_encoding": {
"Text": "quoted-printable"
},
"content_type": { "content_type": {
"ContentType": { "ContentType": {
"c_type": "text", "c_type": "text",
@@ -86,9 +89,6 @@ Tiere, welche also wohl noch ungl=FCcklicher sein m=FCssen als wir."=20
"charset": "iso-8859-1" "charset": "iso-8859-1"
} }
} }
},
"content_transfer_encoding": {
"Text": "quoted-printable"
} }
}, },
"is_encoding_problem": false, "is_encoding_problem": false,
+29 -29
View File
@@ -136,29 +136,14 @@ IFl2ZXMgUGlndWV0NnM7vAAAAABJRU5ErkJggg==
---- EXPECTED STRUCTURE ----{ ---- EXPECTED STRUCTURE ----{
"headers_rfc": { "headers_rfc": {
"content_type": {
"ContentType": {
"c_type": "multipart",
"c_subtype": "mixed",
"attributes": {
"boundary": "----=_NextPart_000_0002_01BFC036.AE309650"
}
}
},
"from": { "from": {
"Address": { "Address": {
"name": "Doug Sauder", "name": "Doug Sauder",
"address": "doug@example.com" "address": "doug@example.com"
} }
}, },
"subject": { "message_id": {
"Text": "Test message from Microsoft Outlook 00" "Text": "NDBBIAKOPKHFGPLCODIGGEKECHAA.doug@example.com"
},
"to": {
"Address": {
"name": "Heinz Müller",
"address": "mueller@example.com"
}
}, },
"date": { "date": {
"DateTime": { "DateTime": {
@@ -173,11 +158,26 @@ IFl2ZXMgUGlndWV0NnM7vAAAAABJRU5ErkJggg==
"tz_minute": 0 "tz_minute": 0
} }
}, },
"message_id": {
"Text": "NDBBIAKOPKHFGPLCODIGGEKECHAA.doug@example.com"
},
"mime_version": { "mime_version": {
"Text": "1.0" "Text": "1.0"
},
"content_type": {
"ContentType": {
"c_type": "multipart",
"c_subtype": "mixed",
"attributes": {
"boundary": "----=_NextPart_000_0002_01BFC036.AE309650"
}
}
},
"to": {
"Address": {
"name": "Heinz Müller",
"address": "mueller@example.com"
}
},
"subject": {
"Text": "Test message from Microsoft Outlook 00"
} }
}, },
"html_body": [ "html_body": [
@@ -215,9 +215,6 @@ IFl2ZXMgUGlndWV0NnM7vAAAAABJRU5ErkJggg==
{ {
"Binary": { "Binary": {
"headers_rfc": { "headers_rfc": {
"content_transfer_encoding": {
"Text": "base64"
},
"content_type": { "content_type": {
"ContentType": { "ContentType": {
"c_type": "image", "c_type": "image",
@@ -235,6 +232,9 @@ IFl2ZXMgUGlndWV0NnM7vAAAAABJRU5ErkJggg==
"filename": "blueball.png" "filename": "blueball.png"
} }
} }
},
"content_transfer_encoding": {
"Text": "base64"
} }
}, },
"is_encoding_problem": false, "is_encoding_problem": false,
@@ -1579,9 +1579,6 @@ IFl2ZXMgUGlndWV0NnM7vAAAAABJRU5ErkJggg==
} }
} }
}, },
"content_transfer_encoding": {
"Text": "base64"
},
"content_type": { "content_type": {
"ContentType": { "ContentType": {
"c_type": "image", "c_type": "image",
@@ -1590,6 +1587,9 @@ IFl2ZXMgUGlndWV0NnM7vAAAAABJRU5ErkJggg==
"name": "greenball.png" "name": "greenball.png"
} }
} }
},
"content_transfer_encoding": {
"Text": "base64"
} }
}, },
"is_encoding_problem": false, "is_encoding_problem": false,
@@ -2907,9 +2907,6 @@ IFl2ZXMgUGlndWV0NnM7vAAAAABJRU5ErkJggg==
} }
} }
}, },
"content_transfer_encoding": {
"Text": "base64"
},
"content_disposition": { "content_disposition": {
"ContentType": { "ContentType": {
"c_type": "attachment", "c_type": "attachment",
@@ -2918,6 +2915,9 @@ IFl2ZXMgUGlndWV0NnM7vAAAAABJRU5ErkJggg==
"filename": "redball.png" "filename": "redball.png"
} }
} }
},
"content_transfer_encoding": {
"Text": "base64"
} }
}, },
"is_encoding_problem": false, "is_encoding_problem": false,
+12 -12
View File
@@ -37,6 +37,18 @@ welche also wohl noch ungl=FCcklicher sein m=FCssen als wir."
---- EXPECTED STRUCTURE ----{ ---- EXPECTED STRUCTURE ----{
"headers_rfc": { "headers_rfc": {
"from": {
"Address": {
"name": "Doug Sauder",
"address": "dwsauder@example.com"
}
},
"message_id": {
"Text": "4.2.0.58.20000519010441.00a8d140@pop.example.com"
},
"subject": {
"Text": "Die Hasen und die Frösche"
},
"date": { "date": {
"DateTime": { "DateTime": {
"year": 2000, "year": 2000,
@@ -50,15 +62,6 @@ welche also wohl noch ungl=FCcklicher sein m=FCssen als wir."
"tz_minute": 0 "tz_minute": 0
} }
}, },
"subject": {
"Text": "Die Hasen und die Frösche"
},
"from": {
"Address": {
"name": "Doug Sauder",
"address": "dwsauder@example.com"
}
},
"mime_version": { "mime_version": {
"Text": "1.0" "Text": "1.0"
}, },
@@ -67,9 +70,6 @@ welche also wohl noch ungl=FCcklicher sein m=FCssen als wir."
"name": "Jürgen Schmürgen", "name": "Jürgen Schmürgen",
"address": "jschmuergen@example.com" "address": "jschmuergen@example.com"
} }
},
"message_id": {
"Text": "4.2.0.58.20000519010441.00a8d140@pop.example.com"
} }
}, },
"html_body": [ "html_body": [
+14 -14
View File
@@ -25,6 +25,18 @@ In einem nahen Teich wollten sie sich nun ers
"subject": { "subject": {
"Text": "Die Hasen und die Fr�sche" "Text": "Die Hasen und die Fr�sche"
}, },
"to": {
"Address": {
"name": "Heinz M�ller",
"address": "mueller@example.com"
}
},
"from": {
"Address": {
"name": "Doug Sauder",
"address": "dwsauder@example.com"
}
},
"date": { "date": {
"DateTime": { "DateTime": {
"year": 2000, "year": 2000,
@@ -38,23 +50,11 @@ In einem nahen Teich wollten sie sich nun ers
"tz_minute": 0 "tz_minute": 0
} }
}, },
"to": {
"Address": {
"name": "Heinz M�ller",
"address": "mueller@example.com"
}
},
"message_id": {
"Text": "4.2.0.58.20000519010842.00a8c7f0@pop.example.com"
},
"mime_version": { "mime_version": {
"Text": "1.0" "Text": "1.0"
}, },
"from": { "message_id": {
"Address": { "Text": "4.2.0.58.20000519010842.00a8c7f0@pop.example.com"
"name": "Doug Sauder",
"address": "dwsauder@example.com"
}
} }
}, },
"html_body": [ "html_body": [
+11 -11
View File
@@ -30,24 +30,18 @@ In einem nahen Teich wollten sie sich nun ers=E4ufen; sie eilten ihm zu;=
---- EXPECTED STRUCTURE ----{ ---- EXPECTED STRUCTURE ----{
"headers_rfc": { "headers_rfc": {
"mime_version": {
"Text": "1.0"
},
"message_id": { "message_id": {
"Text": "4.2.0.58.20000519001217.00a85b60@pop.example.com" "Text": "4.2.0.58.20000519001217.00a85b60@pop.example.com"
}, },
"from": {
"Address": {
"name": "Doug Sauder",
"address": "dwsauder@example.com"
}
},
"to": { "to": {
"Address": { "Address": {
"name": "Jürgen Schmürgen", "name": "Jürgen Schmürgen",
"address": "jschmuergen@example.com" "address": "jschmuergen@example.com"
} }
}, },
"subject": {
"Text": "Die Hasen und die Frösche"
},
"date": { "date": {
"DateTime": { "DateTime": {
"year": 2000, "year": 2000,
@@ -61,8 +55,14 @@ In einem nahen Teich wollten sie sich nun ers=E4ufen; sie eilten ihm zu;=
"tz_minute": 0 "tz_minute": 0
} }
}, },
"mime_version": { "from": {
"Text": "1.0" "Address": {
"name": "Doug Sauder",
"address": "dwsauder@example.com"
}
},
"subject": {
"Text": "Die Hasen und die Frösche"
} }
}, },
"html_body": [ "html_body": [
+15 -15
View File
@@ -31,24 +31,12 @@ Tiere, welche also wohl noch ungl=FCcklicher sein m=FCssen als wir."=20
---- EXPECTED STRUCTURE ----{ ---- EXPECTED STRUCTURE ----{
"headers_rfc": { "headers_rfc": {
"message_id": {
"Text": "NDBBIAKOPKHFGPLCODIGCEKECHAA.doug@example.com"
},
"subject": {
"Text": "Die Hasen und die Frösche (Microsoft Outlook 00)"
},
"to": { "to": {
"Address": { "Address": {
"name": "Heinz Müller", "name": "Heinz Müller",
"address": "mueller@example.com" "address": "mueller@example.com"
} }
}, },
"from": {
"Address": {
"name": "Doug Sauder",
"address": "doug@example.com"
}
},
"date": { "date": {
"DateTime": { "DateTime": {
"year": 2000, "year": 2000,
@@ -62,8 +50,20 @@ Tiere, welche also wohl noch ungl=FCcklicher sein m=FCssen als wir."=20
"tz_minute": 0 "tz_minute": 0
} }
}, },
"message_id": {
"Text": "NDBBIAKOPKHFGPLCODIGCEKECHAA.doug@example.com"
},
"from": {
"Address": {
"name": "Doug Sauder",
"address": "doug@example.com"
}
},
"mime_version": { "mime_version": {
"Text": "1.0" "Text": "1.0"
},
"subject": {
"Text": "Die Hasen und die Frösche (Microsoft Outlook 00)"
} }
}, },
"html_body": [ "html_body": [
@@ -77,6 +77,9 @@ Tiere, welche also wohl noch ungl=FCcklicher sein m=FCssen als wir."=20
{ {
"Text": { "Text": {
"headers_rfc": { "headers_rfc": {
"content_transfer_encoding": {
"Text": "quoted-printable"
},
"content_type": { "content_type": {
"ContentType": { "ContentType": {
"c_type": "text", "c_type": "text",
@@ -85,9 +88,6 @@ Tiere, welche also wohl noch ungl=FCcklicher sein m=FCssen als wir."=20
"charset": "Windows-1252" "charset": "Windows-1252"
} }
} }
},
"content_transfer_encoding": {
"Text": "quoted-printable"
} }
}, },
"is_encoding_problem": false, "is_encoding_problem": false,
+18 -18
View File
@@ -35,24 +35,9 @@ welche also wohl noch ungl
"message_id": { "message_id": {
"Text": "NDBBIAKOPKHFGPLCODIGEEKCCHAA.doug@example.com" "Text": "NDBBIAKOPKHFGPLCODIGEEKCCHAA.doug@example.com"
}, },
"to": {
"Address": {
"name": "Jürgen Schmürgen",
"address": "schmuergen@example.com"
}
},
"subject": {
"Text": "Die Hasen und die Frösche (Microsoft Outlook 00)"
},
"mime_version": { "mime_version": {
"Text": "1.0" "Text": "1.0"
}, },
"from": {
"Address": {
"name": "Doug Sauder",
"address": "doug@example.com"
}
},
"date": { "date": {
"DateTime": { "DateTime": {
"year": 2000, "year": 2000,
@@ -65,6 +50,21 @@ welche also wohl noch ungl
"tz_hour": 4, "tz_hour": 4,
"tz_minute": 0 "tz_minute": 0
} }
},
"subject": {
"Text": "Die Hasen und die Frösche (Microsoft Outlook 00)"
},
"from": {
"Address": {
"name": "Doug Sauder",
"address": "doug@example.com"
}
},
"to": {
"Address": {
"name": "Jürgen Schmürgen",
"address": "schmuergen@example.com"
}
} }
}, },
"html_body": [ "html_body": [
@@ -78,6 +78,9 @@ welche also wohl noch ungl
{ {
"Text": { "Text": {
"headers_rfc": { "headers_rfc": {
"content_transfer_encoding": {
"Text": "8bit"
},
"content_type": { "content_type": {
"ContentType": { "ContentType": {
"c_type": "text", "c_type": "text",
@@ -86,9 +89,6 @@ welche also wohl noch ungl
"charset": "iso-8859-1" "charset": "iso-8859-1"
} }
} }
},
"content_transfer_encoding": {
"Text": "8bit"
} }
}, },
"is_encoding_problem": false, "is_encoding_problem": false,
+18 -18
View File
@@ -73,27 +73,21 @@ race.&nbsp;=20
---- EXPECTED STRUCTURE ----{ ---- EXPECTED STRUCTURE ----{
"headers_rfc": { "headers_rfc": {
"to": { "from": {
"Address": { "Address": {
"name": "Joe Blow", "name": "Doug Sauder",
"address": "jblow@example.com" "address": "doug@example.com"
} }
}, },
"message_id": {
"Text": "NDBBIAKOPKHFGPLCODIGCEKFCHAA.doug@example.com"
},
"mime_version": { "mime_version": {
"Text": "1.0" "Text": "1.0"
}, },
"subject": { "subject": {
"Text": "Test message from Microsoft Outlook 00" "Text": "Test message from Microsoft Outlook 00"
}, },
"content_type": {
"ContentType": {
"c_type": "multipart",
"c_subtype": "alternative",
"attributes": {
"boundary": "----=_NextPart_000_0005_01BFC037.799BEF60"
}
}
},
"date": { "date": {
"DateTime": { "DateTime": {
"year": 2000, "year": 2000,
@@ -107,14 +101,20 @@ race.&nbsp;=20
"tz_minute": 0 "tz_minute": 0
} }
}, },
"from": { "content_type": {
"Address": { "ContentType": {
"name": "Doug Sauder", "c_type": "multipart",
"address": "doug@example.com" "c_subtype": "alternative",
"attributes": {
"boundary": "----=_NextPart_000_0005_01BFC037.799BEF60"
}
} }
}, },
"message_id": { "to": {
"Text": "NDBBIAKOPKHFGPLCODIGCEKFCHAA.doug@example.com" "Address": {
"name": "Joe Blow",
"address": "jblow@example.com"
}
} }
}, },
"html_body": [ "html_body": [
+47 -47
View File
@@ -199,11 +199,8 @@ bGlwMmdpZiB2LjAuNiBieSBZdmVzIFBpZ3VldDZzO7wAAAAASUVORK5CYII=
---- EXPECTED STRUCTURE ----{ ---- EXPECTED STRUCTURE ----{
"headers_rfc": { "headers_rfc": {
"from": { "mime_version": {
"Address": { "Text": "1.0"
"name": "Doug Sauder",
"address": "dwsauder@example.com"
}
}, },
"date": { "date": {
"DateTime": { "DateTime": {
@@ -218,8 +215,8 @@ bGlwMmdpZiB2LjAuNiBieSBZdmVzIFBpZ3VldDZzO7wAAAAASUVORK5CYII=
"tz_minute": 0 "tz_minute": 0
} }
}, },
"mime_version": { "message_id": {
"Text": "1.0" "Text": "4.2.0.58.20000519003556.00a918e0@pop.example.com"
}, },
"to": { "to": {
"Address": { "Address": {
@@ -236,11 +233,14 @@ bGlwMmdpZiB2LjAuNiBieSBZdmVzIFBpZ3VldDZzO7wAAAAASUVORK5CYII=
} }
} }
}, },
"from": {
"Address": {
"name": "Doug Sauder",
"address": "dwsauder@example.com"
}
},
"subject": { "subject": {
"Text": "Die Hasen und die Frösche" "Text": "Die Hasen und die Frösche"
},
"message_id": {
"Text": "4.2.0.58.20000519003556.00a918e0@pop.example.com"
} }
}, },
"html_body": [ "html_body": [
@@ -330,6 +330,15 @@ bGlwMmdpZiB2LjAuNiBieSBZdmVzIFBpZ3VldDZzO7wAAAAASUVORK5CYII=
{ {
"Binary": { "Binary": {
"headers_rfc": { "headers_rfc": {
"content_disposition": {
"ContentType": {
"c_type": "inline",
"c_subtype": null,
"attributes": {
"filename": "2aa3ed95.png"
}
}
},
"content_transfer_encoding": { "content_transfer_encoding": {
"Text": "base64" "Text": "base64"
}, },
@@ -342,15 +351,6 @@ bGlwMmdpZiB2LjAuNiBieSBZdmVzIFBpZ3VldDZzO7wAAAAASUVORK5CYII=
} }
} }
}, },
"content_disposition": {
"ContentType": {
"c_type": "inline",
"c_subtype": null,
"attributes": {
"filename": "2aa3ed95.png"
}
}
},
"content_id": { "content_id": {
"Text": "4.2.0.58.20000519003556.00a918e0@pop.example.com.2" "Text": "4.2.0.58.20000519003556.00a918e0@pop.example.com.2"
} }
@@ -1688,8 +1688,14 @@ bGlwMmdpZiB2LjAuNiBieSBZdmVzIFBpZ3VldDZzO7wAAAAASUVORK5CYII=
{ {
"Binary": { "Binary": {
"headers_rfc": { "headers_rfc": {
"content_id": { "content_type": {
"Text": "4.2.0.58.20000519003556.00a918e0@pop.example.com.3" "ContentType": {
"c_type": "image",
"c_subtype": "png",
"attributes": {
"name": "2aa3edd1.png"
}
}
}, },
"content_disposition": { "content_disposition": {
"ContentType": { "ContentType": {
@@ -1703,14 +1709,8 @@ bGlwMmdpZiB2LjAuNiBieSBZdmVzIFBpZ3VldDZzO7wAAAAASUVORK5CYII=
"content_transfer_encoding": { "content_transfer_encoding": {
"Text": "base64" "Text": "base64"
}, },
"content_type": { "content_id": {
"ContentType": { "Text": "4.2.0.58.20000519003556.00a918e0@pop.example.com.3"
"c_type": "image",
"c_subtype": "png",
"attributes": {
"name": "2aa3edd1.png"
}
}
} }
}, },
"is_encoding_problem": false, "is_encoding_problem": false,
@@ -3174,6 +3174,15 @@ bGlwMmdpZiB2LjAuNiBieSBZdmVzIFBpZ3VldDZzO7wAAAAASUVORK5CYII=
{ {
"Binary": { "Binary": {
"headers_rfc": { "headers_rfc": {
"content_disposition": {
"ContentType": {
"c_type": "attachment",
"c_subtype": null,
"attributes": {
"filename": "blueball.png"
}
}
},
"content_type": { "content_type": {
"ContentType": { "ContentType": {
"c_type": "image", "c_type": "image",
@@ -3185,15 +3194,6 @@ bGlwMmdpZiB2LjAuNiBieSBZdmVzIFBpZ3VldDZzO7wAAAAASUVORK5CYII=
}, },
"content_transfer_encoding": { "content_transfer_encoding": {
"Text": "base64" "Text": "base64"
},
"content_disposition": {
"ContentType": {
"c_type": "attachment",
"c_subtype": null,
"attributes": {
"filename": "blueball.png"
}
}
} }
}, },
"is_encoding_problem": false, "is_encoding_problem": false,
@@ -4529,6 +4529,15 @@ bGlwMmdpZiB2LjAuNiBieSBZdmVzIFBpZ3VldDZzO7wAAAAASUVORK5CYII=
{ {
"Binary": { "Binary": {
"headers_rfc": { "headers_rfc": {
"content_type": {
"ContentType": {
"c_type": "image",
"c_subtype": "png",
"attributes": {
"name": "greenball.png"
}
}
},
"content_transfer_encoding": { "content_transfer_encoding": {
"Text": "base64" "Text": "base64"
}, },
@@ -4540,15 +4549,6 @@ bGlwMmdpZiB2LjAuNiBieSBZdmVzIFBpZ3VldDZzO7wAAAAASUVORK5CYII=
"filename": "greenball.png" "filename": "greenball.png"
} }
} }
},
"content_type": {
"ContentType": {
"c_type": "image",
"c_subtype": "png",
"attributes": {
"name": "greenball.png"
}
}
} }
}, },
"is_encoding_problem": false, "is_encoding_problem": false,
+17 -19
View File
@@ -105,15 +105,24 @@ JB@ac)(GTFLiL)!d09'8!!!:
} }
} }
}, },
"message_id": {
"Text": "4.2.0.58.20000519005150.00a85230@pop.example.com"
},
"from": { "from": {
"Address": { "Address": {
"name": "Doug Sauder", "name": "Doug Sauder",
"address": "dwsauder@example.com" "address": "dwsauder@example.com"
} }
}, },
"to": {
"Address": {
"name": "Jürgen Schmürgen",
"address": "jschmuergen@example.com"
}
},
"mime_version": {
"Text": "1.0"
},
"message_id": {
"Text": "4.2.0.58.20000519005150.00a85230@pop.example.com"
},
"date": { "date": {
"DateTime": { "DateTime": {
"year": 2000, "year": 2000,
@@ -129,15 +138,6 @@ JB@ac)(GTFLiL)!d09'8!!!:
}, },
"subject": { "subject": {
"Text": "Die Hasen und die Frösche" "Text": "Die Hasen und die Frösche"
},
"mime_version": {
"Text": "1.0"
},
"to": {
"Address": {
"name": "Jürgen Schmürgen",
"address": "jschmuergen@example.com"
}
} }
}, },
"html_body": [ "html_body": [
@@ -154,6 +154,9 @@ JB@ac)(GTFLiL)!d09'8!!!:
{ {
"Text": { "Text": {
"headers_rfc": { "headers_rfc": {
"content_transfer_encoding": {
"Text": "quoted-printable"
},
"content_type": { "content_type": {
"ContentType": { "ContentType": {
"c_type": "text", "c_type": "text",
@@ -162,9 +165,6 @@ JB@ac)(GTFLiL)!d09'8!!!:
"charset": "iso-8859-1" "charset": "iso-8859-1"
} }
} }
},
"content_transfer_encoding": {
"Text": "quoted-printable"
} }
}, },
"is_encoding_problem": false, "is_encoding_problem": false,
@@ -2123,8 +2123,7 @@ JB@ac)(GTFLiL)!d09'8!!!:
33, 33,
58, 58,
13, 13,
10, 10
13
] ]
} }
}, },
@@ -3282,8 +3281,7 @@ JB@ac)(GTFLiL)!d09'8!!!:
33, 33,
58, 58,
13, 13,
10, 10
13
] ]
} }
} }
+34 -36
View File
@@ -103,15 +103,31 @@ end
---- EXPECTED STRUCTURE ----{ ---- EXPECTED STRUCTURE ----{
"headers_rfc": { "headers_rfc": {
"mime_version": {
"Text": "1.0"
},
"from": { "from": {
"Address": { "Address": {
"name": "Doug Sauder", "name": "Doug Sauder",
"address": "dwsauder@example.com" "address": "dwsauder@example.com"
} }
}, },
"mime_version": {
"Text": "1.0"
},
"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",
@@ -129,22 +145,6 @@ end
"boundary": "=====================_716177458==_" "boundary": "=====================_716177458==_"
} }
} }
},
"message_id": {
"Text": "4.2.0.58.20000519004755.00a86100@pop.example.com"
},
"date": {
"DateTime": {
"year": 2000,
"month": 5,
"day": 19,
"hour": 0,
"minute": 50,
"second": 8,
"tz_before_gmt": true,
"tz_hour": 4,
"tz_minute": 0
}
} }
}, },
"html_body": [ "html_body": [
@@ -172,7 +172,7 @@ end
} }
}, },
"is_encoding_problem": false, "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" "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"
} }
}, },
{ {
@@ -187,6 +187,9 @@ end
} }
} }
}, },
"content_transfer_encoding": {
"Text": "x-uuencode"
},
"content_type": { "content_type": {
"ContentType": { "ContentType": {
"c_type": "image", "c_type": "image",
@@ -195,9 +198,6 @@ end
"name": "greenball.png" "name": "greenball.png"
} }
} }
},
"content_transfer_encoding": {
"Text": "x-uuencode"
} }
}, },
"is_encoding_problem": false, "is_encoding_problem": false,
@@ -2055,14 +2055,22 @@ end
110, 110,
100, 100,
13, 13,
10, 10
13
] ]
} }
}, },
{ {
"Binary": { "Binary": {
"headers_rfc": { "headers_rfc": {
"content_disposition": {
"ContentType": {
"c_type": "attachment",
"c_subtype": null,
"attributes": {
"filename": "blueball.png"
}
}
},
"content_type": { "content_type": {
"ContentType": { "ContentType": {
"c_type": "image", "c_type": "image",
@@ -2074,15 +2082,6 @@ end
}, },
"content_transfer_encoding": { "content_transfer_encoding": {
"Text": "x-uuencode" "Text": "x-uuencode"
},
"content_disposition": {
"ContentType": {
"c_type": "attachment",
"c_subtype": null,
"attributes": {
"filename": "blueball.png"
}
}
} }
}, },
"is_encoding_problem": false, "is_encoding_problem": false,
@@ -3978,8 +3977,7 @@ end
110, 110,
100, 100,
13, 13,
10, 10
13
] ]
} }
} }
+40 -40
View File
@@ -139,6 +139,15 @@ IFl2ZXMgUGlndWV0NnM7vAAAAABJRU5ErkJggg==
---- EXPECTED STRUCTURE ----{ ---- EXPECTED STRUCTURE ----{
"headers_rfc": { "headers_rfc": {
"from": {
"Address": {
"name": "Doug Sauder",
"address": "dwsauder@example.com"
}
},
"subject": {
"Text": "Die Hasen und die Frösche"
},
"content_type": { "content_type": {
"ContentType": { "ContentType": {
"c_type": "multipart", "c_type": "multipart",
@@ -149,20 +158,8 @@ IFl2ZXMgUGlndWV0NnM7vAAAAABJRU5ErkJggg==
} }
} }
}, },
"from": { "mime_version": {
"Address": { "Text": "1.0"
"name": "Doug Sauder",
"address": "dwsauder@example.com"
}
},
"to": {
"Address": {
"name": "Heinz Müller",
"address": "mueller@example.com"
}
},
"subject": {
"Text": "Die Hasen und die Frösche"
}, },
"date": { "date": {
"DateTime": { "DateTime": {
@@ -180,8 +177,11 @@ IFl2ZXMgUGlndWV0NnM7vAAAAABJRU5ErkJggg==
"message_id": { "message_id": {
"Text": "4.2.0.58.20000519003143.00a8d550@pop.example.com" "Text": "4.2.0.58.20000519003143.00a8d550@pop.example.com"
}, },
"mime_version": { "to": {
"Text": "1.0" "Address": {
"name": "Heinz Müller",
"address": "mueller@example.com"
}
} }
}, },
"html_body": [ "html_body": [
@@ -213,9 +213,6 @@ IFl2ZXMgUGlndWV0NnM7vAAAAABJRU5ErkJggg==
{ {
"Text": { "Text": {
"headers_rfc": { "headers_rfc": {
"content_transfer_encoding": {
"Text": "quoted-printable"
},
"content_type": { "content_type": {
"ContentType": { "ContentType": {
"c_type": "text", "c_type": "text",
@@ -224,6 +221,9 @@ IFl2ZXMgUGlndWV0NnM7vAAAAABJRU5ErkJggg==
"charset": "iso-8859-1" "charset": "iso-8859-1"
} }
} }
},
"content_transfer_encoding": {
"Text": "quoted-printable"
} }
}, },
"is_encoding_problem": false, "is_encoding_problem": false,
@@ -233,6 +233,9 @@ IFl2ZXMgUGlndWV0NnM7vAAAAABJRU5ErkJggg==
{ {
"Html": { "Html": {
"headers_rfc": { "headers_rfc": {
"content_transfer_encoding": {
"Text": "quoted-printable"
},
"content_type": { "content_type": {
"ContentType": { "ContentType": {
"c_type": "text", "c_type": "text",
@@ -241,9 +244,6 @@ IFl2ZXMgUGlndWV0NnM7vAAAAABJRU5ErkJggg==
"charset": "iso-8859-1" "charset": "iso-8859-1"
} }
} }
},
"content_transfer_encoding": {
"Text": "quoted-printable"
} }
}, },
"is_encoding_problem": false, "is_encoding_problem": false,
@@ -262,6 +262,12 @@ IFl2ZXMgUGlndWV0NnM7vAAAAABJRU5ErkJggg==
} }
} }
}, },
"content_id": {
"Text": "4.2.0.58.20000519003143.00a8d550@pop.example.com.0"
},
"content_transfer_encoding": {
"Text": "base64"
},
"content_disposition": { "content_disposition": {
"ContentType": { "ContentType": {
"c_type": "inline", "c_type": "inline",
@@ -270,12 +276,6 @@ IFl2ZXMgUGlndWV0NnM7vAAAAABJRU5ErkJggg==
"filename": "blueball.png" "filename": "blueball.png"
} }
} }
},
"content_id": {
"Text": "4.2.0.58.20000519003143.00a8d550@pop.example.com.0"
},
"content_transfer_encoding": {
"Text": "base64"
} }
}, },
"is_encoding_problem": false, "is_encoding_problem": false,
@@ -1611,18 +1611,6 @@ IFl2ZXMgUGlndWV0NnM7vAAAAABJRU5ErkJggg==
{ {
"Binary": { "Binary": {
"headers_rfc": { "headers_rfc": {
"content_type": {
"ContentType": {
"c_type": "image",
"c_subtype": "png",
"attributes": {
"name": "redball.png"
}
}
},
"content_transfer_encoding": {
"Text": "base64"
},
"content_id": { "content_id": {
"Text": "4.2.0.58.20000519003143.00a8d550@pop.example.com.1" "Text": "4.2.0.58.20000519003143.00a8d550@pop.example.com.1"
}, },
@@ -1634,6 +1622,18 @@ IFl2ZXMgUGlndWV0NnM7vAAAAABJRU5ErkJggg==
"filename": "redball.png" "filename": "redball.png"
} }
} }
},
"content_transfer_encoding": {
"Text": "base64"
},
"content_type": {
"ContentType": {
"c_type": "image",
"c_subtype": "png",
"attributes": {
"name": "redball.png"
}
}
} }
}, },
"is_encoding_problem": false, "is_encoding_problem": false,
+36 -36
View File
@@ -145,6 +145,15 @@ IFl2ZXMgUGlndWV0NnM7vAAAAABJRU5ErkJggg==
---- EXPECTED STRUCTURE ----{ ---- EXPECTED STRUCTURE ----{
"headers_rfc": { "headers_rfc": {
"content_type": {
"ContentType": {
"c_type": "multipart",
"c_subtype": "mixed",
"attributes": {
"boundary": "----=_NextPart_000_0008_01BFC037.FDD8EE90"
}
}
},
"date": { "date": {
"DateTime": { "DateTime": {
"year": 2000, "year": 2000,
@@ -161,31 +170,22 @@ IFl2ZXMgUGlndWV0NnM7vAAAAABJRU5ErkJggg==
"mime_version": { "mime_version": {
"Text": "1.0" "Text": "1.0"
}, },
"subject": {
"Text": "Test message from Microsoft Outlook 00"
},
"from": { "from": {
"Address": { "Address": {
"name": "Doug Sauder", "name": "Doug Sauder",
"address": "doug@example.com" "address": "doug@example.com"
} }
}, },
"to": { "subject": {
"Address": { "Text": "Test message from Microsoft Outlook 00"
"name": "Joe Blow",
"address": "jblow@example.com"
}
}, },
"message_id": { "message_id": {
"Text": "NDBBIAKOPKHFGPLCODIGGEKFCHAA.doug@example.com" "Text": "NDBBIAKOPKHFGPLCODIGGEKFCHAA.doug@example.com"
}, },
"content_type": { "to": {
"ContentType": { "Address": {
"c_type": "multipart", "name": "Joe Blow",
"c_subtype": "mixed", "address": "jblow@example.com"
"attributes": {
"boundary": "----=_NextPart_000_0008_01BFC037.FDD8EE90"
}
} }
} }
}, },
@@ -218,9 +218,6 @@ IFl2ZXMgUGlndWV0NnM7vAAAAABJRU5ErkJggg==
{ {
"Text": { "Text": {
"headers_rfc": { "headers_rfc": {
"content_transfer_encoding": {
"Text": "quoted-printable"
},
"content_type": { "content_type": {
"ContentType": { "ContentType": {
"c_type": "text", "c_type": "text",
@@ -229,6 +226,9 @@ IFl2ZXMgUGlndWV0NnM7vAAAAABJRU5ErkJggg==
"charset": "iso-8859-1" "charset": "iso-8859-1"
} }
} }
},
"content_transfer_encoding": {
"Text": "quoted-printable"
} }
}, },
"is_encoding_problem": false, "is_encoding_problem": false,
@@ -258,15 +258,6 @@ IFl2ZXMgUGlndWV0NnM7vAAAAABJRU5ErkJggg==
{ {
"Binary": { "Binary": {
"headers_rfc": { "headers_rfc": {
"content_type": {
"ContentType": {
"c_type": "image",
"c_subtype": "png",
"attributes": {
"name": "greenball.png"
}
}
},
"content_transfer_encoding": { "content_transfer_encoding": {
"Text": "base64" "Text": "base64"
}, },
@@ -278,6 +269,15 @@ IFl2ZXMgUGlndWV0NnM7vAAAAABJRU5ErkJggg==
"filename": "greenball.png" "filename": "greenball.png"
} }
} }
},
"content_type": {
"ContentType": {
"c_type": "image",
"c_subtype": "png",
"attributes": {
"name": "greenball.png"
}
}
} }
}, },
"is_encoding_problem": false, "is_encoding_problem": false,
@@ -1589,15 +1589,6 @@ IFl2ZXMgUGlndWV0NnM7vAAAAABJRU5ErkJggg==
"content_transfer_encoding": { "content_transfer_encoding": {
"Text": "base64" "Text": "base64"
}, },
"content_disposition": {
"ContentType": {
"c_type": "attachment",
"c_subtype": null,
"attributes": {
"filename": "redball.png"
}
}
},
"content_type": { "content_type": {
"ContentType": { "ContentType": {
"c_type": "image", "c_type": "image",
@@ -1606,6 +1597,15 @@ IFl2ZXMgUGlndWV0NnM7vAAAAABJRU5ErkJggg==
"name": "redball.png" "name": "redball.png"
} }
} }
},
"content_disposition": {
"ContentType": {
"c_type": "attachment",
"c_subtype": null,
"attributes": {
"filename": "redball.png"
}
}
} }
}, },
"is_encoding_problem": false, "is_encoding_problem": false,
+11 -11
View File
@@ -32,9 +32,6 @@ welche also wohl noch ungl
---- EXPECTED STRUCTURE ----{ ---- EXPECTED STRUCTURE ----{
"headers_rfc": { "headers_rfc": {
"subject": {
"Text": "Die Hasen und die Fr�sche (Microsoft Outlook 00)"
},
"to": { "to": {
"Address": { "Address": {
"name": "J�rgen Schm�rgen", "name": "J�rgen Schm�rgen",
@@ -44,11 +41,8 @@ welche also wohl noch ungl
"message_id": { "message_id": {
"Text": "NDBBIAKOPKHFGPLCODIGIEKBCHAA.doug@example.com" "Text": "NDBBIAKOPKHFGPLCODIGIEKBCHAA.doug@example.com"
}, },
"from": { "subject": {
"Address": { "Text": "Die Hasen und die Fr�sche (Microsoft Outlook 00)"
"name": "Doug Sauder",
"address": "doug@example.com"
}
}, },
"date": { "date": {
"DateTime": { "DateTime": {
@@ -63,6 +57,12 @@ welche also wohl noch ungl
"tz_minute": 0 "tz_minute": 0
} }
}, },
"from": {
"Address": {
"name": "Doug Sauder",
"address": "doug@example.com"
}
},
"mime_version": { "mime_version": {
"Text": "1.0" "Text": "1.0"
} }
@@ -78,9 +78,6 @@ welche also wohl noch ungl
{ {
"Text": { "Text": {
"headers_rfc": { "headers_rfc": {
"content_transfer_encoding": {
"Text": "8bit"
},
"content_type": { "content_type": {
"ContentType": { "ContentType": {
"c_type": "text", "c_type": "text",
@@ -89,6 +86,9 @@ welche also wohl noch ungl
"charset": "iso-8859-1" "charset": "iso-8859-1"
} }
} }
},
"content_transfer_encoding": {
"Text": "8bit"
} }
}, },
"is_encoding_problem": false, "is_encoding_problem": false,
+30 -30
View File
@@ -189,30 +189,6 @@ IFl2ZXMgUGlndWV0NnM7vAAAAABJRU5ErkJggg==
---- EXPECTED STRUCTURE ----{ ---- EXPECTED STRUCTURE ----{
"headers_rfc": { "headers_rfc": {
"content_type": {
"ContentType": {
"c_type": "multipart",
"c_subtype": "mixed",
"attributes": {
"boundary": "----=_NextPart_000_0010_01BFC038.B91BC650"
}
}
},
"mime_version": {
"Text": "1.0"
},
"message_id": {
"Text": "NDBBIAKOPKHFGPLCODIGOEKFCHAA.doug@example.com"
},
"to": {
"Address": {
"name": "Joe Blow",
"address": "jblow@example.com"
}
},
"subject": {
"Text": "Test message from Microsoft Outlook 00"
},
"date": { "date": {
"DateTime": { "DateTime": {
"year": 2000, "year": 2000,
@@ -226,11 +202,35 @@ IFl2ZXMgUGlndWV0NnM7vAAAAABJRU5ErkJggg==
"tz_minute": 0 "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": {
"name": "Doug Sauder", "name": "Doug Sauder",
"address": "doug@example.com" "address": "doug@example.com"
} }
},
"subject": {
"Text": "Test message from Microsoft Outlook 00"
},
"to": {
"Address": {
"name": "Joe Blow",
"address": "jblow@example.com"
}
} }
}, },
"html_body": [ "html_body": [
@@ -327,11 +327,11 @@ IFl2ZXMgUGlndWV0NnM7vAAAAABJRU5ErkJggg==
} }
} }
}, },
"content_id": {
"Text": "938014623@17052000-0f9b"
},
"content_transfer_encoding": { "content_transfer_encoding": {
"Text": "base64" "Text": "base64"
},
"content_id": {
"Text": "938014623@17052000-0f9b"
} }
}, },
"is_encoding_problem": false, "is_encoding_problem": false,
@@ -1667,6 +1667,9 @@ IFl2ZXMgUGlndWV0NnM7vAAAAABJRU5ErkJggg==
{ {
"Binary": { "Binary": {
"headers_rfc": { "headers_rfc": {
"content_transfer_encoding": {
"Text": "base64"
},
"content_disposition": { "content_disposition": {
"ContentType": { "ContentType": {
"c_type": "attachment", "c_type": "attachment",
@@ -1676,9 +1679,6 @@ IFl2ZXMgUGlndWV0NnM7vAAAAABJRU5ErkJggg==
} }
} }
}, },
"content_transfer_encoding": {
"Text": "base64"
},
"content_type": { "content_type": {
"ContentType": { "ContentType": {
"c_type": "image", "c_type": "image",
+14 -14
View File
@@ -31,18 +31,6 @@ IiANCg==
---- EXPECTED STRUCTURE ----{ ---- EXPECTED STRUCTURE ----{
"headers_rfc": { "headers_rfc": {
"mime_version": {
"Text": "1.0"
},
"subject": {
"Text": "Die Hasen und die Fr�sche (Microsoft Outlook 00)"
},
"to": {
"Address": {
"name": "J�rgen Schm�rgen",
"address": "schmuergen@example.com"
}
},
"date": { "date": {
"DateTime": { "DateTime": {
"year": 2000, "year": 2000,
@@ -56,14 +44,26 @@ IiANCg==
"tz_minute": 0 "tz_minute": 0
} }
}, },
"message_id": { "mime_version": {
"Text": "NDBBIAKOPKHFGPLCODIGAEKCCHAA.doug@example.com" "Text": "1.0"
}, },
"from": { "from": {
"Address": { "Address": {
"name": "Doug Sauder", "name": "Doug Sauder",
"address": "doug@example.com" "address": "doug@example.com"
} }
},
"to": {
"Address": {
"name": "J�rgen Schm�rgen",
"address": "schmuergen@example.com"
}
},
"subject": {
"Text": "Die Hasen und die Fr�sche (Microsoft Outlook 00)"
},
"message_id": {
"Text": "NDBBIAKOPKHFGPLCODIGAEKCCHAA.doug@example.com"
} }
}, },
"html_body": [ "html_body": [
+34 -34
View File
@@ -109,12 +109,6 @@ In einem nahen Teich wollten sie sich nun ers=E4ufen; sie eilten ihm zu;=
---- EXPECTED STRUCTURE ----{ ---- EXPECTED STRUCTURE ----{
"headers_rfc": { "headers_rfc": {
"subject": {
"Text": "Die Hasen und die Frösche"
},
"mime_version": {
"Text": "1.0"
},
"content_type": { "content_type": {
"ContentType": { "ContentType": {
"c_type": "multipart", "c_type": "multipart",
@@ -127,6 +121,18 @@ In einem nahen Teich wollten sie sich nun ers=E4ufen; sie eilten ihm zu;=
"message_id": { "message_id": {
"Text": "4.2.0.58.20000519005505.00a853a0@pop.example.com" "Text": "4.2.0.58.20000519005505.00a853a0@pop.example.com"
}, },
"subject": {
"Text": "Die Hasen und die Frösche"
},
"from": {
"Address": {
"name": "Doug Sauder",
"address": "dwsauder@example.com"
}
},
"mime_version": {
"Text": "1.0"
},
"date": { "date": {
"DateTime": { "DateTime": {
"year": 2000, "year": 2000,
@@ -145,12 +151,6 @@ In einem nahen Teich wollten sie sich nun ers=E4ufen; sie eilten ihm zu;=
"name": "Jürgen Schmürgen", "name": "Jürgen Schmürgen",
"address": "jschmuergen@example.com" "address": "jschmuergen@example.com"
} }
},
"from": {
"Address": {
"name": "Doug Sauder",
"address": "dwsauder@example.com"
}
} }
}, },
"html_body": [ "html_body": [
@@ -197,9 +197,6 @@ In einem nahen Teich wollten sie sich nun ers=E4ufen; sie eilten ihm zu;=
} }
} }
}, },
"content_transfer_encoding": {
"Text": "base64"
},
"content_type": { "content_type": {
"ContentType": { "ContentType": {
"c_type": "image", "c_type": "image",
@@ -208,6 +205,9 @@ In einem nahen Teich wollten sie sich nun ers=E4ufen; sie eilten ihm zu;=
"name": "blueball.png" "name": "blueball.png"
} }
} }
},
"content_transfer_encoding": {
"Text": "base64"
} }
}, },
"is_encoding_problem": false, "is_encoding_problem": false,
@@ -1543,15 +1543,6 @@ In einem nahen Teich wollten sie sich nun ers=E4ufen; sie eilten ihm zu;=
{ {
"Text": { "Text": {
"headers_rfc": { "headers_rfc": {
"content_disposition": {
"ContentType": {
"c_type": "attachment",
"c_subtype": null,
"attributes": {
"filename": "farmerandstork.txt"
}
}
},
"content_type": { "content_type": {
"ContentType": { "ContentType": {
"c_type": "text", "c_type": "text",
@@ -1560,15 +1551,33 @@ In einem nahen Teich wollten sie sich nun ers=E4ufen; sie eilten ihm zu;=
"charset": "us-ascii" "charset": "us-ascii"
} }
} }
},
"content_disposition": {
"ContentType": {
"c_type": "attachment",
"c_subtype": null,
"attributes": {
"filename": "farmerandstork.txt"
}
}
} }
}, },
"is_encoding_problem": false, "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\r" "body": "\r\nThe Farmer and the Stork \r\n \r\nA FARMER placed nets on his newly-sown plowlands and caught a\r\nnumber of Cranes, which came to pick up his seed. With them he\r\ntrapped a Stork that had fractured his leg in the net and was\r\nearnestly beseeching the Farmer to spare his life. \"Pray save\r\nme, Master,\" he said, \"and let me go free this once. My broken\r\nlimb should excite your pity. Besides, I am no Crane, I am a\r\nStork, a bird of excellent character; and see how I love and\r\nslave for my father and mother. Look too, at my feathers--\r\nthey are not the least like those of a Crane.\" The Farmer \r\nlaughed aloud and said, \"It may be all as you say, I only know \r\nthis: I have taken you with these robbers, the Cranes, and you \r\nmust die in their company.\" \r\n \r\nBirds of a feather flock together. \r\n"
} }
}, },
{ {
"Text": { "Text": {
"headers_rfc": { "headers_rfc": {
"content_type": {
"ContentType": {
"c_type": "text",
"c_subtype": "plain",
"attributes": {
"charset": "iso-8859-1"
}
}
},
"content_transfer_encoding": { "content_transfer_encoding": {
"Text": "quoted-printable" "Text": "quoted-printable"
}, },
@@ -1580,15 +1589,6 @@ In einem nahen Teich wollten sie sich nun ers=E4ufen; sie eilten ihm zu;=
"filename": "HasenundFr�sche.txt" "filename": "HasenundFr�sche.txt"
} }
} }
},
"content_type": {
"ContentType": {
"c_type": "text",
"c_subtype": "plain",
"attributes": {
"charset": "iso-8859-1"
}
}
} }
}, },
"is_encoding_problem": false, "is_encoding_problem": false,
+33 -33
View File
@@ -110,19 +110,13 @@ IFl2ZXMgUGlndWV0NnM7vAAAAABJRU5ErkJggg==
---- EXPECTED STRUCTURE ----{ ---- EXPECTED STRUCTURE ----{
"headers_rfc": { "headers_rfc": {
"message_id": {
"Text": "4.2.0.58.20000519003735.00a8d7e0@pop.example.com"
},
"subject": {
"Text": "Die Hasen und die Frösche"
},
"content_type": { "content_type": {
"ContentType": { "ContentType": {
"c_type": "multipart", "c_type": "multipart",
"c_subtype": "related", "c_subtype": "related",
"attributes": { "attributes": {
"type": "text/html", "boundary": "=====================_715429112==_.REL",
"boundary": "=====================_715429112==_.REL" "type": "text/html"
} }
} }
}, },
@@ -139,12 +133,6 @@ IFl2ZXMgUGlndWV0NnM7vAAAAABJRU5ErkJggg==
"tz_minute": 0 "tz_minute": 0
} }
}, },
"to": {
"Address": {
"name": "Heinz Müller",
"address": "mueller@example.com"
}
},
"from": { "from": {
"Address": { "Address": {
"name": "Doug Sauder", "name": "Doug Sauder",
@@ -153,6 +141,18 @@ IFl2ZXMgUGlndWV0NnM7vAAAAABJRU5ErkJggg==
}, },
"mime_version": { "mime_version": {
"Text": "1.0" "Text": "1.0"
},
"to": {
"Address": {
"name": "Heinz Müller",
"address": "mueller@example.com"
}
},
"message_id": {
"Text": "4.2.0.58.20000519003735.00a8d7e0@pop.example.com"
},
"subject": {
"Text": "Die Hasen und die Frösche"
} }
}, },
"html_body": [ "html_body": [
@@ -169,9 +169,6 @@ IFl2ZXMgUGlndWV0NnM7vAAAAABJRU5ErkJggg==
{ {
"Html": { "Html": {
"headers_rfc": { "headers_rfc": {
"content_transfer_encoding": {
"Text": "quoted-printable"
},
"content_type": { "content_type": {
"ContentType": { "ContentType": {
"c_type": "text", "c_type": "text",
@@ -180,6 +177,9 @@ IFl2ZXMgUGlndWV0NnM7vAAAAABJRU5ErkJggg==
"charset": "iso-8859-1" "charset": "iso-8859-1"
} }
} }
},
"content_transfer_encoding": {
"Text": "quoted-printable"
} }
}, },
"is_encoding_problem": false, "is_encoding_problem": false,
@@ -189,14 +189,8 @@ IFl2ZXMgUGlndWV0NnM7vAAAAABJRU5ErkJggg==
{ {
"Binary": { "Binary": {
"headers_rfc": { "headers_rfc": {
"content_disposition": { "content_id": {
"ContentType": { "Text": "4.2.0.58.20000519003735.00a8d7e0@pop.example.com.2"
"c_type": "inline",
"c_subtype": null,
"attributes": {
"filename": "2aa48eb6.png"
}
}
}, },
"content_type": { "content_type": {
"ContentType": { "ContentType": {
@@ -207,8 +201,14 @@ IFl2ZXMgUGlndWV0NnM7vAAAAABJRU5ErkJggg==
} }
} }
}, },
"content_id": { "content_disposition": {
"Text": "4.2.0.58.20000519003735.00a8d7e0@pop.example.com.2" "ContentType": {
"c_type": "inline",
"c_subtype": null,
"attributes": {
"filename": "2aa48eb6.png"
}
}
}, },
"content_transfer_encoding": { "content_transfer_encoding": {
"Text": "base64" "Text": "base64"
@@ -1547,12 +1547,6 @@ IFl2ZXMgUGlndWV0NnM7vAAAAABJRU5ErkJggg==
{ {
"Binary": { "Binary": {
"headers_rfc": { "headers_rfc": {
"content_id": {
"Text": "4.2.0.58.20000519003735.00a8d7e0@pop.example.com.3"
},
"content_transfer_encoding": {
"Text": "base64"
},
"content_disposition": { "content_disposition": {
"ContentType": { "ContentType": {
"c_type": "inline", "c_type": "inline",
@@ -1562,6 +1556,9 @@ IFl2ZXMgUGlndWV0NnM7vAAAAABJRU5ErkJggg==
} }
} }
}, },
"content_id": {
"Text": "4.2.0.58.20000519003735.00a8d7e0@pop.example.com.3"
},
"content_type": { "content_type": {
"ContentType": { "ContentType": {
"c_type": "image", "c_type": "image",
@@ -1570,6 +1567,9 @@ IFl2ZXMgUGlndWV0NnM7vAAAAABJRU5ErkJggg==
"name": "2aa48ec0.png" "name": "2aa48ec0.png"
} }
} }
},
"content_transfer_encoding": {
"Text": "base64"
} }
}, },
"is_encoding_problem": false, "is_encoding_problem": false,
+33 -33
View File
@@ -181,8 +181,14 @@ bGlwMmdpZiB2LjAuNiBieSBZdmVzIFBpZ3VldDZzO7wAAAAASUVORK5CYII=
} }
} }
}, },
"message_id": { "to": {
"Text": "4.2.0.58.20000519003809.00a85140@pop.example.com" "Address": {
"name": "Heinz Müller",
"address": "mueller@example.com"
}
},
"subject": {
"Text": "Die Hasen und die Frösche"
}, },
"date": { "date": {
"DateTime": { "DateTime": {
@@ -200,20 +206,14 @@ bGlwMmdpZiB2LjAuNiBieSBZdmVzIFBpZ3VldDZzO7wAAAAASUVORK5CYII=
"mime_version": { "mime_version": {
"Text": "1.0" "Text": "1.0"
}, },
"to": { "message_id": {
"Address": { "Text": "4.2.0.58.20000519003809.00a85140@pop.example.com"
"name": "Heinz Müller",
"address": "mueller@example.com"
}
}, },
"from": { "from": {
"Address": { "Address": {
"name": "Doug Sauder", "name": "Doug Sauder",
"address": "dwsauder@example.com" "address": "dwsauder@example.com"
} }
},
"subject": {
"Text": "Die Hasen und die Frösche"
} }
}, },
"html_body": [ "html_body": [
@@ -237,8 +237,8 @@ bGlwMmdpZiB2LjAuNiBieSBZdmVzIFBpZ3VldDZzO7wAAAAASUVORK5CYII=
"c_type": "multipart", "c_type": "multipart",
"c_subtype": "related", "c_subtype": "related",
"attributes": { "attributes": {
"type": "text/html", "boundary": "=====================_715462801==_.REL",
"boundary": "=====================_715462801==_.REL" "type": "text/html"
} }
} }
} }
@@ -248,6 +248,9 @@ bGlwMmdpZiB2LjAuNiBieSBZdmVzIFBpZ3VldDZzO7wAAAAASUVORK5CYII=
{ {
"Html": { "Html": {
"headers_rfc": { "headers_rfc": {
"content_transfer_encoding": {
"Text": "quoted-printable"
},
"content_type": { "content_type": {
"ContentType": { "ContentType": {
"c_type": "text", "c_type": "text",
@@ -256,9 +259,6 @@ bGlwMmdpZiB2LjAuNiBieSBZdmVzIFBpZ3VldDZzO7wAAAAASUVORK5CYII=
"charset": "iso-8859-1" "charset": "iso-8859-1"
} }
} }
},
"content_transfer_encoding": {
"Text": "quoted-printable"
} }
}, },
"is_encoding_problem": false, "is_encoding_problem": false,
@@ -268,9 +268,6 @@ bGlwMmdpZiB2LjAuNiBieSBZdmVzIFBpZ3VldDZzO7wAAAAASUVORK5CYII=
{ {
"Binary": { "Binary": {
"headers_rfc": { "headers_rfc": {
"content_id": {
"Text": "4.2.0.58.20000519003809.00a85140@pop.example.com.2"
},
"content_transfer_encoding": { "content_transfer_encoding": {
"Text": "base64" "Text": "base64"
}, },
@@ -283,6 +280,9 @@ bGlwMmdpZiB2LjAuNiBieSBZdmVzIFBpZ3VldDZzO7wAAAAASUVORK5CYII=
} }
} }
}, },
"content_id": {
"Text": "4.2.0.58.20000519003809.00a85140@pop.example.com.2"
},
"content_disposition": { "content_disposition": {
"ContentType": { "ContentType": {
"c_type": "inline", "c_type": "inline",
@@ -1635,6 +1635,12 @@ bGlwMmdpZiB2LjAuNiBieSBZdmVzIFBpZ3VldDZzO7wAAAAASUVORK5CYII=
} }
} }
}, },
"content_id": {
"Text": "4.2.0.58.20000519003809.00a85140@pop.example.com.3"
},
"content_transfer_encoding": {
"Text": "base64"
},
"content_disposition": { "content_disposition": {
"ContentType": { "ContentType": {
"c_type": "inline", "c_type": "inline",
@@ -1643,12 +1649,6 @@ bGlwMmdpZiB2LjAuNiBieSBZdmVzIFBpZ3VldDZzO7wAAAAASUVORK5CYII=
"filename": "2aa51371.png" "filename": "2aa51371.png"
} }
} }
},
"content_transfer_encoding": {
"Text": "base64"
},
"content_id": {
"Text": "4.2.0.58.20000519003809.00a85140@pop.example.com.3"
} }
}, },
"is_encoding_problem": false, "is_encoding_problem": false,
@@ -4467,15 +4467,6 @@ bGlwMmdpZiB2LjAuNiBieSBZdmVzIFBpZ3VldDZzO7wAAAAASUVORK5CYII=
{ {
"Binary": { "Binary": {
"headers_rfc": { "headers_rfc": {
"content_disposition": {
"ContentType": {
"c_type": "attachment",
"c_subtype": null,
"attributes": {
"filename": "greenball.png"
}
}
},
"content_type": { "content_type": {
"ContentType": { "ContentType": {
"c_type": "image", "c_type": "image",
@@ -4487,6 +4478,15 @@ bGlwMmdpZiB2LjAuNiBieSBZdmVzIFBpZ3VldDZzO7wAAAAASUVORK5CYII=
}, },
"content_transfer_encoding": { "content_transfer_encoding": {
"Text": "base64" "Text": "base64"
},
"content_disposition": {
"ContentType": {
"c_type": "attachment",
"c_subtype": null,
"attributes": {
"filename": "greenball.png"
}
}
} }
}, },
"is_encoding_problem": false, "is_encoding_problem": false,
+26 -26
View File
@@ -85,6 +85,9 @@ Birds of a feather flock together.
---- EXPECTED STRUCTURE ----{ ---- EXPECTED STRUCTURE ----{
"headers_rfc": { "headers_rfc": {
"subject": {
"Text": "Die Hasen und die Frösche"
},
"content_type": { "content_type": {
"ContentType": { "ContentType": {
"c_type": "multipart", "c_type": "multipart",
@@ -94,11 +97,8 @@ Birds of a feather flock together.
} }
} }
}, },
"from": { "mime_version": {
"Address": { "Text": "1.0"
"name": "Doug Sauder",
"address": "dwsauder@example.com"
}
}, },
"date": { "date": {
"DateTime": { "DateTime": {
@@ -119,14 +119,14 @@ Birds of a feather flock together.
"address": "mueller@example.com" "address": "mueller@example.com"
} }
}, },
"subject": { "from": {
"Text": "Die Hasen und die Frösche" "Address": {
"name": "Doug Sauder",
"address": "dwsauder@example.com"
}
}, },
"message_id": { "message_id": {
"Text": "4.2.0.58.20000519005818.00a86aa0@pop.example.com" "Text": "4.2.0.58.20000519005818.00a86aa0@pop.example.com"
},
"mime_version": {
"Text": "1.0"
} }
}, },
"html_body": [ "html_body": [
@@ -143,6 +143,9 @@ Birds of a feather flock together.
{ {
"Text": { "Text": {
"headers_rfc": { "headers_rfc": {
"content_transfer_encoding": {
"Text": "quoted-printable"
},
"content_type": { "content_type": {
"ContentType": { "ContentType": {
"c_type": "text", "c_type": "text",
@@ -151,9 +154,6 @@ Birds of a feather flock together.
"charset": "iso-8859-1" "charset": "iso-8859-1"
} }
} }
},
"content_transfer_encoding": {
"Text": "quoted-printable"
} }
}, },
"is_encoding_problem": false, "is_encoding_problem": false,
@@ -163,17 +163,6 @@ Birds of a feather flock together.
{ {
"Text": { "Text": {
"headers_rfc": { "headers_rfc": {
"content_type": {
"ContentType": {
"c_type": "text",
"c_subtype": "plain",
"attributes": {
"name": "HasenundFr�sche.txt",
"x-mac-type": "54455854",
"x-mac-creator": "74747874"
}
}
},
"content_disposition": { "content_disposition": {
"ContentType": { "ContentType": {
"c_type": "attachment", "c_type": "attachment",
@@ -185,10 +174,21 @@ Birds of a feather flock together.
}, },
"content_transfer_encoding": { "content_transfer_encoding": {
"Text": "x-uuencode" "Text": "x-uuencode"
},
"content_type": {
"ContentType": {
"c_type": "text",
"c_subtype": "plain",
"attributes": {
"x-mac-type": "54455854",
"name": "HasenundFr�sche.txt",
"x-mac-creator": "74747874"
}
}
} }
}, },
"is_encoding_problem": false, "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\r" "body": "\r\nbegin 600 HasenundFr�sche.txt\r\nM1&EE($AA<V5N('5N9\"!D:64@1G+V<V-H90T*#0I$:64@2&%S96X@:VQA9W1E\r\nM;B!E:6YS=\"#\\8F5R(&EH<F4@;6G?;&EC:&4@3&%G93L@(G=I<B!L96)E;B(L\r\nM('-P<F%C:\"!E:6X@4F5D;F5R+\"`B:6X@<W1E=&5R($9U<F-H=\"!V;W(@365N\r\nM<V-H96X@=6YD(%1I97)E;BP@96EN92!\"975T92!D97(@2'5N9&4L(&1E<B!!\r\nM9&QE<BP@:F$@9F%S=\"!A;&QE<B!2875B=&EE<F4A(%5N<V5R92!S=&5T92!!\r\nM;F=S=\"!I<W0@Y')G97(@86QS(&1E<B!4;V0@<V5L8G-T+B!!=68L(&QAWW0@\r\nM=6YS(&5I;B!F_'(@86QL96UA;\"!S=&5R8F5N+B(@#0H-\"DEN(&5I;F5M(&YA\r\nM:&5N(%1E:6-H('=O;&QT96X@<VEE('-I8V@@;G5N(&5R<^1U9F5N.R!S:64@\r\nM96EL=&5N(&EH;2!Z=3L@86QL96EN(&1A<R!A==]E<F]R9&5N=&QI8VAE($=E\r\nM=/9S92!U;F0@:6AR92!W=6YD97)B87)E($=E<W1A;'0@97)S8VAR96-K=&4@\r\nM96EN92!-96YG92!&<O9S8VAE+\"!D:64@86T@569E<B!S8=]E;BP@<V\\@<V5H\r\nM<BP@9&'?('-I92!A=69S('-C:&YE;&QS=&4@=6YT97)T875C:'1E;BX@#0H-\r\nM\"B)(86QT(BP@<FEE9B!N=6X@96)E;B!D:65S97(@4W!R96-H97(L(\")W:7(@\r\nM=V]L;&5N(&1A<R!%<G/D=69E;B!N;V-H(&5I;B!W96YI9R!A=69S8VAI96)E\r\nM;BP@9&5N;B!A=6-H('5N<R!F_')C:'1E;BP@=VEE(&EH<B!S96AT+\"!E:6YI\r\nM9V4@5&EE<F4L('=E;&-H92!A;'-O('=O:&P@;F]C:\"!U;F=L_&-K;&EC:&5R\r\n;('-E:6X@;?QS<V5N(&%L<R!W:7(N(B`-\"@T*\r\n`\r\nend\r\n"
} }
}, },
{ {
@@ -214,7 +214,7 @@ Birds of a feather flock together.
} }
}, },
"is_encoding_problem": false, "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\r" "body": "\r\nThe Farmer and the Stork \r\n \r\nA FARMER placed nets on his newly-sown plowlands and caught a\r\nnumber of Cranes, which came to pick up his seed. With them he\r\ntrapped a Stork that had fractured his leg in the net and was\r\nearnestly beseeching the Farmer to spare his life. \"Pray save\r\nme, Master,\" he said, \"and let me go free this once. My broken\r\nlimb should excite your pity. Besides, I am no Crane, I am a\r\nStork, a bird of excellent character; and see how I love and\r\nslave for my father and mother. Look too, at my feathers--\r\nthey are not the least like those of a Crane.\" The Farmer \r\nlaughed aloud and said, \"It may be all as you say, I only know \r\nthis: I have taken you with these robbers, the Cranes, and you \r\nmust die in their company.\" \r\n \r\nBirds of a feather flock together. \r\n"
} }
} }
], ],
+15 -15
View File
@@ -32,21 +32,6 @@ Tiere, welche also wohl noch ungl=FCcklicher sein m=FCssen als wir."=20
---- EXPECTED STRUCTURE ----{ ---- EXPECTED STRUCTURE ----{
"headers_rfc": { "headers_rfc": {
"from": {
"Address": {
"name": "Doug Sauder",
"address": "doug@example.com"
}
},
"subject": {
"Text": "Die Hasen und die Fr�sche (Microsoft Outlook 00)"
},
"to": {
"Address": {
"name": "J�rgen Schm�rgen",
"address": "schmuergen@example.com"
}
},
"message_id": { "message_id": {
"Text": "NDBBIAKOPKHFGPLCODIGMEKBCHAA.doug@example.com" "Text": "NDBBIAKOPKHFGPLCODIGMEKBCHAA.doug@example.com"
}, },
@@ -65,6 +50,21 @@ Tiere, welche also wohl noch ungl=FCcklicher sein m=FCssen als wir."=20
"tz_hour": 4, "tz_hour": 4,
"tz_minute": 0 "tz_minute": 0
} }
},
"to": {
"Address": {
"name": "J�rgen Schm�rgen",
"address": "schmuergen@example.com"
}
},
"from": {
"Address": {
"name": "Doug Sauder",
"address": "doug@example.com"
}
},
"subject": {
"Text": "Die Hasen und die Fr�sche (Microsoft Outlook 00)"
} }
}, },
"html_body": [ "html_body": [
+34 -34
View File
@@ -163,6 +163,30 @@ IFl2ZXMgUGlndWV0NnM7vAAAAABJRU5ErkJggg==
"address": "jblow@example.com" "address": "jblow@example.com"
} }
}, },
"content_type": {
"ContentType": {
"c_type": "multipart",
"c_subtype": "related",
"attributes": {
"boundary": "----=_NextPart_000_000C_01BFC038.5A5C8E60"
}
}
},
"message_id": {
"Text": "NDBBIAKOPKHFGPLCODIGKEKFCHAA.doug@example.com"
},
"from": {
"Address": {
"name": "Doug Sauder",
"address": "doug@example.com"
}
},
"subject": {
"Text": "Test message from Microsoft Outlook 00"
},
"mime_version": {
"Text": "1.0"
},
"date": { "date": {
"DateTime": { "DateTime": {
"year": 2000, "year": 2000,
@@ -175,30 +199,6 @@ IFl2ZXMgUGlndWV0NnM7vAAAAABJRU5ErkJggg==
"tz_hour": 4, "tz_hour": 4,
"tz_minute": 0 "tz_minute": 0
} }
},
"mime_version": {
"Text": "1.0"
},
"from": {
"Address": {
"name": "Doug Sauder",
"address": "doug@example.com"
}
},
"subject": {
"Text": "Test message from Microsoft Outlook 00"
},
"message_id": {
"Text": "NDBBIAKOPKHFGPLCODIGKEKFCHAA.doug@example.com"
},
"content_type": {
"ContentType": {
"c_type": "multipart",
"c_subtype": "related",
"attributes": {
"boundary": "----=_NextPart_000_000C_01BFC038.5A5C8E60"
}
}
} }
}, },
"html_body": [ "html_body": [
@@ -230,9 +230,6 @@ IFl2ZXMgUGlndWV0NnM7vAAAAABJRU5ErkJggg==
{ {
"Text": { "Text": {
"headers_rfc": { "headers_rfc": {
"content_transfer_encoding": {
"Text": "quoted-printable"
},
"content_type": { "content_type": {
"ContentType": { "ContentType": {
"c_type": "text", "c_type": "text",
@@ -241,6 +238,9 @@ IFl2ZXMgUGlndWV0NnM7vAAAAABJRU5ErkJggg==
"charset": "iso-8859-1" "charset": "iso-8859-1"
} }
} }
},
"content_transfer_encoding": {
"Text": "quoted-printable"
} }
}, },
"is_encoding_problem": false, "is_encoding_problem": false,
@@ -270,8 +270,8 @@ IFl2ZXMgUGlndWV0NnM7vAAAAABJRU5ErkJggg==
{ {
"Binary": { "Binary": {
"headers_rfc": { "headers_rfc": {
"content_id": { "content_transfer_encoding": {
"Text": "823504223@17052000-0f8d" "Text": "base64"
}, },
"content_type": { "content_type": {
"ContentType": { "ContentType": {
@@ -282,8 +282,8 @@ IFl2ZXMgUGlndWV0NnM7vAAAAABJRU5ErkJggg==
} }
} }
}, },
"content_transfer_encoding": { "content_id": {
"Text": "base64" "Text": "823504223@17052000-0f8d"
} }
}, },
"is_encoding_problem": false, "is_encoding_problem": false,
@@ -1619,9 +1619,6 @@ IFl2ZXMgUGlndWV0NnM7vAAAAABJRU5ErkJggg==
{ {
"Binary": { "Binary": {
"headers_rfc": { "headers_rfc": {
"content_id": {
"Text": "823504223@17052000-0f94"
},
"content_type": { "content_type": {
"ContentType": { "ContentType": {
"c_type": "image", "c_type": "image",
@@ -1631,6 +1628,9 @@ IFl2ZXMgUGlndWV0NnM7vAAAAABJRU5ErkJggg==
} }
} }
}, },
"content_id": {
"Text": "823504223@17052000-0f94"
},
"content_transfer_encoding": { "content_transfer_encoding": {
"Text": "base64" "Text": "base64"
} }
+14 -14
View File
@@ -28,11 +28,11 @@ Slow but steady wins the race.
---- EXPECTED STRUCTURE ----{ ---- EXPECTED STRUCTURE ----{
"headers_rfc": { "headers_rfc": {
"from": { "message_id": {
"Address": { "Text": "392362D8.B650789F@example.com"
"name": "Doug Sauder", },
"address": "dwsauder@example.com" "mime_version": {
} "Text": "1.0"
}, },
"to": { "to": {
"Address": { "Address": {
@@ -40,6 +40,15 @@ Slow but steady wins the race.
"address": "blow@example.com" "address": "blow@example.com"
} }
}, },
"subject": {
"Text": "Test message from Netscape Communicator 4.7"
},
"from": {
"Address": {
"name": "Doug Sauder",
"address": "dwsauder@example.com"
}
},
"date": { "date": {
"DateTime": { "DateTime": {
"year": 2000, "year": 2000,
@@ -52,15 +61,6 @@ Slow but steady wins the race.
"tz_hour": 4, "tz_hour": 4,
"tz_minute": 0 "tz_minute": 0
} }
},
"mime_version": {
"Text": "1.0"
},
"subject": {
"Text": "Test message from Netscape Communicator 4.7"
},
"message_id": {
"Text": "392362D8.B650789F@example.com"
} }
}, },
"html_body": [ "html_body": [
+32 -32
View File
@@ -112,12 +112,21 @@ Slow but steady wins the race.
---- EXPECTED STRUCTURE ----{ ---- EXPECTED STRUCTURE ----{
"headers_rfc": { "headers_rfc": {
"subject": {
"Text": "Test message from Netscape Communicator 4.7"
},
"mime_version": { "mime_version": {
"Text": "1.0" "Text": "1.0"
}, },
"to": {
"Address": {
"name": "Joe Blow",
"address": "blow@example.com"
}
},
"message_id": {
"Text": "3923635B.85C58444@example.com"
},
"subject": {
"Text": "Test message from Netscape Communicator 4.7"
},
"content_type": { "content_type": {
"ContentType": { "ContentType": {
"c_type": "multipart", "c_type": "multipart",
@@ -145,15 +154,6 @@ Slow but steady wins the race.
"tz_hour": 4, "tz_hour": 4,
"tz_minute": 0 "tz_minute": 0
} }
},
"message_id": {
"Text": "3923635B.85C58444@example.com"
},
"to": {
"Address": {
"name": "Joe Blow",
"address": "blow@example.com"
}
} }
}, },
"html_body": [ "html_body": [
@@ -175,9 +175,6 @@ Slow but steady wins the race.
{ {
"Text": { "Text": {
"headers_rfc": { "headers_rfc": {
"content_transfer_encoding": {
"Text": "7bit"
},
"content_type": { "content_type": {
"ContentType": { "ContentType": {
"c_type": "text", "c_type": "text",
@@ -186,27 +183,18 @@ Slow but steady wins the race.
"charset": "us-ascii" "charset": "us-ascii"
} }
} }
},
"content_transfer_encoding": {
"Text": "7bit"
} }
}, },
"is_encoding_problem": false, "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" "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": { "InlineBinary": {
"headers_rfc": { "headers_rfc": {
"content_type": {
"ContentType": {
"c_type": "image",
"c_subtype": "png",
"attributes": {
"name": "blueball.png"
}
}
},
"content_transfer_encoding": {
"Text": "base64"
},
"content_disposition": { "content_disposition": {
"ContentType": { "ContentType": {
"c_type": "inline", "c_type": "inline",
@@ -215,6 +203,18 @@ Slow but steady wins the race.
"filename": "blueball.png" "filename": "blueball.png"
} }
} }
},
"content_transfer_encoding": {
"Text": "base64"
},
"content_type": {
"ContentType": {
"c_type": "image",
"c_subtype": "png",
"attributes": {
"name": "blueball.png"
}
}
} }
}, },
"is_encoding_problem": false, "is_encoding_problem": false,
@@ -1550,9 +1550,6 @@ Slow but steady wins the race.
{ {
"InlineBinary": { "InlineBinary": {
"headers_rfc": { "headers_rfc": {
"content_transfer_encoding": {
"Text": "base64"
},
"content_disposition": { "content_disposition": {
"ContentType": { "ContentType": {
"c_type": "inline", "c_type": "inline",
@@ -1562,6 +1559,9 @@ Slow but steady wins the race.
} }
} }
}, },
"content_transfer_encoding": {
"Text": "base64"
},
"content_type": { "content_type": {
"ContentType": { "ContentType": {
"c_type": "image", "c_type": "image",
@@ -2902,7 +2902,7 @@ Slow but steady wins the race.
} }
}, },
"is_encoding_problem": false, "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" "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"
} }
} }
], ],
+48 -48
View File
@@ -97,25 +97,10 @@ Z3VldDZzO7wAAAAASUVORK5CYII=
---- EXPECTED STRUCTURE ----{ ---- EXPECTED STRUCTURE ----{
"headers_rfc": { "headers_rfc": {
"from": { "to": {
"Address": { "Address": {
"name": "Doug Sauder", "name": "Joe Blow",
"address": "doug@penguin.example.com" "address": "blow@example.com"
}
},
"mime_version": {
"Text": "1.0"
},
"subject": {
"Text": "Test message from PINE"
},
"content_type": {
"ContentType": {
"c_type": "multipart",
"c_subtype": "mixed",
"attributes": {
"boundary": "-1463757054-952513540-958744548=:8452"
}
} }
}, },
"date": { "date": {
@@ -131,13 +116,28 @@ Z3VldDZzO7wAAAAASUVORK5CYII=
"tz_minute": 0 "tz_minute": 0
} }
}, },
"subject": {
"Text": "Test message from PINE"
},
"message_id": { "message_id": {
"Text": "Pine.LNX.4.21.0005190951410.8452-102000@penguin.example.com" "Text": "Pine.LNX.4.21.0005190951410.8452-102000@penguin.example.com"
}, },
"to": { "mime_version": {
"Text": "1.0"
},
"content_type": {
"ContentType": {
"c_type": "multipart",
"c_subtype": "mixed",
"attributes": {
"boundary": "-1463757054-952513540-958744548=:8452"
}
}
},
"from": {
"Address": { "Address": {
"name": "Joe Blow", "name": "Doug Sauder",
"address": "blow@example.com" "address": "doug@penguin.example.com"
} }
} }
}, },
@@ -166,18 +166,27 @@ Z3VldDZzO7wAAAAASUVORK5CYII=
} }
}, },
"is_encoding_problem": false, "is_encoding_problem": false,
"body": "This is a test message from PINE MUA.\r\n\r\n\r" "body": "This is a test message from PINE MUA.\r\n\r\n"
} }
}, },
{ {
"Binary": { "Binary": {
"headers_rfc": { "headers_rfc": {
"content_transfer_encoding": { "content_id": {
"Text": "BASE64" "Text": "Pine.LNX.4.21.0005190955480.8452@penguin.example.com"
}, },
"content_description": { "content_description": {
"Text": "A PNG graphic file" "Text": "A PNG graphic file"
}, },
"content_disposition": {
"ContentType": {
"c_type": "attachment",
"c_subtype": null,
"attributes": {
"filename": "redball.png"
}
}
},
"content_type": { "content_type": {
"ContentType": { "ContentType": {
"c_type": "application", "c_type": "application",
@@ -187,17 +196,8 @@ Z3VldDZzO7wAAAAASUVORK5CYII=
} }
} }
}, },
"content_id": { "content_transfer_encoding": {
"Text": "Pine.LNX.4.21.0005190955480.8452@penguin.example.com" "Text": "BASE64"
},
"content_disposition": {
"ContentType": {
"c_type": "attachment",
"c_subtype": null,
"attributes": {
"filename": "redball.png"
}
}
} }
}, },
"is_encoding_problem": false, "is_encoding_problem": false,
@@ -1661,20 +1661,14 @@ Z3VldDZzO7wAAAAASUVORK5CYII=
{ {
"Binary": { "Binary": {
"headers_rfc": { "headers_rfc": {
"content_transfer_encoding": {
"Text": "BASE64"
},
"content_id": { "content_id": {
"Text": "Pine.LNX.4.21.0005190955481.8452@penguin.example.com" "Text": "Pine.LNX.4.21.0005190955481.8452@penguin.example.com"
}, },
"content_disposition": { "content_description": {
"ContentType": { "Text": "A PNG graphic file"
"c_type": "attachment",
"c_subtype": null,
"attributes": {
"filename": "blueball.png"
}
}
},
"content_transfer_encoding": {
"Text": "BASE64"
}, },
"content_type": { "content_type": {
"ContentType": { "ContentType": {
@@ -1685,8 +1679,14 @@ Z3VldDZzO7wAAAAASUVORK5CYII=
} }
} }
}, },
"content_description": { "content_disposition": {
"Text": "A PNG graphic file" "ContentType": {
"c_type": "attachment",
"c_subtype": null,
"attributes": {
"filename": "blueball.png"
}
}
} }
}, },
"is_encoding_problem": false, "is_encoding_problem": false,
+15 -15
View File
@@ -134,15 +134,12 @@ eSBZdmVzIFBpZ3VldDZzO7wAAAAASUVORK5CYII=
---- EXPECTED STRUCTURE ----{ ---- EXPECTED STRUCTURE ----{
"headers_rfc": { "headers_rfc": {
"mime_version": {
"Text": "1.0"
},
"subject": { "subject": {
"Text": "Test message from Netscape Communicator 4.7" "Text": "Test message from Netscape Communicator 4.7"
}, },
"to": {
"Address": {
"name": "Joe Blow",
"address": "blow@example.com"
}
},
"content_type": { "content_type": {
"ContentType": { "ContentType": {
"c_type": "multipart", "c_type": "multipart",
@@ -152,8 +149,17 @@ eSBZdmVzIFBpZ3VldDZzO7wAAAAASUVORK5CYII=
} }
} }
}, },
"mime_version": { "to": {
"Text": "1.0" "Address": {
"name": "Joe Blow",
"address": "blow@example.com"
}
},
"from": {
"Address": {
"name": "Doug Sauder",
"address": "dwsauder@example.com"
}
}, },
"date": { "date": {
"DateTime": { "DateTime": {
@@ -170,12 +176,6 @@ eSBZdmVzIFBpZ3VldDZzO7wAAAAASUVORK5CYII=
}, },
"message_id": { "message_id": {
"Text": "39235EAD.E48E2160@example.com" "Text": "39235EAD.E48E2160@example.com"
},
"from": {
"Address": {
"name": "Doug Sauder",
"address": "dwsauder@example.com"
}
} }
}, },
"html_body": [ "html_body": [
@@ -245,7 +245,7 @@ eSBZdmVzIFBpZ3VldDZzO7wAAAAASUVORK5CYII=
} }
}, },
"is_encoding_problem": false, "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&ouml;sche</b>\r\n<p>Die Hasen klagten einst &uuml;ber ihre mi&szlig;liche Lage; \"wir leben\",\r\nsprach ein Redner, \"in steter Furcht vor Menschen und Tieren, eine Beute\r\nder Hunde, der Adler, ja fast aller Raubtiere! Unsere stete Angst ist &auml;rger\r\nals der Tod selbst. Auf, la&szlig;t uns ein f&uuml;r allemal sterben.\"\r\n<p>In einem nahen Teich wollten sie sich nun ers&auml;ufen; sie eilten\r\nihm zu; allein das au&szlig;erordentliche Get&ouml;se und ihre wunderbare\r\nGestalt erschreckte eine Menge Fr&ouml;sche, die am Ufer sa&szlig;en, so\r\nsehr, da&szlig; sie aufs schnellste untertauchten.\r\n<p>\"Halt\", rief nun eben dieser Sprecher, \"wir wollen das Ers&auml;ufen\r\nnoch ein wenig aufschieben, denn auch uns f&uuml;rchten, wie ihr seht,\r\neinige Tiere, welche also wohl noch ungl&uuml;cklicher sein m&uuml;ssen\r\nals wir.\"\r\n<br>&nbsp;\r\n<br>&nbsp;</html>\r\n\r" "body": "<!doctype html public \"-//w3c//dtd html 4.0 transitional//en\">\r\n<html>\r\n<b>Die Hasen und die Fr&ouml;sche</b>\r\n<p>Die Hasen klagten einst &uuml;ber ihre mi&szlig;liche Lage; \"wir leben\",\r\nsprach ein Redner, \"in steter Furcht vor Menschen und Tieren, eine Beute\r\nder Hunde, der Adler, ja fast aller Raubtiere! Unsere stete Angst ist &auml;rger\r\nals der Tod selbst. Auf, la&szlig;t uns ein f&uuml;r allemal sterben.\"\r\n<p>In einem nahen Teich wollten sie sich nun ers&auml;ufen; sie eilten\r\nihm zu; allein das au&szlig;erordentliche Get&ouml;se und ihre wunderbare\r\nGestalt erschreckte eine Menge Fr&ouml;sche, die am Ufer sa&szlig;en, so\r\nsehr, da&szlig; sie aufs schnellste untertauchten.\r\n<p>\"Halt\", rief nun eben dieser Sprecher, \"wir wollen das Ers&auml;ufen\r\nnoch ein wenig aufschieben, denn auch uns f&uuml;rchten, wie ihr seht,\r\neinige Tiere, welche also wohl noch ungl&uuml;cklicher sein m&uuml;ssen\r\nals wir.\"\r\n<br>&nbsp;\r\n<br>&nbsp;</html>\r\n"
} }
}, },
{ {
+8 -8
View File
@@ -34,8 +34,8 @@ welche also wohl noch ungl=FCcklicher sein m=FCssen als wir."
---- EXPECTED STRUCTURE ----{ ---- EXPECTED STRUCTURE ----{
"headers_rfc": { "headers_rfc": {
"mime_version": { "message_id": {
"Text": "1.0" "Text": "392363E1.2AC47AB3@example.com"
}, },
"from": { "from": {
"Address": { "Address": {
@@ -43,18 +43,18 @@ welche also wohl noch ungl=FCcklicher sein m=FCssen als wir."
"address": "dwsauder@example.com" "address": "dwsauder@example.com"
} }
}, },
"mime_version": {
"Text": "1.0"
},
"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"
} }
}, },
"message_id": {
"Text": "392363E1.2AC47AB3@example.com"
},
"subject": {
"Text": "Test message from Netscape Communicator 4.7"
},
"date": { "date": {
"DateTime": { "DateTime": {
"year": 2000, "year": 2000,
+15 -15
View File
@@ -27,16 +27,10 @@ welche also wohl noch ungl+uKs-licher sein m+vLM-en als wir."
---- EXPECTED STRUCTURE ----{ ---- EXPECTED STRUCTURE ----{
"headers_rfc": { "headers_rfc": {
"message_id": { "to": {
"Text": "39236497.12FA2A89@example.com"
},
"subject": {
"Text": "Die Hasen und die Fr+APY-sche"
},
"from": {
"Address": { "Address": {
"name": "Doug Sauder", "name": "Heinz M+APw-ller",
"address": "dwsauder@example.com" "address": "mueller@example.com"
} }
}, },
"date": { "date": {
@@ -55,10 +49,16 @@ welche also wohl noch ungl+uKs-licher sein m+vLM-en als wir."
"mime_version": { "mime_version": {
"Text": "1.0" "Text": "1.0"
}, },
"to": { "subject": {
"Text": "Die Hasen und die Fr+APY-sche"
},
"message_id": {
"Text": "39236497.12FA2A89@example.com"
},
"from": {
"Address": { "Address": {
"name": "Heinz M+APw-ller", "name": "Doug Sauder",
"address": "mueller@example.com" "address": "dwsauder@example.com"
} }
} }
}, },
@@ -73,9 +73,6 @@ welche also wohl noch ungl+uKs-licher sein m+vLM-en als wir."
{ {
"Text": { "Text": {
"headers_rfc": { "headers_rfc": {
"content_transfer_encoding": {
"Text": "7bit"
},
"content_type": { "content_type": {
"ContentType": { "ContentType": {
"c_type": "text", "c_type": "text",
@@ -84,6 +81,9 @@ welche also wohl noch ungl+uKs-licher sein m+vLM-en als wir."
"charset": "UTF-7" "charset": "UTF-7"
} }
} }
},
"content_transfer_encoding": {
"Text": "7bit"
} }
}, },
"is_encoding_problem": false, "is_encoding_problem": false,
+43 -43
View File
@@ -213,11 +213,11 @@ YII=
---- EXPECTED STRUCTURE ----{ ---- EXPECTED STRUCTURE ----{
"headers_rfc": { "headers_rfc": {
"mime_version": { "to": {
"Text": "1.0" "Address": {
}, "name": "Heinz Müller",
"subject": { "address": "mueller@example.com"
"Text": "Die Hasen und die Frösche (Netscape Messenger 4.7)" }
}, },
"date": { "date": {
"DateTime": { "DateTime": {
@@ -232,6 +232,18 @@ YII=
"tz_minute": 0 "tz_minute": 0
} }
}, },
"from": {
"Address": {
"name": "Doug Sauder",
"address": "dwsauder@example.com"
}
},
"subject": {
"Text": "Die Hasen und die Frösche (Netscape Messenger 4.7)"
},
"mime_version": {
"Text": "1.0"
},
"content_type": { "content_type": {
"ContentType": { "ContentType": {
"c_type": "multipart", "c_type": "multipart",
@@ -241,20 +253,8 @@ YII=
} }
} }
}, },
"to": {
"Address": {
"name": "Heinz Müller",
"address": "mueller@example.com"
}
},
"message_id": { "message_id": {
"Text": "39235FC5.276CCE00@example.com" "Text": "39235FC5.276CCE00@example.com"
},
"from": {
"Address": {
"name": "Doug Sauder",
"address": "dwsauder@example.com"
}
} }
}, },
"html_body": [ "html_body": [
@@ -327,9 +327,6 @@ YII=
{ {
"Html": { "Html": {
"headers_rfc": { "headers_rfc": {
"content_transfer_encoding": {
"Text": "7bit"
},
"content_type": { "content_type": {
"ContentType": { "ContentType": {
"c_type": "text", "c_type": "text",
@@ -338,15 +335,21 @@ YII=
"charset": "us-ascii" "charset": "us-ascii"
} }
} }
},
"content_transfer_encoding": {
"Text": "7bit"
} }
}, },
"is_encoding_problem": false, "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&ouml;sche</b>\r\n<p>Die Hasen klagten einst &uuml;ber ihre mi&szlig;liche Lage; \"wir leben\",\r\nsprach ein Redner, \"in steter Furcht vor Menschen und Tieren, eine Beute\r\nder Hunde, der Adler, ja fast aller Raubtiere! Unsere stete Angst ist &auml;rger\r\nals der Tod selbst. Auf, la&szlig;t uns ein f&uuml;r allemal sterben.\"\r\n<p>In einem nahen Teich wollten sie sich nun ers&auml;ufen; sie eilten\r\nihm zu; allein das au&szlig;erordentliche Get&ouml;se und ihre wunderbare\r\nGestalt erschreckte eine Menge Fr&ouml;sche, die am Ufer sa&szlig;en, so\r\nsehr, da&szlig; sie aufs schnellste untertauchten.\r\n<p>\"Halt\", rief nun eben dieser Sprecher, \"wir wollen das Ers&auml;ufen\r\nnoch ein wenig aufschieben, denn auch uns f&uuml;rchten, wie ihr seht,\r\neinige Tiere, welche also wohl noch ungl&uuml;cklicher sein m&uuml;ssen\r\nals wir.\"\r\n<p><img SRC=\"cid:part2.39235FC5.E71D8178@example.com\" height=27 width=27>\r\n<br>&nbsp;\r\n<br>&nbsp;</html>\r\n\r" "body": "<!doctype html public \"-//w3c//dtd html 4.0 transitional//en\">\r\n<html>\r\n<img SRC=\"cid:part1.39235FC5.E71D8178@example.com\" ALT=\"blue ball\" height=27 width=27><b></b>\r\n<p><b>Die Hasen und die Fr&ouml;sche</b>\r\n<p>Die Hasen klagten einst &uuml;ber ihre mi&szlig;liche Lage; \"wir leben\",\r\nsprach ein Redner, \"in steter Furcht vor Menschen und Tieren, eine Beute\r\nder Hunde, der Adler, ja fast aller Raubtiere! Unsere stete Angst ist &auml;rger\r\nals der Tod selbst. Auf, la&szlig;t uns ein f&uuml;r allemal sterben.\"\r\n<p>In einem nahen Teich wollten sie sich nun ers&auml;ufen; sie eilten\r\nihm zu; allein das au&szlig;erordentliche Get&ouml;se und ihre wunderbare\r\nGestalt erschreckte eine Menge Fr&ouml;sche, die am Ufer sa&szlig;en, so\r\nsehr, da&szlig; sie aufs schnellste untertauchten.\r\n<p>\"Halt\", rief nun eben dieser Sprecher, \"wir wollen das Ers&auml;ufen\r\nnoch ein wenig aufschieben, denn auch uns f&uuml;rchten, wie ihr seht,\r\neinige Tiere, welche also wohl noch ungl&uuml;cklicher sein m&uuml;ssen\r\nals wir.\"\r\n<p><img SRC=\"cid:part2.39235FC5.E71D8178@example.com\" height=27 width=27>\r\n<br>&nbsp;\r\n<br>&nbsp;</html>\r\n"
} }
}, },
{ {
"Binary": { "Binary": {
"headers_rfc": { "headers_rfc": {
"content_id": {
"Text": "part1.39235FC5.E71D8178@example.com"
},
"content_type": { "content_type": {
"ContentType": { "ContentType": {
"c_type": "image", "c_type": "image",
@@ -354,9 +357,6 @@ YII=
"attributes": null "attributes": null
} }
}, },
"content_id": {
"Text": "part1.39235FC5.E71D8178@example.com"
},
"content_disposition": { "content_disposition": {
"ContentType": { "ContentType": {
"c_type": "inline", "c_type": "inline",
@@ -1703,9 +1703,19 @@ YII=
{ {
"Binary": { "Binary": {
"headers_rfc": { "headers_rfc": {
"content_type": {
"ContentType": {
"c_type": "image",
"c_subtype": "png",
"attributes": null
}
},
"content_id": { "content_id": {
"Text": "part2.39235FC5.E71D8178@example.com" "Text": "part2.39235FC5.E71D8178@example.com"
}, },
"content_transfer_encoding": {
"Text": "base64"
},
"content_disposition": { "content_disposition": {
"ContentType": { "ContentType": {
"c_type": "inline", "c_type": "inline",
@@ -1714,16 +1724,6 @@ YII=
"filename": "C:TEMPnsmail39.png" "filename": "C:TEMPnsmail39.png"
} }
} }
},
"content_type": {
"ContentType": {
"c_type": "image",
"c_subtype": "png",
"attributes": null
}
},
"content_transfer_encoding": {
"Text": "base64"
} }
}, },
"is_encoding_problem": false, "is_encoding_problem": false,
@@ -3187,6 +3187,15 @@ YII=
{ {
"InlineBinary": { "InlineBinary": {
"headers_rfc": { "headers_rfc": {
"content_disposition": {
"ContentType": {
"c_type": "inline",
"c_subtype": null,
"attributes": {
"filename": "redball.png"
}
}
},
"content_transfer_encoding": { "content_transfer_encoding": {
"Text": "base64" "Text": "base64"
}, },
@@ -3198,15 +3207,6 @@ YII=
"name": "redball.png" "name": "redball.png"
} }
} }
},
"content_disposition": {
"ContentType": {
"c_type": "inline",
"c_subtype": null,
"attributes": {
"filename": "redball.png"
}
}
} }
}, },
"is_encoding_problem": false, "is_encoding_problem": false,
+6 -6
View File
@@ -27,15 +27,18 @@ lche also wohl noch ungl=FCcklicher sein m=FCssen als wir."=20
---- EXPECTED STRUCTURE ----{ ---- EXPECTED STRUCTURE ----{
"headers_rfc": { "headers_rfc": {
"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"
} }
}, },
"message_id": {
"Text": "Pine.LNX.4.21.0005191014500.8452-100000@penguin.example.com"
},
"mime_version": {
"Text": "1.0"
},
"date": { "date": {
"DateTime": { "DateTime": {
"year": 2000, "year": 2000,
@@ -52,9 +55,6 @@ lche also wohl noch ungl=FCcklicher sein m=FCssen als wir."=20
"subject": { "subject": {
"Text": "Die Hasen und die Frösche" "Text": "Die Hasen und die Frösche"
}, },
"message_id": {
"Text": "Pine.LNX.4.21.0005191014500.8452-100000@penguin.example.com"
},
"from": { "from": {
"Address": { "Address": {
"name": "Doug Sauder", "name": "Doug Sauder",
+19 -19
View File
@@ -52,8 +52,20 @@ eSBZdmVzIFBpZ3VldDZzO7wAAAAASUVORK5CYII=
---- EXPECTED STRUCTURE ----{ ---- EXPECTED STRUCTURE ----{
"headers_rfc": { "headers_rfc": {
"mime_version": { "content_type": {
"Text": "1.0" "ContentType": {
"c_type": "multipart",
"c_subtype": "mixed",
"attributes": {
"boundary": "------------E7889DDF0F75D34163841C59"
}
}
},
"from": {
"Address": {
"name": "Doug Sauder",
"address": "dwsauder@example.com"
}
}, },
"message_id": { "message_id": {
"Text": "392366A7.21929EA7@example.com" "Text": "392366A7.21929EA7@example.com"
@@ -71,14 +83,8 @@ eSBZdmVzIFBpZ3VldDZzO7wAAAAASUVORK5CYII=
"tz_minute": 0 "tz_minute": 0
} }
}, },
"from": { "mime_version": {
"Address": { "Text": "1.0"
"name": "Doug Sauder",
"address": "dwsauder@example.com"
}
},
"subject": {
"Text": "Test message from Netscape Communicator 4.7"
}, },
"to": { "to": {
"Address": { "Address": {
@@ -86,14 +92,8 @@ eSBZdmVzIFBpZ3VldDZzO7wAAAAASUVORK5CYII=
"address": "blow@example.com" "address": "blow@example.com"
} }
}, },
"content_type": { "subject": {
"ContentType": { "Text": "Test message from Netscape Communicator 4.7"
"c_type": "multipart",
"c_subtype": "mixed",
"attributes": {
"boundary": "------------E7889DDF0F75D34163841C59"
}
}
} }
}, },
"html_body": [ "html_body": [
@@ -125,7 +125,7 @@ eSBZdmVzIFBpZ3VldDZzO7wAAAAASUVORK5CYII=
} }
}, },
"is_encoding_problem": false, "is_encoding_problem": false,
"body": " \r" "body": " "
} }
}, },
{ {
+11 -11
View File
@@ -18,12 +18,18 @@ Slow but steady wins the race.
---- EXPECTED STRUCTURE ----{ ---- EXPECTED STRUCTURE ----{
"headers_rfc": { "headers_rfc": {
"from": {
"Address": {
"name": "Doug Sauder",
"address": "dwsauder@example.com"
}
},
"mime_version": {
"Text": "1.0"
},
"message_id": { "message_id": {
"Text": "3923625B.59F0C3AC@example.com" "Text": "3923625B.59F0C3AC@example.com"
}, },
"subject": {
"Text": "Test message from Netscape Communicator 4.7"
},
"to": { "to": {
"Address": { "Address": {
"name": "Joe Blow", "name": "Joe Blow",
@@ -43,14 +49,8 @@ Slow but steady wins the race.
"tz_minute": 0 "tz_minute": 0
} }
}, },
"from": { "subject": {
"Address": { "Text": "Test message from Netscape Communicator 4.7"
"name": "Doug Sauder",
"address": "dwsauder@example.com"
}
},
"mime_version": {
"Text": "1.0"
} }
}, },
"html_body": [ "html_body": [
+35 -35
View File
@@ -172,20 +172,8 @@ eSBZdmVzIFBpZ3VldDZzO7wAAAAASUVORK5CYII=
---- EXPECTED STRUCTURE ----{ ---- EXPECTED STRUCTURE ----{
"headers_rfc": { "headers_rfc": {
"mime_version": { "subject": {
"Text": "1.0" "Text": "Test message from Netscape Communicator 4.7"
},
"to": {
"Address": {
"name": "Jürgen Schmürgen",
"address": "schmuergen@example.com"
}
},
"from": {
"Address": {
"name": "Doug Sauder",
"address": "dwsauder@example.com"
}
}, },
"content_type": { "content_type": {
"ContentType": { "ContentType": {
@@ -196,6 +184,12 @@ eSBZdmVzIFBpZ3VldDZzO7wAAAAASUVORK5CYII=
} }
} }
}, },
"from": {
"Address": {
"name": "Doug Sauder",
"address": "dwsauder@example.com"
}
},
"message_id": { "message_id": {
"Text": "39236103.FFE674FC@example.com" "Text": "39236103.FFE674FC@example.com"
}, },
@@ -212,8 +206,14 @@ eSBZdmVzIFBpZ3VldDZzO7wAAAAASUVORK5CYII=
"tz_minute": 0 "tz_minute": 0
} }
}, },
"subject": { "mime_version": {
"Text": "Test message from Netscape Communicator 4.7" "Text": "1.0"
},
"to": {
"Address": {
"name": "Jürgen Schmürgen",
"address": "schmuergen@example.com"
}
} }
}, },
"html_body": [ "html_body": [
@@ -265,15 +265,12 @@ eSBZdmVzIFBpZ3VldDZzO7wAAAAASUVORK5CYII=
} }
}, },
"is_encoding_problem": false, "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&ouml;sche</font></b>\r\n<p>Die Hasen klagten einst &uuml;ber ihre mi&szlig;liche Lage; \"wir leben\",\r\nsprach ein Redner, \"in steter Furcht vor Menschen und Tieren, eine Beute\r\nder Hunde, der Adler, ja fast aller Raubtiere! Unsere stete Angst ist &auml;rger\r\nals der Tod selbst. Auf, la&szlig;t uns ein f&uuml;r allemal sterben.\"\r\n<p>In einem nahen Teich wollten sie sich nun ers&auml;ufen; sie eilten\r\nihm zu; allein das au&szlig;erordentliche Get&ouml;se und ihre wunderbare\r\nGestalt erschreckte eine Menge Fr&ouml;sche, die am Ufer sa&szlig;en, so\r\nsehr, da&szlig; sie aufs schnellste untertauchten.\r\n<p>\"Halt\", rief nun eben dieser Sprecher, \"wir wollen das Ers&auml;ufen\r\nnoch ein wenig aufschieben, denn auch uns f&uuml;rchten, wie ihr seht,\r\neinige Tiere, welche also wohl noch ungl&uuml;cklicher sein m&uuml;ssen\r\nals wir.\"\r\n<p><img SRC=\"cid:part2.39236103.1B697A54@example.com\" ALT=\"red ball\" height=27 width=27></html>\r\n\r" "body": "<!doctype html public \"-//w3c//dtd html 4.0 transitional//en\">\r\n<html>\r\n<img SRC=\"cid:part1.39236103.1B697A54@example.com\" ALT=\"blue ball\" height=27 width=27><b></b>\r\n<p><b><font size=+2>Die Hasen und die Fr&ouml;sche</font></b>\r\n<p>Die Hasen klagten einst &uuml;ber ihre mi&szlig;liche Lage; \"wir leben\",\r\nsprach ein Redner, \"in steter Furcht vor Menschen und Tieren, eine Beute\r\nder Hunde, der Adler, ja fast aller Raubtiere! Unsere stete Angst ist &auml;rger\r\nals der Tod selbst. Auf, la&szlig;t uns ein f&uuml;r allemal sterben.\"\r\n<p>In einem nahen Teich wollten sie sich nun ers&auml;ufen; sie eilten\r\nihm zu; allein das au&szlig;erordentliche Get&ouml;se und ihre wunderbare\r\nGestalt erschreckte eine Menge Fr&ouml;sche, die am Ufer sa&szlig;en, so\r\nsehr, da&szlig; sie aufs schnellste untertauchten.\r\n<p>\"Halt\", rief nun eben dieser Sprecher, \"wir wollen das Ers&auml;ufen\r\nnoch ein wenig aufschieben, denn auch uns f&uuml;rchten, wie ihr seht,\r\neinige Tiere, welche also wohl noch ungl&uuml;cklicher sein m&uuml;ssen\r\nals wir.\"\r\n<p><img SRC=\"cid:part2.39236103.1B697A54@example.com\" ALT=\"red ball\" height=27 width=27></html>\r\n"
} }
}, },
{ {
"Binary": { "Binary": {
"headers_rfc": { "headers_rfc": {
"content_id": {
"Text": "part1.39236103.1B697A54@example.com"
},
"content_type": { "content_type": {
"ContentType": { "ContentType": {
"c_type": "image", "c_type": "image",
@@ -281,6 +278,9 @@ eSBZdmVzIFBpZ3VldDZzO7wAAAAASUVORK5CYII=
"attributes": null "attributes": null
} }
}, },
"content_id": {
"Text": "part1.39236103.1B697A54@example.com"
},
"content_disposition": { "content_disposition": {
"ContentType": { "ContentType": {
"c_type": "inline", "c_type": "inline",
@@ -1627,6 +1627,9 @@ eSBZdmVzIFBpZ3VldDZzO7wAAAAASUVORK5CYII=
{ {
"Binary": { "Binary": {
"headers_rfc": { "headers_rfc": {
"content_transfer_encoding": {
"Text": "base64"
},
"content_type": { "content_type": {
"ContentType": { "ContentType": {
"c_type": "image", "c_type": "image",
@@ -1634,9 +1637,6 @@ eSBZdmVzIFBpZ3VldDZzO7wAAAAASUVORK5CYII=
"attributes": null "attributes": null
} }
}, },
"content_transfer_encoding": {
"Text": "base64"
},
"content_id": { "content_id": {
"Text": "part2.39236103.1B697A54@example.com" "Text": "part2.39236103.1B697A54@example.com"
}, },
@@ -3120,9 +3120,6 @@ eSBZdmVzIFBpZ3VldDZzO7wAAAAASUVORK5CYII=
} }
} }
}, },
"content_transfer_encoding": {
"Text": "base64"
},
"content_disposition": { "content_disposition": {
"ContentType": { "ContentType": {
"c_type": "inline", "c_type": "inline",
@@ -3131,6 +3128,9 @@ eSBZdmVzIFBpZ3VldDZzO7wAAAAASUVORK5CYII=
"filename": "greenball.png" "filename": "greenball.png"
} }
} }
},
"content_transfer_encoding": {
"Text": "base64"
} }
}, },
"is_encoding_problem": false, "is_encoding_problem": false,
@@ -4439,6 +4439,15 @@ eSBZdmVzIFBpZ3VldDZzO7wAAAAASUVORK5CYII=
{ {
"InlineBinary": { "InlineBinary": {
"headers_rfc": { "headers_rfc": {
"content_disposition": {
"ContentType": {
"c_type": "inline",
"c_subtype": null,
"attributes": {
"filename": "blueball.png"
}
}
},
"content_type": { "content_type": {
"ContentType": { "ContentType": {
"c_type": "image", "c_type": "image",
@@ -4450,15 +4459,6 @@ eSBZdmVzIFBpZ3VldDZzO7wAAAAASUVORK5CYII=
}, },
"content_transfer_encoding": { "content_transfer_encoding": {
"Text": "base64" "Text": "base64"
},
"content_disposition": {
"ContentType": {
"c_type": "inline",
"c_subtype": null,
"attributes": {
"filename": "blueball.png"
}
}
} }
}, },
"is_encoding_problem": false, "is_encoding_problem": false,
+12 -12
View File
@@ -29,15 +29,6 @@ n wenig aufschieben, denn auch uns f=FCrchten, wie ihr seht, einige Tiere=
---- EXPECTED STRUCTURE ----{ ---- EXPECTED STRUCTURE ----{
"headers_rfc": { "headers_rfc": {
"mime_version": {
"Text": "1.0"
},
"from": {
"Address": {
"name": "Doug Sauder",
"address": "dwsauder@example.com"
}
},
"date": { "date": {
"DateTime": { "DateTime": {
"year": 2000, "year": 2000,
@@ -54,14 +45,23 @@ n wenig aufschieben, denn auch uns f=FCrchten, wie ihr seht, einige Tiere=
"message_id": { "message_id": {
"Text": "39236653.CAA8A090@example.com" "Text": "39236653.CAA8A090@example.com"
}, },
"from": {
"Address": {
"name": "Doug Sauder",
"address": "dwsauder@example.com"
}
},
"mime_version": {
"Text": "1.0"
},
"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"
} }
},
"subject": {
"Text": "Die Hasen und die Frösche"
} }
}, },
"html_body": [ "html_body": [
+27 -27
View File
@@ -58,6 +58,12 @@ vAAAAABJRU5ErkJggg==
---- EXPECTED STRUCTURE ----{ ---- EXPECTED STRUCTURE ----{
"headers_rfc": { "headers_rfc": {
"from": {
"Address": {
"name": "Doug Sauder",
"address": "doug@penguin.example.com"
}
},
"date": { "date": {
"DateTime": { "DateTime": {
"year": 2000, "year": 2000,
@@ -71,21 +77,12 @@ vAAAAABJRU5ErkJggg==
"tz_minute": 0 "tz_minute": 0
} }
}, },
"from": {
"Address": {
"name": "Doug Sauder",
"address": "doug@penguin.example.com"
}
},
"to": {
"Address": {
"name": "Heinz Müller",
"address": "mueller@example.com"
}
},
"mime_version": { "mime_version": {
"Text": "1.0" "Text": "1.0"
}, },
"subject": {
"Text": "PNG graphic"
},
"content_type": { "content_type": {
"ContentType": { "ContentType": {
"c_type": "multipart", "c_type": "multipart",
@@ -95,11 +92,14 @@ vAAAAABJRU5ErkJggg==
} }
} }
}, },
"subject": {
"Text": "PNG graphic"
},
"message_id": { "message_id": {
"Text": "Pine.LNX.4.21.0005191019440.8452-101000@penguin.example.com" "Text": "Pine.LNX.4.21.0005191019440.8452-101000@penguin.example.com"
},
"to": {
"Address": {
"name": "Heinz Müller",
"address": "mueller@example.com"
}
} }
}, },
"html_body": [ "html_body": [
@@ -126,7 +126,7 @@ vAAAAABJRU5ErkJggg==
} }
}, },
"is_encoding_problem": false, "is_encoding_problem": false,
"body": "\r" "body": "\n"
} }
}, },
{ {
@@ -135,18 +135,12 @@ vAAAAABJRU5ErkJggg==
"content_transfer_encoding": { "content_transfer_encoding": {
"Text": "BASE64" "Text": "BASE64"
}, },
"content_description": {
"Text": "red ball"
},
"content_id": { "content_id": {
"Text": "Pine.LNX.4.21.0005191023160.8452@penguin.example.com" "Text": "Pine.LNX.4.21.0005191023160.8452@penguin.example.com"
}, },
"content_type": {
"ContentType": {
"c_type": "application",
"c_subtype": "octet-stream",
"attributes": {
"name": "redball.png"
}
}
},
"content_disposition": { "content_disposition": {
"ContentType": { "ContentType": {
"c_type": "attachment", "c_type": "attachment",
@@ -156,8 +150,14 @@ vAAAAABJRU5ErkJggg==
} }
} }
}, },
"content_description": { "content_type": {
"Text": "red ball" "ContentType": {
"c_type": "application",
"c_subtype": "octet-stream",
"attributes": {
"name": "redball.png"
}
}
} }
}, },
"is_encoding_problem": false, "is_encoding_problem": false,
+28 -28
View File
@@ -59,13 +59,16 @@ Birds of a feather flock together.
---- EXPECTED STRUCTURE ----{ ---- EXPECTED STRUCTURE ----{
"headers_rfc": { "headers_rfc": {
"content_type": { "message_id": {
"ContentType": { "Text": "3923686C.99FB5E36@example.com"
"c_type": "multipart", },
"c_subtype": "mixed", "mime_version": {
"attributes": { "Text": "1.0"
"boundary": "------------77060D866A66DC8D0921E051" },
} "to": {
"Address": {
"name": "Joe Blow",
"address": "blow@example.com"
} }
}, },
"subject": { "subject": {
@@ -90,16 +93,13 @@ Birds of a feather flock together.
"address": "dwsauder@example.com" "address": "dwsauder@example.com"
} }
}, },
"mime_version": { "content_type": {
"Text": "1.0" "ContentType": {
}, "c_type": "multipart",
"message_id": { "c_subtype": "mixed",
"Text": "3923686C.99FB5E36@example.com" "attributes": {
}, "boundary": "------------77060D866A66DC8D0921E051"
"to": { }
"Address": {
"name": "Joe Blow",
"address": "blow@example.com"
} }
} }
}, },
@@ -130,12 +130,21 @@ Birds of a feather flock together.
} }
}, },
"is_encoding_problem": false, "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" "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": { "Text": {
"headers_rfc": { "headers_rfc": {
"content_disposition": {
"ContentType": {
"c_type": "inline",
"c_subtype": null,
"attributes": {
"filename": "farmerandstork.txt"
}
}
},
"content_transfer_encoding": { "content_transfer_encoding": {
"Text": "7bit" "Text": "7bit"
}, },
@@ -148,19 +157,10 @@ Birds of a feather flock together.
"name": "farmerandstork.txt" "name": "farmerandstork.txt"
} }
} }
},
"content_disposition": {
"ContentType": {
"c_type": "inline",
"c_subtype": null,
"attributes": {
"filename": "farmerandstork.txt"
}
}
} }
}, },
"is_encoding_problem": false, "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\r" "body": "\r\nThe Farmer and the Stork \r\n \r\nA FARMER placed nets on his newly-sown plowlands and caught a\r\nnumber of Cranes, which came to pick up his seed. With them he\r\ntrapped a Stork that had fractured his leg in the net and was\r\nearnestly beseeching the Farmer to spare his life. \"Pray save\r\nme, Master,\" he said, \"and let me go free this once. My broken\r\nlimb should excite your pity. Besides, I am no Crane, I am a\r\nStork, a bird of excellent character; and see how I love and\r\nslave for my father and mother. Look too, at my feathers--\r\nthey are not the least like those of a Crane.\" The Farmer \r\nlaughed aloud and said, \"It may be all as you say, I only know \r\nthis: I have taken you with these robbers, the Cranes, and you \r\nmust die in their company.\" \r\n \r\nBirds of a feather flock together. \r\n"
} }
} }
], ],
+25 -25
View File
@@ -62,33 +62,15 @@ als wir."
---- EXPECTED STRUCTURE ----{ ---- EXPECTED STRUCTURE ----{
"headers_rfc": { "headers_rfc": {
"subject": {
"Text": "Die Hasen und die Frösche (Netscape Communicator 4.7)"
},
"from": { "from": {
"Address": { "Address": {
"name": "Doug Sauder", "name": "Doug Sauder",
"address": "dwsauder@example.com" "address": "dwsauder@example.com"
} }
}, },
"subject": {
"Text": "Die Hasen und die Frösche (Netscape Communicator 4.7)"
},
"mime_version": {
"Text": "1.0"
},
"to": {
"Address": {
"name": "Heinz Müller",
"address": "mueller@example.com"
}
},
"content_type": {
"ContentType": {
"c_type": "multipart",
"c_subtype": "alternative",
"attributes": {
"boundary": "------------9D454F23DA86BCD63FA3805F"
}
}
},
"date": { "date": {
"DateTime": { "DateTime": {
"year": 2000, "year": 2000,
@@ -102,8 +84,26 @@ als wir."
"tz_minute": 0 "tz_minute": 0
} }
}, },
"mime_version": {
"Text": "1.0"
},
"content_type": {
"ContentType": {
"c_type": "multipart",
"c_subtype": "alternative",
"attributes": {
"boundary": "------------9D454F23DA86BCD63FA3805F"
}
}
},
"message_id": { "message_id": {
"Text": "392359CF.DFF4527@example.com" "Text": "392359CF.DFF4527@example.com"
},
"to": {
"Address": {
"name": "Heinz Müller",
"address": "mueller@example.com"
}
} }
}, },
"html_body": [ "html_body": [
@@ -137,9 +137,6 @@ als wir."
{ {
"Html": { "Html": {
"headers_rfc": { "headers_rfc": {
"content_transfer_encoding": {
"Text": "7bit"
},
"content_type": { "content_type": {
"ContentType": { "ContentType": {
"c_type": "text", "c_type": "text",
@@ -148,10 +145,13 @@ als wir."
"charset": "us-ascii" "charset": "us-ascii"
} }
} }
},
"content_transfer_encoding": {
"Text": "7bit"
} }
}, },
"is_encoding_problem": false, "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&ouml;sche</b>\r\n<p>Die Hasen klagten einst &uuml;ber ihre mi&szlig;liche Lage; \"wir leben\",\r\nsprach ein Redner, \"in steter Furcht vor Menschen und Tieren, eine Beute\r\nder Hunde, der Adler, ja fast aller Raubtiere! Unsere stete Angst ist &auml;rger\r\nals der Tod selbst. Auf, la&szlig;t uns ein f&uuml;r allemal sterben.\"\r\n<p>In einem nahen Teich wollten sie sich nun ers&auml;ufen; sie eilten\r\nihm zu; allein das au&szlig;erordentliche Get&ouml;se und ihre wunderbare\r\nGestalt erschreckte eine Menge Fr&ouml;sche, die am Ufer sa&szlig;en, so\r\nsehr, da&szlig; sie aufs schnellste untertauchten.\r\n<p>\"Halt\", rief nun eben dieser Sprecher, \"wir wollen das Ers&auml;ufen\r\nnoch ein wenig aufschieben, denn auch uns f&uuml;rchten, wie ihr seht,\r\neinige Tiere, welche also wohl noch ungl&uuml;cklicher sein m&uuml;ssen\r\nals wir.\"\r\n<br>&nbsp;\r\n<br>&nbsp;</html>\r\n\r" "body": "<!doctype html public \"-//w3c//dtd html 4.0 transitional//en\">\r\n<html>\r\n<b>Die Hasen und die Fr&ouml;sche</b>\r\n<p>Die Hasen klagten einst &uuml;ber ihre mi&szlig;liche Lage; \"wir leben\",\r\nsprach ein Redner, \"in steter Furcht vor Menschen und Tieren, eine Beute\r\nder Hunde, der Adler, ja fast aller Raubtiere! Unsere stete Angst ist &auml;rger\r\nals der Tod selbst. Auf, la&szlig;t uns ein f&uuml;r allemal sterben.\"\r\n<p>In einem nahen Teich wollten sie sich nun ers&auml;ufen; sie eilten\r\nihm zu; allein das au&szlig;erordentliche Get&ouml;se und ihre wunderbare\r\nGestalt erschreckte eine Menge Fr&ouml;sche, die am Ufer sa&szlig;en, so\r\nsehr, da&szlig; sie aufs schnellste untertauchten.\r\n<p>\"Halt\", rief nun eben dieser Sprecher, \"wir wollen das Ers&auml;ufen\r\nnoch ein wenig aufschieben, denn auch uns f&uuml;rchten, wie ihr seht,\r\neinige Tiere, welche also wohl noch ungl&uuml;cklicher sein m&uuml;ssen\r\nals wir.\"\r\n<br>&nbsp;\r\n<br>&nbsp;</html>\r\n"
} }
} }
], ],
+29 -29
View File
@@ -138,14 +138,17 @@ eSBZdmVzIFBpZ3VldDZzO7wAAAAASUVORK5CYII=
---- EXPECTED STRUCTURE ----{ ---- EXPECTED STRUCTURE ----{
"headers_rfc": { "headers_rfc": {
"from": { "message_id": {
"Text": "39235E1C.1DC7EA90@example.com"
},
"to": {
"Address": { "Address": {
"name": "Doug Sauder", "name": "Joe Blow",
"address": "dwsauder@example.com" "address": "blow@example.com"
} }
}, },
"subject": { "mime_version": {
"Text": "Test message from Netscape Communicator 4.7" "Text": "1.0"
}, },
"content_type": { "content_type": {
"ContentType": { "ContentType": {
@@ -156,9 +159,6 @@ eSBZdmVzIFBpZ3VldDZzO7wAAAAASUVORK5CYII=
} }
} }
}, },
"message_id": {
"Text": "39235E1C.1DC7EA90@example.com"
},
"date": { "date": {
"DateTime": { "DateTime": {
"year": 2000, "year": 2000,
@@ -172,14 +172,14 @@ eSBZdmVzIFBpZ3VldDZzO7wAAAAASUVORK5CYII=
"tz_minute": 0 "tz_minute": 0
} }
}, },
"mime_version": { "from": {
"Text": "1.0"
},
"to": {
"Address": { "Address": {
"name": "Joe Blow", "name": "Doug Sauder",
"address": "blow@example.com" "address": "dwsauder@example.com"
} }
},
"subject": {
"Text": "Test message from Netscape Communicator 4.7"
} }
}, },
"html_body": [ "html_body": [
@@ -1706,18 +1706,6 @@ eSBZdmVzIFBpZ3VldDZzO7wAAAAASUVORK5CYII=
{ {
"InlineBinary": { "InlineBinary": {
"headers_rfc": { "headers_rfc": {
"content_disposition": {
"ContentType": {
"c_type": "inline",
"c_subtype": null,
"attributes": {
"filename": "greenball.png"
}
}
},
"content_transfer_encoding": {
"Text": "base64"
},
"content_type": { "content_type": {
"ContentType": { "ContentType": {
"c_type": "image", "c_type": "image",
@@ -1726,6 +1714,18 @@ eSBZdmVzIFBpZ3VldDZzO7wAAAAASUVORK5CYII=
"name": "greenball.png" "name": "greenball.png"
} }
} }
},
"content_transfer_encoding": {
"Text": "base64"
},
"content_disposition": {
"ContentType": {
"c_type": "inline",
"c_subtype": null,
"attributes": {
"filename": "greenball.png"
}
}
} }
}, },
"is_encoding_problem": false, "is_encoding_problem": false,
@@ -3034,6 +3034,9 @@ eSBZdmVzIFBpZ3VldDZzO7wAAAAASUVORK5CYII=
{ {
"InlineBinary": { "InlineBinary": {
"headers_rfc": { "headers_rfc": {
"content_transfer_encoding": {
"Text": "base64"
},
"content_disposition": { "content_disposition": {
"ContentType": { "ContentType": {
"c_type": "inline", "c_type": "inline",
@@ -3051,9 +3054,6 @@ eSBZdmVzIFBpZ3VldDZzO7wAAAAASUVORK5CYII=
"name": "blueball.png" "name": "blueball.png"
} }
} }
},
"content_transfer_encoding": {
"Text": "base64"
} }
}, },
"is_encoding_problem": false, "is_encoding_problem": false,
+27 -27
View File
@@ -43,6 +43,15 @@ bGljaGVyIHNlaW4gbfxzc2VuIGFscyB3aXIuIiANDQoNDQo=
---- EXPECTED STRUCTURE ----{ ---- EXPECTED STRUCTURE ----{
"headers_rfc": { "headers_rfc": {
"from": {
"Address": {
"name": "Doug Sauder",
"address": "doug@penguin.example.com"
}
},
"mime_version": {
"Text": "1.0"
},
"content_type": { "content_type": {
"ContentType": { "ContentType": {
"c_type": "multipart", "c_type": "multipart",
@@ -52,8 +61,8 @@ bGljaGVyIHNlaW4gbfxzc2VuIGFscyB3aXIuIiANDQoNDQo=
} }
} }
}, },
"subject": { "message_id": {
"Text": "Die Hasen und die Frösche" "Text": "Pine.LNX.4.21.0005191024380.8452-200000@penguin.example.com"
}, },
"to": { "to": {
"AddressList": [ "AddressList": [
@@ -67,11 +76,8 @@ bGljaGVyIHNlaW4gbfxzc2VuIGFscyB3aXIuIiANDQoNDQo=
} }
] ]
}, },
"from": { "subject": {
"Address": { "Text": "Die Hasen und die Frösche"
"name": "Doug Sauder",
"address": "doug@penguin.example.com"
}
}, },
"date": { "date": {
"DateTime": { "DateTime": {
@@ -85,12 +91,6 @@ bGljaGVyIHNlaW4gbfxzc2VuIGFscyB3aXIuIiANDQoNDQo=
"tz_hour": 4, "tz_hour": 4,
"tz_minute": 0 "tz_minute": 0
} }
},
"message_id": {
"Text": "Pine.LNX.4.21.0005191024380.8452-200000@penguin.example.com"
},
"mime_version": {
"Text": "1.0"
} }
}, },
"html_body": [ "html_body": [
@@ -117,22 +117,12 @@ bGljaGVyIHNlaW4gbfxzc2VuIGFscyB3aXIuIiANDQoNDQo=
} }
}, },
"is_encoding_problem": false, "is_encoding_problem": false,
"body": "\r" "body": "\n"
} }
}, },
{ {
"Text": { "Text": {
"headers_rfc": { "headers_rfc": {
"content_type": {
"ContentType": {
"c_type": "text",
"c_subtype": "plain",
"attributes": {
"charset": "iso-8859-1",
"name": "HasenundFrösche.txt"
}
}
},
"content_disposition": { "content_disposition": {
"ContentType": { "ContentType": {
"c_type": "attachment", "c_type": "attachment",
@@ -142,14 +132,24 @@ bGljaGVyIHNlaW4gbfxzc2VuIGFscyB3aXIuIiANDQoNDQo=
} }
} }
}, },
"content_transfer_encoding": {
"Text": "BASE64"
},
"content_id": { "content_id": {
"Text": "Pine.LNX.4.21.0005191026120.8452@penguin.example.com" "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": { "content_description": {
"Text": "Short story in German" "Text": "Short story in German"
},
"content_transfer_encoding": {
"Text": "BASE64"
} }
}, },
"is_encoding_problem": false, "is_encoding_problem": false,
+9 -9
View File
@@ -33,6 +33,9 @@ welche also wohl noch ungl=FCcklicher sein m=FCssen als wir."
---- EXPECTED STRUCTURE ----{ ---- EXPECTED STRUCTURE ----{
"headers_rfc": { "headers_rfc": {
"message_id": {
"Text": "3923561C.B7078DEF@example.com"
},
"date": { "date": {
"DateTime": { "DateTime": {
"year": 2000, "year": 2000,
@@ -46,21 +49,18 @@ welche also wohl noch ungl=FCcklicher sein m=FCssen als wir."
"tz_minute": 0 "tz_minute": 0
} }
}, },
"message_id": {
"Text": "3923561C.B7078DEF@example.com"
},
"subject": {
"Text": "Die Hasen und die Frösche (Netscape Communicator 4.7)"
},
"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"
} }
}, },
"mime_version": {
"Text": "1.0"
},
"subject": {
"Text": "Die Hasen und die Frösche (Netscape Communicator 4.7)"
},
"from": { "from": {
"Address": { "Address": {
"name": "Doug Sauder", "name": "Doug Sauder",
+31 -31
View File
@@ -61,8 +61,29 @@ n wenig aufschieben, denn auch uns f=FCrchten, wie ihr seht, einige Tiere=
---- EXPECTED STRUCTURE ----{ ---- EXPECTED STRUCTURE ----{
"headers_rfc": { "headers_rfc": {
"mime_version": { "to": {
"Text": "1.0" "Address": {
"name": "Joe Blow",
"address": "blow@example.com"
}
},
"content_type": {
"ContentType": {
"c_type": "multipart",
"c_subtype": "mixed",
"attributes": {
"boundary": "------------CA611088711119FBDB3473B4"
}
}
},
"message_id": {
"Text": "392367BC.3D075C95@example.com"
},
"from": {
"Address": {
"name": "Doug Sauder",
"address": "dwsauder@example.com"
}
}, },
"date": { "date": {
"DateTime": { "DateTime": {
@@ -80,29 +101,8 @@ n wenig aufschieben, denn auch uns f=FCrchten, wie ihr seht, einige Tiere=
"subject": { "subject": {
"Text": "Test message from Netscape Communicator 4.7" "Text": "Test message from Netscape Communicator 4.7"
}, },
"from": { "mime_version": {
"Address": { "Text": "1.0"
"name": "Doug Sauder",
"address": "dwsauder@example.com"
}
},
"message_id": {
"Text": "392367BC.3D075C95@example.com"
},
"to": {
"Address": {
"name": "Joe Blow",
"address": "blow@example.com"
}
},
"content_type": {
"ContentType": {
"c_type": "multipart",
"c_subtype": "mixed",
"attributes": {
"boundary": "------------CA611088711119FBDB3473B4"
}
}
} }
}, },
"html_body": [ "html_body": [
@@ -132,25 +132,25 @@ n wenig aufschieben, denn auch uns f=FCrchten, wie ihr seht, einige Tiere=
} }
}, },
"is_encoding_problem": false, "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" "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": { "Text": {
"headers_rfc": { "headers_rfc": {
"content_transfer_encoding": {
"Text": "quoted-printable"
},
"content_type": { "content_type": {
"ContentType": { "ContentType": {
"c_type": "text", "c_type": "text",
"c_subtype": "plain", "c_subtype": "plain",
"attributes": { "attributes": {
"charset": "iso-8859-1", "name": "HasenundFrösche.txt",
"name": "HasenundFrösche.txt" "charset": "iso-8859-1"
} }
} }
}, },
"content_transfer_encoding": {
"Text": "quoted-printable"
},
"content_disposition": { "content_disposition": {
"ContentType": { "ContentType": {
"c_type": "inline", "c_type": "inline",
+36 -39
View File
@@ -156,6 +156,24 @@ end
---- EXPECTED STRUCTURE ----{ ---- EXPECTED STRUCTURE ----{
"headers_rfc": { "headers_rfc": {
"mime_version": {
"Text": "1.0"
},
"content_type": {
"ContentType": {
"c_type": "multipart",
"c_subtype": "mixed",
"attributes": {
"boundary": "------------177483472E7788F4AD46AB1A"
}
}
},
"from": {
"Address": {
"name": "Doug Sauder",
"address": "dwsauder@example.com"
}
},
"date": { "date": {
"DateTime": { "DateTime": {
"year": 2000, "year": 2000,
@@ -169,18 +187,6 @@ end
"tz_minute": 0 "tz_minute": 0
} }
}, },
"from": {
"Address": {
"name": "Doug Sauder",
"address": "dwsauder@example.com"
}
},
"message_id": {
"Text": "3923670C.67D83A99@example.com"
},
"mime_version": {
"Text": "1.0"
},
"to": { "to": {
"Address": { "Address": {
"name": "Joe Blow", "name": "Joe Blow",
@@ -190,14 +196,8 @@ end
"subject": { "subject": {
"Text": "Test message from Netscape Communicator 4.7" "Text": "Test message from Netscape Communicator 4.7"
}, },
"content_type": { "message_id": {
"ContentType": { "Text": "3923670C.67D83A99@example.com"
"c_type": "multipart",
"c_subtype": "mixed",
"attributes": {
"boundary": "------------177483472E7788F4AD46AB1A"
}
}
} }
}, },
"html_body": [ "html_body": [
@@ -235,12 +235,15 @@ end
} }
}, },
"is_encoding_problem": false, "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" "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": { "InlineBinary": {
"headers_rfc": { "headers_rfc": {
"content_transfer_encoding": {
"Text": "x-uuencode"
},
"content_type": { "content_type": {
"ContentType": { "ContentType": {
"c_type": "image", "c_type": "image",
@@ -250,9 +253,6 @@ end
} }
} }
}, },
"content_transfer_encoding": {
"Text": "x-uuencode"
},
"content_disposition": { "content_disposition": {
"ContentType": { "ContentType": {
"c_type": "inline", "c_type": "inline",
@@ -2331,8 +2331,7 @@ end
110, 110,
100, 100,
13, 13,
10, 10
13
] ]
} }
}, },
@@ -4211,23 +4210,13 @@ end
110, 110,
100, 100,
13, 13,
10, 10
13
] ]
} }
}, },
{ {
"InlineBinary": { "InlineBinary": {
"headers_rfc": { "headers_rfc": {
"content_type": {
"ContentType": {
"c_type": "image",
"c_subtype": "png",
"attributes": {
"name": "blueball.png"
}
}
},
"content_disposition": { "content_disposition": {
"ContentType": { "ContentType": {
"c_type": "inline", "c_type": "inline",
@@ -4239,6 +4228,15 @@ end
}, },
"content_transfer_encoding": { "content_transfer_encoding": {
"Text": "x-uuencode" "Text": "x-uuencode"
},
"content_type": {
"ContentType": {
"c_type": "image",
"c_subtype": "png",
"attributes": {
"name": "blueball.png"
}
}
} }
}, },
"is_encoding_problem": false, "is_encoding_problem": false,
@@ -6129,8 +6127,7 @@ end
110, 110,
100, 100,
13, 13,
10, 10
13
] ]
} }
} }
+15 -15
View File
@@ -132,6 +132,21 @@ end
---- EXPECTED STRUCTURE ----{ ---- EXPECTED STRUCTURE ----{
"headers_rfc": { "headers_rfc": {
"from": {
"Address": {
"name": "Doug Sauder",
"address": "doug@example.com"
}
},
"to": {
"Address": {
"name": "Joe Blow",
"address": "jblow@example.com"
}
},
"message_id": {
"Text": "NDBBIAKOPKHFGPLCODIGIEKGCHAA.doug@example.com"
},
"subject": { "subject": {
"Text": "Test message from Microsoft Outlook 00" "Text": "Test message from Microsoft Outlook 00"
}, },
@@ -147,21 +162,6 @@ end
"tz_hour": 4, "tz_hour": 4,
"tz_minute": 0 "tz_minute": 0
} }
},
"message_id": {
"Text": "NDBBIAKOPKHFGPLCODIGIEKGCHAA.doug@example.com"
},
"to": {
"Address": {
"name": "Joe Blow",
"address": "jblow@example.com"
}
},
"from": {
"Address": {
"name": "Doug Sauder",
"address": "doug@example.com"
}
} }
}, },
"html_body": [ "html_body": [
+42 -42
View File
@@ -110,31 +110,6 @@ IFl2ZXMgUGlndWV0NnM7vAAAAABJRU5ErkJggg==
---- EXPECTED STRUCTURE ----{ ---- EXPECTED STRUCTURE ----{
"headers_rfc": { "headers_rfc": {
"date": {
"DateTime": {
"year": 2000,
"month": 5,
"day": 19,
"hour": 0,
"minute": 39,
"second": 36,
"tz_before_gmt": true,
"tz_hour": 4,
"tz_minute": 0
}
},
"from": {
"Address": {
"name": "Doug Sauder",
"address": "dwsauder@example.com"
}
},
"to": {
"Address": {
"name": "Heinz Müller",
"address": "mueller@example.com"
}
},
"mime_version": { "mime_version": {
"Text": "1.0" "Text": "1.0"
}, },
@@ -148,11 +123,36 @@ IFl2ZXMgUGlndWV0NnM7vAAAAABJRU5ErkJggg==
} }
} }
}, },
"message_id": {
"Text": "4.2.0.58.20000519003934.00a866f0@pop.example.com"
},
"from": {
"Address": {
"name": "Doug Sauder",
"address": "dwsauder@example.com"
}
},
"subject": { "subject": {
"Text": "Die Hasen und die Frösche" "Text": "Die Hasen und die Frösche"
}, },
"message_id": { "to": {
"Text": "4.2.0.58.20000519003934.00a866f0@pop.example.com" "Address": {
"name": "Heinz Müller",
"address": "mueller@example.com"
}
},
"date": {
"DateTime": {
"year": 2000,
"month": 5,
"day": 19,
"hour": 0,
"minute": 39,
"second": 36,
"tz_before_gmt": true,
"tz_hour": 4,
"tz_minute": 0
}
} }
}, },
"html_body": [ "html_body": [
@@ -169,6 +169,9 @@ IFl2ZXMgUGlndWV0NnM7vAAAAABJRU5ErkJggg==
{ {
"Html": { "Html": {
"headers_rfc": { "headers_rfc": {
"content_transfer_encoding": {
"Text": "quoted-printable"
},
"content_type": { "content_type": {
"ContentType": { "ContentType": {
"c_type": "text", "c_type": "text",
@@ -177,9 +180,6 @@ IFl2ZXMgUGlndWV0NnM7vAAAAABJRU5ErkJggg==
"charset": "iso-8859-1" "charset": "iso-8859-1"
} }
} }
},
"content_transfer_encoding": {
"Text": "quoted-printable"
} }
}, },
"is_encoding_problem": false, "is_encoding_problem": false,
@@ -189,6 +189,12 @@ IFl2ZXMgUGlndWV0NnM7vAAAAABJRU5ErkJggg==
{ {
"Binary": { "Binary": {
"headers_rfc": { "headers_rfc": {
"content_transfer_encoding": {
"Text": "base64"
},
"content_id": {
"Text": "4.2.0.58.20000519003934.00a866f0@pop.example.com.2"
},
"content_type": { "content_type": {
"ContentType": { "ContentType": {
"c_type": "image", "c_type": "image",
@@ -198,9 +204,6 @@ IFl2ZXMgUGlndWV0NnM7vAAAAABJRU5ErkJggg==
} }
} }
}, },
"content_id": {
"Text": "4.2.0.58.20000519003934.00a866f0@pop.example.com.2"
},
"content_disposition": { "content_disposition": {
"ContentType": { "ContentType": {
"c_type": "inline", "c_type": "inline",
@@ -209,9 +212,6 @@ IFl2ZXMgUGlndWV0NnM7vAAAAABJRU5ErkJggg==
"filename": "2aa658b6.png" "filename": "2aa658b6.png"
} }
} }
},
"content_transfer_encoding": {
"Text": "base64"
} }
}, },
"is_encoding_problem": false, "is_encoding_problem": false,
@@ -1547,6 +1547,9 @@ IFl2ZXMgUGlndWV0NnM7vAAAAABJRU5ErkJggg==
{ {
"Binary": { "Binary": {
"headers_rfc": { "headers_rfc": {
"content_id": {
"Text": "4.2.0.58.20000519003934.00a866f0@pop.example.com.3"
},
"content_disposition": { "content_disposition": {
"ContentType": { "ContentType": {
"c_type": "inline", "c_type": "inline",
@@ -1556,12 +1559,6 @@ IFl2ZXMgUGlndWV0NnM7vAAAAABJRU5ErkJggg==
} }
} }
}, },
"content_transfer_encoding": {
"Text": "base64"
},
"content_id": {
"Text": "4.2.0.58.20000519003934.00a866f0@pop.example.com.3"
},
"content_type": { "content_type": {
"ContentType": { "ContentType": {
"c_type": "image", "c_type": "image",
@@ -1570,6 +1567,9 @@ IFl2ZXMgUGlndWV0NnM7vAAAAABJRU5ErkJggg==
"name": "2aa658c0.png" "name": "2aa658c0.png"
} }
} }
},
"content_transfer_encoding": {
"Text": "base64"
} }
}, },
"is_encoding_problem": false, "is_encoding_problem": false,
+55 -55
View File
@@ -162,6 +162,36 @@ bGlwMmdpZiB2LjAuNiBieSBZdmVzIFBpZ3VldDZzO7wAAAAASUVORK5CYII=
---- EXPECTED STRUCTURE ----{ ---- EXPECTED STRUCTURE ----{
"headers_rfc": { "headers_rfc": {
"from": {
"Address": {
"name": "Doug Sauder",
"address": "dwsauder@example.com"
}
},
"mime_version": {
"Text": "1.0"
},
"content_type": {
"ContentType": {
"c_type": "multipart",
"c_subtype": "mixed",
"attributes": {
"boundary": "=====================_715515186==_"
}
}
},
"to": {
"Address": {
"name": "Heinz Müller",
"address": "mueller@example.com"
}
},
"message_id": {
"Text": "4.2.0.58.20000519003903.00a859b0@pop.example.com"
},
"subject": {
"Text": "Die Hasen und die Frösche"
},
"date": { "date": {
"DateTime": { "DateTime": {
"year": 2000, "year": 2000,
@@ -174,36 +204,6 @@ bGlwMmdpZiB2LjAuNiBieSBZdmVzIFBpZ3VldDZzO7wAAAAASUVORK5CYII=
"tz_hour": 4, "tz_hour": 4,
"tz_minute": 0 "tz_minute": 0
} }
},
"message_id": {
"Text": "4.2.0.58.20000519003903.00a859b0@pop.example.com"
},
"to": {
"Address": {
"name": "Heinz Müller",
"address": "mueller@example.com"
}
},
"subject": {
"Text": "Die Hasen und die Frösche"
},
"mime_version": {
"Text": "1.0"
},
"from": {
"Address": {
"name": "Doug Sauder",
"address": "dwsauder@example.com"
}
},
"content_type": {
"ContentType": {
"c_type": "multipart",
"c_subtype": "mixed",
"attributes": {
"boundary": "=====================_715515186==_"
}
}
} }
}, },
"html_body": [ "html_body": [
@@ -258,8 +258,14 @@ bGlwMmdpZiB2LjAuNiBieSBZdmVzIFBpZ3VldDZzO7wAAAAASUVORK5CYII=
{ {
"Binary": { "Binary": {
"headers_rfc": { "headers_rfc": {
"content_id": { "content_disposition": {
"Text": "4.2.0.58.20000519003903.00a859b0@pop.example.com.2" "ContentType": {
"c_type": "inline",
"c_subtype": null,
"attributes": {
"filename": "2aa5e03a.png"
}
}
}, },
"content_type": { "content_type": {
"ContentType": { "ContentType": {
@@ -270,14 +276,8 @@ bGlwMmdpZiB2LjAuNiBieSBZdmVzIFBpZ3VldDZzO7wAAAAASUVORK5CYII=
} }
} }
}, },
"content_disposition": { "content_id": {
"ContentType": { "Text": "4.2.0.58.20000519003903.00a859b0@pop.example.com.2"
"c_type": "inline",
"c_subtype": null,
"attributes": {
"filename": "2aa5e03a.png"
}
}
}, },
"content_transfer_encoding": { "content_transfer_encoding": {
"Text": "base64" "Text": "base64"
@@ -1634,11 +1634,11 @@ bGlwMmdpZiB2LjAuNiBieSBZdmVzIFBpZ3VldDZzO7wAAAAASUVORK5CYII=
} }
} }
}, },
"content_id": {
"Text": "4.2.0.58.20000519003903.00a859b0@pop.example.com.3"
},
"content_transfer_encoding": { "content_transfer_encoding": {
"Text": "base64" "Text": "base64"
},
"content_id": {
"Text": "4.2.0.58.20000519003903.00a859b0@pop.example.com.3"
} }
}, },
"is_encoding_problem": false, "is_encoding_problem": false,
@@ -3102,6 +3102,9 @@ bGlwMmdpZiB2LjAuNiBieSBZdmVzIFBpZ3VldDZzO7wAAAAASUVORK5CYII=
{ {
"Binary": { "Binary": {
"headers_rfc": { "headers_rfc": {
"content_transfer_encoding": {
"Text": "base64"
},
"content_disposition": { "content_disposition": {
"ContentType": { "ContentType": {
"c_type": "attachment", "c_type": "attachment",
@@ -3111,9 +3114,6 @@ bGlwMmdpZiB2LjAuNiBieSBZdmVzIFBpZ3VldDZzO7wAAAAASUVORK5CYII=
} }
} }
}, },
"content_transfer_encoding": {
"Text": "base64"
},
"content_type": { "content_type": {
"ContentType": { "ContentType": {
"c_type": "image", "c_type": "image",
@@ -4457,6 +4457,15 @@ bGlwMmdpZiB2LjAuNiBieSBZdmVzIFBpZ3VldDZzO7wAAAAASUVORK5CYII=
{ {
"Binary": { "Binary": {
"headers_rfc": { "headers_rfc": {
"content_disposition": {
"ContentType": {
"c_type": "attachment",
"c_subtype": null,
"attributes": {
"filename": "greenball.png"
}
}
},
"content_transfer_encoding": { "content_transfer_encoding": {
"Text": "base64" "Text": "base64"
}, },
@@ -4468,15 +4477,6 @@ bGlwMmdpZiB2LjAuNiBieSBZdmVzIFBpZ3VldDZzO7wAAAAASUVORK5CYII=
"name": "greenball.png" "name": "greenball.png"
} }
} }
},
"content_disposition": {
"ContentType": {
"c_type": "attachment",
"c_subtype": null,
"attributes": {
"filename": "greenball.png"
}
}
} }
}, },
"is_encoding_problem": false, "is_encoding_problem": false,
+15 -15
View File
@@ -28,9 +28,24 @@ welche also wohl noch ungl
---- EXPECTED STRUCTURE ----{ ---- EXPECTED STRUCTURE ----{
"headers_rfc": { "headers_rfc": {
"message_id": {
"Text": "NDBBIAKOPKHFGPLCODIGOEKDCHAA.doug@example.com"
},
"subject": { "subject": {
"Text": "Die Hasen und die Fr�sche (Microsoft Outlook 00)" "Text": "Die Hasen und die Fr�sche (Microsoft Outlook 00)"
}, },
"to": {
"Address": {
"name": "Heinz M�ller",
"address": "mueller@example.com"
}
},
"from": {
"Address": {
"name": "Doug Sauder",
"address": "doug@example.com"
}
},
"date": { "date": {
"DateTime": { "DateTime": {
"year": 2000, "year": 2000,
@@ -43,21 +58,6 @@ welche also wohl noch ungl
"tz_hour": 4, "tz_hour": 4,
"tz_minute": 0 "tz_minute": 0
} }
},
"message_id": {
"Text": "NDBBIAKOPKHFGPLCODIGOEKDCHAA.doug@example.com"
},
"from": {
"Address": {
"name": "Doug Sauder",
"address": "doug@example.com"
}
},
"to": {
"Address": {
"name": "Heinz M�ller",
"address": "mueller@example.com"
}
} }
}, },
"html_body": [ "html_body": [
+12 -12
View File
@@ -33,6 +33,12 @@ als wir."=20
---- EXPECTED STRUCTURE ----{ ---- EXPECTED STRUCTURE ----{
"headers_rfc": { "headers_rfc": {
"to": {
"Address": {
"name": "Heinz Müller",
"address": "mueller@example.com"
}
},
"mime_version": { "mime_version": {
"Text": "1.0" "Text": "1.0"
}, },
@@ -42,12 +48,6 @@ als wir."=20
"address": "doug@example.com" "address": "doug@example.com"
} }
}, },
"to": {
"Address": {
"name": "Heinz Müller",
"address": "mueller@example.com"
}
},
"date": { "date": {
"DateTime": { "DateTime": {
"year": 2000, "year": 2000,
@@ -61,11 +61,11 @@ als wir."=20
"tz_minute": 0 "tz_minute": 0
} }
}, },
"subject": {
"Text": "Die Hasen und die Frösche (Microsoft Outlook 00)"
},
"message_id": { "message_id": {
"Text": "NDBBIAKOPKHFGPLCODIGKEKDCHAA.doug@example.com" "Text": "NDBBIAKOPKHFGPLCODIGKEKDCHAA.doug@example.com"
},
"subject": {
"Text": "Die Hasen und die Frösche (Microsoft Outlook 00)"
} }
}, },
"html_body": [ "html_body": [
@@ -79,6 +79,9 @@ als wir."=20
{ {
"Text": { "Text": {
"headers_rfc": { "headers_rfc": {
"content_transfer_encoding": {
"Text": "quoted-printable"
},
"content_type": { "content_type": {
"ContentType": { "ContentType": {
"c_type": "text", "c_type": "text",
@@ -87,9 +90,6 @@ als wir."=20
"charset": "utf-8" "charset": "utf-8"
} }
} }
},
"content_transfer_encoding": {
"Text": "quoted-printable"
} }
}, },
"is_encoding_problem": false, "is_encoding_problem": false,
+3 -3
View File
@@ -31,9 +31,6 @@ Content-Type: text/plain
{ {
"Multipart": { "Multipart": {
"headers_rfc": { "headers_rfc": {
"mime_version": {
"Text": "1.0"
},
"content_type": { "content_type": {
"ContentType": { "ContentType": {
"c_type": "multipart", "c_type": "multipart",
@@ -42,6 +39,9 @@ Content-Type: text/plain
"boundary": "ab" "boundary": "ab"
} }
} }
},
"mime_version": {
"Text": "1.0"
} }
} }
} }
+3 -3
View File
@@ -33,9 +33,6 @@ hello, world
---- EXPECTED STRUCTURE ----{ ---- EXPECTED STRUCTURE ----{
"headers_rfc": { "headers_rfc": {
"mime_version": {
"Text": "1.0"
},
"content_type": { "content_type": {
"ContentType": { "ContentType": {
"c_type": "multipart", "c_type": "multipart",
@@ -44,6 +41,9 @@ hello, world
"boundary": "1" "boundary": "1"
} }
} }
},
"mime_version": {
"Text": "1.0"
} }
}, },
"html_body": [ "html_body": [
+38 -38
View File
@@ -26,6 +26,41 @@ invalid
---- EXPECTED STRUCTURE ----{ ---- EXPECTED STRUCTURE ----{
"headers_rfc": { "headers_rfc": {
"mime_version": {
"Text": "1.0"
},
"return_path": {
"Text": "test@example.org"
},
"content_type": {
"ContentType": {
"c_type": "multipart",
"c_subtype": "signed",
"attributes": {
"protocol": "application/pgp-signature",
"boundary": "=-GNQXLhuj24Pl1aCkk4/d",
"micalg": "pgp-sha1"
}
}
},
"message_id": {
"Text": "1.2.3.4@example"
},
"to": {
"Address": {
"name": "Another User",
"address": "test2@example.org"
}
},
"subject": {
"Text": "Hello world"
},
"from": {
"Address": {
"name": "Test User",
"address": "test@example.org"
}
},
"date": { "date": {
"DateTime": { "DateTime": {
"year": 2007, "year": 2007,
@@ -38,41 +73,6 @@ invalid
"tz_hour": 3, "tz_hour": 3,
"tz_minute": 0 "tz_minute": 0
} }
},
"return_path": {
"Text": "test@example.org"
},
"subject": {
"Text": "Hello world"
},
"from": {
"Address": {
"name": "Test User",
"address": "test@example.org"
}
},
"to": {
"Address": {
"name": "Another User",
"address": "test2@example.org"
}
},
"content_type": {
"ContentType": {
"c_type": "multipart",
"c_subtype": "signed",
"attributes": {
"boundary": "=-GNQXLhuj24Pl1aCkk4/d",
"protocol": "application/pgp-signature",
"micalg": "pgp-sha1"
}
}
},
"message_id": {
"Text": "1.2.3.4@example"
},
"mime_version": {
"Text": "1.0"
} }
}, },
"html_body": [ "html_body": [
@@ -88,15 +88,15 @@ invalid
{ {
"Text": { "Text": {
"headers_rfc": { "headers_rfc": {
"content_transfer_encoding": {
"Text": "quoted-printable"
},
"content_type": { "content_type": {
"ContentType": { "ContentType": {
"c_type": "text", "c_type": "text",
"c_subtype": "plain", "c_subtype": "plain",
"attributes": null "attributes": null
} }
},
"content_transfer_encoding": {
"Text": "quoted-printable"
} }
}, },
"is_encoding_problem": false, "is_encoding_problem": false,
+24 -24
View File
@@ -73,18 +73,33 @@ Content-Transfer-Encoding: Quoted-printable
---- EXPECTED STRUCTURE ----{ ---- EXPECTED STRUCTURE ----{
"headers_rfc": { "headers_rfc": {
"mime_version": {
"Text": "1.0"
},
"from": { "from": {
"Address": { "Address": {
"name": "Nathaniel Borenstein", "name": "Nathaniel Borenstein",
"address": "nsb@nsb.fv.com" "address": "nsb@nsb.fv.com"
} }
}, },
"mime_version": {
"Text": "1.0"
},
"to": {
"Address": {
"name": "Ned Freed",
"address": "ned@innosoft.com"
}
},
"subject": { "subject": {
"Text": "A multipart example" "Text": "A multipart example"
}, },
"content_type": {
"ContentType": {
"c_type": "multipart",
"c_subtype": "mixed",
"attributes": {
"boundary": "unique-boundary-1"
}
}
},
"date": { "date": {
"DateTime": { "DateTime": {
"year": 1994, "year": 1994,
@@ -97,21 +112,6 @@ Content-Transfer-Encoding: Quoted-printable
"tz_hour": 7, "tz_hour": 7,
"tz_minute": 0 "tz_minute": 0
} }
},
"content_type": {
"ContentType": {
"c_type": "multipart",
"c_subtype": "mixed",
"attributes": {
"boundary": "unique-boundary-1"
}
}
},
"to": {
"Address": {
"name": "Ned Freed",
"address": "ned@innosoft.com"
}
} }
}, },
"html_body": [ "html_body": [
@@ -179,15 +179,15 @@ Content-Transfer-Encoding: Quoted-printable
{ {
"Text": { "Text": {
"headers_rfc": { "headers_rfc": {
"content_transfer_encoding": {
"Text": "base64"
},
"content_type": { "content_type": {
"ContentType": { "ContentType": {
"c_type": "audio", "c_type": "audio",
"c_subtype": "basic", "c_subtype": "basic",
"attributes": null "attributes": null
} }
},
"content_transfer_encoding": {
"Text": "base64"
} }
}, },
"is_encoding_problem": true, "is_encoding_problem": true,
@@ -241,6 +241,9 @@ Content-Transfer-Encoding: Quoted-printable
"is_encoding_problem": false, "is_encoding_problem": false,
"body": { "body": {
"headers_rfc": { "headers_rfc": {
"subject": {
"Text": "(subject in US-ASCII)"
},
"to": { "to": {
"Address": { "Address": {
"name": "address in US-ASCII", "name": "address in US-ASCII",
@@ -252,9 +255,6 @@ Content-Transfer-Encoding: Quoted-printable
"name": "mailbox in US-ASCII", "name": "mailbox in US-ASCII",
"address": null "address": null
} }
},
"subject": {
"Text": "(subject in US-ASCII)"
} }
}, },
"html_body": [ "html_body": [
+26 -26
View File
@@ -41,23 +41,8 @@ get RFC-MIME.DOC
---- EXPECTED STRUCTURE ----{ ---- EXPECTED STRUCTURE ----{
"headers_rfc": { "headers_rfc": {
"mime_version": { "message_id": {
"Text": "1.0" "Text": "id1@host.com"
},
"content_id": {
"Text": "id001@guppylake.bellcore.com"
},
"to": {
"Address": {
"name": "Someone",
"address": null
}
},
"from": {
"Address": {
"name": "Whomever",
"address": null
}
}, },
"content_type": { "content_type": {
"ContentType": { "ContentType": {
@@ -68,11 +53,26 @@ get RFC-MIME.DOC
} }
} }
}, },
"message_id": { "to": {
"Text": "id1@host.com" "Address": {
"name": "Someone",
"address": null
}
}, },
"subject": { "subject": {
"Text": "whatever" "Text": "whatever"
},
"content_id": {
"Text": "id001@guppylake.bellcore.com"
},
"from": {
"Address": {
"name": "Whomever",
"address": null
}
},
"mime_version": {
"Text": "1.0"
} }
}, },
"html_body": [], "html_body": [],
@@ -91,12 +91,12 @@ get RFC-MIME.DOC
"c_type": "message", "c_type": "message",
"c_subtype": "external-body", "c_subtype": "external-body",
"attributes": { "attributes": {
"expiration": "Fri, 14 Jun 1991 19:13:14 -0400 (EDT)",
"mode": "image", "mode": "image",
"site": "thumper.bellcore.com", "site": "thumper.bellcore.com",
"name": "BodyFormats.ps",
"access-type": "ANON-FTP", "access-type": "ANON-FTP",
"directory": "pub" "directory": "pub",
"expiration": "Fri, 14 Jun 1991 19:13:14 -0400 (EDT)",
"name": "BodyFormats.ps"
} }
} }
} }
@@ -195,8 +195,8 @@ get RFC-MIME.DOC
"attributes": { "attributes": {
"site": "thumper.bellcore.com", "site": "thumper.bellcore.com",
"access-type": "local-file", "access-type": "local-file",
"name": "/u/nsb/writing/rfcs/RFC-MIME.ps", "expiration": "Fri, 14 Jun 1991 19:13:14 -0400 (EDT)",
"expiration": "Fri, 14 Jun 1991 19:13:14 -0400 (EDT)" "name": "/u/nsb/writing/rfcs/RFC-MIME.ps"
} }
} }
} }
@@ -294,8 +294,8 @@ get RFC-MIME.DOC
"c_subtype": "external-body", "c_subtype": "external-body",
"attributes": { "attributes": {
"access-type": "mail-server", "access-type": "mail-server",
"server": "listserv@bogus.bitnet", "expiration": "Fri, 14 Jun 1991 19:13:14 -0400 (EDT)",
"expiration": "Fri, 14 Jun 1991 19:13:14 -0400 (EDT)" "server": "listserv@bogus.bitnet"
} }
} }
} }
+44 -44
View File
@@ -85,9 +85,6 @@ U6ZGxseyk8SasGw3J9GRzdTQky1iHNvcPNNI4TLeKdfMvy0vMqLrItvuxfDW8ubjueDtJufz
"address": "transport@whitehouse.gov" "address": "transport@whitehouse.gov"
} }
}, },
"subject": {
"Text": "[Fwd: Map of Argentina with Description]"
},
"content_type": { "content_type": {
"ContentType": { "ContentType": {
"c_type": "multipart", "c_type": "multipart",
@@ -96,6 +93,9 @@ U6ZGxseyk8SasGw3J9GRzdTQky1iHNvcPNNI4TLeKdfMvy0vMqLrItvuxfDW8ubjueDtJufz
"boundary": "D7F------------D7FD5A0B8AB9C65CCDBFA872" "boundary": "D7F------------D7FD5A0B8AB9C65CCDBFA872"
} }
} }
},
"subject": {
"Text": "[Fwd: Map of Argentina with Description]"
} }
}, },
"html_body": [ "html_body": [
@@ -131,12 +131,8 @@ U6ZGxseyk8SasGw3J9GRzdTQky1iHNvcPNNI4TLeKdfMvy0vMqLrItvuxfDW8ubjueDtJufz
{ {
"Message": { "Message": {
"headers_rfc": { "headers_rfc": {
"content_type": { "content_transfer_encoding": {
"ContentType": { "Text": "7bit"
"c_type": "message",
"c_subtype": "rfc822",
"attributes": null
}
}, },
"content_disposition": { "content_disposition": {
"ContentType": { "ContentType": {
@@ -145,47 +141,23 @@ U6ZGxseyk8SasGw3J9GRzdTQky1iHNvcPNNI4TLeKdfMvy0vMqLrItvuxfDW8ubjueDtJufz
"attributes": null "attributes": null
} }
}, },
"content_transfer_encoding": { "content_type": {
"Text": "7bit" "ContentType": {
"c_type": "message",
"c_subtype": "rfc822",
"attributes": null
}
} }
}, },
"is_encoding_problem": false, "is_encoding_problem": false,
"body": { "body": {
"headers_rfc": { "headers_rfc": {
"message_id": { "mime_version": {
"Text": "199804130742.RAA20366@mai1host.whitehouse.gov" "Text": "1.0"
},
"content_type": {
"ContentType": {
"c_type": "multipart",
"c_subtype": "mixed",
"attributes": {
"boundary": "DC8------------DC8638F443D87A7F0726DEF7"
}
}
},
"received": {
"Collection": [
{
"Text": "from mailhost.whitehouse.gov ([192.168.51.200])\n by heartbeat.whitehouse.gov (8.8.8/8.8.8) with ESMTP id SAA22453\n for <vice-president@heartbeat.whitehouse.gov>;\n Mon, 13 Aug 1998 l8:14:23 +1000"
},
{
"Text": "from the_big_box.whitehouse.gov ([192.168.51.50])\n by mailhost.whitehouse.gov (8.8.8/8.8.7) with ESMTP id RAA20366\n for vice-president@whitehouse.gov; Mon, 13 Aug 1998 17:42:41 +1000"
}
]
},
"to": {
"Address": {
"name": "A1 Gore (The Enforcer)",
"address": "vice-president@whitehouse.gov"
}
}, },
"subject": { "subject": {
"Text": "Map of Argentina with Description" "Text": "Map of Argentina with Description"
}, },
"mime_version": {
"Text": "1.0"
},
"date": { "date": {
"DateTime": { "DateTime": {
"year": 1998, "year": 1998,
@@ -199,12 +171,40 @@ U6ZGxseyk8SasGw3J9GRzdTQky1iHNvcPNNI4TLeKdfMvy0vMqLrItvuxfDW8ubjueDtJufz
"tz_minute": 0 "tz_minute": 0
} }
}, },
"message_id": {
"Text": "199804130742.RAA20366@mai1host.whitehouse.gov"
},
"received": {
"Collection": [
{
"Text": "from mailhost.whitehouse.gov ([192.168.51.200])\n by heartbeat.whitehouse.gov (8.8.8/8.8.8) with ESMTP id SAA22453\n for <vice-president@heartbeat.whitehouse.gov>;\n Mon, 13 Aug 1998 l8:14:23 +1000"
},
{
"Text": "from the_big_box.whitehouse.gov ([192.168.51.50])\n by mailhost.whitehouse.gov (8.8.8/8.8.7) with ESMTP id RAA20366\n for vice-president@whitehouse.gov; Mon, 13 Aug 1998 17:42:41 +1000"
}
]
},
"content_type": {
"ContentType": {
"c_type": "multipart",
"c_subtype": "mixed",
"attributes": {
"boundary": "DC8------------DC8638F443D87A7F0726DEF7"
}
}
},
"from": { "from": {
"Address": { "Address": {
"name": "Bill Clinton", "name": "Bill Clinton",
"address": "president@whitehouse.gov" "address": "president@whitehouse.gov"
} }
}, },
"to": {
"Address": {
"name": "A1 Gore (The Enforcer)",
"address": "vice-president@whitehouse.gov"
}
},
"return_path": { "return_path": {
"Text": "president@whitehouse.gov" "Text": "president@whitehouse.gov"
} }
@@ -253,9 +253,6 @@ U6ZGxseyk8SasGw3J9GRzdTQky1iHNvcPNNI4TLeKdfMvy0vMqLrItvuxfDW8ubjueDtJufz
} }
} }
}, },
"content_transfer_encoding": {
"Text": "base64"
},
"content_type": { "content_type": {
"ContentType": { "ContentType": {
"c_type": "image", "c_type": "image",
@@ -264,6 +261,9 @@ U6ZGxseyk8SasGw3J9GRzdTQky1iHNvcPNNI4TLeKdfMvy0vMqLrItvuxfDW8ubjueDtJufz
"name": "map_of_Argentina.gif" "name": "map_of_Argentina.gif"
} }
} }
},
"content_transfer_encoding": {
"Text": "base64"
} }
}, },
"is_encoding_problem": false, "is_encoding_problem": false,
+15 -15
View File
@@ -25,21 +25,6 @@ Content-Type: application/x-whatever
---- EXPECTED STRUCTURE ----{ ---- EXPECTED STRUCTURE ----{
"headers_rfc": { "headers_rfc": {
"from": {
"Address": {
"name": "Nathaniel Borenstein",
"address": "nsb@bellcore.com"
}
},
"subject": {
"Text": "Formatted text mail"
},
"to": {
"Address": {
"name": "Ned Freed",
"address": "ned@innosoft.com"
}
},
"date": { "date": {
"DateTime": { "DateTime": {
"year": 1993, "year": 1993,
@@ -53,6 +38,9 @@ Content-Type: application/x-whatever
"tz_minute": 0 "tz_minute": 0
} }
}, },
"subject": {
"Text": "Formatted text mail"
},
"mime_version": { "mime_version": {
"Text": "1.0" "Text": "1.0"
}, },
@@ -64,6 +52,18 @@ Content-Type: application/x-whatever
"boundary": "boundary42" "boundary": "boundary42"
} }
} }
},
"from": {
"Address": {
"name": "Nathaniel Borenstein",
"address": "nsb@bellcore.com"
}
},
"to": {
"Address": {
"name": "Ned Freed",
"address": "ned@innosoft.com"
}
} }
}, },
"html_body": [ "html_body": [
+27 -27
View File
@@ -39,30 +39,6 @@ Subject: my different opinion
"mime_version": { "mime_version": {
"Text": "1.0" "Text": "1.0"
}, },
"to": {
"Address": {
"name": "Recipient-List",
"address": null
}
},
"content_type": {
"ContentType": {
"c_type": "multipart",
"c_subtype": "mixed",
"attributes": {
"boundary": "---- main boundary ----"
}
}
},
"from": {
"Address": {
"name": "Moderator-Address",
"address": null
}
},
"subject": {
"Text": "Internet Digest, volume 42"
},
"date": { "date": {
"DateTime": { "DateTime": {
"year": 1994, "year": 1994,
@@ -75,6 +51,30 @@ Subject: my different opinion
"tz_hour": 0, "tz_hour": 0,
"tz_minute": 0 "tz_minute": 0
} }
},
"content_type": {
"ContentType": {
"c_type": "multipart",
"c_subtype": "mixed",
"attributes": {
"boundary": "---- main boundary ----"
}
}
},
"subject": {
"Text": "Internet Digest, volume 42"
},
"from": {
"Address": {
"name": "Moderator-Address",
"address": null
}
},
"to": {
"Address": {
"name": "Recipient-List",
"address": null
}
} }
}, },
"html_body": [ "html_body": [
@@ -215,14 +215,14 @@ Subject: my different opinion
"tz_minute": 0 "tz_minute": 0
} }
}, },
"subject": {
"Text": "my different opinion"
},
"from": { "from": {
"Address": { "Address": {
"name": "someone-else-again", "name": "someone-else-again",
"address": null "address": null
} }
},
"subject": {
"Text": "my different opinion"
} }
}, },
"html_body": [ "html_body": [
+15 -15
View File
@@ -25,16 +25,13 @@ This is the epilogue. It is also to be ignored.
---- EXPECTED STRUCTURE ----{ ---- EXPECTED STRUCTURE ----{
"headers_rfc": { "headers_rfc": {
"mime_version": { "subject": {
"Text": "1.0" "Text": "Sample message"
}, },
"content_type": { "to": {
"ContentType": { "Address": {
"c_type": "multipart", "name": "Ned Freed",
"c_subtype": "mixed", "address": "ned@innosoft.com"
"attributes": {
"boundary": "simple boundary"
}
} }
}, },
"from": { "from": {
@@ -43,8 +40,8 @@ This is the epilogue. It is also to be ignored.
"address": "nsb@bellcore.com" "address": "nsb@bellcore.com"
} }
}, },
"subject": { "mime_version": {
"Text": "Sample message" "Text": "1.0"
}, },
"date": { "date": {
"DateTime": { "DateTime": {
@@ -59,10 +56,13 @@ This is the epilogue. It is also to be ignored.
"tz_minute": 0 "tz_minute": 0
} }
}, },
"to": { "content_type": {
"Address": { "ContentType": {
"name": "Ned Freed", "c_type": "multipart",
"address": "ned@innosoft.com" "c_subtype": "mixed",
"attributes": {
"boundary": "simple boundary"
}
} }
} }
}, },

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