mirror of
https://github.com/stalwartlabs/mail-parser.git
synced 2026-12-04 00:01:34 +00:00
Merge v1.0.0 branch into main (fixes #156 closes #127 fixes #109 closes #107 closes #98 closes #82 closes #73 fixes #119 fixes #70 fixes #67)
This commit is contained in:
@@ -3,3 +3,5 @@
|
||||
perf.*
|
||||
*.svg
|
||||
Cargo.lock
|
||||
.ignore
|
||||
*.failed
|
||||
|
||||
+363
-117
@@ -1,238 +1,484 @@
|
||||
mail-parser 0.11.9
|
||||
================================
|
||||
# Change Log
|
||||
|
||||
All notable changes to this project will be documented in this file. This project adheres to [Semantic Versioning](https://semver.org/).
|
||||
|
||||
## [1.0.0] - Unreleased
|
||||
|
||||
A rewrite of the parser for performance, with a new read-only API. Breaking changes are listed under Changed and Removed; the table at the end of this entry maps the 0.11 API to 1.0.
|
||||
|
||||
### Added
|
||||
- Bodies are decoded on access: `MessagePart::decoded()`, `decode_into()`, `decoded_len()` (measures base64 and quoted-printable without decoding), `text()`, `text_into()` and `text_prefix()` (decodes only what the first characters need).
|
||||
- `MessagePart::decoded_checked()` and `text_checked()` also return the `DecodeProblems` found while decoding (malformed base64 or quoted-printable, unknown transfer encoding, unknown charset, sequences not valid in the charset), which is the RFC 8621 `isEncodingProblem` flag.
|
||||
- `MessageRef`, a view of the root message or of a nested message, with `id()`, `root_part()`, `container()`, `source()`, `source_bytes()`, `raw()`, `parts()`, the body lists and the header getters; `Message::root()` and `Message::messages()`.
|
||||
- Access to MIME boundaries (#127): `MessagePart::boundary()`, `MessagePart::delimiter()` and `Message::part_by_boundary()`, and the raw bytes of a part with `raw()`, `raw_headers()` and `raw_body()`, which exclude the line break before the next delimiter as RFC 2046 defines the body part.
|
||||
- Part roles (#107): `MessagePart::role()` (`PartRole`) gives every part exactly one role, and `MessageRef::other_parts()` returns the parts in no list.
|
||||
- `MessageRef::has_attachments()`, the RFC 8621 `hasAttachment` rule: an attachment without `Content-Disposition: inline`.
|
||||
- `MessagePart::html_utf8()` and `strip_charset_meta()` (#109): the HTML with its `<meta>` charset declarations rewritten to UTF-8, looking only before `<body`. The default decoding does not scan HTML.
|
||||
- `MessagePart::id()`, `message()`, `parent()`, `kind()` (`PartKind`), `children()`, `nested()`, `flags()` (`PartFlags`), `has_problems()`, `in_text_body()`, `in_html_body()`, `is_attachment()`, `is_inline()`, `encoding()` and `content_transfer_encoding()`.
|
||||
- `PartFlags` records damaged structure: `MISSING_DELIMITER`, `FALLBACK_DELIMITER`, `NO_BLANK_LINE`, `UNTERMINATED`, `NESTING_LIMIT` and `LIMIT_REACHED`.
|
||||
- `Headers`, a view of the header fields of any part: `iter()`, `get()`, `all()`, `contains()`, `value()`, `has_known()`, `len()` and the typed getters. `Header::raw_name()` keeps the spelling of the name found in the message, `Header::raw_value()` returns the bytes after the colon, and `Header::parse_as()` parses a field again in another form.
|
||||
- `HeaderForm::parse()` parses a header value on its own into a `ParsedValue`. `HeaderForm` gains `CommaList`, `ContentType`, `Received` and `Ignore`.
|
||||
- `AddressList` (#98): `iter()` yields `Address::Mailbox` and `Address::Group` items in document order, `mailboxes()` flattens the groups, `groups()` gives the JMAP `asGroupedAddresses` shape, and `first()`, `last()`, `contains()` and `has_groups()`. `TextList` holds message identifiers and comma-separated lists.
|
||||
- `MessageParser::parse_owned()` gives a `Message<'static>` that owns its input, and `MessageParser::parse_with()` with `MessageBuffers` and `Message::into_buffers()` reuses the storage of one message for the next. `MessageBuffers::shrink_to(max_bytes)` frees that storage when it exceeds `max_bytes`; otherwise the buffers keep the capacity of the largest message parsed with them.
|
||||
- `MessageParser::header()` sets the form of one header field and `unknown_headers()` the form of unknown fields; `max_depth()`, `max_parts()` and `max_encoded_nesting()` set the limits (64, 10,000 and 3 by default). After the part limit, the rest of the input stays in the part flagged `LIMIT_REACHED`: the last part when it is a leaf of the innermost open multipart, else that multipart, or the `message/rfc822` part whose nested message had no part yet; the containers left open are not flagged `UNTERMINATED`.
|
||||
- `HeaderName::key()` resolves a name once into a `HeaderKey`, for `Headers::all_key()` and `Headers::get_key()`, which skip the name lookup that `all()` and `get()` do on every call.
|
||||
- 112 header names from Stalwart's metadata list are `HeaderName` variants: `X-Mailer`, `User-Agent`, `Precedence`, `X-Priority`, the `X-MS-Exchange`, `X-Google` and `X-GitHub` fields and others.
|
||||
- `Charset`, with `from_label()`, `decode()`, `decode_owned()` and `decode_append()`, and `decoders::charsets::decode()` and `decode_append()`.
|
||||
- `PartId` and `MessageId`, and `From<Encoding> for u8`.
|
||||
- Value equality for `HeaderValue`, `TextList`, `AddressList`, `ContentType`, `Received` and `ParsedValue`; `Debug` output that shows the content of the views; `Debug` for the mailbox iterators. `Message`, `MessageParser` and the views are `Send + Sync`, and `Message<'x>` is covariant in `'x`.
|
||||
|
||||
### Changed
|
||||
- The parser was rewritten for performance: SIMD kernels find boundaries and header fields (NEON, AVX2 and SSE2, `memchr` on other targets), the header field parsers work on bounded slices, a message is stored in a handful of flat vectors whatever its size, and bodies are decoded only on access, through the SIMD codecs of encodify. See the README for measurements.
|
||||
- New dependencies: `memchr`, `simdutf8` and `encodify`, next to `hashify`; `encoding_rs` and `serde` stay optional. `unsafe` code is used in the SIMD kernels and in the audited UTF-8 module, whose two functions turn bytes already validated as UTF-8 into `str` and `String`: string spans validated during the parse, and decoded text bodies validated with simdutf8; the rest of the crate denies it. The minimum supported Rust version is 1.98.
|
||||
- A parsed message is read-only and is read through `Copy` views (`MessageRef`, `MessagePart`, `Headers`, `Header`, `HeaderValue`, `AddressList`, `ContentType`, `Received` and others) that borrow the message, so a value can no longer outlive the `Message` it came from. `Message` is still `Send`, `Sync`, `Clone` and `Default`; `Message::default()` is an empty message with one root part (id 0, no header field, empty body), so `root_part()`, `parts()` and `messages()` agree.
|
||||
- The header getters return views by value: `from()`, `to()`, `cc()`, `bcc()`, `reply_to()`, `sender()`, the `resent_*()` address getters and the `list_*()` getters return `Option<AddressList>`; `date()` and `resent_date()` return `Option<DateTime>`; `comments()` and `mime_version()` return `Option<&str>`; `in_reply_to()`, `references()`, `keywords()`, `resent_message_id()` and `return_path()` return `Option<TextList>`; `received()` returns `Option<Received>`.
|
||||
- `text_bodies()` and `html_bodies()` yield the text of the parts of the text and HTML bodies (#73), converting HTML to text and text to HTML and skipping parts that are not text; 0.11 yielded the parts, which are now `text_body()` and `html_body()`. This change is silent where the item is only measured: `message.text_bodies().map(|body| body.len())` still compiles and now measures text.
|
||||
- Part identifiers are global: parts are numbered in document order across the root message and every nested message, and `Message::part()` takes such an id. A nested message is a `MessageRef` (`PartKind::Message`, `MessagePart::nested()`), no longer a `Message` inside the part. A base64 or quoted-printable encoded `message/rfc822` part is decoded and parsed during the parse; the offsets of its parts refer to its decoded body, as `MessageRef::source()` tells.
|
||||
- Address fields (#98) are an `AddressList` of mailboxes and groups in document order, whether or not they contain a group. 0.11 returned `Address::List` when there was no group and turned every run of mailboxes into an unnamed group as soon as there was one; that shape is now `AddressList::groups()`.
|
||||
- Message identifier fields, Keywords and Content-Language are always a `TextList`, even with one item; 0.11 switched between `Text` and `TextList`. `HeaderValue::as_text()` returns the last item of a list.
|
||||
- The body lists follow the RFC 8621 `parseStructure` algorithm exactly (#67). An image, audio or video part shown in both bodies is no longer also an attachment, and a named `text/html` alternative that follows a `text/plain` becomes an attachment while the `text/plain` is copied into `html_body`. Where the algorithm is silent: a text part of an alternative whose list an ancestor dropped goes to no list, a multipart that cannot be opened stays an attachment, a part without a usable Content-Type is `text/plain` (`message/rfc822` in a digest), and the name test uses the Content-Disposition `filename`, else the Content-Type `name`, an empty name counting as none. The `multipart/alternative` fix-up also runs when the alternative is not closed.
|
||||
- `PartKind::InlineBinary` and `MessagePart::is_inline()` follow the Content-Disposition (#70): `inline`, or no disposition on a child of `multipart/related` other than the first. 0.11 derived them from the RFC 8621 list rule, so images referenced by `cid:` in a `multipart/related` were `Binary`. The body lists are not affected.
|
||||
- Decoding no longer changes the part tree. 0.11 turned a part whose body failed to decode into a text part flagged `is_encoding_problem`; 1.0 keeps its kind, decodes it on a best-effort basis and reports the problems through `decoded_checked()` and `text_checked()`. `MessagePart::encoding()` is the declared Content-Transfer-Encoding, comments allowed (`base64 (comment)` is base64).
|
||||
- `is_encoding_problem` is split: `MessagePart::has_problems()` and `flags()` for damaged structure, `decoded_checked()` and `text_checked()` for decoding.
|
||||
- MIME delimiters (#156): a delimiter is `--boundary` at the start of a line followed by `--`, a space, a tab, CR, LF or the end of the input, checked against every open boundary, innermost first. A `--boundary` in the middle of a line ends a part only when the part has no valid delimiter at all, and the part is then flagged `FALLBACK_DELIMITER`. A multipart whose first delimiter is its close delimiter looks for a delimiter in the middle of a line of its preamble the same way (flagged `FALLBACK_DELIMITER`); a multipart closed before any part is flagged `MISSING_DELIMITER` and keeps its content in its preamble.
|
||||
- Malformed structure: a header block ends at a delimiter line (flagged `NO_BLANK_LINE`), an inner multipart that is never closed is closed by an outer delimiter, a part whose delimiter is missing is decoded and classified by its type, and every part ends by one rule (the end of the input, or before the line break that precedes the next delimiter), so a part never ends past its container: when a delimiter cuts a header block, or ends a part together with its container, the part ends where the container ends, and the last header field may end one line break past `offset_body()`.
|
||||
- RFC 2047 encoded words are decoded by encodify. No space is inserted between plain text and an adjacent encoded word, whitespace between two encoded words is dropped and whitespace between text and a word is kept as written. Adjacent words of one charset are joined before conversion, so a character split across two words decodes, and one-byte charset names are accepted.
|
||||
- Base64 bodies: bytes outside the alphabet are skipped and reported, a final unpadded quantum is decoded (0.11 dropped it) and a lone sextet before `=` no longer produces a byte. Quoted-printable bodies: `==` and other invalid escapes are kept as written (0.11 failed the whole part on `==`), trailing blanks at the end of the input are deleted (RFC 2045, section 6.7), and a soft line break right before a delimiter no longer deletes content.
|
||||
- Header blocks: a line without a colon at the end of the input is no longer a header field, the last field keeps its value when the input has no final line break, and a bare CR in unstructured text becomes a space.
|
||||
- Dates: the zone reader no longer consumes the next line after a `UT` or `Z` zone, and a one-digit zone such as `+5` means +05:00. Received fields: two-digit years follow the date parser (00 to 49 are 20xx), and `]` ends an address literal inside comments.
|
||||
- `MessageParser::header(name, form)` replaces the builder shorthands and changes the form of one field without dropping the default forms of the others. `unknown_headers()` also applies to the header names added in 1.0, unless they are registered with `header()`.
|
||||
- `HeaderName`: the names added in 1.0 are variants (`HeaderName::XMailer`), and an `Other` spelled like a known name, such as `Other("X-Mailer")`, equals, hashes and orders as that name; `MessageParser::header()`, `Headers::get()` and `Headers::all()` treat it as that name. `HeaderName::parse()` accepts every character RFC 5322 allows in a field name (printable US-ASCII except the colon; 0.11 accepted only letters, digits, `-` and `_`) and never allocates, and the `From` conversions keep any other string in `Other` with its spelling (0.11 returned `Other("")`, which matched no field). `Header::name()` returns a `HeaderName` (0.11: `&str`).
|
||||
- A header field that is present but blank and parsed as `Raw` or `Text` has the value `HeaderValue::Text("")`, so an empty `Subject:` gives `subject() == Some("")`, as RFC 8621 `asText` does; 0.11 returned no value. `HeaderValue::Empty` now means that the value does not parse in its form (an empty address list, date or Content-Type included) or that the field is parsed with `HeaderForm::Ignore`.
|
||||
- Header field names are matched strictly: a name with whitespace or a control character inside it (`Fr om`, `Sub\tject`) or starting with a colon (`:From`) is an unknown field kept with its spelling, where 0.11 read it as the known field, so mail-parser sees the same From and Subject as DKIM and DMARC verifiers. Space and tab between the name and the colon are still accepted (RFC 5322 obsolete syntax).
|
||||
- RFC 2231 parameters: the sections of a continued parameter are joined before they are converted, with the charset of the first section that declares one (section 0 in conforming input), and a language parameter (`name-language`) is reported once; 0.11 moved a repeated `'lang'` prefix into the value. A Content-Type or Content-Disposition field keeps at most 1,000 parameters.
|
||||
- `MessageParser::parse_headers()` records the real body offset; 0.11 reported the end of the input.
|
||||
- `MessageParser::parse()` returns `None` for input with no header field and no blank line, where 0.11 returned a message without headers and with an empty body, dropping the text. It also returns `None` for empty input and for input of 4 GiB or more.
|
||||
- `preview_text()`, `preview_html()`, `truncate_text()` and `truncate_html()` take `&str`, remove carriage returns themselves and borrow when they can; `body_preview()` decodes only the beginning of the body.
|
||||
- `text_to_html()` also escapes `&` and `>`.
|
||||
- `Charset::from_label()` maps the UTF-8 labels to `Charset::Utf8`; `charset_decoder()`, kept for compatibility, still returns `None` for them.
|
||||
- With the `serde` feature, a `Message` serializes to a new JSON shape (messages and parts in flat lists, with roles, flags and decoding problems) and implements `Serialize` only.
|
||||
- `mailbox::mbox::MessageIterator` finds separator lines with `memchr` and copies message contents in bulk. After an I/O error inside a line, the partial line is kept and reading continues on the next call.
|
||||
|
||||
### Removed
|
||||
- The `rkyv` and `base64_slice` features.
|
||||
- The public fields and struct literals of `Message`, `MessagePart`, `Header`, `ContentType`, `Addr`, `Group` and `Attribute`, the methods that changed them (`Message::remove_header()`, `ContentType::remove_attribute()`), and `into_owned()` on parts and values.
|
||||
- `PartType` (replaced by `PartKind` and the decoding methods), `Addr` (replaced by `Mailbox`), `Attribute`, the `Address::List` and `Address::Group` shapes, `MessagePartId` (now `PartId`), the `GetHeader` and `MimeHeaders` traits (their methods are inherent), `MessageStream`, and the `core` and `parsers` modules.
|
||||
- `HeaderValue::unwrap_*()`, `into_*()`, `into_owned()` and `len()`; `HeaderForm::GroupedAddresses` and `HeaderForm::URLs` (use `HeaderForm::Addresses`); `HeaderName::len()`, `is_empty()` and `into_string()`.
|
||||
- The base64, quoted-printable and hex helpers: `base64_decode()`, `base64_decode_slice()`, `base64_decode_stream()`, `quoted_printable_decode()`, `quoted_printable_decode_char()`, `decode_hex()`, `HEX_MAP` and `BASE64_MAP`, with the `decoders::base64`, `decoders::quoted_printable`, `decoders::hex` and `decoders::encoded_word` modules; use encodify directly (`encodify::base64`, `qp`, `hex` and `rfc2047`). The `decoders::charsets::{map, multi_byte, single_byte, utf}` modules are replaced by `Charset`.
|
||||
- `MessagePart::is_text_html()`, `is_binary()` and `is_empty()`.
|
||||
- `PartialEq` for `Message` and `MessagePart`, and `Deserialize` for `Message`.
|
||||
- `trim_trailing_fwd()`, an internal step of `thread_name()`.
|
||||
|
||||
### Fixed
|
||||
- MIME boundaries were matched anywhere in a line, which silently truncated body parts (#156).
|
||||
- Inline images in `multipart/related` were reported as `Binary` (#70).
|
||||
- `attachments` included inline media shown in both body lists, against RFC 8621 (#67).
|
||||
- `resent_cc()` returned the Resent-To field.
|
||||
- Registering one header parser disabled the default parsers of every other field.
|
||||
- An RFC 2231 value with a third apostrophe (`filename*=utf-8''O'Brien.txt`) was split at it.
|
||||
- The comment of an empty address group was attached to the next group.
|
||||
- `add_html_token()` panicked on invalid UTF-8.
|
||||
- `FolderIterator::next()` panicked when called after the end of the folders.
|
||||
- A multipart whose first delimiter line carried text after the boundary (`--b5Content-Type: ...`) made 0.11 panic in debug builds ("Invalid part ID, could not find multipart"); 1.0 keeps the content as a part.
|
||||
- RFC 2231 parameter sections were converted one by one, so a character split across two sections, or any section after the first in a charset other than UTF-8, became U+FFFD (`name*0*=utf-8''%E2%98; name*1*=%95.txt` now gives `☕.txt`).
|
||||
- RFC 2231 continuations took quadratic time in the number of sections or parameters of a field.
|
||||
- UTF-7 dropped the character that ends a base64 run (`+AKM.` gave `£` instead of `£.`) and did not decode `+-` to `+` (RFC 2152).
|
||||
- A UTF-16 text with an odd number of bytes lost its last byte silently; it now ends with U+FFFD, as documented.
|
||||
- `DateTime::to_timezone()` overflowed (a panic in debug builds) for offsets near `i64::MIN` or `i64::MAX`; it saturates.
|
||||
|
||||
### Migrating from 0.11
|
||||
|
||||
| 0.11 | 1.0 |
|
||||
|---|---|
|
||||
| `MessageParser::new().with_mime_headers()`, `with_date_headers()`, `with_address_headers()`, `with_message_ids()`, `with_minimal_headers()` | `MessageParser::new()`: the default forms parse these fields |
|
||||
| `header_text(name)`, `header_date(name)`, `header_address(name)`, `header_id(name)`, `header_comma_separated(name)`, `header_content_type(name)`, `header_received(name)`, `header_raw(name)`, `ignore_header(name)` | `header(name, form)` with `HeaderForm::Text`, `Date`, `Addresses`, `MessageIds`, `CommaList`, `ContentType`, `Received`, `Raw` or `Ignore` |
|
||||
| `without_header(name)` | `header(name, HeaderForm::Raw)` |
|
||||
| `default_header_text()`, `default_header_raw()`, `default_header_ignore()` | `unknown_headers(HeaderForm::Text)`, `Raw` or `Ignore` |
|
||||
| `MessageStream::new(value).parse_address()` and the other `parse_*()` | `HeaderForm::Addresses.parse(value).value()` and the other forms |
|
||||
| `message.header_as(name, form)` | `header.parse_as(form)` for each field of `message.headers().all(name)` |
|
||||
| `message.parts`, `message.parts[i]` | `message.parts()`, `message.part(id)` (ids are global across nested messages) |
|
||||
| `message.text_body`, `html_body`, `attachments` (lists of ids) | `message.text_body()`, `html_body()`, `attachments()` (iterators of `MessagePart`; `part.id()` gives the id) |
|
||||
| `message.text_part(i)`, `html_part(i)`, `attachment(i)` | `message.text_body().nth(i)`, `html_body().nth(i)`, `attachments().nth(i)` |
|
||||
| `message.text_body_count()`, `html_body_count()`, `attachment_count()` | `message.text_body().len()`, `html_body().len()`, `attachments().len()` |
|
||||
| `message.text_bodies()`, `html_bodies()` (parts) | `message.text_body()`, `html_body()`; `text_bodies()` and `html_bodies()` now yield text |
|
||||
| `message.raw_message`, `raw_message()` | `message.raw()` (the input) or `message.root().raw()` (the range of the root message) |
|
||||
| `message.header(name)` | `message.headers().value(name)` |
|
||||
| `message.header_raw(name)` | `raw_value()` (bytes) of `message.headers().get(name)` |
|
||||
| `message.header_values(name)` | `value()` of each field of `message.headers().all(name)` |
|
||||
| `message.headers()` (a slice), `headers_raw()` | `message.headers()` (a `Headers` view, iterated with `for header in message.headers()` or `iter()`); `raw_name()` and `raw_value()` of each field |
|
||||
| `message.remove_header(name)` | No replacement: messages are read-only |
|
||||
| `message.is_empty()` | `parse()` returns `None` for such input; `headers().has_known()` |
|
||||
| `from()`, `to()`, `cc()` and the other address getters (`Option<&Address>`) | `Option<AddressList>` |
|
||||
| `date()` (`Option<&DateTime>`), `resent_date()` (`&HeaderValue`) | `Option<DateTime>` |
|
||||
| `in_reply_to()`, `references()`, `keywords()`, `resent_message_id()`, `return_path()` (`&HeaderValue`) | `Option<TextList>` |
|
||||
| `list_archive()` to `list_unsubscribe()` (`&HeaderValue`) | `Option<AddressList>` |
|
||||
| `comments()`, `mime_version()` (`&HeaderValue`) | `Option<&str>` |
|
||||
| `received()` (`Option<&Received>`) | `Option<Received>` |
|
||||
| `received_all()` | `all_received()`, like `all_to()`, `all_cc()` and `all_bcc()` |
|
||||
| `part.body` (`PartType`) | `part.kind()` (`PartKind`), with `text()`, `decoded()`, `nested()` and `children()` for the content |
|
||||
| `part.contents()` | `part.decoded()` |
|
||||
| `part.text_contents()` | `part.text()` |
|
||||
| `part.message()` (the nested message) | `part.nested()`; `part.message()` now returns the message the part belongs to |
|
||||
| `part.sub_parts()` | `part.children()` |
|
||||
| `part.len()` | `part.decoded_len()` |
|
||||
| `part.is_text_html()`, `part.is_binary()`, `part.is_empty()` | a match on `part.kind()`; `part.decoded_len() == 0` |
|
||||
| `part.is_encoding_problem` | `part.has_problems()` and `part.flags()`; `decoded_checked()` and `text_checked()` |
|
||||
| `part.encoding`, `part.headers` | `part.encoding()`, `part.headers()` |
|
||||
| `part.offset_header`, `offset_body`, `offset_end`, `raw_header_offset()`, `raw_body_offset()`, `raw_end_offset()` | `part.offset_header()`, `offset_body()`, `offset_end()` |
|
||||
| `part.raw_len()` | `part.raw().len()` |
|
||||
| `MimeHeaders` methods (`content_type()`, `content_id()`, `attachment_name()`, ...) | Inherent methods of `MessagePart` and `MessageRef`; `content_language()` returns `Option<TextList>` |
|
||||
| `PartType::Message(message)` | `PartKind::Message(message)`, a `MessageRef` |
|
||||
| `header.name` (a `HeaderName`), `header.name()` (a `&str`) | `header.name()` (a `HeaderName`), `header.raw_name()` (as written) |
|
||||
| `header.value`, `header.offset_*` | `header.value()`, `header.offset_field()`, `offset_start()`, `offset_end()` (same meaning) |
|
||||
| `GetHeader::header()`, `header_value()` | `Headers::get()`, `Headers::value()` |
|
||||
| `HeaderValue::Text(Cow<str>)` | `HeaderValue::Text(&str)` |
|
||||
| `HeaderValue::TextList(Vec<Cow<str>>)` | `HeaderValue::TextList(TextList)`, also for a single item |
|
||||
| `HeaderValue::Address(Address::List(..))`, `HeaderValue::Address(Address::Group(..))` | `HeaderValue::Address(AddressList)` with `iter()`, `mailboxes()` and `groups()` |
|
||||
| `HeaderValue::Received(Box<Received>)` | `HeaderValue::Received(Received)`; hosts are returned by value |
|
||||
| `value.unwrap_text()`, `into_text()` and the other `unwrap_*()` and `into_*()` | `as_text()`, `as_text_list()`, `as_address()`, `as_datetime()`, `as_content_type()`, `as_received()` |
|
||||
| `Address::first()`, `last()`, `contains()`, `iter()` | `AddressList::first()`, `last()`, `contains()`, `mailboxes()` |
|
||||
| `Address::as_list()`, `as_group()`, `into_list()`, `into_group()` | `AddressList::mailboxes()`, `AddressList::groups()` |
|
||||
| `Addr` (`name`, `address`) | `Mailbox` (`name()`, `address()`) |
|
||||
| `Group` (`name`, `addresses`) | `Group` (`name()`, `mailboxes()`) |
|
||||
| `ContentType` (`c_type`, `c_subtype`, `attributes`) | `ContentType` (`ctype()`, `subtype()`, `attribute()`, `attributes()` yielding name and value) |
|
||||
| `HeaderName::Other("X-Mailer")` and the other names added in 1.0 | `HeaderName::XMailer`; an `Other` with the same spelling still finds and configures the field, but `header.name()` returns the variant |
|
||||
| `HeaderValue::Empty` for a blank Subject or other text field (`subject() == None`) | `HeaderValue::Text("")` (`subject() == Some("")`) |
|
||||
| `HeaderName::from("X.Spam")` gave `Other("")` | `Other("X.Spam")`, which finds the field |
|
||||
| `HeaderName::into_string()`, `len()` | `String::from(name)`, `name.as_str().len()` |
|
||||
| `MessagePartId` | `PartId` |
|
||||
| `decoders::base64::base64_decode()`, `base64_decode_slice()`, `base64_decode_stream()`, `BASE64_MAP` | `encodify::base64` |
|
||||
| `decoders::quoted_printable::quoted_printable_decode()`, `quoted_printable_decode_char()`, `HEX_MAP` | `encodify::qp` |
|
||||
| `decoders::hex::decode_hex()` | `encodify::hex` |
|
||||
| `decoders::charsets::map::charset_decoder()` | `Charset::from_label()` and `Charset::decode()`; `decoders::charsets::charset_decoder()` is kept |
|
||||
| `parsers::preview::preview_text()` and the other preview functions (taking `Cow<str>`) | `preview_text()` and the others at the crate root, taking `&str` |
|
||||
| `parsers::fields::thread::thread_name()` | `thread_name()` |
|
||||
| `parsers::fields::address::parse_address_local_part()` and the other address helpers | `parse_address_local_part()` and the others at the crate root |
|
||||
| `rkyv` feature | No replacement |
|
||||
| `base64_slice` feature | encodify |
|
||||
|
||||
## [0.11.9] - 2026-09-09
|
||||
|
||||
### Added
|
||||
- Added `base64_decode_slice` behind the new `base64_slice` feature, which adds a `memchr` dependency.
|
||||
|
||||
mail-parser 0.11.8
|
||||
================================
|
||||
- Fix: `HeaderName` breaks rkyv serialization from <= 0.11.6.
|
||||
## [0.11.8] - 2026-08-22
|
||||
|
||||
mail-parser 0.11.7
|
||||
================================
|
||||
### Fixed
|
||||
- `HeaderName` breaks rkyv serialization from <= 0.11.6.
|
||||
|
||||
## [0.11.7] - 2026-08-20
|
||||
|
||||
### Added
|
||||
- Added more IANA headers.
|
||||
- Fix: `DateTime::to_timezone` corrupting non-whole-hour offsets by storing leftover seconds in `tz_minute` (#158)
|
||||
|
||||
mail-parser 0.11.6
|
||||
================================
|
||||
- Fix: Missing whitespace between a quoted name and a following encoded word (#150)
|
||||
- Fix: `panic` when a `Received` header ends with a folded line (#155)
|
||||
- Fix: `Received` header tokens losing their last character at the end of the input, retaining folding characters, and failing to parse a clause folded before its value (#155)
|
||||
- Fix: Multi-word display names followed by a comment no longer produce a fabricated address (#153)
|
||||
### Fixed
|
||||
- `DateTime::to_timezone` corrupting non-whole-hour offsets by storing leftover seconds in `tz_minute` (#158)
|
||||
|
||||
mail-parser 0.11.5
|
||||
================================
|
||||
- Fix: Address names containing LF are not parsed correctly (#149)
|
||||
- Fix: Decode the `iso-8859-1` label as `windows-1252` per the WHATWG Encoding Standard (#131)
|
||||
- Fix: `panic` with messages containing corrupted eml attachments (#120).
|
||||
## [0.11.6] - 2026-08-10
|
||||
|
||||
### Fixed
|
||||
- Missing whitespace between a quoted name and a following encoded word (#150)
|
||||
- `panic` when a `Received` header ends with a folded line (#155)
|
||||
- `Received` header tokens losing their last character at the end of the input, retaining folding characters, and failing to parse a clause folded before its value (#155)
|
||||
- Multi-word display names followed by a comment no longer produce a fabricated address (#153)
|
||||
|
||||
## [0.11.5] - 2026-07-08
|
||||
|
||||
### Added
|
||||
- Recognize additional charset labels supported by `encoding_rs` (#123)
|
||||
- Added `Dkim2Signature` and `MessageInstance` to support DKIM2 headers.
|
||||
|
||||
mail-parser 0.11.4
|
||||
================================
|
||||
### Fixed
|
||||
- Address names containing LF are not parsed correctly (#149)
|
||||
- Decode the `iso-8859-1` label as `windows-1252` per the WHATWG Encoding Standard (#131)
|
||||
- `panic` with messages containing corrupted eml attachments (#120).
|
||||
|
||||
## [0.11.4] - 2026-06-21
|
||||
|
||||
### Added
|
||||
- Add `Message::received_all()` to iterate over all Received header fields (#146)
|
||||
|
||||
### Changed
|
||||
- Reject dates with invalid month names.
|
||||
- `parse_date()` doesn't handle UTC+12 and greater (#148)
|
||||
- Leniently decode quoted-printable bodies with invalid `=` escapes (#144)
|
||||
|
||||
mail-parser 0.11.3
|
||||
================================
|
||||
### Fixed
|
||||
- `parse_date()` doesn't handle UTC+12 and greater (#148)
|
||||
|
||||
## [0.11.3] - 2026-05-02
|
||||
|
||||
### Fixed
|
||||
- Fix panic with messages containing corrupted attachments (#145)
|
||||
|
||||
mail-parser 0.11.2
|
||||
================================
|
||||
## [0.11.2] - 2026-02-14
|
||||
|
||||
### Fixed
|
||||
- Do not return invalid mime parts when parsing broken nested messages.
|
||||
- Fix broken receive header date parsing when tab is used in long header syntax (#130)
|
||||
|
||||
mail-parser 0.11.1
|
||||
================================
|
||||
## [0.11.1] - 2025-08-18
|
||||
|
||||
### Fixed
|
||||
- Fix `DateTime::from_timestamp` to handle negative timestamps correctly.
|
||||
|
||||
mail-parser 0.11.0
|
||||
================================
|
||||
## [0.11.0] - 2025-05-11
|
||||
|
||||
### Added
|
||||
- `rkyv` zero-copy deserialization support.
|
||||
|
||||
### Changed
|
||||
- Changed `usize` to `u32` types.
|
||||
- Renamed `serde_support` feature to `serde`.
|
||||
- Fix: Parsing of headers without LFs (#102)
|
||||
|
||||
mail-parser 0.10.2
|
||||
================================
|
||||
### Fixed
|
||||
- Parsing of headers without LFs (#102)
|
||||
|
||||
## [0.10.2] - 2025-01-28
|
||||
|
||||
### Fixed
|
||||
- Fixed `HeaderName` enum order to avoid breaking bincode serialization.
|
||||
|
||||
mail-parser 0.10.1
|
||||
================================
|
||||
## [0.10.1] - 2025-01-26
|
||||
|
||||
### Fixed
|
||||
- Fixed `HeaderName::parse` function.
|
||||
|
||||
mail-parser 0.10.0
|
||||
================================
|
||||
## [0.10.0] - 2025-01-26
|
||||
|
||||
### Added
|
||||
- Added `DkimSignature`, `ArcAuthenticationResults`, `ArcMessageSignature` and `ArcSeal` headers.
|
||||
|
||||
### Changed
|
||||
- Perfect hashing using `hashify` crate rather than static `gperf` generated code.
|
||||
- Added `DkimSignature`, `ArcAuthenticationResults`, `ArcMessageSignature` and `ArcSeal` headers.
|
||||
- `HeaderName` is non-exhaustive.
|
||||
- Parse obsolete timezones (#95).
|
||||
- Fix: Folding ws between "Content-Type:" and "plain/text" leads to empty header (#96).
|
||||
- Fix: Multiline quoted continuations (closes #92).
|
||||
- Fix: Deserialize (#93).
|
||||
- Retain mbox IO errors (#91).
|
||||
- Hide concrete type behind impl type (#94).
|
||||
|
||||
### Removed
|
||||
- Removed `ludicrous` feature, the Rust compiler is smart enough to optimize array lookups.
|
||||
|
||||
mail-parser 0.9.4
|
||||
================================
|
||||
### Fixed
|
||||
- Folding ws between "Content-Type:" and "plain/text" leads to empty header (#96).
|
||||
- Multiline quoted continuations (closes #92).
|
||||
- Deserialize (#93).
|
||||
|
||||
## [0.9.4] - 2024-09-04
|
||||
|
||||
### Changed
|
||||
- Flexible parsing of charset names (#85).
|
||||
|
||||
mail-parser 0.9.3
|
||||
================================
|
||||
## [0.9.3] - 2024-03-28
|
||||
|
||||
### Fixed
|
||||
- Fixed parsing of address names containing @ (#80)
|
||||
|
||||
mail-parser 0.9.2
|
||||
================================
|
||||
## [0.9.2] - 2023-11-27
|
||||
|
||||
### Fixed
|
||||
- Fixed `quoted_printable_decode` external function (not used by mail-parser directly).
|
||||
- Fix `Received` header serialization for bincode compatibility.
|
||||
|
||||
mail-parser 0.9.1
|
||||
================================
|
||||
- Fixed panic when Content-Disposition is empty (#63)
|
||||
- Removed `content_type()` and `address()` functions that could `panic!`. Use `as_content_type()` and `as_address()` instead.
|
||||
## [0.9.1] - 2023-09-22
|
||||
|
||||
### Changed
|
||||
- Updated Rust edition to 2021.
|
||||
|
||||
mail-parser 0.9.0
|
||||
================================
|
||||
### Removed
|
||||
- Removed `content_type()` and `address()` functions that could `panic!`. Use `as_content_type()` and `as_address()` instead.
|
||||
|
||||
### Fixed
|
||||
- Fixed panic when Content-Disposition is empty (#63)
|
||||
|
||||
## [0.9.0] - 2023-09-05
|
||||
|
||||
This version introduces multiple breaking changes. Please read the following notes carefully.
|
||||
|
||||
- Parsing is now done using `MessageParser`, which allows to customize the parsing process.
|
||||
### Added
|
||||
- Added parser for `Received` headers.
|
||||
- Added `MessageParser::parse_headers` function to parse only the headers of a message.
|
||||
- Removed `RfcHeader` enum, now all headers are represented using `HeaderName`.
|
||||
|
||||
### Changed
|
||||
- Parsing is now done using `MessageParser`, which allows to customize the parsing process.
|
||||
- All address types are now stored in the `HeaderValue::Address` variant using the `Address` enum.
|
||||
- Renamed the `as_` prefix to `to_` in some functions.
|
||||
|
||||
mail-parser 0.8.2
|
||||
================================
|
||||
- Fix: Parsing address name with \ characters (#41)
|
||||
- Fix: Missing space when folded header begins with RFC2047 word (#43)
|
||||
### Removed
|
||||
- Removed `RfcHeader` enum, now all headers are represented using `HeaderName`.
|
||||
|
||||
mail-parser 0.8.1
|
||||
================================
|
||||
## [0.8.2] - 2023-02-22
|
||||
|
||||
### Fixed
|
||||
- Parsing address name with \ characters (#41)
|
||||
- Missing space when folded header begins with RFC2047 word (#43)
|
||||
|
||||
## [0.8.1] - 2023-02-09
|
||||
|
||||
### Added
|
||||
- Added `raw_message()` function.
|
||||
|
||||
mail-parser 0.8.0
|
||||
================================
|
||||
## [0.8.0] - 2022-12-01
|
||||
|
||||
### Changed
|
||||
- Removed get_() prefixes (#31).
|
||||
- Maildir import: Use modified time instead of created time (#32)
|
||||
|
||||
mail-parser 0.7.0
|
||||
================================
|
||||
- Base64/QuotedPrintable decoding optimizations.
|
||||
## [0.7.0] - 2022-10-21
|
||||
|
||||
### Added
|
||||
- Automatic parsing of base64/qp encoded nested messages.
|
||||
- Refactoring or ``MessageStream`` to use iterators more efficiently.
|
||||
- Added "ludicrous mode" Cargo option to use some unsafe code for additional performance.
|
||||
|
||||
### Changed
|
||||
- Base64/QuotedPrintable decoding optimizations.
|
||||
- Refactoring or ``MessageStream`` to use iterators more efficiently.
|
||||
|
||||
### Fixed
|
||||
- Fixed support for empty messages.
|
||||
- Fixed raw offsets of multipart/* parts to include MIME epilogue.
|
||||
- Fixed values of non-RFC headers.
|
||||
|
||||
mail-parser 0.6.1
|
||||
================================
|
||||
## [0.6.1] - 2022-09-09
|
||||
|
||||
### Added
|
||||
- Support for malformed unstructured fields containing encoded words (#29).
|
||||
- Add support for gb2312 charsets (#30).
|
||||
|
||||
mail-parser 0.6.0
|
||||
================================
|
||||
## [0.6.0] - 2022-08-21
|
||||
|
||||
### Added
|
||||
- Maildir parsing support.
|
||||
- Headers and attributes are now stored in a `Vec` instead of a `HashMap` for a tiny performance enhancement.
|
||||
- Support for Content-Type attributes spanning multiple lines.
|
||||
- Support for malformed Thunderbird messages (#27).
|
||||
- Support for malformed Thunderbird messages (#27).
|
||||
|
||||
### Changed
|
||||
- Headers and attributes are now stored in a `Vec` instead of a `HashMap` for a tiny performance enhancement.
|
||||
|
||||
### Fixed
|
||||
- Fixed raw offset range for body parts.
|
||||
|
||||
mail-parser 0.5.0
|
||||
================================
|
||||
## [0.5.0] - 2022-07-15
|
||||
|
||||
### Added
|
||||
- Added raw offsets to MIME parts.
|
||||
|
||||
### Changed
|
||||
- `Message` headers are now stored as a `MessagePart` with index 0.
|
||||
- Improved `MessagePart` API.
|
||||
- Nested base64/quoted-printable encoded message/rfc822 parts are automatically parsed when calling `get_message`.
|
||||
- Better handling of malformed MIME messages.
|
||||
- Added raw offsets to MIME parts.
|
||||
|
||||
mail-parser 0.4.8
|
||||
================================
|
||||
## [0.4.8] - 2022-06-06
|
||||
|
||||
### Fixed
|
||||
- get_bytes_to_boundary fix (#21)
|
||||
|
||||
mail-parser 0.4.7
|
||||
================================
|
||||
## [0.4.7] - 2022-06-03
|
||||
|
||||
### Added
|
||||
- Retrieving message headers in order (#19)
|
||||
- Added `get_raw_headers` and `get_header` methods.
|
||||
- Added `get_return_address` method to obtain the return address from the Return-Path or From headers.
|
||||
- Support for malformed Return-Path headers.
|
||||
- Support for ks_c_5601 charsets (#20)
|
||||
|
||||
mail-parser 0.4.6
|
||||
================================
|
||||
## [0.4.6]
|
||||
|
||||
### Fixed
|
||||
- DateTime is_valid() fix (#15)
|
||||
|
||||
mail-parser 0.4.5
|
||||
================================
|
||||
|
||||
## [0.4.5] - 2022-03-14
|
||||
|
||||
### Added
|
||||
- DateTime to UNIX timestamp conversion.
|
||||
- Ord, PartialOrd support for DateTime (#13).
|
||||
|
||||
### Fixed
|
||||
- Fixed Message::parse() panic on duplicate Content-Type headers (#14).
|
||||
|
||||
mail-parser 0.4.4
|
||||
================================
|
||||
## [0.4.4] - 2022-01-24
|
||||
|
||||
### Added
|
||||
- Support for multi-line headers.
|
||||
- Text and HTML message body preview.
|
||||
|
||||
### Changed
|
||||
- Improved support for raw headers.
|
||||
|
||||
mail-parser 0.4.3
|
||||
================================
|
||||
## [0.4.3] - 2021-12-31
|
||||
|
||||
### Added
|
||||
- Mbox file parsing support (issue #11) conforming to the [QMail specification](http://qmail.org/qmail-manual-html/man5/mbox.html).
|
||||
- Support for bincode serialize/deserialize.
|
||||
|
||||
mail-parser 0.4.2
|
||||
================================
|
||||
## [0.4.2] - 2021-12-22
|
||||
|
||||
### Added
|
||||
- Added `Message::get_thread_name()` to obtain the base subject of a message as defined in [RFC 5957 - Internet Message Access Protocol - SORT and THREAD Extensions (Section 2.1)](https://datatracker.ietf.org/doc/html/rfc5256#section-2.1).
|
||||
- Added `MimeHeader::get_attachment_name` for simplified access to a MIME attachment file name.
|
||||
|
||||
mail-parser 0.4.1
|
||||
================================
|
||||
- Lazy parsing of nested e-mail messages.
|
||||
## [0.4.1] - 2021-12-16
|
||||
|
||||
### Added
|
||||
- Support for base64/quoted-printable nested messages.
|
||||
|
||||
mail-parser 0.4.0
|
||||
================================
|
||||
### Changed
|
||||
- Lazy parsing of nested e-mail messages.
|
||||
|
||||
## [0.4.0] - 2021-12-16
|
||||
|
||||
### Changed
|
||||
- Lazy conversion to/from HTML an plain text parts.
|
||||
- Improved API.
|
||||
- Parts are now generics.
|
||||
|
||||
mail-parser 0.3.1
|
||||
================================
|
||||
## [0.3.1] - 2021-12-15
|
||||
|
||||
### Added
|
||||
- Support for non-standard headers.
|
||||
|
||||
### Changed
|
||||
- Raw message offsets are stored in the message object.
|
||||
- Message body structure is now stored in the message object.
|
||||
|
||||
mail-parser 0.3
|
||||
================================
|
||||
- Improved API, now `Message::parse` returns `Option<Message>` to indicate when parsing was successful.
|
||||
- Headers are now stored internally in a `HashMap` instead of `struct` fields.
|
||||
## [0.3.0] - 2021-11-08
|
||||
|
||||
### Added
|
||||
- Added support for new RFCs:
|
||||
- [RFC 2557 - MIME Encapsulation of Aggregate Documents, such as HTML (MHTML)](https://datatracker.ietf.org/doc/html/rfc2557)
|
||||
- [RFC 2392 - Content-ID and Message-ID Uniform Resource Locators](https://datatracker.ietf.org/doc/html/rfc2392)
|
||||
- [RFC 3282 - Content Language Headers](https://datatracker.ietf.org/doc/html/rfc3282)
|
||||
- [RFC 3339 - Date and Time on the Internet: Timestamps](https://datatracker.ietf.org/doc/html/rfc3339)
|
||||
|
||||
mail-parser 0.2.1
|
||||
================================
|
||||
### Changed
|
||||
- Improved API, now `Message::parse` returns `Option<Message>` to indicate when parsing was successful.
|
||||
- Headers are now stored internally in a `HashMap` instead of `struct` fields.
|
||||
|
||||
## [0.2.2] - 2021-11-04
|
||||
|
||||
### Changed
|
||||
- Improved decoder results.
|
||||
- Dependency requirements for `encoding_rs`, `serde` and `serde_bytes` use caret ranges (`0.8`, `1.0` and `0.11`) instead of `>=0.8.28`, `>=1.0.117` and `>=0.11.5`.
|
||||
|
||||
## [0.2.1] - 2021-11-03
|
||||
|
||||
### Changed
|
||||
- Performance enhacements, now *mail-parser* is almost as fast as the `unsafe` 0.1 version.
|
||||
|
||||
mail-parser 0.2
|
||||
================================
|
||||
- Re-factoring to use **100% safe** Rust after a [discussion on Reddit](https://www.reddit.com/r/rust/comments/qkc5rk/fast_and_robust_email_parsing_library_for_rust/).
|
||||
## [0.2.0] - 2021-11-03
|
||||
|
||||
### Added
|
||||
- Added `Message::is_empty`.
|
||||
|
||||
mail-parser 0.1.1
|
||||
================================
|
||||
### Changed
|
||||
- Re-factoring to use **100% safe** Rust after a [discussion on Reddit](https://www.reddit.com/r/rust/comments/qkc5rk/fast_and_robust_email_parsing_library_for_rust/).
|
||||
|
||||
## [0.1.1] - 2021-11-02
|
||||
|
||||
### Fixed
|
||||
- Bug-fixing after **fuzzing** the library.
|
||||
|
||||
mail-parser 0.1
|
||||
================================
|
||||
## [0.1.0] - 2021-11-01
|
||||
|
||||
### Added
|
||||
- Initial release with plenty of `unsafe` code to speed things up.
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
+26
-14
@@ -1,8 +1,9 @@
|
||||
[package]
|
||||
name = "mail-parser"
|
||||
description = "Fast and robust e-mail parsing library for Rust"
|
||||
version = "0.11.9"
|
||||
version = "1.0.0"
|
||||
edition = "2024"
|
||||
rust-version = "1.98"
|
||||
authors = [ "Stalwart Labs <hello@stalw.art>"]
|
||||
license = "Apache-2.0 OR MIT"
|
||||
repository = "https://github.com/stalwartlabs/mail-parser"
|
||||
@@ -10,31 +11,42 @@ homepage = "https://github.com/stalwartlabs/mail-parser"
|
||||
keywords = ["email", "mail", "parser", "parse", "mime"]
|
||||
categories = ["email", "parser-implementations"]
|
||||
readme = "README.md"
|
||||
resolver = "2"
|
||||
|
||||
[dependencies]
|
||||
hashify = { version = "0.3" }
|
||||
memchr = { version = "2.7", optional = true }
|
||||
hashify = "0.3"
|
||||
memchr = "2.8"
|
||||
simdutf8 = "0.1"
|
||||
encodify = { path = "../encodify" }
|
||||
encoding_rs = { version = "0.8", optional = true }
|
||||
serde = { version = "1.0", features = ["derive"], optional = true }
|
||||
rkyv = { version = "0.8", optional = true }
|
||||
|
||||
[dev-dependencies]
|
||||
mail-parser = { path = ".", features = ["serde", "full_encoding"] }
|
||||
serde = { version = "1.0", features = ["derive"] }
|
||||
serde_json = "1.0"
|
||||
bincode = "1.3.3"
|
||||
chrono = "0.4"
|
||||
criterion = { version = "0.8", default-features = false, features = ["cargo_bench_support"] }
|
||||
|
||||
[features]
|
||||
default = []
|
||||
full_encoding = ["encoding_rs"]
|
||||
full_encoding = ["dep:encoding_rs"]
|
||||
serde = ["dep:serde"]
|
||||
rkyv = ["dep:rkyv"]
|
||||
base64_slice = ["dep:memchr"]
|
||||
|
||||
[[bench]]
|
||||
name = "kernels"
|
||||
harness = false
|
||||
|
||||
[[bench]]
|
||||
name = "resolve"
|
||||
harness = false
|
||||
|
||||
[lints.rust]
|
||||
rust_2018_idioms = { level = "deny", priority = -1 }
|
||||
unsafe_code = "deny"
|
||||
unsafe_op_in_unsafe_fn = "deny"
|
||||
unexpected_cfgs = { level = "warn", check-cfg = ["cfg(mail_parser_checked_str)"] }
|
||||
|
||||
[lints.clippy]
|
||||
undocumented_unsafe_blocks = "deny"
|
||||
unwrap_used = "deny"
|
||||
|
||||
[profile.bench]
|
||||
debug = true
|
||||
|
||||
[lib]
|
||||
doctest = false
|
||||
|
||||
@@ -3,38 +3,40 @@
|
||||
[](https://crates.io/crates/mail-parser)
|
||||
[](https://github.com/stalwartlabs/mail-parser/actions/workflows/rust.yml)
|
||||
[](https://docs.rs/mail-parser)
|
||||
[](https://crates.io/crates/mail-parser)
|
||||
[](http://www.apache.org/licenses/LICENSE-2.0)
|
||||
|
||||
_mail-parser_ is an **e-mail parsing library** written in Rust that fully conforms to the Internet Message Format standard (_RFC 5322_), the
|
||||
Multipurpose Internet Mail Extensions (MIME; _RFC 2045 - 2049_) as well as many other [internet messaging RFCs](#conformed-rfcs).
|
||||
_mail-parser_ is an **e-mail parsing library** written in Rust that fully conforms to the Internet Message Format standard (_RFC 5322_), the Multipurpose Internet Mail Extensions (MIME; _RFC 2045 - 2049_) as well as many other [internet messaging RFCs](#conformed-rfcs).
|
||||
|
||||
It also supports decoding messages in [41 different character sets](#supported-character-sets) including obsolete formats such as UTF-7.
|
||||
All Unicode (UTF-*) and single-byte character sets are handled internally by the library while support for legacy multi-byte encodings of Chinese
|
||||
and Japanese languages such as BIG5 or ISO-2022-JP is provided by the optional dependency [encoding_rs](https://crates.io/crates/encoding_rs).
|
||||
It also supports decoding messages in [41 different character sets](#supported-character-sets) including obsolete formats such as UTF-7. All Unicode (UTF-*) and single-byte character sets are handled internally by the library while support for legacy multi-byte encodings of Chinese and Japanese languages such as BIG5 or ISO-2022-JP is provided by the optional dependency [encoding_rs](https://crates.io/crates/encoding_rs).
|
||||
|
||||
In general, this library abides by the Postel's law or [Robustness Principle](https://en.wikipedia.org/wiki/Robustness_principle) which
|
||||
states that an implementation must be conservative in its sending behavior and liberal in its receiving behavior. This means that
|
||||
_mail-parser_ will make a best effort to parse non-conformant e-mail messages as long as these do not deviate too much from the standard.
|
||||
In general, this library abides by the Postel's law or [Robustness Principle](https://en.wikipedia.org/wiki/Robustness_principle) which states that an implementation must be conservative in its sending behavior and liberal in its receiving behavior. This means that _mail-parser_ will make a best effort to parse non-conformant e-mail messages as long as these do not deviate too much from the standard.
|
||||
|
||||
Unlike other e-mail parsing libraries that return nested representations of the different MIME parts in a message, this library
|
||||
conforms to [RFC 8621, Section 4.1.4](https://datatracker.ietf.org/doc/html/rfc8621#section-4.1.4) and provides a more human-friendly
|
||||
representation of the message contents consisting of just text body parts, html body parts and attachments. Additionally, conversion to/from
|
||||
HTML and plain text inline body parts is done automatically when the _alternative_ version is missing.
|
||||
Besides the MIME tree, every message comes with the three body lists of [RFC 8621, Section 4.1.4](https://datatracker.ietf.org/doc/html/rfc8621#section-4.1.4): the text body, the HTML body and the attachments. HTML is converted to plain text, and plain text to HTML, when a part has no alternative in the other format.
|
||||
|
||||
Performance and memory safety were two important factors while designing _mail-parser_:
|
||||
## Features
|
||||
|
||||
- **Zero-copy**: Practically all strings returned by this library are `Cow<str>` references to the input raw message.
|
||||
- **High performance Base64 decoding** based on Chromium's decoder ([the fastest non-SIMD decoder](https://github.com/lemire/fastbase64)).
|
||||
- **Fast parsing** of message header fields, character set names and HTML entities using [perfect hashing](https://en.wikipedia.org/wiki/Perfect_hash_function).
|
||||
- Written in **100% safe** Rust with no external dependencies.
|
||||
- Every function in the library has been [fuzzed](#testing-fuzzing--benchmarking) and thoroughly [tested with MIRI](#testing-fuzzing--benchmarking).
|
||||
- **Fast parsing**:
|
||||
- Boundaries and header fields are found by SIMD kernels (NEON on aarch64, AVX2 and SSE2 on x86-64, `memchr` on every other target).
|
||||
- Base64 and quoted-printable are decoded by the SIMD codecs of [encodify](https://github.com/stalwartlabs/encodify)
|
||||
- UTF-8 is validated by [simdutf8](https://crates.io/crates/simdutf8)
|
||||
- Header names, charset labels and HTML entities are looked up with perfect hashing through [hashify](https://crates.io/crates/hashify).
|
||||
- **Lazy decoding**: Nothing is transfer-decoded or converted from its character set during the parse; a message whose attachments are never read never pays for decoding them.
|
||||
- **Zero-copy**: Practically all strings returned by this library are references to the input raw message.
|
||||
- **Battle-tested** with millions of real-world e-mail messages dating from 1995 until today.
|
||||
- Every function in the library has been [fuzzed](#testing-fuzzing--benchmarking) and thoroughly [tested with MIRI](#testing-fuzzing--benchmarking).
|
||||
- Used in production environments worldwide by [Stalwart Mail Server](https://github.com/stalwartlabs/mail-server).
|
||||
|
||||
## Usage Example
|
||||
> Note: This library does not support building e-mail messages as this functionality is provided separately by the [`mail-builder`](https://crates.io/crates/mail-builder) crate.
|
||||
|
||||
## Usage
|
||||
|
||||
### Parse a message
|
||||
|
||||
```rust
|
||||
let input = br#"From: Art Vandelay <art@vandelay.com> (Vandelay Industries)
|
||||
use mail_parser::{Address, MessageParser, PartKind};
|
||||
|
||||
let input = br#"From: Art Vandelay <art@vandelay.com> (Vandelay Industries)
|
||||
To: "Colleagues": "James Smythe" <james@vandelay.com>; Friends:
|
||||
jane@example.com, =?UTF-8?Q?John_Sm=C3=AEth?= <john@example.com>;
|
||||
Date: Sat, 20 Nov 2021 14:22:01 -0800
|
||||
@@ -75,126 +77,294 @@ R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7
|
||||
--festivus--
|
||||
"#;
|
||||
|
||||
let message = MessageParser::default().parse(input).unwrap();
|
||||
let message = MessageParser::default().parse(input).expect("a message");
|
||||
|
||||
// Parses addresses (including comments), lists and groups
|
||||
assert_eq!(
|
||||
message.from().unwrap().first().unwrap(),
|
||||
&Addr::new(
|
||||
"Art Vandelay (Vandelay Industries)".into(),
|
||||
"art@vandelay.com"
|
||||
)
|
||||
);
|
||||
let sender = message.from().and_then(|from| from.first()).expect("a sender");
|
||||
assert_eq!(sender.name(), Some("Art Vandelay (Vandelay Industries)"));
|
||||
assert_eq!(sender.address(), Some("art@vandelay.com"));
|
||||
|
||||
assert_eq!(
|
||||
message.to().unwrap().as_group().unwrap(),
|
||||
&[
|
||||
Group::new(
|
||||
"Colleagues",
|
||||
vec![Addr::new("James Smythe".into(), "james@vandelay.com")]
|
||||
),
|
||||
Group::new(
|
||||
"Friends",
|
||||
vec![
|
||||
Addr::new(None, "jane@example.com"),
|
||||
Addr::new("John Smîth".into(), "john@example.com"),
|
||||
]
|
||||
)
|
||||
]
|
||||
);
|
||||
let to = message.to().expect("recipients");
|
||||
let addresses: Vec<_> = to.mailboxes().filter_map(|mailbox| mailbox.address()).collect();
|
||||
assert_eq!(addresses, ["james@vandelay.com", "jane@example.com", "john@example.com"]);
|
||||
let Some(Address::Group(friends)) = to.iter().nth(1) else {
|
||||
panic!("the second item is a group");
|
||||
};
|
||||
assert_eq!(friends.name(), Some("Friends"));
|
||||
assert_eq!(friends.mailboxes().nth(1).and_then(|mailbox| mailbox.name()), Some("John Smîth"));
|
||||
|
||||
assert_eq!(
|
||||
message.date().unwrap().to_rfc3339(),
|
||||
"2021-11-20T14:22:01-08:00"
|
||||
);
|
||||
assert_eq!(message.date().expect("a date").to_rfc3339(), "2021-11-20T14:22:01-08:00");
|
||||
assert_eq!(message.subject(), Some("Why not both importing AND exporting? ☺"));
|
||||
|
||||
// RFC2047 support for encoded text in message readers
|
||||
assert_eq!(
|
||||
message.subject().unwrap(),
|
||||
"Why not both importing AND exporting? ☺"
|
||||
);
|
||||
assert_eq!(
|
||||
message.body_html(0).as_deref(),
|
||||
Some(concat!(
|
||||
"<html><p>I was thinking about quitting the “exporting” to ",
|
||||
"focus just on the “importing”,</p><p>but then I thought,",
|
||||
" why not do both? ☺</p></html>"
|
||||
))
|
||||
);
|
||||
assert_eq!(
|
||||
message.body_text(0).as_deref(),
|
||||
Some(concat!(
|
||||
"I was thinking about quitting the “exporting” to focus just on the",
|
||||
" “importing”,\nbut then I thought, why not do both? ☺\n"
|
||||
))
|
||||
);
|
||||
|
||||
// HTML and text body parts are returned conforming to RFC8621, Section 4.1.4
|
||||
assert_eq!(
|
||||
message.body_html(0).unwrap(),
|
||||
concat!(
|
||||
"<html><p>I was thinking about quitting the “exporting” to ",
|
||||
"focus just on the “importing”,</p><p>but then I thought,",
|
||||
" why not do both? ☺</p></html>"
|
||||
)
|
||||
);
|
||||
let nested = message
|
||||
.attachments()
|
||||
.find_map(|part| part.nested())
|
||||
.expect("a nested message");
|
||||
assert_eq!(nested.subject(), Some("Exporting my book about coffee tables"));
|
||||
assert_eq!(nested.body_text(0).as_deref(), Some("ℌ𝔢𝔩𝔭 𝔪𝔢 𝔢𝔵𝔭𝔬𝔯𝔱 𝔪𝔶 𝔟𝔬𝔬𝔨 𝔭𝔩𝔢𝔞𝔰𝔢!"));
|
||||
assert_eq!(
|
||||
nested.body_html(0).as_deref(),
|
||||
Some("<html><body>ℌ𝔢𝔩𝔭 𝔪𝔢 𝔢𝔵𝔭𝔬𝔯𝔱 𝔪𝔶 𝔟𝔬𝔬𝔨 𝔭𝔩𝔢𝔞𝔰𝔢!</body></html>")
|
||||
);
|
||||
|
||||
// HTML parts are converted to plain text (and viceversa) when missing
|
||||
assert_eq!(
|
||||
message.body_text(0).unwrap(),
|
||||
concat!(
|
||||
"I was thinking about quitting the “exporting” to focus just on the",
|
||||
" “importing”,\nbut then I thought, why not do both? ☺\n"
|
||||
)
|
||||
);
|
||||
|
||||
// Supports nested messages as well as multipart/digest
|
||||
let nested_message = message
|
||||
.attachment(0)
|
||||
.unwrap()
|
||||
.message();
|
||||
.unwrap();
|
||||
|
||||
assert_eq!(
|
||||
nested_message.subject().unwrap(),
|
||||
"Exporting my book about coffee tables"
|
||||
);
|
||||
|
||||
// Handles UTF-* as well as many legacy encodings
|
||||
assert_eq!(
|
||||
nested_message.body_text(0).unwrap(),
|
||||
"ℌ𝔢𝔩𝔭 𝔪𝔢 𝔢𝔵𝔭𝔬𝔯𝔱 𝔪𝔶 𝔟𝔬𝔬𝔨 𝔭𝔩𝔢𝔞𝔰𝔢!"
|
||||
);
|
||||
assert_eq!(
|
||||
nested_message.body_html(0).unwrap(),
|
||||
"<html><body>ℌ𝔢𝔩𝔭 𝔪𝔢 𝔢𝔵𝔭𝔬𝔯𝔱 𝔪𝔶 𝔟𝔬𝔬𝔨 𝔭𝔩𝔢𝔞𝔰𝔢!</body></html>"
|
||||
);
|
||||
|
||||
let nested_attachment = nested_message.attachment(0).unwrap();
|
||||
|
||||
assert_eq!(nested_attachment.len(), 42);
|
||||
|
||||
// Full RFC2231 support for continuations and character sets
|
||||
assert_eq!(
|
||||
nested_attachment.attachment_name().unwrap(),
|
||||
"Book about ☕ tables.gif"
|
||||
);
|
||||
|
||||
// Integrates with Serde
|
||||
println!("{}", serde_json::to_string_pretty(&message).unwrap());
|
||||
let image = nested.attachments().next().expect("an attachment");
|
||||
assert_eq!(image.attachment_name(), Some("Book about ☕ tables.gif"));
|
||||
assert!(matches!(image.kind(), PartKind::Binary));
|
||||
assert_eq!(image.decoded_len(), 42);
|
||||
```
|
||||
|
||||
More examples available under the [examples](examples) directory. Please note that this library does not support building e-mail messages as this functionality is provided separately by the [`mail-builder`](https://crates.io/crates/mail-builder) crate.
|
||||
### Read header fields
|
||||
|
||||
```rust
|
||||
use mail_parser::{HeaderName, HeaderValue, MessageParser};
|
||||
|
||||
let raw = b"Received: from mx.example.com by mail.example.org; Sat, 20 Nov 2021 14:22:05 -0800\r\n\
|
||||
Message-ID: <1234@example.com>\r\n\
|
||||
X-Priority: 1\r\n\
|
||||
X-Custom: first\r\n\
|
||||
X-Custom: second\r\n\
|
||||
Subject: Status report\r\n\
|
||||
\r\n\
|
||||
Body\r\n";
|
||||
let message = MessageParser::new().parse(raw).expect("a message");
|
||||
let headers = message.headers();
|
||||
|
||||
assert_eq!(message.message_id(), Some("1234@example.com"));
|
||||
assert_eq!(headers.get("x-custom").map(|header| header.raw_value()), Some(&b" second\r\n"[..]));
|
||||
assert_eq!(headers.all("X-Custom").count(), 2);
|
||||
assert!(headers.contains(HeaderName::XPriority));
|
||||
|
||||
for header in headers {
|
||||
match header.value() {
|
||||
HeaderValue::Text(text) => println!("{}: {text}", header.raw_name()),
|
||||
HeaderValue::Received(received) => println!("received by {:?}", received.by()),
|
||||
other => println!("{}: {other:?}", header.raw_name()),
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
### Decode bodies on demand
|
||||
|
||||
```rust
|
||||
use mail_parser::{DecodeProblems, MessageParser};
|
||||
|
||||
let raw = concat!(
|
||||
"Content-Type: multipart/mixed; boundary=\"b\"\r\n",
|
||||
"\r\n",
|
||||
"--b\r\n",
|
||||
"Content-Type: text/plain; charset=iso-8859-1\r\n",
|
||||
"Content-Transfer-Encoding: quoted-printable\r\n",
|
||||
"\r\n",
|
||||
"Caf=E9 cr=E8me\r\n",
|
||||
"--b\r\n",
|
||||
"Content-Type: application/octet-stream\r\n",
|
||||
"Content-Transfer-Encoding: base64\r\n",
|
||||
"\r\n",
|
||||
"AAEC*AwQF\r\n",
|
||||
"--b--\r\n",
|
||||
);
|
||||
let message = MessageParser::new().parse(raw).expect("a message");
|
||||
|
||||
let text = message.text_body().next().expect("a text part");
|
||||
assert_eq!(text.text().as_deref(), Some("Café crème"));
|
||||
assert_eq!(text.text_prefix(4).as_deref(), Some("Café"));
|
||||
|
||||
let file = message.attachments().next().expect("an attachment");
|
||||
assert_eq!(file.decoded().as_ref(), b"\x00\x01\x02\x03\x04\x05");
|
||||
assert_eq!(file.decoded_len(), 6);
|
||||
let (_, problems) = file.decoded_checked();
|
||||
assert!(problems.contains(DecodeProblems::MALFORMED_TRANSFER_ENCODING));
|
||||
```
|
||||
|
||||
### Walk the MIME structure
|
||||
|
||||
```rust
|
||||
use mail_parser::{MessageParser, Source};
|
||||
|
||||
let raw = concat!(
|
||||
"Content-Type: multipart/mixed; boundary=\"outer\"\r\n",
|
||||
"\r\n",
|
||||
"--outer\r\n",
|
||||
"Content-Type: multipart/alternative; boundary=\"inner\"\r\n",
|
||||
"\r\n",
|
||||
"--inner\r\n",
|
||||
"Content-Type: text/plain\r\n",
|
||||
"\r\n",
|
||||
"Hello\r\n",
|
||||
"--inner\r\n",
|
||||
"Content-Type: text/html\r\n",
|
||||
"\r\n",
|
||||
"<p>Hello</p>\r\n",
|
||||
"--inner--\r\n",
|
||||
"--outer\r\n",
|
||||
"Content-Type: message/rfc822\r\n",
|
||||
"Content-Transfer-Encoding: base64\r\n",
|
||||
"\r\n",
|
||||
"U3ViamVjdDogRm9yd2FyZGVkDQoNCkJvZHkNCg==\r\n",
|
||||
"--outer--\r\n",
|
||||
);
|
||||
let message = MessageParser::new().parse(raw).expect("a message");
|
||||
|
||||
let alternative = message.part_by_boundary("inner").expect("a multipart");
|
||||
assert_eq!(alternative.id(), 1);
|
||||
assert_eq!(alternative.delimiter(), Some("outer"));
|
||||
let html = alternative.children().nth(1).expect("the HTML part");
|
||||
assert_eq!(html.delimiter(), Some("inner"));
|
||||
assert_eq!(html.raw_body(), b"<p>Hello</p>");
|
||||
|
||||
let forwarded = message.parts().find_map(|part| part.nested()).expect("a nested message");
|
||||
assert_eq!(forwarded.subject(), Some("Forwarded"));
|
||||
assert_eq!(forwarded.container().map(|part| part.id()), Some(4));
|
||||
assert_eq!(forwarded.source(), Source::Decoded(4));
|
||||
assert_eq!(forwarded.body_text(0).as_deref(), Some("Body\r\n"));
|
||||
assert_eq!(message.parts().len(), 6);
|
||||
```
|
||||
|
||||
### Parse many messages
|
||||
|
||||
```rust
|
||||
use mail_parser::{MessageBuffers, MessageParser, mailbox::mbox::MessageIterator};
|
||||
|
||||
let mbox = b"From ann@example.com Sat Jan 3 01:05:34 1996\n\
|
||||
Subject: first\n\
|
||||
\n\
|
||||
Hello\n\
|
||||
From bob@example.com Sat Jan 3 01:06:10 1996\n\
|
||||
Subject: second\n\
|
||||
\n\
|
||||
Hi\n";
|
||||
|
||||
let parser = MessageParser::new();
|
||||
let mut buffers = MessageBuffers::new();
|
||||
let mut subjects = Vec::new();
|
||||
for entry in MessageIterator::new(&mbox[..]) {
|
||||
let entry = entry.expect("a readable mbox");
|
||||
if let Some(message) = parser.parse_with(entry.contents(), &mut buffers) {
|
||||
subjects.push(message.subject().unwrap_or_default().to_string());
|
||||
buffers = message.into_buffers();
|
||||
}
|
||||
}
|
||||
assert_eq!(subjects, ["first", "second"]);
|
||||
```
|
||||
|
||||
### Parse header values on their own
|
||||
|
||||
```rust
|
||||
use mail_parser::{DateTime, HeaderForm};
|
||||
|
||||
let parsed = HeaderForm::Addresses.parse(b" Ann <ann@example.com>, bob@example.com\r\n");
|
||||
let list = parsed.value().as_address().expect("an address list");
|
||||
assert_eq!(list.mailboxes().count(), 2);
|
||||
|
||||
let subject = HeaderForm::Text.parse(b" =?utf-8?q?caf=C3=A9?= au lait\r\n");
|
||||
assert_eq!(subject.value().as_text(), Some("café au lait"));
|
||||
|
||||
let date = DateTime::parse_rfc822("Sat, 20 Nov 2021 14:22:01 -0800").expect("a date");
|
||||
assert_eq!(date.to_timestamp(), 1_637_446_921);
|
||||
```
|
||||
|
||||
### Configure the parser
|
||||
|
||||
```rust
|
||||
use mail_parser::{HeaderForm, HeaderName, MessageParser};
|
||||
|
||||
let parser = MessageParser::new()
|
||||
.header(HeaderName::Received, HeaderForm::Raw)
|
||||
.header("X-Sender", HeaderForm::Addresses)
|
||||
.unknown_headers(HeaderForm::Ignore)
|
||||
.max_depth(16)
|
||||
.max_parts(500);
|
||||
let message = parser
|
||||
.parse(b"X-Sender: <kel@vandelay.com>\r\nX-Spam: yes\r\n\r\nbody")
|
||||
.expect("a message");
|
||||
let sender = message
|
||||
.headers()
|
||||
.value("X-Sender")
|
||||
.and_then(|value| value.as_address())
|
||||
.and_then(|list| list.first());
|
||||
assert_eq!(sender.and_then(|mailbox| mailbox.address()), Some("kel@vandelay.com"));
|
||||
assert!(message.headers().value("X-Spam").is_some_and(|value| value.is_empty()));
|
||||
```
|
||||
|
||||
Build a parser once and share it; it is `Send` and `Sync`. `header(name, form)` sets the form of one header field, `unknown_headers(form)` the form of every field with a name the parser does not know. Content-Type, Content-Disposition and Content-Transfer-Encoding always keep their MIME form. The defaults are the forms 0.11 used:
|
||||
|
||||
| Form | Header fields |
|
||||
|---|---|
|
||||
| `Text` | Subject, Comments, Content-Description, Content-Location, Content-Transfer-Encoding |
|
||||
| `Addresses` | From, To, Cc, Bcc, Reply-To, Sender, Resent-From, Resent-To, Resent-Cc, Resent-Bcc, Resent-Sender, List-Archive, List-Help, List-ID, List-Owner, List-Post, List-Subscribe, List-Unsubscribe |
|
||||
| `MessageIds` | Message-ID, In-Reply-To, References, Return-Path, Content-ID, Resent-Message-ID |
|
||||
| `CommaList` | Keywords, Content-Language |
|
||||
| `Date` | Date, Resent-Date |
|
||||
| `ContentType` | Content-Type, Content-Disposition |
|
||||
| `Received` | Received |
|
||||
| `Raw` | every other field |
|
||||
|
||||
`Ignore` keeps a field with an empty value, and any form can be set for any name. `parse_headers()` stops after the header block of the message, for callers that need no MIME structure, such as DKIM verification. The limits bound the nesting depth (64 by default), the number of parts (10,000) and the levels of transfer-encoded nested messages that are decoded and parsed (3); content past a limit stays in the last part, which is flagged.
|
||||
|
||||
### Keep a message
|
||||
|
||||
```rust
|
||||
use mail_parser::{Message, MessageParser};
|
||||
|
||||
let raw = b"Subject: moved\r\n\r\nbody".to_vec();
|
||||
let message: Message<'static> = MessageParser::new().parse_owned(raw).expect("a message");
|
||||
let subject = std::thread::spawn(move || message.subject().map(str::to_string))
|
||||
.join()
|
||||
.expect("the thread finished");
|
||||
assert_eq!(subject.as_deref(), Some("moved"));
|
||||
```
|
||||
|
||||
`parse_owned()` takes ownership of the input, and `into_owned()` copies a borrowed input; either way only the raw bytes are copied or moved, never the parsed values.
|
||||
|
||||
## Performance
|
||||
|
||||
**[PLACEHOLDER: performance section, to be written after the final benchmarks against 0.11 and against other Rust and C/C++ parsers.]**
|
||||
|
||||
## Feature flags
|
||||
|
||||
| Feature | Effect |
|
||||
|---|---|
|
||||
| `full_encoding` | Decodes the multi-byte character sets through `encoding_rs`: Shift_JIS, EUC-JP, ISO-2022-JP, Big5, GBK, GB18030, EUC-KR, windows-874, IBM866, x-mac-cyrillic and x-user-defined. Without it, text in these character sets is decoded as UTF-8 and reported as an unknown charset by `text_checked()`. |
|
||||
| `serde` | `Serialize` for `Message` and the views; `Serialize` and `Deserialize` for `DateTime`, `HeaderName` and the Received enums. |
|
||||
|
||||
No feature is enabled by default. The minimum supported Rust version is 1.98.
|
||||
|
||||
## Testing, Fuzzing & Benchmarking
|
||||
|
||||
To run the testsuite:
|
||||
To run the test suite, including the comparison of every message under `resources/eml/` with its expected JSON (in LF and CRLF form; a mismatch writes the parsed message to a `.failed` file next to it):
|
||||
|
||||
```bash
|
||||
$ cargo test --all-features
|
||||
$ cargo test --features full_encoding,serde
|
||||
```
|
||||
|
||||
or, to run the testsuite with MIRI:
|
||||
and without optional features:
|
||||
|
||||
```bash
|
||||
$ cargo +nightly miri test --all-features
|
||||
$ cargo test
|
||||
```
|
||||
|
||||
To fuzz the library with `cargo-fuzz`:
|
||||
**[PLACEHOLDER: fuzzing and Miri commands, to be written after the final fuzzing and Miri runs.]**
|
||||
|
||||
To run the micro-benchmarks of the SIMD kernels and of string resolution:
|
||||
|
||||
```bash
|
||||
$ cargo +nightly fuzz run mail_parser
|
||||
```
|
||||
|
||||
and, to run the benchmarks:
|
||||
|
||||
```bash
|
||||
$ cargo +nightly bench --all-features
|
||||
$ cargo bench --bench kernels
|
||||
$ cargo bench --bench resolve
|
||||
```
|
||||
|
||||
## Conformed RFCs
|
||||
@@ -215,63 +385,70 @@ and, to run the benchmarks:
|
||||
- [RFC 2152 - UTF-7 - A Mail-Safe Transformation Format of Unicode](https://datatracker.ietf.org/doc/html/rfc2152)
|
||||
- [RFC 2369 - The Use of URLs as Meta-Syntax for Core Mail List Commands and their Transport through Message Header Fields](https://datatracker.ietf.org/doc/html/rfc2369)
|
||||
- [RFC 2919 - List-Id: A Structured Field and Namespace for the Identification of Mailing Lists](https://datatracker.ietf.org/doc/html/rfc2919)
|
||||
- [RFC 5321 - Simple Mail Transfer Protocol (Section 4.4, trace information)](https://datatracker.ietf.org/doc/html/rfc5321#section-4.4)
|
||||
- [RFC 3848 - ESMTP and LMTP Transmission Types Registration](https://datatracker.ietf.org/doc/html/rfc3848)
|
||||
- [RFC 3339 - Date and Time on the Internet: Timestamps](https://datatracker.ietf.org/doc/html/rfc3339)
|
||||
- [RFC 5233 - Sieve Email Filtering: Subaddress Extension](https://datatracker.ietf.org/doc/html/rfc5233)
|
||||
- [RFC 8621 - The JSON Meta Application Protocol (JMAP) for Mail (Section 4.1.4)](https://datatracker.ietf.org/doc/html/rfc8621#section-4.1.4)
|
||||
- [RFC 5957 - Internet Message Access Protocol - SORT and THREAD Extensions (Section 2.1)](https://datatracker.ietf.org/doc/html/rfc5256#section-2.1)
|
||||
- [RFC 5256 - Internet Message Access Protocol - SORT and THREAD Extensions (Section 2.1)](https://datatracker.ietf.org/doc/html/rfc5256#section-2.1)
|
||||
|
||||
## Supported Character Sets
|
||||
|
||||
Every label of the [WHATWG Encoding Standard](https://encoding.spec.whatwg.org/#names-and-labels) is recognized, along with the MIME names of the character sets below. As in that standard, text labeled US-ASCII or ISO-8859-1 is decoded as windows-1252, TIS-620 covers ISO-8859-11, and with the `full_encoding` feature the labels mapped to the replacement encoding (ISO-2022-KR, ISO-2022-CN, HZ-GB-2312) turn the text into a single U+FFFD.
|
||||
|
||||
- UTF-8
|
||||
- UTF-16, UTF-16BE, UTF-16LE
|
||||
- UTF-7
|
||||
- US-ASCII
|
||||
- ISO-8859-1
|
||||
- ISO-8859-2
|
||||
- ISO-8859-3
|
||||
- ISO-8859-4
|
||||
- ISO-8859-5
|
||||
- ISO-8859-6
|
||||
- ISO-8859-7
|
||||
- ISO-8859-8
|
||||
- ISO-8859-9
|
||||
- ISO-8859-10
|
||||
- ISO-8859-13
|
||||
- ISO-8859-14
|
||||
- ISO-8859-15
|
||||
- ISO-8859-1
|
||||
- ISO-8859-2
|
||||
- ISO-8859-3
|
||||
- ISO-8859-4
|
||||
- ISO-8859-5
|
||||
- ISO-8859-6
|
||||
- ISO-8859-7
|
||||
- ISO-8859-8
|
||||
- ISO-8859-9
|
||||
- ISO-8859-10
|
||||
- ISO-8859-13
|
||||
- ISO-8859-14
|
||||
- ISO-8859-15
|
||||
- ISO-8859-16
|
||||
- CP1250
|
||||
- CP1251
|
||||
- CP1252
|
||||
- CP1253
|
||||
- CP1254
|
||||
- CP1255
|
||||
- CP1256
|
||||
- CP1257
|
||||
- CP1258
|
||||
- windows-1250
|
||||
- windows-1251
|
||||
- windows-1252
|
||||
- windows-1253
|
||||
- windows-1254
|
||||
- windows-1255
|
||||
- windows-1256
|
||||
- windows-1257
|
||||
- windows-1258
|
||||
- KOI8-R
|
||||
- KOI8_U
|
||||
- MACINTOSH
|
||||
- KOI8-U
|
||||
- Macintosh (Mac OS Roman)
|
||||
- IBM850
|
||||
- TIS-620
|
||||
|
||||
Supported character sets via the optional dependency [encoding_rs](https://crates.io/crates/encoding_rs):
|
||||
|
||||
- SHIFT_JIS
|
||||
- BIG5
|
||||
- EUC-JP
|
||||
- EUC-KR
|
||||
|
||||
With the `full_encoding` feature, through [encoding_rs](https://crates.io/crates/encoding_rs):
|
||||
|
||||
- Shift_JIS
|
||||
- EUC-JP
|
||||
- ISO-2022-JP
|
||||
- Big5
|
||||
- GBK (GB2312)
|
||||
- GB18030
|
||||
- GBK
|
||||
- ISO-2022-JP
|
||||
- WINDOWS-874
|
||||
- IBM-866
|
||||
- EUC-KR
|
||||
- windows-874
|
||||
- IBM866
|
||||
- x-mac-cyrillic
|
||||
- x-user-defined
|
||||
|
||||
## License
|
||||
|
||||
Licensed under either of
|
||||
|
||||
* Apache License, Version 2.0 ([LICENSE-APACHE](LICENSE-APACHE) or http://www.apache.org/licenses/LICENSE-2.0)
|
||||
* MIT license ([LICENSE-MIT](LICENSE-MIT) or http://opensource.org/licenses/MIT)
|
||||
* Apache License, Version 2.0 ([LICENSES/Apache-2.0.txt](LICENSES/Apache-2.0.txt) or <https://www.apache.org/licenses/LICENSE-2.0>)
|
||||
* MIT license ([LICENSES/MIT.txt](LICENSES/MIT.txt) or <https://opensource.org/licenses/MIT>)
|
||||
|
||||
at your option.
|
||||
|
||||
|
||||
@@ -0,0 +1,197 @@
|
||||
/*
|
||||
* SPDX-FileCopyrightText: 2020 Stalwart Labs LLC <hello@stalw.art>
|
||||
*
|
||||
* SPDX-License-Identifier: Apache-2.0 OR MIT
|
||||
*/
|
||||
|
||||
#[path = "support/corpus.rs"]
|
||||
mod corpus;
|
||||
|
||||
use corpus::{LineEnding, Sample};
|
||||
use criterion::{BenchmarkId, Criterion, Throughput, criterion_group, criterion_main};
|
||||
use mail_parser::scan::Kernel;
|
||||
use memchr::{memchr_iter, memmem};
|
||||
use std::{hint::black_box, time::Duration};
|
||||
|
||||
fn body_of(sample: &Sample) -> &[u8] {
|
||||
memmem::find(&sample.bytes, b"\n\n")
|
||||
.or_else(|| memmem::find(&sample.bytes, b"\r\n\r\n"))
|
||||
.and_then(|pos| sample.bytes.get(pos..))
|
||||
.unwrap_or(&sample.bytes)
|
||||
}
|
||||
|
||||
fn count(hay: &[u8], find: impl Fn(&[u8], usize) -> Option<usize>) -> usize {
|
||||
let mut total = 0;
|
||||
let mut from = 0;
|
||||
while let Some(hit) = find(hay, from) {
|
||||
total += 1;
|
||||
from = hit + 1;
|
||||
}
|
||||
total
|
||||
}
|
||||
|
||||
fn dash_by_memchr_dash(hay: &[u8]) -> usize {
|
||||
memchr_iter(b'-', hay)
|
||||
.filter(|&pos| {
|
||||
pos > 0 && hay.get(pos - 1) == Some(&b'\n') && hay.get(pos + 1) == Some(&b'-')
|
||||
})
|
||||
.count()
|
||||
}
|
||||
|
||||
fn dash_by_memchr_newline(hay: &[u8]) -> usize {
|
||||
memchr_iter(b'\n', hay)
|
||||
.filter(|&pos| hay.get(pos + 1..pos + 3) == Some(b"--"))
|
||||
.count()
|
||||
}
|
||||
|
||||
fn inputs() -> Vec<(String, Vec<u8>)> {
|
||||
let synthetic = corpus::synthetic(LineEnding::Crlf);
|
||||
let find = |name: &str, sample: &str| {
|
||||
synthetic
|
||||
.iter()
|
||||
.find(|c| c.name.starts_with(name))
|
||||
.and_then(|c| c.samples.iter().find(|s| s.name == sample))
|
||||
.map(|s| body_of(s).to_vec())
|
||||
.unwrap_or_default()
|
||||
};
|
||||
vec![
|
||||
(
|
||||
"base64-attachment".to_string(),
|
||||
find("attachments", "attachments-2"),
|
||||
),
|
||||
(
|
||||
"html-newsletter".to_string(),
|
||||
find("newsletter", "newsletter-5"),
|
||||
),
|
||||
("text-8bit".to_string(), find("plain-large", "plain-large")),
|
||||
("dash-heavy".to_string(), find("dashes", "dashes")),
|
||||
]
|
||||
}
|
||||
|
||||
fn delimiter_scan(c: &mut Criterion) {
|
||||
let mut group = c.benchmark_group("delimiter_scan");
|
||||
for (name, hay) in inputs() {
|
||||
group.throughput(Throughput::Bytes(hay.len() as u64));
|
||||
for kernel in Kernel::available() {
|
||||
let label = match kernel {
|
||||
Kernel::MEMCHR => "memchr-memmem",
|
||||
kernel => kernel.name(),
|
||||
};
|
||||
group.bench_with_input(BenchmarkId::new(label, &name), &hay, |b, h| {
|
||||
b.iter(|| count(black_box(h), |hay, from| kernel.dash_line(hay, from)))
|
||||
});
|
||||
}
|
||||
group.bench_with_input(BenchmarkId::new("memchr-dash", &name), &hay, |b, h| {
|
||||
b.iter(|| dash_by_memchr_dash(black_box(h)))
|
||||
});
|
||||
group.bench_with_input(BenchmarkId::new("memchr-newline", &name), &hay, |b, h| {
|
||||
b.iter(|| dash_by_memchr_newline(black_box(h)))
|
||||
});
|
||||
}
|
||||
group.finish();
|
||||
}
|
||||
|
||||
fn header_messages(line_ending: LineEnding) -> Vec<Vec<u8>> {
|
||||
corpus::synthetic(line_ending)
|
||||
.into_iter()
|
||||
.find(|c| c.name.starts_with("modern-headers"))
|
||||
.map(|c| c.samples.into_iter().map(|s| s.bytes).collect())
|
||||
.unwrap_or_default()
|
||||
}
|
||||
|
||||
fn crlf_then_lf(hay: &[u8]) -> Option<usize> {
|
||||
memmem::find(hay, b"\r\n\r\n").or_else(|| memmem::find(hay, b"\n\n"))
|
||||
}
|
||||
|
||||
fn fused_blank_line(kernel: Kernel, hay: &[u8]) -> Option<usize> {
|
||||
let mut line = 0;
|
||||
loop {
|
||||
match hay.get(line..)? {
|
||||
[b'\n', ..] | [b'\r', b'\n', ..] => return Some(line),
|
||||
[] => return None,
|
||||
_ => line = kernel.field_end(hay, line)? + 1,
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
const ENRON_BLANK_LINE_SAMPLES: usize = 2;
|
||||
|
||||
fn blank_line(c: &mut Criterion) {
|
||||
let mut group = c.benchmark_group("blank_line");
|
||||
let enron: Vec<Vec<u8>> = corpus::enron(ENRON_BLANK_LINE_SAMPLES)
|
||||
.map(|c| c.samples.into_iter().map(|s| s.bytes).collect())
|
||||
.unwrap_or_default();
|
||||
let inputs = [
|
||||
("modern-lf", header_messages(LineEnding::Lf)),
|
||||
("modern-crlf", header_messages(LineEnding::Crlf)),
|
||||
("enron-crlf", enron),
|
||||
];
|
||||
for (name, messages) in inputs {
|
||||
if messages.is_empty() {
|
||||
continue;
|
||||
}
|
||||
group.throughput(Throughput::Elements(messages.len() as u64));
|
||||
let messages = &messages;
|
||||
group.bench_function(BenchmarkId::new("memmem-crlf-then-lf", name), |b| {
|
||||
b.iter(|| {
|
||||
messages
|
||||
.iter()
|
||||
.filter_map(|m| crlf_then_lf(black_box(m)))
|
||||
.sum::<usize>()
|
||||
})
|
||||
});
|
||||
for kernel in Kernel::available() {
|
||||
group.bench_function(
|
||||
BenchmarkId::new(format!("fused-{}", kernel.name()), name),
|
||||
|b| {
|
||||
b.iter(|| {
|
||||
messages
|
||||
.iter()
|
||||
.filter_map(|m| fused_blank_line(kernel, black_box(m)))
|
||||
.sum::<usize>()
|
||||
})
|
||||
},
|
||||
);
|
||||
}
|
||||
}
|
||||
group.finish();
|
||||
}
|
||||
|
||||
fn field_split(c: &mut Criterion) {
|
||||
let mut group = c.benchmark_group("field_split");
|
||||
let blocks: Vec<Vec<u8>> = header_messages(LineEnding::Crlf)
|
||||
.into_iter()
|
||||
.filter_map(|m| {
|
||||
let end = fused_blank_line(Kernel::SCALAR, &m)?;
|
||||
m.get(..end).map(<[u8]>::to_vec)
|
||||
})
|
||||
.collect();
|
||||
let bytes: usize = blocks.iter().map(Vec::len).sum();
|
||||
group.throughput(Throughput::Bytes(bytes as u64));
|
||||
for kernel in Kernel::available() {
|
||||
let blocks = &blocks;
|
||||
group.bench_function(kernel.name(), |b| {
|
||||
b.iter(|| {
|
||||
blocks
|
||||
.iter()
|
||||
.map(|block| count(black_box(block), |hay, from| kernel.field_end(hay, from)))
|
||||
.sum::<usize>()
|
||||
})
|
||||
});
|
||||
}
|
||||
group.finish();
|
||||
}
|
||||
|
||||
fn config() -> Criterion {
|
||||
Criterion::default()
|
||||
.warm_up_time(Duration::from_millis(500))
|
||||
.measurement_time(Duration::from_secs(2))
|
||||
.sample_size(30)
|
||||
}
|
||||
|
||||
criterion_group! {
|
||||
name = benches;
|
||||
config = config();
|
||||
targets = delimiter_scan, blank_line, field_split
|
||||
}
|
||||
criterion_main!(benches);
|
||||
@@ -0,0 +1,113 @@
|
||||
/*
|
||||
* SPDX-FileCopyrightText: 2020 Stalwart Labs LLC <hello@stalw.art>
|
||||
*
|
||||
* SPDX-License-Identifier: Apache-2.0 OR MIT
|
||||
*/
|
||||
|
||||
#[path = "support/corpus.rs"]
|
||||
mod corpus;
|
||||
|
||||
use corpus::{Corpus, LineEnding};
|
||||
use criterion::{BenchmarkId, Criterion, Throughput, criterion_group, criterion_main};
|
||||
use mail_parser::{HeaderValue, Message, MessageParser};
|
||||
use std::{hint::black_box, time::Duration};
|
||||
|
||||
const ENRON_PER_USER: usize = 2;
|
||||
|
||||
fn resolver_name() -> &'static str {
|
||||
if cfg!(mail_parser_checked_str) {
|
||||
"checked"
|
||||
} else {
|
||||
"unchecked"
|
||||
}
|
||||
}
|
||||
|
||||
fn touch(message: &Message<'_>) -> usize {
|
||||
let mut total = 0;
|
||||
for part in message.parts() {
|
||||
for header in part.headers().iter() {
|
||||
total += header.raw_name().len();
|
||||
total += match header.value() {
|
||||
HeaderValue::Text(text) => text.len(),
|
||||
HeaderValue::TextList(list) => list.iter().map(str::len).sum(),
|
||||
HeaderValue::Address(list) => list
|
||||
.mailboxes()
|
||||
.map(|mailbox| {
|
||||
mailbox.name().map_or(0, str::len) + mailbox.address().map_or(0, str::len)
|
||||
})
|
||||
.sum(),
|
||||
HeaderValue::ContentType(content_type) => {
|
||||
content_type.ctype().len()
|
||||
+ content_type
|
||||
.attributes()
|
||||
.map(|(name, value)| name.len() + value.len())
|
||||
.sum::<usize>()
|
||||
}
|
||||
HeaderValue::Empty | HeaderValue::DateTime(_) | HeaderValue::Received(_) => 0,
|
||||
};
|
||||
}
|
||||
}
|
||||
total
|
||||
}
|
||||
|
||||
fn corpora() -> Vec<Corpus> {
|
||||
let mut corpora = vec![corpus::testsuite(LineEnding::Crlf)];
|
||||
corpora.extend(corpus::enron(ENRON_PER_USER));
|
||||
corpora.extend(
|
||||
corpus::synthetic(LineEnding::Crlf)
|
||||
.into_iter()
|
||||
.filter(|corpus| corpus.name.starts_with("modern-headers")),
|
||||
);
|
||||
corpora
|
||||
}
|
||||
|
||||
fn resolve(c: &mut Criterion) {
|
||||
let parser = MessageParser::new();
|
||||
let mut group = c.benchmark_group(format!("resolve-{}", resolver_name()));
|
||||
for corpus in corpora() {
|
||||
let messages: Vec<Message<'_>> = corpus
|
||||
.samples
|
||||
.iter()
|
||||
.filter_map(|sample| parser.parse(&sample.bytes))
|
||||
.collect();
|
||||
let headers: usize = messages
|
||||
.iter()
|
||||
.flat_map(|message| message.parts())
|
||||
.map(|part| part.headers().len())
|
||||
.sum();
|
||||
group.throughput(Throughput::Elements(headers as u64));
|
||||
group.bench_function(BenchmarkId::new("touch", &corpus.name), |b| {
|
||||
b.iter(|| {
|
||||
messages
|
||||
.iter()
|
||||
.map(|message| touch(black_box(message)))
|
||||
.sum::<usize>()
|
||||
})
|
||||
});
|
||||
group.bench_function(BenchmarkId::new("parse-and-touch", &corpus.name), |b| {
|
||||
b.iter(|| {
|
||||
corpus
|
||||
.samples
|
||||
.iter()
|
||||
.filter_map(|sample| parser.parse(black_box(&sample.bytes)))
|
||||
.map(|message| touch(&message))
|
||||
.sum::<usize>()
|
||||
})
|
||||
});
|
||||
}
|
||||
group.finish();
|
||||
}
|
||||
|
||||
fn config() -> Criterion {
|
||||
Criterion::default()
|
||||
.warm_up_time(Duration::from_millis(500))
|
||||
.measurement_time(Duration::from_secs(3))
|
||||
.sample_size(30)
|
||||
}
|
||||
|
||||
criterion_group! {
|
||||
name = benches;
|
||||
config = config();
|
||||
targets = resolve
|
||||
}
|
||||
criterion_main!(benches);
|
||||
@@ -0,0 +1,647 @@
|
||||
/*
|
||||
* SPDX-FileCopyrightText: 2020 Stalwart Labs LLC <hello@stalw.art>
|
||||
*
|
||||
* SPDX-License-Identifier: Apache-2.0 OR MIT
|
||||
*/
|
||||
|
||||
#![allow(dead_code)]
|
||||
|
||||
use std::{
|
||||
env,
|
||||
fmt::Write as _,
|
||||
fs,
|
||||
path::{Path, PathBuf},
|
||||
};
|
||||
|
||||
pub const CORPORA_ENV: &str = "MAIL_PARSER_CORPORA";
|
||||
const ENRON_MAILDIR: &str = "enron/maildir";
|
||||
const STALWART_SMTP: &str = "stalwart-smtp";
|
||||
const SIEVE_MESSAGES: &str = "sieve";
|
||||
|
||||
#[derive(Debug, Clone, Copy, PartialEq, Eq)]
|
||||
pub enum LineEnding {
|
||||
Lf,
|
||||
Crlf,
|
||||
}
|
||||
|
||||
impl LineEnding {
|
||||
pub fn suffix(self) -> &'static str {
|
||||
match self {
|
||||
LineEnding::Lf => "lf",
|
||||
LineEnding::Crlf => "crlf",
|
||||
}
|
||||
}
|
||||
|
||||
pub fn apply(self, bytes: &[u8]) -> Vec<u8> {
|
||||
let mut result = Vec::with_capacity(bytes.len() + bytes.len() / 32);
|
||||
match self {
|
||||
LineEnding::Lf => result.extend(bytes.iter().filter(|&&byte| byte != b'\r')),
|
||||
LineEnding::Crlf => {
|
||||
let mut last = 0;
|
||||
for &byte in bytes {
|
||||
if byte == b'\n' && last != b'\r' {
|
||||
result.push(b'\r');
|
||||
}
|
||||
result.push(byte);
|
||||
last = byte;
|
||||
}
|
||||
}
|
||||
}
|
||||
result
|
||||
}
|
||||
}
|
||||
|
||||
#[derive(Debug, Clone)]
|
||||
pub struct Sample {
|
||||
pub name: String,
|
||||
pub bytes: Vec<u8>,
|
||||
}
|
||||
|
||||
#[derive(Debug, Clone)]
|
||||
pub struct Corpus {
|
||||
pub name: String,
|
||||
pub samples: Vec<Sample>,
|
||||
}
|
||||
|
||||
impl Corpus {
|
||||
pub fn total_bytes(&self) -> u64 {
|
||||
self.samples.iter().map(|s| s.bytes.len() as u64).sum()
|
||||
}
|
||||
|
||||
fn with_line_ending(name: &str, line_ending: LineEnding, samples: Vec<Sample>) -> Self {
|
||||
Corpus {
|
||||
name: format!("{name}-{}", line_ending.suffix()),
|
||||
samples: samples
|
||||
.into_iter()
|
||||
.map(|sample| Sample {
|
||||
bytes: line_ending.apply(&sample.bytes),
|
||||
name: sample.name,
|
||||
})
|
||||
.collect(),
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
pub fn mail_parser_root() -> PathBuf {
|
||||
Path::new(env!("CARGO_MANIFEST_DIR")).to_path_buf()
|
||||
}
|
||||
|
||||
pub fn corpora_root() -> PathBuf {
|
||||
env::var_os(CORPORA_ENV).map_or_else(
|
||||
|| mail_parser_root().join("target").join("corpora"),
|
||||
PathBuf::from,
|
||||
)
|
||||
}
|
||||
|
||||
fn corpus_dir(name: &str) -> Option<PathBuf> {
|
||||
let dir = corpora_root().join(name);
|
||||
if dir.is_dir() {
|
||||
return Some(dir);
|
||||
}
|
||||
eprintln!(
|
||||
"corpus {name} not found in {}: skipped (run scripts/fetch-corpora.sh or set {CORPORA_ENV})",
|
||||
dir.display()
|
||||
);
|
||||
None
|
||||
}
|
||||
|
||||
fn read_dir_sorted(dir: &Path) -> Vec<PathBuf> {
|
||||
let mut paths: Vec<_> = fs::read_dir(dir)
|
||||
.into_iter()
|
||||
.flatten()
|
||||
.flatten()
|
||||
.map(|entry| entry.path())
|
||||
.filter(|path| path.is_file())
|
||||
.collect();
|
||||
paths.sort();
|
||||
paths
|
||||
}
|
||||
|
||||
fn load(paths: impl IntoIterator<Item = PathBuf>) -> Vec<Sample> {
|
||||
paths
|
||||
.into_iter()
|
||||
.filter_map(|path| {
|
||||
fs::read(&path).ok().map(|bytes| Sample {
|
||||
name: path.display().to_string(),
|
||||
bytes,
|
||||
})
|
||||
})
|
||||
.collect()
|
||||
}
|
||||
|
||||
pub fn testsuite_samples() -> Vec<Sample> {
|
||||
let resources = mail_parser_root().join("resources");
|
||||
let eml = resources.join("eml");
|
||||
let suites = ["rfc", "legacy", "thirdparty", "malformed"]
|
||||
.iter()
|
||||
.flat_map(|suite| read_dir_sorted(&eml.join(suite)))
|
||||
.filter(|path| path.extension().is_some_and(|ext| ext == "eml"));
|
||||
let sieve = read_dir_sorted(&resources.join(SIEVE_MESSAGES));
|
||||
let smtp = corpus_dir(STALWART_SMTP)
|
||||
.map(|dir| read_dir_sorted(&dir))
|
||||
.unwrap_or_default();
|
||||
load(suites.chain(smtp).chain(sieve))
|
||||
}
|
||||
|
||||
pub fn testsuite(line_ending: LineEnding) -> Corpus {
|
||||
Corpus::with_line_ending("testsuite", line_ending, testsuite_samples())
|
||||
}
|
||||
|
||||
pub fn enron(per_user: usize) -> Option<Corpus> {
|
||||
let users = fs::read_dir(corpus_dir(ENRON_MAILDIR)?).ok()?;
|
||||
let mut users: Vec<_> = users.flatten().map(|entry| entry.path()).collect();
|
||||
users.sort();
|
||||
let mut paths = Vec::new();
|
||||
for user in users {
|
||||
let mut stack = vec![user];
|
||||
let mut taken = 0;
|
||||
while let Some(dir) = stack.pop() {
|
||||
let mut entries: Vec<_> = fs::read_dir(&dir)
|
||||
.into_iter()
|
||||
.flatten()
|
||||
.flatten()
|
||||
.map(|entry| entry.path())
|
||||
.collect();
|
||||
entries.sort();
|
||||
for entry in entries {
|
||||
if entry.is_dir() {
|
||||
stack.push(entry);
|
||||
} else if taken < per_user {
|
||||
paths.push(entry);
|
||||
taken += 1;
|
||||
}
|
||||
}
|
||||
if taken >= per_user {
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
let samples = load(paths);
|
||||
(!samples.is_empty()).then(|| Corpus {
|
||||
name: "enron-crlf".to_string(),
|
||||
samples,
|
||||
})
|
||||
}
|
||||
|
||||
pub fn synthetic(line_ending: LineEnding) -> Vec<Corpus> {
|
||||
let mut rng = Rng(0x9e37_79b9_7f4a_7c15);
|
||||
vec![
|
||||
Corpus::with_line_ending("attachments", line_ending, attachments(&mut rng)),
|
||||
Corpus::with_line_ending("newsletter", line_ending, newsletters(&mut rng)),
|
||||
Corpus::with_line_ending("modern-headers", line_ending, modern_headers(&mut rng)),
|
||||
Corpus::with_line_ending("forwarded", line_ending, forwarded(&mut rng)),
|
||||
Corpus::with_line_ending("dashes", line_ending, dashes(&mut rng)),
|
||||
Corpus::with_line_ending("plain-large", line_ending, plain_large(&mut rng)),
|
||||
]
|
||||
}
|
||||
|
||||
pub fn malformed(line_ending: LineEnding) -> Corpus {
|
||||
Corpus::with_line_ending("malformed-synthetic", line_ending, malformed_samples())
|
||||
}
|
||||
|
||||
struct Rng(u64);
|
||||
|
||||
impl Rng {
|
||||
fn next(&mut self) -> u64 {
|
||||
self.0 ^= self.0 << 13;
|
||||
self.0 ^= self.0 >> 7;
|
||||
self.0 ^= self.0 << 17;
|
||||
self.0
|
||||
}
|
||||
|
||||
fn below(&mut self, limit: usize) -> usize {
|
||||
(self.next() % limit as u64) as usize
|
||||
}
|
||||
|
||||
fn pick<'a>(&mut self, items: &[&'a str]) -> &'a str {
|
||||
items[self.below(items.len())]
|
||||
}
|
||||
|
||||
fn bytes(&mut self, len: usize) -> Vec<u8> {
|
||||
(0..len).map(|_| self.next() as u8).collect()
|
||||
}
|
||||
}
|
||||
|
||||
const WORDS: &[&str] = &[
|
||||
"the",
|
||||
"quarterly",
|
||||
"report",
|
||||
"attached",
|
||||
"please",
|
||||
"review",
|
||||
"meeting",
|
||||
"tomorrow",
|
||||
"budget",
|
||||
"forecast",
|
||||
"café",
|
||||
"naïve",
|
||||
"déjà",
|
||||
"vu",
|
||||
"résumé",
|
||||
"日本語",
|
||||
"über",
|
||||
"schedule",
|
||||
"project",
|
||||
"deadline",
|
||||
"update",
|
||||
"customer",
|
||||
"invoice",
|
||||
"shipping",
|
||||
"order",
|
||||
"account",
|
||||
"security",
|
||||
"password",
|
||||
"reset",
|
||||
"team",
|
||||
"lunch",
|
||||
"Friday",
|
||||
"regards",
|
||||
"thanks",
|
||||
"server",
|
||||
"deploy",
|
||||
"release",
|
||||
"notes",
|
||||
"feature",
|
||||
"bug",
|
||||
"fix",
|
||||
"issue",
|
||||
];
|
||||
|
||||
fn sentence(rng: &mut Rng, words: usize) -> String {
|
||||
let mut out = String::new();
|
||||
for index in 0..words {
|
||||
if index > 0 {
|
||||
out.push(' ');
|
||||
}
|
||||
out.push_str(rng.pick(WORDS));
|
||||
}
|
||||
out.push('.');
|
||||
out
|
||||
}
|
||||
|
||||
fn wrapped_text(rng: &mut Rng, target: usize) -> String {
|
||||
let mut out = String::with_capacity(target + 128);
|
||||
let mut line = String::new();
|
||||
while out.len() < target {
|
||||
let word = rng.pick(WORDS);
|
||||
if line.len() + word.len() + 1 > 72 {
|
||||
out.push_str(&line);
|
||||
out.push('\n');
|
||||
line.clear();
|
||||
if rng.below(12) == 0 {
|
||||
out.push('\n');
|
||||
}
|
||||
}
|
||||
if !line.is_empty() {
|
||||
line.push(' ');
|
||||
}
|
||||
line.push_str(word);
|
||||
}
|
||||
out.push_str(&line);
|
||||
out.push('\n');
|
||||
out
|
||||
}
|
||||
|
||||
fn base64(bytes: &[u8]) -> String {
|
||||
const ALPHABET: &[u8; 64] = b"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";
|
||||
let mut encoded = Vec::with_capacity(bytes.len() * 4 / 3 + 4);
|
||||
for chunk in bytes.chunks(3) {
|
||||
let word = chunk
|
||||
.iter()
|
||||
.enumerate()
|
||||
.fold(0u32, |acc, (i, &b)| acc | (b as u32) << (16 - 8 * i));
|
||||
let symbols = chunk.len() + 1;
|
||||
for index in 0..4 {
|
||||
encoded.push(if index < symbols {
|
||||
ALPHABET[((word >> (18 - 6 * index)) & 0x3f) as usize]
|
||||
} else {
|
||||
b'='
|
||||
});
|
||||
}
|
||||
}
|
||||
let mut out = String::with_capacity(encoded.len() + encoded.len() / 76 + 2);
|
||||
for line in encoded.chunks(76) {
|
||||
out.push_str(std::str::from_utf8(line).unwrap_or_default());
|
||||
out.push('\n');
|
||||
}
|
||||
out
|
||||
}
|
||||
|
||||
fn quoted_printable(text: &str) -> String {
|
||||
let mut out = String::with_capacity(text.len() * 5 / 4);
|
||||
for line in text.split('\n') {
|
||||
let mut column = 0;
|
||||
for &byte in line.as_bytes() {
|
||||
let encoded = if byte == b'=' || byte >= 0x80 || byte == b'\t' {
|
||||
format!("={byte:02X}")
|
||||
} else {
|
||||
(byte as char).to_string()
|
||||
};
|
||||
if column + encoded.len() > 75 {
|
||||
out.push_str("=\n");
|
||||
column = 0;
|
||||
}
|
||||
column += encoded.len();
|
||||
out.push_str(&encoded);
|
||||
}
|
||||
out.push('\n');
|
||||
}
|
||||
out
|
||||
}
|
||||
|
||||
fn html(rng: &mut Rng, target: usize) -> String {
|
||||
let mut out = String::with_capacity(target + 512);
|
||||
out.push_str(
|
||||
"<!DOCTYPE html>\n<html><head><meta charset=\"utf-8\">\n<style>\n:root { --brand-color: #0a66c2; --gap: 12px; }\n.button { color: var(--brand-color); margin: var(--gap); }\n</style>\n</head><body>\n",
|
||||
);
|
||||
while out.len() < target {
|
||||
match rng.below(6) {
|
||||
0 => {
|
||||
let _ = writeln!(out, "<!-- section {} -->", rng.below(1000));
|
||||
}
|
||||
1 => {
|
||||
let _ = writeln!(
|
||||
out,
|
||||
"<table role=\"presentation\" style=\"width:100%;border-top:1px solid #eee\"><tr><td class=\"cell\">{}</td></tr></table>",
|
||||
sentence(rng, 12)
|
||||
);
|
||||
}
|
||||
2 => {
|
||||
let _ = writeln!(
|
||||
out,
|
||||
"<a class=\"button\" href=\"https://example.com/track?id={}&u={}\">{}</a>",
|
||||
rng.next(),
|
||||
rng.next(),
|
||||
sentence(rng, 3)
|
||||
);
|
||||
}
|
||||
3 => out.push_str("<hr style=\"border:0;border-top:1px dashed #ccc\">\n-----\n"),
|
||||
_ => {
|
||||
let _ = writeln!(out, "<p>{}</p>", sentence(rng, 20));
|
||||
}
|
||||
}
|
||||
}
|
||||
out.push_str("</body></html>\n");
|
||||
out
|
||||
}
|
||||
|
||||
fn envelope(rng: &mut Rng, subject: &str, received: usize, extra: &str) -> String {
|
||||
let mut out = String::with_capacity(1024 + received * 256);
|
||||
for hop in 0..received {
|
||||
let _ = write!(
|
||||
out,
|
||||
"Received: from mx{hop}.example.net (mx{hop}.example.net [192.0.2.{}])\n\tby relay{hop}.example.org (Postfix) with ESMTPS id {:X}\n\tfor <user@example.org>; Tue, 3 Sep 2024 10:{:02}:{:02} +0000\n",
|
||||
rng.below(255),
|
||||
rng.next(),
|
||||
rng.below(60),
|
||||
rng.below(60)
|
||||
);
|
||||
}
|
||||
let _ = write!(
|
||||
out,
|
||||
"From: \"Sender {}\" <sender{}@example.com>\nTo: Recipient <user@example.org>, \"Another Person\" <another@example.org>\nSubject: {subject}\nDate: Tue, 3 Sep 2024 10:{:02}:{:02} +0000\nMessage-ID: <{:x}@example.com>\nMIME-Version: 1.0\n{extra}",
|
||||
rng.below(100),
|
||||
rng.below(100),
|
||||
rng.below(60),
|
||||
rng.below(60),
|
||||
rng.next()
|
||||
);
|
||||
out
|
||||
}
|
||||
|
||||
fn attachments(rng: &mut Rng) -> Vec<Sample> {
|
||||
[(400_000usize, 150_000usize), (60_000, 20_000), (2_000_000, 300_000)]
|
||||
.into_iter()
|
||||
.enumerate()
|
||||
.map(|(index, (pdf, png))| {
|
||||
let outer = format!("----=_Part_{index}_1634.1725357934");
|
||||
let inner = format!("----=_Part_{}_1634.1725357934", index + 10);
|
||||
let text = wrapped_text(rng, 4_000);
|
||||
let page = html(rng, 30_000);
|
||||
let mut out = envelope(
|
||||
rng,
|
||||
"Quarterly report",
|
||||
4,
|
||||
&format!("Content-Type: multipart/mixed; boundary=\"{outer}\"\n\nThis is a multi-part message in MIME format.\n\n"),
|
||||
);
|
||||
let _ = write!(
|
||||
out,
|
||||
"--{outer}\nContent-Type: multipart/alternative; boundary=\"{inner}\"\n\n--{inner}\nContent-Type: text/plain; charset=utf-8\nContent-Transfer-Encoding: quoted-printable\n\n{}--{inner}\nContent-Type: text/html; charset=utf-8\nContent-Transfer-Encoding: quoted-printable\n\n{}--{inner}--\n\n",
|
||||
quoted_printable(&text),
|
||||
quoted_printable(&page)
|
||||
);
|
||||
let _ = write!(
|
||||
out,
|
||||
"--{outer}\nContent-Type: application/pdf; name=\"report.pdf\"\nContent-Disposition: attachment; filename=\"report.pdf\"\nContent-Transfer-Encoding: base64\n\n{}--{outer}\nContent-Type: image/png; name=\"photo.png\"\nContent-Disposition: inline; filename=\"photo.png\"\nContent-ID: <photo{index}@example.com>\nContent-Transfer-Encoding: base64\n\n{}--{outer}--\n",
|
||||
base64(&rng.bytes(pdf)),
|
||||
base64(&rng.bytes(png))
|
||||
);
|
||||
Sample {
|
||||
name: format!("attachments-{index}"),
|
||||
bytes: out.into_bytes(),
|
||||
}
|
||||
})
|
||||
.collect()
|
||||
}
|
||||
|
||||
fn newsletters(rng: &mut Rng) -> Vec<Sample> {
|
||||
(0..6)
|
||||
.map(|index| {
|
||||
let boundary = format!("b1_{:x}", rng.next());
|
||||
let related = format!("b2_{:x}", rng.next());
|
||||
let mut text = wrapped_text(rng, 8_000 + index * 2_000);
|
||||
text.push_str("-----\nUnsubscribe: https://example.com/u\n-- \nThe Newsletter Team\n");
|
||||
let page = html(rng, 60_000 + index * 10_000);
|
||||
let mut out = envelope(
|
||||
rng,
|
||||
"Your weekly digest",
|
||||
3,
|
||||
&format!("Content-Type: multipart/alternative; boundary=\"{boundary}\"\n\n"),
|
||||
);
|
||||
let _ = write!(
|
||||
out,
|
||||
"--{boundary}\nContent-Type: text/plain; charset=utf-8\nContent-Transfer-Encoding: 8bit\n\n{text}\n--{boundary}\nContent-Type: multipart/related; boundary=\"{related}\"\n\n--{related}\nContent-Type: text/html; charset=utf-8\nContent-Transfer-Encoding: quoted-printable\n\n{}\n--{related}\nContent-Type: image/gif; name=\"logo.gif\"\nContent-ID: <logo@example.com>\nContent-Transfer-Encoding: base64\n\n{}--{related}--\n\n--{boundary}--\n",
|
||||
quoted_printable(&page),
|
||||
base64(&rng.bytes(12_000))
|
||||
);
|
||||
Sample {
|
||||
name: format!("newsletter-{index}"),
|
||||
bytes: out.into_bytes(),
|
||||
}
|
||||
})
|
||||
.collect()
|
||||
}
|
||||
|
||||
fn modern_headers(rng: &mut Rng) -> Vec<Sample> {
|
||||
(0..20)
|
||||
.map(|index| {
|
||||
let boundary = format!("000000000000{:x}", rng.next());
|
||||
let signature: String = (0..6)
|
||||
.map(|_| format!("\t {}\n", base64(&rng.bytes(48)).trim_end()))
|
||||
.collect();
|
||||
let extra = format!(
|
||||
"ARC-Seal: i=1; a=rsa-sha256; t=1725357934; cv=none; d=example.com; s=arc-20240605;\n{signature}ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=example.com;\n\ts=arc-20240605; h=to:subject:message-id:date:from:mime-version:dkim-signature;\n\tbh={}=;\n{signature}ARC-Authentication-Results: i=1; mx.example.com;\n\tdkim=pass header.i=@example.com header.s=20230601 header.b=abc;\n\tspf=pass (example.com: domain of sender@example.com designates 192.0.2.1 as permitted sender) smtp.mailfrom=sender@example.com;\n\tdmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=example.com\nDKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=example.com; s=20230601; t=1725357934; x=1725962734;\n\th=to:subject:message-id:date:from:mime-version:from:to:cc:subject:date:message-id:reply-to;\n\tbh={}=;\n{signature}X-Google-Smtp-Source: {}\nX-Received: by 2002:a05:6512:3b0a with SMTP id f10mr{} ; Tue, 03 Sep 2024 03:05:34 -0700 (PDT)\nList-Unsubscribe: <mailto:unsubscribe@example.com?subject=unsub>, <https://example.com/unsub/{:x}>\nList-Unsubscribe-Post: List-Unsubscribe=One-Click\nAuthentication-Results: mx.example.org; dkim=pass; spf=pass; dmarc=pass\nContent-Type: multipart/alternative; boundary=\"{boundary}\"\n\n",
|
||||
base64(&rng.bytes(32)).trim_end(),
|
||||
base64(&rng.bytes(32)).trim_end(),
|
||||
base64(&rng.bytes(40)).trim_end(),
|
||||
rng.below(1_000_000),
|
||||
rng.next()
|
||||
);
|
||||
let text = wrapped_text(rng, 1_500);
|
||||
let page = html(rng, 6_000);
|
||||
let subject = sentence(rng, 6);
|
||||
let mut out = envelope(rng, &subject, 6 + index % 4, &extra);
|
||||
let _ = write!(
|
||||
out,
|
||||
"--{boundary}\nContent-Type: text/plain; charset=\"UTF-8\"\nContent-Transfer-Encoding: quoted-printable\n\n{}\n--{boundary}\nContent-Type: text/html; charset=\"UTF-8\"\nContent-Transfer-Encoding: quoted-printable\n\n{}\n--{boundary}--\n",
|
||||
quoted_printable(&text),
|
||||
quoted_printable(&page)
|
||||
);
|
||||
Sample {
|
||||
name: format!("modern-headers-{index}"),
|
||||
bytes: out.into_bytes(),
|
||||
}
|
||||
})
|
||||
.collect()
|
||||
}
|
||||
|
||||
fn nested_message(rng: &mut Rng, depth: usize) -> String {
|
||||
let boundary = format!("fwd-{depth}-{:x}", rng.next());
|
||||
let mut out = envelope(
|
||||
rng,
|
||||
&format!("Fwd: level {depth}"),
|
||||
2,
|
||||
&format!("Content-Type: multipart/mixed; boundary=\"{boundary}\"\n\n"),
|
||||
);
|
||||
let _ = write!(
|
||||
out,
|
||||
"--{boundary}\nContent-Type: text/plain; charset=utf-8\n\n{}\n",
|
||||
wrapped_text(rng, 1_500)
|
||||
);
|
||||
if depth == 0 {
|
||||
let alternative = format!("alt-{:x}", rng.next());
|
||||
let _ = write!(
|
||||
out,
|
||||
"--{boundary}\nContent-Type: multipart/alternative; boundary=\"{alternative}\"\n\n--{alternative}\nContent-Type: text/plain; charset=utf-8\n\n{}\n--{alternative}\nContent-Type: text/html; charset=utf-8\n\n{}\n--{alternative}--\n\n",
|
||||
wrapped_text(rng, 2_000),
|
||||
html(rng, 5_000)
|
||||
);
|
||||
} else {
|
||||
let _ = write!(
|
||||
out,
|
||||
"--{boundary}\nContent-Type: message/rfc822\nContent-Disposition: inline\n\n{}\n",
|
||||
nested_message(rng, depth - 1)
|
||||
);
|
||||
}
|
||||
let _ = writeln!(out, "--{boundary}--");
|
||||
out
|
||||
}
|
||||
|
||||
fn forwarded(rng: &mut Rng) -> Vec<Sample> {
|
||||
(1..=6)
|
||||
.map(|depth| Sample {
|
||||
name: format!("forwarded-{depth}"),
|
||||
bytes: nested_message(rng, depth).into_bytes(),
|
||||
})
|
||||
.collect()
|
||||
}
|
||||
|
||||
fn dashes(rng: &mut Rng) -> Vec<Sample> {
|
||||
let boundary = "==dash-boundary==";
|
||||
let mut out = envelope(
|
||||
rng,
|
||||
"Patch review",
|
||||
2,
|
||||
&format!("Content-Type: multipart/mixed; boundary=\"{boundary}\"\n\n"),
|
||||
);
|
||||
for part in 0..3 {
|
||||
let mut body = String::with_capacity(200_000);
|
||||
while body.len() < 200_000 {
|
||||
match rng.below(10) {
|
||||
0 => body.push_str("-- SELECT * FROM accounts WHERE id = 42;\n"),
|
||||
1 => body.push_str("--- a/src/lib.rs\n+++ b/src/lib.rs\n"),
|
||||
2 => {
|
||||
let _ = writeln!(body, "--{boundary}x not a delimiter");
|
||||
}
|
||||
3 => body.push_str("-----\n"),
|
||||
_ => {
|
||||
body.push_str(&sentence(rng, 10));
|
||||
body.push('\n');
|
||||
}
|
||||
}
|
||||
}
|
||||
let _ = write!(
|
||||
out,
|
||||
"--{boundary}\nContent-Type: text/plain; charset=utf-8\nContent-Disposition: attachment; filename=\"part{part}.diff\"\n\n{body}"
|
||||
);
|
||||
}
|
||||
let _ = writeln!(out, "--{boundary}--");
|
||||
vec![Sample {
|
||||
name: "dashes".to_string(),
|
||||
bytes: out.into_bytes(),
|
||||
}]
|
||||
}
|
||||
|
||||
fn plain_large(rng: &mut Rng) -> Vec<Sample> {
|
||||
let mut body = String::with_capacity(1_000_000);
|
||||
while body.len() < 1_000_000 {
|
||||
body.push_str(&wrapped_text(rng, 2_000));
|
||||
body.push_str("-----Original Message-----\n-- \nSent from my phone\n");
|
||||
}
|
||||
let mut out = envelope(
|
||||
rng,
|
||||
"Long thread",
|
||||
3,
|
||||
"Content-Type: text/plain; charset=utf-8\nContent-Transfer-Encoding: 8bit\n\n",
|
||||
);
|
||||
out.push_str(&body);
|
||||
vec![Sample {
|
||||
name: "plain-large".to_string(),
|
||||
bytes: out.into_bytes(),
|
||||
}]
|
||||
}
|
||||
|
||||
fn malformed_samples() -> Vec<Sample> {
|
||||
let cases: &[(&str, &str)] = &[
|
||||
(
|
||||
"inner-missing-close",
|
||||
"Subject: a\nContent-Type: multipart/mixed; boundary=\"outer\"\n\n--outer\nContent-Type: multipart/alternative; boundary=\"inner\"\n\n--inner\nContent-Type: text/plain\n\nplain\n--inner\nContent-Type: text/html\n\n<p>html</p>\n--outer\nContent-Type: text/plain\n\nafter the unterminated alternative\n--outer--\n",
|
||||
),
|
||||
(
|
||||
"prefix-collision",
|
||||
"Subject: b\nContent-Type: multipart/mixed; boundary=\"abc\"\n\n--abc\nContent-Type: multipart/alternative; boundary=\"abc-1\"\n\n--abc-1\nContent-Type: text/plain\n\none\n--abc-1\nContent-Type: text/html\n\n<b>two</b>\n--abc-1--\n--abc\nContent-Type: text/plain\n\nthree\n--abc--\n",
|
||||
),
|
||||
(
|
||||
"part-without-blank-line",
|
||||
"Subject: c\nContent-Type: multipart/mixed; boundary=\"x\"\n\n--x\nContent-Type: text/plain\n--x\nContent-Type: text/plain\n\nsecond\n--x--\n",
|
||||
),
|
||||
(
|
||||
"truncated-base64",
|
||||
"Subject: d\nContent-Type: multipart/mixed; boundary=\"t\"\n\n--t\nContent-Type: text/plain\n\nhello\n--t\nContent-Type: application/octet-stream\nContent-Transfer-Encoding: base64\n\nSGVsbG8gd29ybGQ=\nSGVsbG8g",
|
||||
),
|
||||
(
|
||||
"mid-line-boundary",
|
||||
"Subject: e\nContent-Type: multipart/mixed; boundary=\"1\"\n\n--1\nContent-Type: text/plain\n\nfirst\n--1\nContent-Type: text/plain\n\nlast part--1--\n",
|
||||
),
|
||||
(
|
||||
"empty-rfc822",
|
||||
"Subject: f\nContent-Type: multipart/mixed; boundary=\"m\"\n\n--m\nContent-Type: message/rfc822\n\n--m\nContent-Type: text/plain\n\nafter\n--m--\n",
|
||||
),
|
||||
(
|
||||
"boundary-never-appears",
|
||||
"Subject: g\nContent-Type: multipart/mixed; boundary=\"missing\"\n\njust some text\nwithout delimiters\n",
|
||||
),
|
||||
("headers-only", "Subject: h\nFrom: a@example.com"),
|
||||
(
|
||||
"nested-unterminated-rfc822",
|
||||
"Subject: i\nContent-Type: multipart/mixed; boundary=\"o\"\n\n--o\nContent-Type: message/rfc822\n\nSubject: inner\nContent-Type: multipart/mixed; boundary=\"n\"\n\n--n\nContent-Type: text/plain\n\ninner text\n--o\nContent-Type: text/plain\n\nouter again\n--o--\n",
|
||||
),
|
||||
];
|
||||
cases
|
||||
.iter()
|
||||
.map(|(name, text)| Sample {
|
||||
name: (*name).to_string(),
|
||||
bytes: text.as_bytes().to_vec(),
|
||||
})
|
||||
.collect()
|
||||
}
|
||||
+72
-62
@@ -4,71 +4,81 @@
|
||||
* SPDX-License-Identifier: Apache-2.0 OR MIT
|
||||
*/
|
||||
|
||||
use mail_parser::{HeaderName, MessageParser};
|
||||
use mail_parser::{HeaderForm, HeaderName, MessageParser};
|
||||
|
||||
const MESSAGE: &str = r#"From: Art Vandelay <art@vandelay.com> (Vandelay Industries)
|
||||
To: "Colleagues": "James Smythe" <james@vandelay.com>; Friends:
|
||||
jane@example.com, =?UTF-8?Q?John_Sm=C3=AEth?= <john@example.com>;
|
||||
Date: Sat, 20 Nov 2021 14:22:01 -0800
|
||||
Subject: Why not both importing AND exporting? =?utf-8?b?4pi6?=
|
||||
Content-Type: multipart/mixed; boundary="festivus";
|
||||
|
||||
--festivus
|
||||
Content-Type: text/html; charset="us-ascii"
|
||||
Content-Transfer-Encoding: base64
|
||||
|
||||
PGh0bWw+PHA+SSB3YXMgdGhpbmtpbmcgYWJvdXQgcXVpdHRpbmcgdGhlICZsZHF1bztle
|
||||
HBvcnRpbmcmcmRxdW87IHRvIGZvY3VzIGp1c3Qgb24gdGhlICZsZHF1bztpbXBvcnRpbm
|
||||
cmcmRxdW87LDwvcD48cD5idXQgdGhlbiBJIHRob3VnaHQsIHdoeSBub3QgZG8gYm90aD8
|
||||
gJiN4MjYzQTs8L3A+PC9odG1sPg==
|
||||
--festivus
|
||||
Content-Type: message/rfc822
|
||||
|
||||
From: "Cosmo Kramer" <kramer@kramerica.com>
|
||||
Subject: Exporting my book about coffee tables
|
||||
Content-Type: multipart/mixed; boundary="giddyup";
|
||||
|
||||
--giddyup
|
||||
Content-Type: text/plain; charset="utf-16"
|
||||
Content-Transfer-Encoding: quoted-printable
|
||||
|
||||
=FF=FE=0C!5=D8"=DD5=D8)=DD5=D8-=DD =005=D8*=DD5=D8"=DD =005=D8"=
|
||||
=DD5=D85=DD5=D8-=DD5=D8,=DD5=D8/=DD5=D81=DD =005=D8*=DD5=D86=DD =
|
||||
=005=D8=1F=DD5=D8,=DD5=D8,=DD5=D8(=DD =005=D8-=DD5=D8)=DD5=D8"=
|
||||
=DD5=D8=1E=DD5=D80=DD5=D8"=DD!=00
|
||||
--giddyup
|
||||
Content-Type: image/gif; name*1="about "; name*0="Book ";
|
||||
name*2*=utf-8''%e2%98%95 tables.gif
|
||||
Content-Transfer-Encoding: Base64
|
||||
Content-Disposition: attachment
|
||||
|
||||
R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7
|
||||
--giddyup--
|
||||
--festivus--
|
||||
"#;
|
||||
const MESSAGE: &[u8] = b"Received: from mx.example.com (mx.example.com [192.0.2.1])\r\n\
|
||||
\tby mail.example.org with ESMTPS id 4F2A1; Sat, 20 Nov 2021 14:22:05 -0800\r\n\
|
||||
From: Art Vandelay <art@vandelay.com>\r\n\
|
||||
To: jane@example.com\r\n\
|
||||
Subject: Latex imports\r\n\
|
||||
X-Sender: Kel Varnsen <kel@vandelay.com>\r\n\
|
||||
X-Tags: latex, import, export\r\n\
|
||||
X-Mailer: Vandelay Mail 1.0\r\n\
|
||||
X-Internal-Note: kept, but not parsed\r\n\
|
||||
\r\n\
|
||||
Please see the attached catalog.\r\n";
|
||||
|
||||
fn main() {
|
||||
// Parse only the message headers
|
||||
let _headers = MessageParser::new()
|
||||
let parser = MessageParser::new()
|
||||
.header(HeaderName::Received, HeaderForm::Raw)
|
||||
.header("X-Sender", HeaderForm::Addresses)
|
||||
.header("X-Tags", HeaderForm::CommaList)
|
||||
.unknown_headers(HeaderForm::Ignore)
|
||||
.max_depth(16)
|
||||
.max_parts(100);
|
||||
let message = parser.parse(MESSAGE).expect("the message parses");
|
||||
|
||||
println!("Header fields with the configured forms:");
|
||||
for header in message.headers().iter() {
|
||||
println!(" {}: {:?}", header.raw_name(), header.value());
|
||||
}
|
||||
|
||||
let received = message
|
||||
.headers()
|
||||
.get(HeaderName::Received)
|
||||
.expect("a Received field");
|
||||
let parsed = received.parse_as(HeaderForm::Received);
|
||||
if let Some(trace) = parsed.value().as_received() {
|
||||
println!(
|
||||
"\nReceived, parsed on demand: from {:?} by {:?} with {:?}, id {:?}",
|
||||
trace.from(),
|
||||
trace.by(),
|
||||
trace.with(),
|
||||
trace.id()
|
||||
);
|
||||
}
|
||||
|
||||
let headers_only = MessageParser::new()
|
||||
.parse_headers(MESSAGE)
|
||||
.unwrap()
|
||||
.headers();
|
||||
.expect("the header block parses");
|
||||
println!(
|
||||
"\nparse_headers: {} header fields, body at byte {}",
|
||||
headers_only.headers().len(),
|
||||
headers_only.root_part().offset_body()
|
||||
);
|
||||
|
||||
// Parse only the message body, ignoring all headers (except MIME headers, which are required to parse the body)
|
||||
let _message = MessageParser::new()
|
||||
.with_mime_headers()
|
||||
.default_header_ignore()
|
||||
.parse(MESSAGE)
|
||||
.unwrap();
|
||||
|
||||
// Parse only To, From, Date, and Subject headers. All other headers are parsed as raw.
|
||||
let _message = MessageParser::new()
|
||||
.with_mime_headers()
|
||||
.header_text(HeaderName::Subject)
|
||||
.header_address(HeaderName::From)
|
||||
.header_address(HeaderName::To)
|
||||
.header_date(HeaderName::Date)
|
||||
.default_header_raw()
|
||||
.parse(MESSAGE)
|
||||
.unwrap();
|
||||
println!("\nHeader values parsed on their own:");
|
||||
let addresses =
|
||||
HeaderForm::Addresses.parse(b" Ann <ann@example.com>, team: bob@example.com;\r\n");
|
||||
if let Some(list) = addresses.value().as_address() {
|
||||
for mailbox in list.mailboxes() {
|
||||
println!(
|
||||
" mailbox {:?} {:?}",
|
||||
mailbox.name().unwrap_or_default(),
|
||||
mailbox.address().unwrap_or_default()
|
||||
);
|
||||
}
|
||||
}
|
||||
let date = HeaderForm::Date.parse(b" Sat, 20 Nov 2021 14:22:01 -0800\r\n");
|
||||
if let Some(date) = date.value().as_datetime() {
|
||||
println!(" date {} ({})", date.to_rfc3339(), date.to_timestamp());
|
||||
}
|
||||
let ids = HeaderForm::MessageIds.parse(b" <first@example.com>\r\n <second@example.com>\r\n");
|
||||
if let Some(ids) = ids.value().as_text_list() {
|
||||
for id in ids.iter() {
|
||||
println!(" message id {id}");
|
||||
}
|
||||
}
|
||||
let subject = HeaderForm::Text.parse(b" =?utf-8?q?caf=C3=A9?= au lait\r\n");
|
||||
println!(" text {:?}", subject.value().as_text().unwrap_or_default());
|
||||
}
|
||||
|
||||
@@ -4,31 +4,35 @@
|
||||
* SPDX-License-Identifier: Apache-2.0 OR MIT
|
||||
*/
|
||||
|
||||
use std::path::PathBuf;
|
||||
use mail_parser::{MessageBuffers, MessageParser, mailbox::maildir::FolderIterator};
|
||||
use std::{env, io, path::PathBuf};
|
||||
|
||||
use mail_parser::mailbox::maildir::FolderIterator;
|
||||
|
||||
fn main() {
|
||||
// Iterates a Maildir++ structure printing the results to stdout.
|
||||
for folder in FolderIterator::new(
|
||||
PathBuf::from(env!("CARGO_MANIFEST_DIR"))
|
||||
.join("resources")
|
||||
.join("maildir"),
|
||||
".".into(),
|
||||
)
|
||||
.unwrap()
|
||||
{
|
||||
let folder = folder.unwrap();
|
||||
println!("------\nMailbox: {:?}", folder.name().unwrap_or("INBOX"));
|
||||
|
||||
for message in folder {
|
||||
let message = message.unwrap();
|
||||
println!(
|
||||
"Message with internal date {}, flags {:?} and content {:?}.",
|
||||
message.internal_date(),
|
||||
message.flags(),
|
||||
String::from_utf8_lossy(message.contents())
|
||||
fn main() -> io::Result<()> {
|
||||
let maildir = env::args_os().nth(1).map_or_else(
|
||||
|| PathBuf::from(env!("CARGO_MANIFEST_DIR")).join("resources/maildir"),
|
||||
PathBuf::from,
|
||||
);
|
||||
let parser = MessageParser::new();
|
||||
let mut buffers = MessageBuffers::new();
|
||||
for folder in FolderIterator::new(maildir, Some("."))? {
|
||||
let folder = folder?;
|
||||
println!("Folder {}", folder.name().unwrap_or("INBOX"));
|
||||
for entry in folder {
|
||||
let entry = entry?;
|
||||
print!(
|
||||
" {}, flags {:?}, {} bytes: ",
|
||||
entry.path().display(),
|
||||
entry.flags(),
|
||||
entry.contents().len()
|
||||
);
|
||||
match parser.parse_with(entry.contents(), &mut buffers) {
|
||||
Some(message) => {
|
||||
println!("{:?}", message.subject().unwrap_or_default());
|
||||
buffers = message.into_buffers();
|
||||
}
|
||||
None => println!("not a message"),
|
||||
}
|
||||
}
|
||||
}
|
||||
Ok(())
|
||||
}
|
||||
|
||||
@@ -4,16 +4,56 @@
|
||||
* SPDX-License-Identifier: Apache-2.0 OR MIT
|
||||
*/
|
||||
|
||||
use mail_parser::{MessageParser, mailbox::mbox::MessageIterator};
|
||||
use mail_parser::{MessageBuffers, MessageParser, mailbox::mbox::MessageIterator};
|
||||
use std::{
|
||||
env,
|
||||
fs::File,
|
||||
io::{self, BufRead, BufReader},
|
||||
};
|
||||
|
||||
fn main() {
|
||||
// Reads an MBox mailbox from stdin and prints each message as JSON.
|
||||
for raw_message in MessageIterator::new(std::io::stdin().lock()) {
|
||||
let raw_message = raw_message.unwrap();
|
||||
let message = MessageParser::default()
|
||||
.parse(raw_message.contents())
|
||||
.unwrap();
|
||||
const SAMPLE: &[u8] = b"From ann@example.com Sat Jan 3 01:05:34 1996\n\
|
||||
From: Ann <ann@example.com>\n\
|
||||
Subject: First message\n\
|
||||
\n\
|
||||
>From the mbox point of view, this line was quoted.\n\
|
||||
\n\
|
||||
From bob@example.com Sun Jan 4 10:00:00 1996\n\
|
||||
From: Bob <bob@example.com>\n\
|
||||
Subject: Second message\n\
|
||||
\n\
|
||||
Hello.\n";
|
||||
|
||||
println!("{}", serde_json::to_string(&message).unwrap());
|
||||
fn main() -> io::Result<()> {
|
||||
match env::args_os().nth(1) {
|
||||
None => list(SAMPLE),
|
||||
Some(path) if path == "-" => list(io::stdin().lock()),
|
||||
Some(path) => list(BufReader::new(File::open(path)?)),
|
||||
}
|
||||
}
|
||||
|
||||
fn list(mbox: impl BufRead) -> io::Result<()> {
|
||||
let parser = MessageParser::new();
|
||||
let mut buffers = MessageBuffers::new();
|
||||
for entry in MessageIterator::new(mbox) {
|
||||
let entry = entry?;
|
||||
match parser.parse_with(entry.contents(), &mut buffers) {
|
||||
Some(message) => {
|
||||
println!(
|
||||
"{} from {}: {:?}, {} parts, preview {:?}",
|
||||
entry.internal_date(),
|
||||
entry.from(),
|
||||
message.subject().unwrap_or_default(),
|
||||
message.parts().len(),
|
||||
message.body_preview(60).unwrap_or_default()
|
||||
);
|
||||
buffers = message.into_buffers();
|
||||
}
|
||||
None => println!(
|
||||
"{} from {}: not a message",
|
||||
entry.internal_date(),
|
||||
entry.from()
|
||||
),
|
||||
}
|
||||
}
|
||||
Ok(())
|
||||
}
|
||||
|
||||
+114
-82
@@ -4,10 +4,9 @@
|
||||
* SPDX-License-Identifier: Apache-2.0 OR MIT
|
||||
*/
|
||||
|
||||
use mail_parser::*;
|
||||
use mail_parser::{Address, Mailbox, MessageParser, MessagePart, PartKind};
|
||||
|
||||
fn main() {
|
||||
let input = br#"From: Art Vandelay <art@vandelay.com> (Vandelay Industries)
|
||||
const MESSAGE: &[u8] = br#"From: Art Vandelay <art@vandelay.com> (Vandelay Industries)
|
||||
To: "Colleagues": "James Smythe" <james@vandelay.com>; Friends:
|
||||
jane@example.com, =?UTF-8?Q?John_Sm=C3=AEth?= <john@example.com>;
|
||||
Date: Sat, 20 Nov 2021 14:22:01 -0800
|
||||
@@ -48,92 +47,125 @@ R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7
|
||||
--festivus--
|
||||
"#;
|
||||
|
||||
let message = MessageParser::default().parse(input).unwrap();
|
||||
fn main() {
|
||||
let message = MessageParser::new()
|
||||
.parse(MESSAGE)
|
||||
.expect("the message parses");
|
||||
|
||||
// Parses addresses (including comments), lists and groups
|
||||
assert_eq!(
|
||||
message.from().unwrap().first().unwrap(),
|
||||
&Addr::new(
|
||||
"Art Vandelay (Vandelay Industries)".into(),
|
||||
"art@vandelay.com"
|
||||
)
|
||||
);
|
||||
println!("Subject: {}", message.subject().unwrap_or_default());
|
||||
if let Some(date) = message.date() {
|
||||
println!("Date: {}", date.to_rfc3339());
|
||||
}
|
||||
for sender in message.from().into_iter().flat_map(|from| from.mailboxes()) {
|
||||
println!("From: {}", display(sender));
|
||||
}
|
||||
for recipient in message.to().into_iter().flat_map(|to| to.iter()) {
|
||||
match recipient {
|
||||
Address::Mailbox(mailbox) => println!("To: {}", display(mailbox)),
|
||||
Address::Group(group) => {
|
||||
println!("To group {}:", group.name().unwrap_or_default());
|
||||
for member in group.mailboxes() {
|
||||
println!(" {}", display(member));
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
assert_eq!(
|
||||
message.to().unwrap().as_group().unwrap(),
|
||||
&[
|
||||
Group::new(
|
||||
"Colleagues",
|
||||
vec![Addr::new("James Smythe".into(), "james@vandelay.com")]
|
||||
),
|
||||
Group::new(
|
||||
"Friends",
|
||||
vec![
|
||||
Addr::new(None, "jane@example.com"),
|
||||
Addr::new("John Smîth".into(), "john@example.com"),
|
||||
]
|
||||
)
|
||||
]
|
||||
);
|
||||
println!("\nHeader fields as written, with their parsed values:");
|
||||
for header in message.headers().iter() {
|
||||
println!(" {}: {:?}", header.raw_name(), header.value());
|
||||
}
|
||||
|
||||
assert_eq!(
|
||||
message.date().unwrap().to_rfc3339(),
|
||||
"2021-11-20T14:22:01-08:00"
|
||||
);
|
||||
println!("\nText body (HTML converted to text):");
|
||||
for text in message.text_bodies() {
|
||||
println!("{text}");
|
||||
}
|
||||
println!("\nHTML body:");
|
||||
for html in message.html_bodies() {
|
||||
println!("{html}");
|
||||
}
|
||||
|
||||
// RFC2047 support for encoded text in message readers
|
||||
assert_eq!(
|
||||
message.subject().unwrap(),
|
||||
"Why not both importing AND exporting? ☺"
|
||||
);
|
||||
println!("\nEvery part of every message, in document order:");
|
||||
for part in message.parts() {
|
||||
describe(part);
|
||||
}
|
||||
|
||||
// HTML and text body parts are returned conforming to RFC8621, Section 4.1.4
|
||||
assert_eq!(
|
||||
message.body_html(0).unwrap(),
|
||||
concat!(
|
||||
"<html><p>I was thinking about quitting the “exporting” to ",
|
||||
"focus just on the “importing”,</p><p>but then I thought,",
|
||||
" why not do both? ☺</p></html>"
|
||||
)
|
||||
);
|
||||
if let Some(multipart) = message.part_by_boundary("giddyup") {
|
||||
println!(
|
||||
"\nThe boundary \"giddyup\" belongs to part {}, which has {} children",
|
||||
multipart.id(),
|
||||
multipart.children().len()
|
||||
);
|
||||
}
|
||||
|
||||
// HTML parts are converted to plain text (and viceversa) when missing
|
||||
assert_eq!(
|
||||
message.body_text(0).unwrap(),
|
||||
concat!(
|
||||
"I was thinking about quitting the “exporting” to focus just on the",
|
||||
" “importing”,\nbut then I thought, why not do both? ☺\n"
|
||||
)
|
||||
);
|
||||
|
||||
// Supports nested messages as well as multipart/digest
|
||||
let nested_message = message.attachment(0).unwrap().message().unwrap();
|
||||
for attachment in message.attachments() {
|
||||
let PartKind::Message(nested) = attachment.kind() else {
|
||||
continue;
|
||||
};
|
||||
println!(
|
||||
"\nNested message {}: {}",
|
||||
nested.id(),
|
||||
nested.subject().unwrap_or_default()
|
||||
);
|
||||
for text in nested.text_bodies() {
|
||||
println!(" text: {text}");
|
||||
}
|
||||
for file in nested.attachments() {
|
||||
println!(
|
||||
" attachment {:?}: {} bytes",
|
||||
file.attachment_name().unwrap_or_default(),
|
||||
file.decoded_len()
|
||||
);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
assert_eq!(
|
||||
nested_message.subject().unwrap(),
|
||||
"Exporting my book about coffee tables"
|
||||
);
|
||||
fn display(mailbox: Mailbox<'_>) -> String {
|
||||
let address = mailbox.address().unwrap_or_default();
|
||||
match mailbox.name() {
|
||||
Some(name) => format!("{name} <{address}>"),
|
||||
None => address.to_string(),
|
||||
}
|
||||
}
|
||||
|
||||
// Handles UTF-* as well as many legacy encodings
|
||||
assert_eq!(
|
||||
nested_message.body_text(0).unwrap(),
|
||||
"ℌ𝔢𝔩𝔭 𝔪𝔢 𝔢𝔵𝔭𝔬𝔯𝔱 𝔪𝔶 𝔟𝔬𝔬𝔨 𝔭𝔩𝔢𝔞𝔰𝔢!"
|
||||
fn describe(part: MessagePart<'_>) {
|
||||
let content_type = part
|
||||
.content_type()
|
||||
.map(|content_type| {
|
||||
format!(
|
||||
"{}/{}",
|
||||
content_type.ctype(),
|
||||
content_type.subtype().unwrap_or_default()
|
||||
)
|
||||
})
|
||||
.unwrap_or_else(|| "text/plain".to_string());
|
||||
let summary = match part.kind() {
|
||||
PartKind::Multipart => format!(
|
||||
"boundary {:?}, {} children",
|
||||
part.boundary().unwrap_or_default(),
|
||||
part.children().len()
|
||||
),
|
||||
PartKind::Message(nested) => format!("holds message {}", nested.id()),
|
||||
PartKind::Text | PartKind::Html => match part.text_checked() {
|
||||
Some((text, problems)) if problems.is_empty() => {
|
||||
format!("{} characters", text.chars().count())
|
||||
}
|
||||
Some((text, problems)) => format!(
|
||||
"{} characters, decoding problems: {problems:?}",
|
||||
text.chars().count()
|
||||
),
|
||||
None => String::new(),
|
||||
},
|
||||
PartKind::Binary | PartKind::InlineBinary => format!(
|
||||
"{} bytes as written, {} decoded",
|
||||
part.raw_body().len(),
|
||||
part.decoded_len()
|
||||
),
|
||||
};
|
||||
println!(
|
||||
" part {} of message {} ({content_type}, {:?}): {summary}",
|
||||
part.id(),
|
||||
part.message().id(),
|
||||
part.role()
|
||||
);
|
||||
assert_eq!(
|
||||
nested_message.body_html(0).unwrap(),
|
||||
"<html><body>ℌ𝔢𝔩𝔭 𝔪𝔢 𝔢𝔵𝔭𝔬𝔯𝔱 𝔪𝔶 𝔟𝔬𝔬𝔨 𝔭𝔩𝔢𝔞𝔰𝔢!</body></html>"
|
||||
);
|
||||
|
||||
let nested_attachment = nested_message.attachment(0).unwrap();
|
||||
|
||||
assert_eq!(nested_attachment.len(), 42);
|
||||
|
||||
// Full RFC2231 support for continuations and character sets
|
||||
assert_eq!(
|
||||
nested_attachment.attachment_name().unwrap(),
|
||||
"Book about ☕ tables.gif"
|
||||
);
|
||||
|
||||
// Integrates with Serde
|
||||
println!("{}", serde_json::to_string_pretty(&message).unwrap());
|
||||
}
|
||||
|
||||
@@ -4,10 +4,13 @@
|
||||
* SPDX-License-Identifier: Apache-2.0 OR MIT
|
||||
*/
|
||||
|
||||
use mail_parser::*;
|
||||
use mail_parser::{MessageParser, MessagePart};
|
||||
use std::{
|
||||
env, fs, io,
|
||||
path::{Path, PathBuf},
|
||||
};
|
||||
|
||||
fn main() {
|
||||
let input = br#"From: Art Vandelay <art@vandelay.com> (Vandelay Industries)
|
||||
const MESSAGE: &[u8] = br#"From: Art Vandelay <art@vandelay.com> (Vandelay Industries)
|
||||
To: "Colleagues": "James Smythe" <james@vandelay.com>; Friends:
|
||||
jane@example.com, =?UTF-8?Q?John_Sm=C3=AEth?= <john@example.com>;
|
||||
Date: Sat, 20 Nov 2021 14:22:01 -0800
|
||||
@@ -24,7 +27,7 @@ cmcmRxdW87LDwvcD48cD5idXQgdGhlbiBJIHRob3VnaHQsIHdoeSBub3QgZG8gYm90aD8
|
||||
gJiN4MjYzQTs8L3A+PC9odG1sPg==
|
||||
--festivus
|
||||
Content-Type: message/rfc822; name="Exporting my book about coffee tables.eml"
|
||||
Content-Disposition: inline; filename="Exporting my book about coffee tables.eml"
|
||||
Content-Disposition: inline; filename="Exporting my book about coffee tables.eml"
|
||||
Content-Transfer-Encoding: 7bit
|
||||
|
||||
From: "Cosmo Kramer" <kramer@kramerica.com>
|
||||
@@ -50,19 +53,41 @@ R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7
|
||||
--festivus--
|
||||
"#;
|
||||
|
||||
write_attachments(&MessageParser::default().parse(input).unwrap());
|
||||
fn main() -> io::Result<()> {
|
||||
let directory = env::args_os().nth(1).map_or_else(
|
||||
|| env::temp_dir().join("mail-parser-attachments"),
|
||||
PathBuf::from,
|
||||
);
|
||||
fs::create_dir_all(&directory)?;
|
||||
|
||||
let message = MessageParser::new()
|
||||
.parse(MESSAGE)
|
||||
.expect("the message parses");
|
||||
for part in message.parts().filter(|part| part.is_attachment()) {
|
||||
let path = directory.join(file_name(part));
|
||||
fs::write(&path, part.decoded())?;
|
||||
println!(
|
||||
"{} ({} bytes, attachment of message {})",
|
||||
path.display(),
|
||||
part.decoded_len(),
|
||||
part.message().id()
|
||||
);
|
||||
}
|
||||
Ok(())
|
||||
}
|
||||
|
||||
fn write_attachments(message: &Message) {
|
||||
for attachment in message.attachments() {
|
||||
if !attachment.is_message() {
|
||||
std::fs::write(
|
||||
attachment.attachment_name().unwrap_or("Untitled"),
|
||||
attachment.contents(),
|
||||
)
|
||||
.unwrap();
|
||||
} else {
|
||||
write_attachments(attachment.message().unwrap());
|
||||
}
|
||||
}
|
||||
fn file_name(part: MessagePart<'_>) -> PathBuf {
|
||||
let name = part
|
||||
.attachment_name()
|
||||
.map(str::to_string)
|
||||
.or_else(|| {
|
||||
part.nested()
|
||||
.and_then(|nested| nested.subject())
|
||||
.map(|subject| format!("{subject}.eml"))
|
||||
})
|
||||
.unwrap_or_default();
|
||||
Path::new(&name).file_name().map_or_else(
|
||||
|| PathBuf::from(format!("part-{}", part.id())),
|
||||
PathBuf::from,
|
||||
)
|
||||
}
|
||||
|
||||
@@ -1,4 +0,0 @@
|
||||
#!/bin/sh
|
||||
|
||||
perf record -F max --call-graph dwarf target/release/mail-parser
|
||||
perf script | inferno-collapse-perf | inferno-flamegraph > flamegraph.svg
|
||||
Generated
+181
-26
@@ -4,36 +4,78 @@ version = 4
|
||||
|
||||
[[package]]
|
||||
name = "arbitrary"
|
||||
version = "1.0.2"
|
||||
version = "1.4.2"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "577b08a4acd7b99869f863c50011b01eb73424ccc798ecd996f2e24817adfca7"
|
||||
checksum = "c3d036a3c4ab069c7b410a2ce876bd74808d2d0888a82667669f8e783a898bf1"
|
||||
|
||||
[[package]]
|
||||
name = "cc"
|
||||
version = "1.0.71"
|
||||
version = "1.5.1"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "79c2681d6594606957bbb8631c4b90a7fcaaa72cdb714743a437b156d6a7eedd"
|
||||
checksum = "f360145194ee8e21db5ee7f3fcd4fe52210864c75c985dae33218202c8bbe040"
|
||||
dependencies = [
|
||||
"find-msvc-tools",
|
||||
"jobserver",
|
||||
"libc",
|
||||
"shlex",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "cfg-if"
|
||||
version = "1.0.5"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "4e7648175b45a9a48536d676f68d918270699102aa8dab5496df06904c914600"
|
||||
|
||||
[[package]]
|
||||
name = "core_detect"
|
||||
version = "1.0.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "baf1de4339761588bc0619e3cbc0120ee582ebb74b53b4efbf79117bd2da40fd"
|
||||
checksum = "7f8f80099a98041a3d1622845c271458a2d73e688351bf3cb999266764b81d48"
|
||||
|
||||
[[package]]
|
||||
name = "encodify"
|
||||
version = "1.0.0"
|
||||
dependencies = [
|
||||
"memchr",
|
||||
"simdutf8",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "encoding_rs"
|
||||
version = "0.8.29"
|
||||
version = "0.8.42"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "a74ea89a0a1b98f6332de42c95baff457ada66d1cb4030f9ff151b2041a1c746"
|
||||
checksum = "8e985e0451871ad22fb8d2b6b076e2028a502a0d3950998c2c5c0a4f9b5d9679"
|
||||
dependencies = [
|
||||
"cfg-if",
|
||||
"core_detect",
|
||||
"multiversion_no_op",
|
||||
"rustversion",
|
||||
"scopeguard",
|
||||
"simdutf8",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "find-msvc-tools"
|
||||
version = "0.1.14"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "aedcfb3409746eddb02b9e19ebda1c3394f759a152e48ee875a0844d1b955484"
|
||||
|
||||
[[package]]
|
||||
name = "getrandom"
|
||||
version = "0.4.3"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "300e883d756b2e4ec94e02791f39b04b522276138852cfc41d9fb7e904106099"
|
||||
dependencies = [
|
||||
"cfg-if",
|
||||
"libc",
|
||||
"r-efi",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "hashify"
|
||||
version = "0.2.6"
|
||||
version = "0.3.1"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "f208758247e68e239acaa059e72e4ce1f30f2a4b6523f19c1b923d25b7e9cceb"
|
||||
checksum = "66f5a65bf7824ada2de4a2cf9fa0981dabffc5392bb8550767c3c3d71ed52e4d"
|
||||
dependencies = [
|
||||
"proc-macro2",
|
||||
"quote",
|
||||
@@ -41,61 +83,168 @@ dependencies = [
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "libfuzzer-sys"
|
||||
version = "0.4.2"
|
||||
name = "itoa"
|
||||
version = "1.0.18"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "36a9a84a6e8b55dfefb04235e55edb2b9a2a18488fcae777a6bdaa6f06f1deb3"
|
||||
checksum = "8f42a60cbdf9a97f5d2305f08a87dc4e09308d1276d28c869c684d7777685682"
|
||||
|
||||
[[package]]
|
||||
name = "jobserver"
|
||||
version = "0.1.35"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "1c00acbd29eabad4a2392fa0e921c874934dbbf4194312ad20f04a0ed67a3cb3"
|
||||
dependencies = [
|
||||
"getrandom",
|
||||
"libc",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "libc"
|
||||
version = "0.2.189"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "3eaf3ede3fee6db1a4c2ee091bf8a8b4dccdc6d17f656fb07896ee72867612f2"
|
||||
|
||||
[[package]]
|
||||
name = "libfuzzer-sys"
|
||||
version = "0.4.13"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "a9fd2f41a1cba099f79a0b6b6c35656cf7c03351a7bae8ff0f28f25270f929d2"
|
||||
dependencies = [
|
||||
"arbitrary",
|
||||
"cc",
|
||||
"once_cell",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "mail-parser"
|
||||
version = "0.10.2"
|
||||
version = "1.0.0"
|
||||
dependencies = [
|
||||
"encodify",
|
||||
"encoding_rs",
|
||||
"hashify",
|
||||
"memchr",
|
||||
"serde",
|
||||
"simdutf8",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "mail-parser-fuzz"
|
||||
version = "0.0.0"
|
||||
dependencies = [
|
||||
"encodify",
|
||||
"libfuzzer-sys",
|
||||
"mail-parser",
|
||||
"memchr",
|
||||
"serde_json",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "once_cell"
|
||||
version = "1.8.0"
|
||||
name = "memchr"
|
||||
version = "2.8.3"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "692fcb63b64b1758029e0a96ee63e049ce8c5948587f2f7208df04625e5f6b56"
|
||||
checksum = "cf8baf1c55e62ffcace7a9f06f4bd9cd3f0c4beb022d3b367256b91b87513d98"
|
||||
|
||||
[[package]]
|
||||
name = "multiversion_no_op"
|
||||
version = "1.0.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "743fb55ba31b18fb1ecef6bdc9aa2743314978ac084044301a7eee33fb99a20d"
|
||||
|
||||
[[package]]
|
||||
name = "proc-macro2"
|
||||
version = "1.0.93"
|
||||
version = "1.0.107"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "60946a68e5f9d28b0dc1c21bb8a97ee7d018a8b322fa57838ba31cc878e22d99"
|
||||
checksum = "985e7ec9bb745e6ce6535b544d84d6cd6f7ad8bd711c398938ae983b91a766d9"
|
||||
dependencies = [
|
||||
"unicode-ident",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "quote"
|
||||
version = "1.0.38"
|
||||
version = "1.0.47"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "0e4dccaaaf89514f546c693ddc140f729f958c247918a13380cccc6078391acc"
|
||||
checksum = "1fbf4db142a473a8d80c26bbf18454ed458bf8d26c8219c331daecfdbd079001"
|
||||
dependencies = [
|
||||
"proc-macro2",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "syn"
|
||||
version = "2.0.98"
|
||||
name = "r-efi"
|
||||
version = "6.0.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "36147f1a48ae0ec2b5b3bc5b537d267457555a10dc06f3dbc8cb11ba3006d3b1"
|
||||
checksum = "f8dcc9c7d52a811697d2151c701e0d08956f92b0e24136cf4cf27b57a6a0d9bf"
|
||||
|
||||
[[package]]
|
||||
name = "rustversion"
|
||||
version = "1.0.23"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "cf54715a573b99ac80df0bc206da022bcd442c974952c7b9720069370852e21f"
|
||||
|
||||
[[package]]
|
||||
name = "scopeguard"
|
||||
version = "1.2.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "94143f37725109f92c262ed2cf5e59bce7498c01bcc1502d7b9afe439a4e9f49"
|
||||
|
||||
[[package]]
|
||||
name = "serde"
|
||||
version = "1.0.229"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "4148590afebada386688f18773da617792bf2ef03ffc1e4cbd2b1d45b023e0ba"
|
||||
dependencies = [
|
||||
"serde_core",
|
||||
"serde_derive",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "serde_core"
|
||||
version = "1.0.229"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "67dca2c9c51e58a4791a4b1ed58308b39c64224d349a935ab5039aa360942a48"
|
||||
dependencies = [
|
||||
"serde_derive",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "serde_derive"
|
||||
version = "1.0.229"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "e7a5d71263a5a7d47b41f6b3f06ba276f10cc18b0931f1799f710578e2309348"
|
||||
dependencies = [
|
||||
"proc-macro2",
|
||||
"quote",
|
||||
"syn",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "serde_json"
|
||||
version = "1.0.151"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "c841b55ecdae098c80dcae9cf767f6f8a0c2cdb3416bbef72181df4d0fe73f14"
|
||||
dependencies = [
|
||||
"itoa",
|
||||
"memchr",
|
||||
"serde",
|
||||
"serde_core",
|
||||
"zmij",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "shlex"
|
||||
version = "2.0.1"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "f8fadd59c855ef2080decdef8ff161eb6661b86933c9d82e5ba29dc602a55aba"
|
||||
|
||||
[[package]]
|
||||
name = "simdutf8"
|
||||
version = "0.1.5"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "e3a9fe34e3e7a50316060351f37187a3f546bce95496156754b601a5fa71b76e"
|
||||
|
||||
[[package]]
|
||||
name = "syn"
|
||||
version = "3.0.6"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "8593e8e72159ed2257d083c7a454a85cbf854f37a0966d8d483aff8c8a3ebcee"
|
||||
dependencies = [
|
||||
"proc-macro2",
|
||||
"quote",
|
||||
@@ -104,6 +253,12 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "unicode-ident"
|
||||
version = "1.0.17"
|
||||
version = "1.0.26"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "00e2473a93778eb0bad35909dff6a10d28e63f792f16ed15e404fca9d5eeedbe"
|
||||
checksum = "d245f478577f809a851594d02313b640fb437e0bb33866753cff937863096954"
|
||||
|
||||
[[package]]
|
||||
name = "zmij"
|
||||
version = "1.0.23"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "29666d0abbfad1e3dc4dcf6144730dd3a3ab225bbbdac83319345b1b44ccfc1b"
|
||||
|
||||
+61
-8
@@ -1,25 +1,78 @@
|
||||
[package]
|
||||
name = "mail-parser-fuzz"
|
||||
version = "0.0.0"
|
||||
authors = ["Automatically generated"]
|
||||
publish = false
|
||||
edition = "2018"
|
||||
edition = "2024"
|
||||
|
||||
[package.metadata]
|
||||
cargo-fuzz = true
|
||||
|
||||
[dependencies]
|
||||
libfuzzer-sys = "0.4"
|
||||
memchr = "2.8"
|
||||
serde_json = "1.0"
|
||||
encodify = { path = "../../encodify" }
|
||||
mail-parser = { path = "..", features = ["serde"] }
|
||||
|
||||
[dependencies.mail-parser]
|
||||
path = ".."
|
||||
[features]
|
||||
default = ["full_encoding"]
|
||||
full_encoding = ["mail-parser/full_encoding"]
|
||||
|
||||
# Prevent this from interfering with workspaces
|
||||
[workspace]
|
||||
members = ["."]
|
||||
|
||||
[[bin]]
|
||||
name = "mail_parser"
|
||||
path = "fuzz_targets/mail_parser.rs"
|
||||
[lib]
|
||||
path = "src/lib.rs"
|
||||
test = false
|
||||
doc = false
|
||||
bench = false
|
||||
|
||||
[lints.rust]
|
||||
rust_2018_idioms = { level = "deny", priority = -1 }
|
||||
unsafe_code = "deny"
|
||||
unsafe_op_in_unsafe_fn = "deny"
|
||||
|
||||
[lints.clippy]
|
||||
unwrap_used = "deny"
|
||||
|
||||
[[bin]]
|
||||
name = "parse"
|
||||
path = "fuzz_targets/parse.rs"
|
||||
test = false
|
||||
doc = false
|
||||
bench = false
|
||||
|
||||
[[bin]]
|
||||
name = "limits"
|
||||
path = "fuzz_targets/limits.rs"
|
||||
test = false
|
||||
doc = false
|
||||
bench = false
|
||||
|
||||
[[bin]]
|
||||
name = "fields"
|
||||
path = "fuzz_targets/fields.rs"
|
||||
test = false
|
||||
doc = false
|
||||
bench = false
|
||||
|
||||
[[bin]]
|
||||
name = "charsets"
|
||||
path = "fuzz_targets/charsets.rs"
|
||||
test = false
|
||||
doc = false
|
||||
bench = false
|
||||
|
||||
[[bin]]
|
||||
name = "kernels"
|
||||
path = "fuzz_targets/kernels.rs"
|
||||
test = false
|
||||
doc = false
|
||||
bench = false
|
||||
|
||||
[[bin]]
|
||||
name = "mbox"
|
||||
path = "fuzz_targets/mbox.rs"
|
||||
test = false
|
||||
doc = false
|
||||
bench = false
|
||||
|
||||
@@ -0,0 +1,8 @@
|
||||
#![no_main]
|
||||
|
||||
use libfuzzer_sys::fuzz_target;
|
||||
use mail_parser_fuzz::charsets;
|
||||
|
||||
fuzz_target!(|data: &[u8]| {
|
||||
charsets::check(data);
|
||||
});
|
||||
@@ -0,0 +1,8 @@
|
||||
#![no_main]
|
||||
|
||||
use libfuzzer_sys::fuzz_target;
|
||||
use mail_parser_fuzz::fields;
|
||||
|
||||
fuzz_target!(|data: &[u8]| {
|
||||
fields::check(data);
|
||||
});
|
||||
@@ -0,0 +1,12 @@
|
||||
#![no_main]
|
||||
|
||||
use libfuzzer_sys::fuzz_target;
|
||||
use mail_parser_fuzz::kernels;
|
||||
use std::sync::Once;
|
||||
|
||||
static REPORTED: Once = Once::new();
|
||||
|
||||
fuzz_target!(|data: &[u8]| {
|
||||
REPORTED.call_once(kernels::report);
|
||||
kernels::check(data);
|
||||
});
|
||||
@@ -0,0 +1,25 @@
|
||||
#![no_main]
|
||||
|
||||
use libfuzzer_sys::fuzz_target;
|
||||
use mail_parser::MessageParser;
|
||||
use mail_parser_fuzz::walk::{self, Limits};
|
||||
|
||||
const MAX_DEPTH: u8 = 8;
|
||||
const MAX_PARTS: u8 = 24;
|
||||
const MAX_ENCODED: u8 = 4;
|
||||
|
||||
fuzz_target!(|data: &[u8]| {
|
||||
let Some(([depth, parts, encoded], raw)) = data.split_first_chunk::<3>() else {
|
||||
return;
|
||||
};
|
||||
let limits = Limits {
|
||||
depth: usize::from(depth % MAX_DEPTH) + 1,
|
||||
parts: usize::from(parts % MAX_PARTS) + 1,
|
||||
encoded: usize::from(encoded % MAX_ENCODED),
|
||||
};
|
||||
let parser = MessageParser::new()
|
||||
.max_depth(limits.depth)
|
||||
.max_parts(limits.parts)
|
||||
.max_encoded_nesting(limits.encoded);
|
||||
walk::run(&parser, raw, Some(limits));
|
||||
});
|
||||
@@ -1,76 +0,0 @@
|
||||
#![no_main]
|
||||
use libfuzzer_sys::fuzz_target;
|
||||
|
||||
use mail_parser::{
|
||||
decoders::{
|
||||
base64::base64_decode,
|
||||
charsets::map::charset_decoder,
|
||||
hex::decode_hex,
|
||||
html::{add_html_token, html_to_text, text_to_html},
|
||||
quoted_printable::quoted_printable_decode,
|
||||
},
|
||||
parsers::{
|
||||
fields::thread::{thread_name, trim_trailing_fwd},
|
||||
MessageStream,
|
||||
},
|
||||
Message, MessageParser,
|
||||
};
|
||||
|
||||
static RFC822_ALPHABET: &[u8] = b"0123456789abcdefghijklm:=- \r\n";
|
||||
|
||||
fuzz_target!(|data: &[u8]| {
|
||||
for data_ in [
|
||||
std::borrow::Cow::from(data),
|
||||
std::borrow::Cow::from(into_alphabet(data, RFC822_ALPHABET)),
|
||||
] {
|
||||
let data = data_.as_ref();
|
||||
|
||||
// Fuzz every parsing function
|
||||
MessageStream::new(data).parse_date();
|
||||
MessageStream::new(data).parse_address();
|
||||
MessageStream::new(data).parse_id();
|
||||
MessageStream::new(data).parse_comma_separared();
|
||||
MessageStream::new(data).parse_and_ignore();
|
||||
MessageStream::new(data).parse_raw();
|
||||
MessageStream::new(data).parse_unstructured();
|
||||
MessageStream::new(data).parse_content_type();
|
||||
MessageStream::new(data).parse_headers(&MessageParser::default(), &mut Vec::new());
|
||||
MessageStream::new(data).parse_header_name();
|
||||
MessageStream::new(data).decode_rfc2047();
|
||||
|
||||
MessageStream::new(data).seek_next_part(b"\n");
|
||||
MessageStream::new(data).mime_part(b"\n");
|
||||
MessageStream::new(data).seek_part_end(b"\n"[..].into());
|
||||
MessageStream::new(data).skip_crlf();
|
||||
MessageStream::new(data).is_multipart_end();
|
||||
|
||||
base64_decode(data);
|
||||
MessageStream::new(data).decode_base64_word();
|
||||
MessageStream::new(data).decode_base64_mime(b"\n");
|
||||
quoted_printable_decode(data);
|
||||
MessageStream::new(data).decode_quoted_printable_word();
|
||||
MessageStream::new(data).decode_quoted_printable_mime(b"\n");
|
||||
|
||||
// Fuzz text functions
|
||||
let mut html_str = String::with_capacity(data.len());
|
||||
let str_data = String::from_utf8_lossy(data);
|
||||
add_html_token(&mut html_str, str_data.as_ref().as_bytes(), false);
|
||||
html_to_text(&str_data);
|
||||
text_to_html(&str_data);
|
||||
thread_name(&str_data);
|
||||
trim_trailing_fwd(&str_data);
|
||||
|
||||
// Fuzz decoding functions
|
||||
decode_hex(data);
|
||||
charset_decoder(data);
|
||||
|
||||
// Fuzz the entire library
|
||||
MessageParser::default().parse(data);
|
||||
}
|
||||
});
|
||||
|
||||
fn into_alphabet(data: &[u8], alphabet: &[u8]) -> Vec<u8> {
|
||||
data.iter()
|
||||
.map(|&byte| alphabet[byte as usize % alphabet.len()])
|
||||
.collect()
|
||||
}
|
||||
@@ -0,0 +1,8 @@
|
||||
#![no_main]
|
||||
|
||||
use libfuzzer_sys::fuzz_target;
|
||||
use mail_parser_fuzz::mbox;
|
||||
|
||||
fuzz_target!(|data: &[u8]| {
|
||||
mbox::check(data);
|
||||
});
|
||||
@@ -0,0 +1,12 @@
|
||||
#![no_main]
|
||||
|
||||
use libfuzzer_sys::fuzz_target;
|
||||
use mail_parser::MessageParser;
|
||||
use mail_parser_fuzz::walk;
|
||||
use std::sync::LazyLock;
|
||||
|
||||
static PARSER: LazyLock<MessageParser> = LazyLock::new(MessageParser::new);
|
||||
|
||||
fuzz_target!(|data: &[u8]| {
|
||||
walk::run(&PARSER, data, None);
|
||||
});
|
||||
+194
@@ -0,0 +1,194 @@
|
||||
"\x0a"
|
||||
"\x0d\x0a"
|
||||
"\x0a\x0a"
|
||||
"\x0d\x0a\x0d\x0a"
|
||||
"\x0a--"
|
||||
"\x0d\x0a--"
|
||||
"--"
|
||||
"\x0a "
|
||||
"\x0a\x09"
|
||||
": "
|
||||
":"
|
||||
";"
|
||||
","
|
||||
"="
|
||||
"\""
|
||||
"\\"
|
||||
"("
|
||||
")"
|
||||
"<"
|
||||
">"
|
||||
"@"
|
||||
"["
|
||||
"]"
|
||||
"From: "
|
||||
"To: "
|
||||
"Cc: "
|
||||
"Bcc: "
|
||||
"Reply-To: "
|
||||
"Sender: "
|
||||
"Subject: "
|
||||
"Date: "
|
||||
"Message-ID: "
|
||||
"In-Reply-To: "
|
||||
"References: "
|
||||
"Return-Path: "
|
||||
"Received: "
|
||||
"MIME-Version: 1.0"
|
||||
"Keywords: "
|
||||
"Comments: "
|
||||
"Resent-From: "
|
||||
"Resent-Date: "
|
||||
"List-Unsubscribe: "
|
||||
"Content-Type: "
|
||||
"Content-Transfer-Encoding: "
|
||||
"Content-Disposition: "
|
||||
"Content-ID: "
|
||||
"Content-Language: "
|
||||
"Content-Location: "
|
||||
"Content-Description: "
|
||||
"DKIM-Signature: "
|
||||
"X-Mailer: "
|
||||
"text/plain"
|
||||
"text/html"
|
||||
"text/enriched"
|
||||
"multipart/mixed"
|
||||
"multipart/alternative"
|
||||
"multipart/related"
|
||||
"multipart/digest"
|
||||
"multipart/report"
|
||||
"message/rfc822"
|
||||
"message/global"
|
||||
"message/delivery-status"
|
||||
"application/octet-stream"
|
||||
"image/png"
|
||||
"boundary="
|
||||
"boundary=\""
|
||||
"charset="
|
||||
"charset=\""
|
||||
"name="
|
||||
"filename="
|
||||
"format=flowed"
|
||||
"delsp=yes"
|
||||
"name*0="
|
||||
"name*1="
|
||||
"name*0*="
|
||||
"name*1*="
|
||||
"filename*="
|
||||
"utf-8''"
|
||||
"iso-8859-1'en'"
|
||||
"attachment"
|
||||
"inline"
|
||||
"attachment; filename="
|
||||
"inline; filename="
|
||||
"7bit"
|
||||
"8bit"
|
||||
"binary"
|
||||
"base64"
|
||||
"quoted-printable"
|
||||
"x-uuencode"
|
||||
"=?utf-8?q?"
|
||||
"=?utf-8?b?"
|
||||
"=?iso-8859-1?q?"
|
||||
"=?us-ascii?Q?"
|
||||
"?="
|
||||
"=?"
|
||||
"_"
|
||||
"=20"
|
||||
"=3D"
|
||||
"=\x0a"
|
||||
"=\x0d\x0a"
|
||||
"=C3=A9"
|
||||
"=="
|
||||
"utf-8"
|
||||
"us-ascii"
|
||||
"iso-8859-1"
|
||||
"iso-8859-15"
|
||||
"windows-1252"
|
||||
"utf-16"
|
||||
"utf-16le"
|
||||
"utf-16be"
|
||||
"utf-7"
|
||||
"koi8-r"
|
||||
"shift_jis"
|
||||
"iso-2022-jp"
|
||||
"gb18030"
|
||||
"big5"
|
||||
"euc-kr"
|
||||
"x-user-defined"
|
||||
"\xfe\xff"
|
||||
"\xff\xfe"
|
||||
"\x1b$B"
|
||||
"\x1b(B"
|
||||
"+AKM-"
|
||||
"+-"
|
||||
"Mon, "
|
||||
"Sat, 20 Nov 2021 14:22:01 -0800"
|
||||
" GMT"
|
||||
" +0000"
|
||||
" -0000"
|
||||
" (UTC)"
|
||||
" EST"
|
||||
" PDT"
|
||||
"Jan"
|
||||
"Feb"
|
||||
"Dec"
|
||||
"2021-11-20T14:22:01Z"
|
||||
"from "
|
||||
" by "
|
||||
" with "
|
||||
" via "
|
||||
" id "
|
||||
" for "
|
||||
" ESMTPS"
|
||||
" ESMTP"
|
||||
" SMTP"
|
||||
" LMTP"
|
||||
" HTTP"
|
||||
" (version=TLS1_3 cipher="
|
||||
" helo="
|
||||
" ehlo "
|
||||
"[127.0.0.1]"
|
||||
"[IPv6:::1]"
|
||||
"localhost"
|
||||
"(Postfix)"
|
||||
"undisclosed-recipients:;"
|
||||
"Group: a@b.c, d@e.f;"
|
||||
"\"Last, First\" <first@example.com>"
|
||||
"<a@b>"
|
||||
"a@b.c"
|
||||
"mailto:"
|
||||
"Re: "
|
||||
"Fwd: "
|
||||
"Fw: "
|
||||
"[list] "
|
||||
"(fwd)"
|
||||
"<html>"
|
||||
"</html>"
|
||||
"<body>"
|
||||
"<br>"
|
||||
"<br/>"
|
||||
"<p>"
|
||||
"</p>"
|
||||
"<head>"
|
||||
"<style>"
|
||||
"</style>"
|
||||
"<script>"
|
||||
"<!--"
|
||||
"-->"
|
||||
"<meta charset=\""
|
||||
"<meta http-equiv=\"Content-Type\" content=\"text/html; charset="
|
||||
"&"
|
||||
"<"
|
||||
" "
|
||||
"é"
|
||||
"☺"
|
||||
"From "
|
||||
">From "
|
||||
">>From "
|
||||
"\x00"
|
||||
"\xc3\xa9"
|
||||
"\xe2\x98\x95"
|
||||
"\xf0\x9d\x84\x9e"
|
||||
"\xff"
|
||||
"\x80"
|
||||
@@ -0,0 +1,237 @@
|
||||
use crate::{char_prefix, debug, valid, walk};
|
||||
use encodify::{base64, qp};
|
||||
use mail_parser::{
|
||||
Charset, MessageParser, add_html_token,
|
||||
decoders::charsets::{self, charset_decoder},
|
||||
html_to_text, preview_html, preview_text, strip_charset_meta, text_to_html, truncate_html,
|
||||
truncate_text,
|
||||
};
|
||||
use std::borrow::Cow;
|
||||
|
||||
const LABELS: [&str; 44] = [
|
||||
"utf-8",
|
||||
"utf-7",
|
||||
"utf-16",
|
||||
"utf-16le",
|
||||
"utf-16be",
|
||||
"iso-8859-2",
|
||||
"iso-8859-3",
|
||||
"iso-8859-4",
|
||||
"iso-8859-5",
|
||||
"iso-8859-6",
|
||||
"iso-8859-7",
|
||||
"iso-8859-8",
|
||||
"iso-8859-9",
|
||||
"iso-8859-10",
|
||||
"iso-8859-13",
|
||||
"iso-8859-14",
|
||||
"iso-8859-15",
|
||||
"iso-8859-16",
|
||||
"windows-1250",
|
||||
"windows-1251",
|
||||
"windows-1252",
|
||||
"windows-1253",
|
||||
"windows-1254",
|
||||
"windows-1255",
|
||||
"windows-1256",
|
||||
"windows-1257",
|
||||
"windows-1258",
|
||||
"koi8-r",
|
||||
"koi8-u",
|
||||
"macintosh",
|
||||
"ibm850",
|
||||
"tis-620",
|
||||
"shift_jis",
|
||||
"big5",
|
||||
"euc-jp",
|
||||
"euc-kr",
|
||||
"gb18030",
|
||||
"gbk",
|
||||
"iso-2022-jp",
|
||||
"windows-874",
|
||||
"ibm866",
|
||||
"x-mac-cyrillic",
|
||||
"x-user-defined",
|
||||
"hz-gb-2312",
|
||||
];
|
||||
|
||||
const PREVIEW_LENS: [usize; 6] = [0, 1, 6, 7, 20, 300];
|
||||
const PREFIX_CHARS: [usize; 5] = [0, 1, 5, 64, 1_000];
|
||||
const ELLIPSIS: &str = "...";
|
||||
const APPENDED: &str = "appended";
|
||||
const HTML_OPEN: &str = "<html><body>";
|
||||
const HTML_CLOSE: &str = "</body></html>";
|
||||
const MAX_LABEL: usize = 48;
|
||||
|
||||
#[derive(Debug, Clone, Copy)]
|
||||
enum Transfer {
|
||||
Identity,
|
||||
Base64,
|
||||
QuotedPrintable,
|
||||
}
|
||||
|
||||
const TRANSFERS: [(Transfer, &str); 3] = [
|
||||
(Transfer::Identity, "8bit"),
|
||||
(Transfer::Base64, "base64"),
|
||||
(Transfer::QuotedPrintable, "quoted-printable"),
|
||||
];
|
||||
|
||||
pub fn check(data: &[u8]) {
|
||||
let mut pieces = data.splitn(2, |&byte| byte == b'\n');
|
||||
let (label, bytes) = match (pieces.next(), pieces.next()) {
|
||||
(Some(label), Some(rest)) => (label, rest),
|
||||
_ => (data.get(..MAX_LABEL).unwrap_or(data), data),
|
||||
};
|
||||
let charset = Charset::from_label(label);
|
||||
labels(label, charset, bytes);
|
||||
let fallback = data
|
||||
.first()
|
||||
.and_then(|&byte| LABELS.get(usize::from(byte) % LABELS.len()))
|
||||
.copied()
|
||||
.unwrap_or("utf-8");
|
||||
let label = match (charset, std::str::from_utf8(label)) {
|
||||
(Some(_), Ok(label)) if label.bytes().all(is_token) => label,
|
||||
_ => fallback,
|
||||
};
|
||||
let charset = Charset::from_label(label.as_bytes()).unwrap_or_default();
|
||||
let decoded = conversions(charset, bytes);
|
||||
for (transfer, name) in TRANSFERS {
|
||||
in_message(label, transfer, name, bytes, &decoded);
|
||||
}
|
||||
text_functions(&decoded);
|
||||
text_functions(&String::from_utf8_lossy(data));
|
||||
}
|
||||
|
||||
fn is_token(byte: u8) -> bool {
|
||||
byte.is_ascii_alphanumeric() || matches!(byte, b'-' | b'_' | b'.' | b':')
|
||||
}
|
||||
|
||||
fn labels(label: &[u8], charset: Option<Charset>, bytes: &[u8]) {
|
||||
assert_eq!(Charset::from_label(&label.to_ascii_uppercase()), charset);
|
||||
assert_eq!(Charset::from_label(&label.to_ascii_lowercase()), charset);
|
||||
let expected = charset.unwrap_or_default().decode(bytes);
|
||||
assert_eq!(charsets::decode(label, bytes), expected);
|
||||
let mut appended = String::from(APPENDED);
|
||||
charsets::decode_append(label, bytes, &mut appended);
|
||||
assert_eq!(appended.strip_prefix(APPENDED), Some(expected.as_ref()));
|
||||
match charset_decoder(label) {
|
||||
Some(decoder) => {
|
||||
assert!(charset.is_some_and(|charset| charset != Charset::Utf8));
|
||||
assert_eq!(decoder(bytes), expected);
|
||||
}
|
||||
None => assert!(charset.is_none_or(|charset| charset == Charset::Utf8)),
|
||||
}
|
||||
debug(&charset);
|
||||
}
|
||||
|
||||
fn conversions(charset: Charset, bytes: &[u8]) -> Cow<'_, str> {
|
||||
let decoded = charset.decode(bytes);
|
||||
valid(&decoded);
|
||||
if let Cow::Borrowed(text) = &decoded {
|
||||
assert_eq!(
|
||||
text.as_bytes(),
|
||||
bytes,
|
||||
"borrowed text differs from its bytes"
|
||||
);
|
||||
}
|
||||
assert_eq!(
|
||||
charset.decode_owned(bytes.to_vec()),
|
||||
decoded,
|
||||
"decode_owned"
|
||||
);
|
||||
let mut appended = String::from(APPENDED);
|
||||
charset.decode_append(bytes, &mut appended);
|
||||
assert_eq!(
|
||||
appended.strip_prefix(APPENDED),
|
||||
Some(decoded.as_ref()),
|
||||
"decode_append"
|
||||
);
|
||||
decoded
|
||||
}
|
||||
|
||||
fn in_message(label: &str, transfer: Transfer, name: &str, bytes: &[u8], decoded: &str) {
|
||||
let mut raw = format!(
|
||||
"Content-Type: text/plain; charset=\"{label}\"\r\nContent-Transfer-Encoding: {name}\r\n\r\n"
|
||||
)
|
||||
.into_bytes();
|
||||
match transfer {
|
||||
Transfer::Identity => raw.extend_from_slice(bytes),
|
||||
Transfer::Base64 => raw.extend_from_slice(base64::MIME.encode(bytes).as_bytes()),
|
||||
Transfer::QuotedPrintable => raw.extend_from_slice(qp::BINARY.encode(bytes).as_bytes()),
|
||||
}
|
||||
let message = MessageParser::new()
|
||||
.parse(&raw)
|
||||
.expect("a message with a header parses");
|
||||
walk::check_message(&message);
|
||||
let part = message.root().root_part();
|
||||
let body = part.decoded();
|
||||
if !matches!(transfer, Transfer::QuotedPrintable) {
|
||||
assert_eq!(body.as_ref(), bytes, "{transfer:?} body");
|
||||
}
|
||||
let text = part.text().expect("a text/plain part has text");
|
||||
if body.as_ref() == bytes {
|
||||
assert_eq!(text, decoded, "{label} text differs from Charset::decode");
|
||||
}
|
||||
let chars = text.chars().count();
|
||||
for max_chars in PREFIX_CHARS
|
||||
.into_iter()
|
||||
.chain([chars.saturating_sub(1), chars, chars + 1])
|
||||
{
|
||||
assert_eq!(
|
||||
part.text_prefix(max_chars).as_deref(),
|
||||
Some(char_prefix(&text, max_chars)),
|
||||
"{label} {transfer:?} text_prefix({max_chars})"
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
fn text_functions(text: &str) {
|
||||
let plain = html_to_text(text);
|
||||
valid(&plain);
|
||||
let html = text_to_html(text);
|
||||
valid(&html);
|
||||
assert!(html.starts_with(HTML_OPEN) && html.ends_with(HTML_CLOSE));
|
||||
assert!(!html.contains('\r'));
|
||||
valid(&strip_charset_meta(text));
|
||||
let mut token = String::new();
|
||||
add_html_token(&mut token, text.as_bytes(), true);
|
||||
valid(&token);
|
||||
let stripped = text.replace('\r', "");
|
||||
for max_len in PREVIEW_LENS {
|
||||
let preview = preview_text(text, max_len);
|
||||
check_cut(&preview, &stripped, max_len);
|
||||
assert_eq!(truncate_text(text, max_len), preview);
|
||||
let html_preview = preview_html(text, max_len);
|
||||
valid(&html_preview);
|
||||
assert!(html_preview.len() <= max_len && !html_preview.contains('\r'));
|
||||
assert_eq!(
|
||||
html_preview,
|
||||
preview_text(&plain, max_len),
|
||||
"preview_html differs from preview_text of html_to_text"
|
||||
);
|
||||
let truncated = truncate_html(text, max_len);
|
||||
valid(&truncated);
|
||||
assert!(truncated.len() <= max_len && !truncated.contains('\r'));
|
||||
if stripped.len() <= max_len {
|
||||
assert_eq!(truncated, stripped);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
fn check_cut(preview: &str, stripped: &str, max_len: usize) {
|
||||
valid(preview);
|
||||
assert!(preview.len() <= max_len, "preview longer than {max_len}");
|
||||
assert!(!preview.contains('\r'));
|
||||
if stripped.len() <= max_len {
|
||||
assert_eq!(preview, stripped);
|
||||
return;
|
||||
}
|
||||
let kept = if stripped.starts_with(preview) {
|
||||
preview
|
||||
} else {
|
||||
preview
|
||||
.strip_suffix(ELLIPSIS)
|
||||
.expect("a cut preview ends with an ellipsis")
|
||||
};
|
||||
assert!(stripped.starts_with(kept), "preview is not a prefix");
|
||||
}
|
||||
@@ -0,0 +1,160 @@
|
||||
use crate::{debug, display, valid, walk, within};
|
||||
use mail_parser::{
|
||||
DateTime, HeaderForm, HeaderName, MessageParser, parse_address_detail_part,
|
||||
parse_address_domain, parse_address_local_part, parse_address_user_part, thread_name,
|
||||
};
|
||||
use std::{
|
||||
borrow::Cow,
|
||||
cmp::Ordering,
|
||||
hash::{DefaultHasher, Hash, Hasher},
|
||||
sync::LazyLock,
|
||||
};
|
||||
|
||||
const FIELD: &str = "X-Fuzz";
|
||||
const FIELD_END: &[u8] = b"\n\n";
|
||||
|
||||
static PARSERS: LazyLock<[MessageParser; 9]> =
|
||||
LazyLock::new(|| walk::FORMS.map(|form| MessageParser::new().header(FIELD, form)));
|
||||
|
||||
type AddressHelper = fn(&str) -> Option<&str>;
|
||||
|
||||
const ADDRESS_HELPERS: [AddressHelper; 4] = [
|
||||
parse_address_local_part,
|
||||
parse_address_domain,
|
||||
parse_address_user_part,
|
||||
parse_address_detail_part,
|
||||
];
|
||||
|
||||
pub fn check(data: &[u8]) {
|
||||
for form in walk::FORMS {
|
||||
let parsed = form.parse(data);
|
||||
walk::header_value(parsed.value());
|
||||
debug(&parsed);
|
||||
}
|
||||
in_message(data);
|
||||
let text = String::from_utf8_lossy(data);
|
||||
dates(&text, data);
|
||||
names(&text);
|
||||
if let Some((name, _)) = text.split_once(':') {
|
||||
names(name);
|
||||
names(name.trim());
|
||||
}
|
||||
for helper in ADDRESS_HELPERS {
|
||||
if let Some(part) = helper(&text) {
|
||||
valid(part);
|
||||
assert!(within(part.as_bytes(), text.as_bytes()));
|
||||
}
|
||||
}
|
||||
let thread = thread_name(&text);
|
||||
valid(thread);
|
||||
assert!(within(thread.as_bytes(), text.as_bytes()));
|
||||
}
|
||||
|
||||
fn in_message(data: &[u8]) {
|
||||
let mut raw = Vec::with_capacity(FIELD.len() + 1 + data.len() + FIELD_END.len());
|
||||
raw.extend_from_slice(FIELD.as_bytes());
|
||||
raw.push(b':');
|
||||
raw.extend_from_slice(data);
|
||||
raw.extend_from_slice(FIELD_END);
|
||||
for (parser, form) in PARSERS.iter().zip(walk::FORMS) {
|
||||
let message = parser.parse(&raw).expect("a message with a header parses");
|
||||
let header = message
|
||||
.headers()
|
||||
.iter()
|
||||
.next()
|
||||
.expect("the message has its header");
|
||||
assert_eq!(header.raw_name(), FIELD);
|
||||
let parsed = header.parse_as(form);
|
||||
assert_eq!(
|
||||
parsed.value(),
|
||||
header.value(),
|
||||
"{form:?}: in-message value differs from parse_as"
|
||||
);
|
||||
assert!(
|
||||
form.parse(header.raw_value()) == parsed,
|
||||
"{form:?}: HeaderForm::parse differs from parse_as"
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
fn dates(text: &str, data: &[u8]) {
|
||||
let rfc822 = DateTime::parse_rfc822(text);
|
||||
let header = HeaderForm::Date.parse(text.as_bytes());
|
||||
assert_eq!(
|
||||
rfc822,
|
||||
header.value().as_datetime(),
|
||||
"parse_rfc822 differs from the Date form"
|
||||
);
|
||||
for date in [rfc822, DateTime::parse_rfc3339(text)]
|
||||
.into_iter()
|
||||
.flatten()
|
||||
{
|
||||
walk::datetime(date);
|
||||
}
|
||||
if let Some(bytes) = data.first_chunk::<8>() {
|
||||
walk::datetime(DateTime::from_timestamp(i64::from_le_bytes(*bytes)));
|
||||
}
|
||||
}
|
||||
|
||||
fn is_ftext(byte: u8) -> bool {
|
||||
matches!(byte, b'!'..=b'9' | b';'..=b'~')
|
||||
}
|
||||
|
||||
fn fingerprint(name: &HeaderName<'_>) -> u64 {
|
||||
let mut hasher = DefaultHasher::new();
|
||||
name.hash(&mut hasher);
|
||||
hasher.finish()
|
||||
}
|
||||
|
||||
fn same_name(left: &HeaderName<'_>, right: &HeaderName<'_>) {
|
||||
assert_eq!(left, right);
|
||||
assert_eq!(left.cmp(right), Ordering::Equal);
|
||||
assert_eq!(fingerprint(left), fingerprint(right));
|
||||
}
|
||||
|
||||
fn names(candidate: &str) {
|
||||
let parsed = HeaderName::parse(candidate);
|
||||
let allowed = !candidate.is_empty() && candidate.bytes().all(is_ftext);
|
||||
assert_eq!(
|
||||
parsed.is_some(),
|
||||
allowed,
|
||||
"HeaderName::parse({candidate:?})"
|
||||
);
|
||||
let converted = HeaderName::from(candidate);
|
||||
check_name(&converted, candidate);
|
||||
if let Some(name) = &parsed {
|
||||
same_name(name, &converted);
|
||||
check_name(name, candidate);
|
||||
}
|
||||
same_name(&converted, &HeaderName::from(candidate.to_string()));
|
||||
same_name(&converted, &HeaderName::from(Cow::Borrowed(candidate)));
|
||||
same_name(&converted, &HeaderName::Other(Cow::Borrowed(candidate)));
|
||||
same_name(
|
||||
&converted,
|
||||
&HeaderName::Other(Cow::Owned(candidate.to_ascii_uppercase())),
|
||||
);
|
||||
}
|
||||
|
||||
fn check_name(name: &HeaderName<'_>, spelling: &str) {
|
||||
let text = name.as_str();
|
||||
valid(text);
|
||||
assert!(
|
||||
text.eq_ignore_ascii_case(spelling),
|
||||
"{name:?} spelled {spelling:?}"
|
||||
);
|
||||
display(name);
|
||||
debug(name);
|
||||
same_name(&name.clone().into_owned(), name);
|
||||
assert_eq!(Cow::from(name.clone()), text);
|
||||
assert_eq!(String::from(name.clone()), text);
|
||||
let _ = (
|
||||
name.is_other(),
|
||||
name.is_mime_header(),
|
||||
name.is_structured(),
|
||||
name.as_static_str(),
|
||||
);
|
||||
let json = serde_json::to_string(name).expect("a header name serializes");
|
||||
let back: HeaderName<'static> =
|
||||
serde_json::from_str(&json).expect("a serialized header name deserializes");
|
||||
same_name(&back, name);
|
||||
}
|
||||
@@ -0,0 +1,238 @@
|
||||
use crate::scan::{self, ByteSet, swar};
|
||||
use mail_parser::scan::Kernel;
|
||||
use std::sync::LazyLock;
|
||||
|
||||
const SHIFTS: usize = 64;
|
||||
const SET_SHIFTS: usize = 16;
|
||||
const SPAN: usize = 256;
|
||||
const MAX_MEMBERS: usize = 16;
|
||||
const ASCII_MASK: u8 = 0x7f;
|
||||
const BELOW_LIMIT: u8 = 0x80;
|
||||
const CLASS: u8 = 1;
|
||||
const BITMAP_BYTES: usize = 16;
|
||||
const BITS: usize = 8;
|
||||
const HIGH_BIT: usize = 7;
|
||||
const FIELD_STOPS: u8 = 0x21;
|
||||
|
||||
static SIMPLE_NAME: ByteSet = ByteSet::with_marks(b"\n\r,;<\"(:=", b"@");
|
||||
static SIMPLE_QUOTED: ByteSet = ByteSet::new(b"\n\r\"\\=");
|
||||
static SIMPLE_ADDRESS: ByteSet = ByteSet::new(b"\n\r>\\(=");
|
||||
static TOKEN_STOPS: LazyLock<ByteSet> = LazyLock::new(token_stops);
|
||||
|
||||
type Scan = fn(Kernel, &[u8], usize) -> Option<usize>;
|
||||
|
||||
const SCANS: [(Scan, &str); 2] = [
|
||||
(Kernel::dash_line, "dash_line"),
|
||||
(Kernel::field_end, "field_end"),
|
||||
];
|
||||
|
||||
pub fn report() {
|
||||
let public: Vec<_> = Kernel::available().map(Kernel::name).collect();
|
||||
let sets: Vec<_> = scan::Kernel::available().map(scan::Kernel::name).collect();
|
||||
eprintln!(
|
||||
"kernels: scan {}; set {}",
|
||||
public.join(", "),
|
||||
sets.join(", ")
|
||||
);
|
||||
}
|
||||
|
||||
pub fn check(data: &[u8]) {
|
||||
variants(data, SHIFTS, scans);
|
||||
for set in [&SIMPLE_NAME, &SIMPLE_QUOTED, &SIMPLE_ADDRESS, &TOKEN_STOPS] {
|
||||
sets(set, data);
|
||||
}
|
||||
if let Some((custom, hay)) = custom_sets(data) {
|
||||
for set in &custom {
|
||||
sets(set, hay);
|
||||
}
|
||||
}
|
||||
let (low, high, limit) = match data {
|
||||
[low, high, limit, ..] => (
|
||||
low & ASCII_MASK,
|
||||
high & ASCII_MASK,
|
||||
limit % (BELOW_LIMIT + 1),
|
||||
),
|
||||
_ => (b'A', b'Z', FIELD_STOPS),
|
||||
};
|
||||
for skip in 0..data.len().min(swar::WORD) {
|
||||
words(data.get(skip..).unwrap_or_default(), low, high, limit);
|
||||
}
|
||||
}
|
||||
|
||||
fn variants(data: &[u8], shifts: usize, mut each: impl FnMut(&[u8])) {
|
||||
each(data);
|
||||
let len = data.len();
|
||||
for skip in 1..len.min(shifts) {
|
||||
each(data.get(skip..len.min(skip + SPAN)).unwrap_or_default());
|
||||
}
|
||||
for cut in 1..len.min(shifts) {
|
||||
let end = len - cut;
|
||||
let tail: Box<[u8]> =
|
||||
Box::from(data.get(end.saturating_sub(SPAN)..end).unwrap_or_default());
|
||||
each(&tail);
|
||||
}
|
||||
}
|
||||
|
||||
fn scans(hay: &[u8]) {
|
||||
for kernel in Kernel::available() {
|
||||
for (scan, name) in SCANS {
|
||||
let mut from = 0;
|
||||
loop {
|
||||
let expected = scan(Kernel::SCALAR, hay, from);
|
||||
assert_eq!(
|
||||
scan(kernel, hay, from),
|
||||
expected,
|
||||
"{} {name} from {from} over {} bytes",
|
||||
kernel.name(),
|
||||
hay.len()
|
||||
);
|
||||
match expected {
|
||||
Some(hit) => from = hit + 1,
|
||||
None => break,
|
||||
}
|
||||
}
|
||||
for from in [hay.len(), hay.len() + 1, usize::MAX] {
|
||||
assert_eq!(scan(kernel, hay, from), scan(Kernel::SCALAR, hay, from));
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
fn token_stops() -> ByteSet {
|
||||
let classes: [u8; 256] = std::array::from_fn(|byte| {
|
||||
let byte = byte as u8;
|
||||
let token = byte.is_ascii_alphanumeric() || b"!#$%&'*+-.^_`{|}~".contains(&byte);
|
||||
if token || !byte.is_ascii() { CLASS } else { 0 }
|
||||
});
|
||||
ByteSet::excluding(&classes, CLASS)
|
||||
}
|
||||
|
||||
fn custom_sets(data: &[u8]) -> Option<([ByteSet; 3], &[u8])> {
|
||||
let (&count, rest) = data.split_first()?;
|
||||
let (stops, rest) = rest.split_at_checked(1 + usize::from(count) % MAX_MEMBERS)?;
|
||||
let (&count, rest) = rest.split_first()?;
|
||||
let (marks, rest) = rest.split_at_checked(usize::from(count) % (MAX_MEMBERS + 1))?;
|
||||
let (bitmap, hay) = rest.split_first_chunk::<BITMAP_BYTES>()?;
|
||||
let bucket = |byte: u8| 1u8 << (byte >> 4);
|
||||
let mut stop_bytes = [0u8; MAX_MEMBERS];
|
||||
let mut stop_buckets = 0u8;
|
||||
for (out, &byte) in stop_bytes.iter_mut().zip(stops) {
|
||||
*out = byte & ASCII_MASK;
|
||||
stop_buckets |= bucket(*out);
|
||||
}
|
||||
let mut mark_bytes = [0u8; MAX_MEMBERS];
|
||||
let mut marked = 0;
|
||||
for byte in marks.iter().map(|&byte| byte & ASCII_MASK) {
|
||||
if bucket(byte) & stop_buckets == 0
|
||||
&& let Some(out) = mark_bytes.get_mut(marked)
|
||||
{
|
||||
*out = byte;
|
||||
marked += 1;
|
||||
}
|
||||
}
|
||||
let classes: [u8; 256] = std::array::from_fn(|byte| {
|
||||
let bit = bitmap
|
||||
.get(byte / BITS)
|
||||
.is_some_and(|bits| bits >> (byte % BITS) & 1 == 1);
|
||||
if bit || byte >= usize::from(BELOW_LIMIT) {
|
||||
CLASS
|
||||
} else {
|
||||
0
|
||||
}
|
||||
});
|
||||
let stops = stop_bytes.get(..stops.len()).unwrap_or_default();
|
||||
let marks = mark_bytes.get(..marked).unwrap_or_default();
|
||||
Some((
|
||||
[
|
||||
ByteSet::new(stops),
|
||||
ByteSet::with_marks(stops, marks),
|
||||
ByteSet::excluding(&classes, CLASS),
|
||||
],
|
||||
hay,
|
||||
))
|
||||
}
|
||||
|
||||
fn sets(set: &ByteSet, hay: &[u8]) {
|
||||
let len = hay.len();
|
||||
for end in [len.saturating_sub(1), len / 2, usize::MAX] {
|
||||
set_scans(set, hay, end);
|
||||
}
|
||||
variants(hay, SET_SHIFTS, |window| {
|
||||
set_scans(set, window, window.len())
|
||||
});
|
||||
}
|
||||
|
||||
fn set_scans(set: &ByteSet, hay: &[u8], end: usize) {
|
||||
for kernel in scan::Kernel::available() {
|
||||
let mut from = 0;
|
||||
loop {
|
||||
let expected = scan::Kernel::SCALAR.first_in_set(set, hay, from, end);
|
||||
assert_eq!(
|
||||
kernel.first_in_set(set, hay, from, end),
|
||||
expected,
|
||||
"{} first_in_set {from}..{end} over {} bytes",
|
||||
kernel.name(),
|
||||
hay.len()
|
||||
);
|
||||
assert_eq!(
|
||||
kernel.stop_in_set(set, hay, from, end),
|
||||
scan::Kernel::SCALAR.stop_in_set(set, hay, from, end),
|
||||
"{} stop_in_set {from}..{end} over {} bytes",
|
||||
kernel.name(),
|
||||
hay.len()
|
||||
);
|
||||
match expected {
|
||||
Some(hit) => from = hit + 1,
|
||||
None => break,
|
||||
}
|
||||
}
|
||||
for from in [end, end.saturating_add(1), hay.len() + 1] {
|
||||
assert_eq!(
|
||||
kernel.first_in_set(set, hay, from, end),
|
||||
scan::Kernel::SCALAR.first_in_set(set, hay, from, end)
|
||||
);
|
||||
assert_eq!(
|
||||
kernel.stop_in_set(set, hay, from, end),
|
||||
scan::Kernel::SCALAR.stop_in_set(set, hay, from, end)
|
||||
);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
fn words(hay: &[u8], low: u8, high: u8, limit: u8) {
|
||||
for chunk in hay.chunks(swar::WORD) {
|
||||
let mut bytes = [0u8; swar::WORD];
|
||||
bytes
|
||||
.iter_mut()
|
||||
.zip(chunk)
|
||||
.for_each(|(out, &byte)| *out = byte);
|
||||
let word = swar::load(chunk);
|
||||
assert_eq!(word, u64::from_le_bytes(bytes), "swar::load");
|
||||
let first = |mask: u64| (mask != 0).then(|| swar::first_byte(mask));
|
||||
assert_eq!(
|
||||
first(swar::equal_bytes(word, b':')),
|
||||
bytes.iter().position(|&byte| byte == b':')
|
||||
);
|
||||
assert_eq!(
|
||||
first(swar::zero_bytes(word)),
|
||||
bytes.iter().position(|&byte| byte == 0)
|
||||
);
|
||||
assert_eq!(
|
||||
first(swar::bytes_below(word, limit)),
|
||||
bytes.iter().position(|&byte| byte < limit),
|
||||
"bytes_below {limit}"
|
||||
);
|
||||
let range = swar::ascii_in_range(word, low, high);
|
||||
for (index, byte) in bytes.iter().enumerate() {
|
||||
assert_eq!(
|
||||
range >> (index * BITS + HIGH_BIT) & 1 == 1,
|
||||
(low..=high).contains(byte),
|
||||
"ascii_in_range {low}..={high} byte {byte}"
|
||||
);
|
||||
}
|
||||
assert_eq!(
|
||||
swar::ascii_lowercase(word).to_le_bytes(),
|
||||
bytes.map(|byte| byte.to_ascii_lowercase())
|
||||
);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,41 @@
|
||||
#[allow(dead_code, unreachable_pub)]
|
||||
#[path = "../../src/scan/mod.rs"]
|
||||
mod scan;
|
||||
|
||||
pub mod charsets;
|
||||
pub mod fields;
|
||||
pub mod kernels;
|
||||
pub mod mbox;
|
||||
pub mod walk;
|
||||
|
||||
use std::{
|
||||
fmt::{Debug, Display},
|
||||
io::{self, Write},
|
||||
};
|
||||
|
||||
pub fn valid(text: &str) {
|
||||
assert!(
|
||||
std::str::from_utf8(text.as_bytes()).is_ok(),
|
||||
"invalid UTF-8 returned as &str"
|
||||
);
|
||||
}
|
||||
|
||||
pub fn debug(value: &impl Debug) {
|
||||
let _ = write!(io::sink(), "{value:?}");
|
||||
}
|
||||
|
||||
pub fn display(value: &impl Display) {
|
||||
let _ = write!(io::sink(), "{value}");
|
||||
}
|
||||
|
||||
pub fn within(inner: &[u8], outer: &[u8]) -> bool {
|
||||
let (range, outer) = (inner.as_ptr_range(), outer.as_ptr_range());
|
||||
inner.is_empty() || range.start >= outer.start && range.end <= outer.end
|
||||
}
|
||||
|
||||
pub fn char_prefix(text: &str, chars: usize) -> &str {
|
||||
text.char_indices()
|
||||
.nth(chars)
|
||||
.and_then(|(end, _)| text.get(..end))
|
||||
.unwrap_or(text)
|
||||
}
|
||||
@@ -0,0 +1,109 @@
|
||||
use mail_parser::mailbox::mbox::{Message, MessageIterator};
|
||||
use std::io::{self, BufRead, BufReader, Read};
|
||||
|
||||
const SEPARATOR: &[u8] = b"From ";
|
||||
const QUOTE: u8 = b'>';
|
||||
const CAPACITIES: [usize; 7] = [1, 2, 3, 7, 16, 64, 4_096];
|
||||
const CHUNK_SIZES: usize = 4;
|
||||
const MAX_CHUNK: usize = 9;
|
||||
const CHUNKED_CAPACITY: usize = 16;
|
||||
|
||||
#[derive(Debug, PartialEq, Eq)]
|
||||
struct Expected {
|
||||
from: String,
|
||||
contents: Vec<u8>,
|
||||
}
|
||||
|
||||
fn unquoted(line: &[u8]) -> &[u8] {
|
||||
let quotes = line.iter().take_while(|&&byte| byte == QUOTE).count();
|
||||
match (line.get(quotes..), line.get(1..)) {
|
||||
(Some(rest), Some(unquoted)) if quotes > 0 && rest.starts_with(SEPARATOR) => unquoted,
|
||||
_ => line,
|
||||
}
|
||||
}
|
||||
|
||||
fn sender(line: &[u8]) -> String {
|
||||
line.strip_prefix(SEPARATOR)
|
||||
.and_then(|rest| std::str::from_utf8(rest).ok())
|
||||
.and_then(|rest| rest.split_once(' '))
|
||||
.map_or_else(String::new, |(from, _)| from.trim().to_string())
|
||||
}
|
||||
|
||||
fn reference(mbox: &[u8]) -> Vec<Expected> {
|
||||
let mut messages = Vec::new();
|
||||
let mut current: Option<Expected> = None;
|
||||
for line in mbox.split_inclusive(|&byte| byte == b'\n') {
|
||||
if line.starts_with(SEPARATOR) {
|
||||
messages.extend(current.replace(Expected {
|
||||
from: sender(line),
|
||||
contents: Vec::new(),
|
||||
}));
|
||||
} else if let Some(message) = &mut current {
|
||||
message.contents.extend_from_slice(unquoted(line));
|
||||
}
|
||||
}
|
||||
messages.extend(current);
|
||||
messages
|
||||
}
|
||||
|
||||
fn read_all(reader: impl BufRead) -> Vec<Message> {
|
||||
MessageIterator::new(reader)
|
||||
.map(|message| message.expect("an in-memory mbox is readable"))
|
||||
.collect()
|
||||
}
|
||||
|
||||
struct Chunked<'x> {
|
||||
data: &'x [u8],
|
||||
sizes: [usize; CHUNK_SIZES],
|
||||
next: usize,
|
||||
}
|
||||
|
||||
impl Read for Chunked<'_> {
|
||||
fn read(&mut self, buf: &mut [u8]) -> io::Result<usize> {
|
||||
let size = self.sizes.get(self.next).copied().unwrap_or(1);
|
||||
self.next = (self.next + 1) % CHUNK_SIZES;
|
||||
let len = size.min(buf.len()).min(self.data.len());
|
||||
let (head, tail) = self.data.split_at(len);
|
||||
if let Some(out) = buf.get_mut(..len) {
|
||||
out.copy_from_slice(head);
|
||||
}
|
||||
self.data = tail;
|
||||
Ok(len)
|
||||
}
|
||||
}
|
||||
|
||||
pub fn check(data: &[u8]) {
|
||||
let whole = read_all(data);
|
||||
let expected = reference(data);
|
||||
assert_eq!(whole.len(), expected.len(), "message count");
|
||||
for (message, expected) in whole.iter().zip(&expected) {
|
||||
assert_eq!(message.from(), expected.from, "separator sender");
|
||||
assert_eq!(message.contents(), expected.contents, "contents");
|
||||
let _ = message.internal_date();
|
||||
}
|
||||
for capacity in CAPACITIES {
|
||||
assert_eq!(
|
||||
read_all(BufReader::with_capacity(capacity, data)),
|
||||
whole,
|
||||
"capacity {capacity}"
|
||||
);
|
||||
}
|
||||
let mut sizes = [1; CHUNK_SIZES];
|
||||
for (size, &byte) in sizes.iter_mut().zip(data.iter().rev()) {
|
||||
*size = 1 + usize::from(byte) % MAX_CHUNK;
|
||||
}
|
||||
let chunked = Chunked {
|
||||
data,
|
||||
sizes,
|
||||
next: 0,
|
||||
};
|
||||
assert_eq!(
|
||||
read_all(BufReader::with_capacity(CHUNKED_CAPACITY, chunked)),
|
||||
whole,
|
||||
"chunked reader {sizes:?}"
|
||||
);
|
||||
for message in whole {
|
||||
let contents = message.unwrap_contents();
|
||||
let _ = mail_parser::MessageParser::new().parse(&contents);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,65 @@
|
||||
use crate::{char_prefix, debug, valid};
|
||||
use mail_parser::{MessagePart, PartKind, strip_charset_meta};
|
||||
|
||||
const PREFIX_CHARS: [usize; 7] = [0, 1, 2, 3, 7, 64, 1_000];
|
||||
const PROBE_CHARS: usize = 8;
|
||||
const APPENDED: &str = "appended";
|
||||
|
||||
pub fn check(part: MessagePart<'_>) {
|
||||
let decoded = part.decoded();
|
||||
assert_eq!(part.decoded_len(), decoded.len(), "decoded_len");
|
||||
let (checked, problems) = part.decoded_checked();
|
||||
assert_eq!(checked, decoded, "decoded_checked");
|
||||
assert_eq!(
|
||||
problems.names().count(),
|
||||
problems.bits().count_ones() as usize
|
||||
);
|
||||
debug(&problems);
|
||||
let mut appended = APPENDED.as_bytes().to_vec();
|
||||
part.decode_into(&mut appended);
|
||||
assert_eq!(
|
||||
appended.strip_prefix(APPENDED.as_bytes()),
|
||||
Some(decoded.as_ref()),
|
||||
"decode_into"
|
||||
);
|
||||
let Some(text) = part.text() else {
|
||||
assert!(!part.is_text());
|
||||
assert!(part.text_checked().is_none());
|
||||
assert!(part.text_prefix(PROBE_CHARS).is_none());
|
||||
assert!(!part.text_into(&mut String::new()));
|
||||
assert!(part.html_utf8().is_none());
|
||||
return;
|
||||
};
|
||||
valid(&text);
|
||||
assert!(part.is_text());
|
||||
let (checked, problems) = part.text_checked().expect("a text part has checked text");
|
||||
assert_eq!(checked, text, "text_checked");
|
||||
debug(&problems);
|
||||
let mut appended = String::from(APPENDED);
|
||||
assert!(part.text_into(&mut appended));
|
||||
assert_eq!(
|
||||
appended.strip_prefix(APPENDED),
|
||||
Some(text.as_ref()),
|
||||
"text_into"
|
||||
);
|
||||
let chars = text.chars().count();
|
||||
for max_chars in PREFIX_CHARS
|
||||
.into_iter()
|
||||
.chain([chars.saturating_sub(1), chars, chars + 1])
|
||||
{
|
||||
let prefix = part.text_prefix(max_chars);
|
||||
assert_eq!(
|
||||
prefix.as_deref(),
|
||||
Some(char_prefix(&text, max_chars)),
|
||||
"text_prefix({max_chars})"
|
||||
);
|
||||
}
|
||||
match part.kind() {
|
||||
PartKind::Html => {
|
||||
let html = part.html_utf8().expect("an HTML part has UTF-8 HTML");
|
||||
valid(&html);
|
||||
assert_eq!(html, strip_charset_meta(&text), "html_utf8");
|
||||
}
|
||||
_ => assert!(part.html_utf8().is_none()),
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,222 @@
|
||||
use super::values::header_value;
|
||||
use crate::{debug, valid};
|
||||
use mail_parser::{Header, HeaderForm, HeaderName, HeaderValue, Headers};
|
||||
|
||||
pub const FORMS: [HeaderForm; 9] = [
|
||||
HeaderForm::Raw,
|
||||
HeaderForm::Text,
|
||||
HeaderForm::Addresses,
|
||||
HeaderForm::MessageIds,
|
||||
HeaderForm::CommaList,
|
||||
HeaderForm::Date,
|
||||
HeaderForm::ContentType,
|
||||
HeaderForm::Received,
|
||||
HeaderForm::Ignore,
|
||||
];
|
||||
|
||||
const CHECKED_LOOKUPS: usize = 64;
|
||||
const CHECKED_REPARSES: usize = 256;
|
||||
const MAX_LINE_BREAK: usize = 2;
|
||||
|
||||
macro_rules! getters {
|
||||
($target:expr) => {{
|
||||
let target = &$target;
|
||||
for text in [
|
||||
target.subject(),
|
||||
target.comments(),
|
||||
target.mime_version(),
|
||||
target.thread_name(),
|
||||
target.message_id(),
|
||||
target.return_address(),
|
||||
]
|
||||
.into_iter()
|
||||
.flatten()
|
||||
{
|
||||
$crate::valid(text);
|
||||
}
|
||||
assert_eq!(
|
||||
target.thread_name(),
|
||||
target.subject().map(mail_parser::thread_name)
|
||||
);
|
||||
for list in [
|
||||
target.from(),
|
||||
target.to(),
|
||||
target.cc(),
|
||||
target.bcc(),
|
||||
target.reply_to(),
|
||||
target.sender(),
|
||||
target.resent_to(),
|
||||
target.resent_from(),
|
||||
target.resent_cc(),
|
||||
target.resent_bcc(),
|
||||
target.resent_sender(),
|
||||
target.list_archive(),
|
||||
target.list_help(),
|
||||
target.list_id(),
|
||||
target.list_owner(),
|
||||
target.list_post(),
|
||||
target.list_subscribe(),
|
||||
target.list_unsubscribe(),
|
||||
]
|
||||
.into_iter()
|
||||
.flatten()
|
||||
.chain(target.all_to())
|
||||
.chain(target.all_cc())
|
||||
.chain(target.all_bcc())
|
||||
{
|
||||
$crate::walk::addresses(list);
|
||||
}
|
||||
for date in [target.date(), target.resent_date()].into_iter().flatten() {
|
||||
$crate::walk::datetime(date);
|
||||
}
|
||||
for list in [
|
||||
target.in_reply_to(),
|
||||
target.references(),
|
||||
target.resent_message_id(),
|
||||
target.return_path(),
|
||||
target.keywords(),
|
||||
]
|
||||
.into_iter()
|
||||
.flatten()
|
||||
{
|
||||
$crate::walk::text_list(list);
|
||||
}
|
||||
for trace in target.received().into_iter().chain(target.all_received()) {
|
||||
$crate::walk::received(trace);
|
||||
}
|
||||
}};
|
||||
}
|
||||
|
||||
pub(crate) use getters;
|
||||
|
||||
pub fn check_headers(headers: Headers<'_>, source: &[u8], part_header: usize, body: usize) {
|
||||
let len = headers.len();
|
||||
assert_eq!(headers.is_empty(), len == 0);
|
||||
assert_eq!(headers.iter().len(), len);
|
||||
assert_eq!(headers.iter().rev().count(), len);
|
||||
assert_eq!((&headers).into_iter().count(), len);
|
||||
let mut previous = None;
|
||||
for (index, header) in headers.iter().enumerate() {
|
||||
check_offsets(header, source, part_header, body);
|
||||
assert!(
|
||||
previous < Some(header.offset_field()),
|
||||
"headers out of order"
|
||||
);
|
||||
previous = Some(header.offset_field());
|
||||
check_name(headers, header, index < CHECKED_LOOKUPS);
|
||||
if index < CHECKED_REPARSES {
|
||||
check_value(header);
|
||||
} else {
|
||||
header_value(header.value());
|
||||
}
|
||||
debug(&header);
|
||||
}
|
||||
let _ = headers.has_known();
|
||||
getters!(headers);
|
||||
debug(&headers);
|
||||
}
|
||||
|
||||
fn check_offsets(header: Header<'_>, source: &[u8], part_header: usize, body: usize) {
|
||||
let (field, start, end) = (
|
||||
header.offset_field() as usize,
|
||||
header.offset_start() as usize,
|
||||
header.offset_end() as usize,
|
||||
);
|
||||
assert!(
|
||||
part_header <= field && field < start && start <= end && end <= source.len(),
|
||||
"header {:?} offsets {field}..{start}..{end}, part header {part_header}, source {}",
|
||||
header.raw_name(),
|
||||
source.len()
|
||||
);
|
||||
assert!(start <= body, "header value starts past the body");
|
||||
if end > body {
|
||||
let tail = source.get(body..end).unwrap_or_default();
|
||||
assert!(
|
||||
tail.len() <= MAX_LINE_BREAK && tail.iter().all(|byte| matches!(byte, b'\r' | b'\n')),
|
||||
"header {:?} ends {} bytes past the body offset",
|
||||
header.raw_name(),
|
||||
end - body
|
||||
);
|
||||
}
|
||||
assert_eq!(source.get(start..end), Some(header.raw_value()));
|
||||
let name = header.raw_name();
|
||||
valid(name);
|
||||
let region = source.get(field..start).unwrap_or_default();
|
||||
let found = if name.contains(char::REPLACEMENT_CHARACTER) {
|
||||
String::from_utf8_lossy(region).contains(name)
|
||||
} else {
|
||||
region
|
||||
.windows(name.len())
|
||||
.any(|window| window == name.as_bytes())
|
||||
};
|
||||
assert!(
|
||||
name.is_empty() || found,
|
||||
"raw_name {name:?} not in its region {region:?}"
|
||||
);
|
||||
}
|
||||
|
||||
fn check_name(headers: Headers<'_>, header: Header<'_>, lookups: bool) {
|
||||
let name = header.name();
|
||||
let raw = header.raw_name();
|
||||
valid(name.as_str());
|
||||
match &name {
|
||||
HeaderName::Other(other) => assert_eq!(other.as_ref(), raw),
|
||||
known => assert!(
|
||||
known.as_str().eq_ignore_ascii_case(raw),
|
||||
"known name {known:?} spelled {raw:?}"
|
||||
),
|
||||
}
|
||||
if !lookups {
|
||||
return;
|
||||
}
|
||||
let last = headers
|
||||
.get(&name)
|
||||
.expect("get finds the name of a present header");
|
||||
assert!(last.offset_field() >= header.offset_field());
|
||||
assert!(
|
||||
headers
|
||||
.all(&name)
|
||||
.any(|same| same.offset_field() == header.offset_field())
|
||||
);
|
||||
assert!(headers.contains(&name));
|
||||
assert_eq!(headers.value(&name), Some(last.value()));
|
||||
if !raw.is_empty() {
|
||||
let by_raw = headers.get(raw).map(|found| found.offset_field());
|
||||
assert_eq!(by_raw, Some(last.offset_field()));
|
||||
}
|
||||
}
|
||||
|
||||
fn own_forms(value: HeaderValue<'_>) -> &'static [HeaderForm] {
|
||||
match value {
|
||||
HeaderValue::Empty => &[],
|
||||
HeaderValue::Text(_) => &[HeaderForm::Text, HeaderForm::Raw],
|
||||
HeaderValue::TextList(_) => &[HeaderForm::MessageIds, HeaderForm::CommaList],
|
||||
HeaderValue::Address(_) => &[HeaderForm::Addresses],
|
||||
HeaderValue::DateTime(_) => &[HeaderForm::Date],
|
||||
HeaderValue::ContentType(_) => &[HeaderForm::ContentType],
|
||||
HeaderValue::Received(_) => &[HeaderForm::Received],
|
||||
}
|
||||
}
|
||||
|
||||
fn check_value(header: Header<'_>) {
|
||||
let value = header.value();
|
||||
header_value(value);
|
||||
let forms = own_forms(value);
|
||||
let mut matched = forms.is_empty();
|
||||
for form in FORMS {
|
||||
let parsed = header.parse_as(form);
|
||||
let reparsed = parsed.value();
|
||||
header_value(reparsed);
|
||||
matched |= forms.contains(&form) && reparsed == value;
|
||||
assert!(
|
||||
form.parse(header.raw_value()) == parsed,
|
||||
"parse_as({form:?}) differs from HeaderForm::parse of the raw value"
|
||||
);
|
||||
debug(&parsed);
|
||||
}
|
||||
assert!(
|
||||
matched,
|
||||
"value of {:?} differs from parse_as in its own form",
|
||||
header.raw_name()
|
||||
);
|
||||
}
|
||||
@@ -0,0 +1,493 @@
|
||||
mod body;
|
||||
mod headers;
|
||||
mod values;
|
||||
|
||||
pub use headers::{FORMS, check_headers};
|
||||
pub use values::{addresses, content_type, datetime, header_value, received, text_list};
|
||||
|
||||
use crate::{debug, valid, within};
|
||||
use mail_parser::{
|
||||
Encoding, Message, MessageBuffers, MessageParser, MessagePart, MessageRef, PartId, PartKind,
|
||||
PartRole, Source, html_to_text, preview_html, preview_text, text_to_html,
|
||||
};
|
||||
use std::{borrow::Cow, ptr};
|
||||
|
||||
const PREVIEW_LENS: [usize; 5] = [0, 3, 7, 20, 256];
|
||||
const CHECKED_BOUNDARIES: usize = 16;
|
||||
const CHECKED_BODIES: usize = 2;
|
||||
|
||||
#[derive(Debug, Clone, Copy)]
|
||||
pub struct Limits {
|
||||
pub depth: usize,
|
||||
pub parts: usize,
|
||||
pub encoded: usize,
|
||||
}
|
||||
|
||||
pub fn run(parser: &MessageParser, raw: &[u8], limits: Option<Limits>) {
|
||||
let parsed = parser.parse(raw);
|
||||
let headers_only = parser.parse_headers(raw);
|
||||
assert_eq!(parsed.is_some(), headers_only.is_some());
|
||||
if let Some(message) = &headers_only {
|
||||
check_message(message);
|
||||
check_headers_only(message, parsed.as_ref());
|
||||
limits
|
||||
.into_iter()
|
||||
.for_each(|limits| check_limits(message, limits));
|
||||
}
|
||||
let json = parsed.as_ref().map(|message| {
|
||||
check_message(message);
|
||||
limits
|
||||
.into_iter()
|
||||
.for_each(|limits| check_limits(message, limits));
|
||||
serialize(message)
|
||||
});
|
||||
if let Some(message) = parsed {
|
||||
assert_eq!(
|
||||
Some(serialize(&message.clone().into_owned())),
|
||||
json,
|
||||
"into_owned"
|
||||
);
|
||||
}
|
||||
assert_eq!(
|
||||
parser.parse_owned(raw.to_vec()).as_ref().map(serialize),
|
||||
json,
|
||||
"parse_owned"
|
||||
);
|
||||
reuse(parser, raw, json.as_deref());
|
||||
}
|
||||
|
||||
fn serialize(message: &Message<'_>) -> String {
|
||||
serde_json::to_string(message).expect("a message serializes")
|
||||
}
|
||||
|
||||
fn reuse(parser: &MessageParser, raw: &[u8], json: Option<&str>) {
|
||||
let (_, second) = raw.split_at(raw.len() / 2);
|
||||
let second_json = parser.parse(second).as_ref().map(serialize);
|
||||
let mut buffers = MessageBuffers::new();
|
||||
for (input, expected) in [(raw, json), (second, second_json.as_deref()), (raw, json)] {
|
||||
let reused = parser.parse_with(input, &mut buffers);
|
||||
assert_eq!(
|
||||
reused.as_ref().map(serialize).as_deref(),
|
||||
expected,
|
||||
"parse_with"
|
||||
);
|
||||
if let Some(message) = reused {
|
||||
buffers = message.into_buffers();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
fn check_headers_only(message: &Message<'_>, full: Option<&Message<'_>>) {
|
||||
assert_eq!(message.messages().len(), 1);
|
||||
assert_eq!(message.parts().len(), 1);
|
||||
let root = message.root();
|
||||
assert_eq!(root.text_body().len(), 0);
|
||||
assert_eq!(root.html_body().len(), 0);
|
||||
assert_eq!(root.attachments().len(), 0);
|
||||
assert!(!root.has_attachments());
|
||||
let (part, raw) = (root.root_part(), message.raw());
|
||||
assert_eq!(part.offset_end() as usize, raw.len());
|
||||
if let Some(full) = full {
|
||||
let full_part = full.root().root_part();
|
||||
assert_eq!(part.offset_header(), full_part.offset_header());
|
||||
assert_eq!(part.offset_body(), full_part.offset_body());
|
||||
assert_eq!(
|
||||
serde_json::to_string(&part.headers()).ok(),
|
||||
serde_json::to_string(&full_part.headers()).ok(),
|
||||
"parse_headers and parse disagree on the root header block"
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
pub fn check_message(message: &Message<'_>) {
|
||||
for (part, id) in message.parts().zip(0..) {
|
||||
assert_eq!(part.id(), id);
|
||||
check_part(part);
|
||||
}
|
||||
let missing = PartId::try_from(message.parts().len()).ok();
|
||||
assert!(missing.and_then(|id| message.part(id)).is_none());
|
||||
let listed: usize = message.parts().map(|part| part.children().len()).sum();
|
||||
let with_parent = message
|
||||
.parts()
|
||||
.filter(|part| part.parent().is_some())
|
||||
.count();
|
||||
assert_eq!(
|
||||
listed, with_parent,
|
||||
"children lists and parent links differ"
|
||||
);
|
||||
for (nested, id) in message.messages().zip(0..) {
|
||||
assert_eq!(nested.id(), id);
|
||||
check_ref(message, nested);
|
||||
}
|
||||
for boundary in message
|
||||
.parts()
|
||||
.filter_map(|part| part.boundary())
|
||||
.take(CHECKED_BOUNDARIES)
|
||||
{
|
||||
let found = message.part_by_boundary(boundary);
|
||||
assert_eq!(found.and_then(|part| part.boundary()), Some(boundary));
|
||||
}
|
||||
let root = message.root();
|
||||
assert_eq!(root.id(), 0);
|
||||
assert_eq!(root.source(), Source::Raw);
|
||||
assert_eq!(message.subject(), root.subject());
|
||||
assert_eq!(message.from(), root.from());
|
||||
assert_eq!(message.root_part().id(), root.root_part().id());
|
||||
assert_eq!(message.has_attachments(), root.has_attachments());
|
||||
assert_eq!(message.body_preview(20), root.body_preview(20));
|
||||
assert_eq!(message.body_text(0), root.body_text(0));
|
||||
assert_eq!(message.body_html(0), root.body_html(0));
|
||||
assert_eq!(message.attachment_name(), root.attachment_name());
|
||||
assert_eq!(message.content_type(), root.content_type());
|
||||
assert_eq!(message.text_body().len(), root.text_body().len());
|
||||
assert_eq!(message.html_body().len(), root.html_body().len());
|
||||
assert_eq!(message.attachments().len(), root.attachments().len());
|
||||
assert_eq!(message.other_parts().count(), root.other_parts().count());
|
||||
assert_eq!(message.headers().len(), root.headers().len());
|
||||
headers::getters!(message);
|
||||
debug(message);
|
||||
}
|
||||
|
||||
fn check_ref(message: &Message<'_>, nested: MessageRef<'_>) {
|
||||
let source = nested.source_bytes();
|
||||
match nested.source() {
|
||||
Source::Raw => assert!(ptr::eq(source, message.raw())),
|
||||
Source::Decoded(id) => {
|
||||
let holder = message.part(id).expect("the source part exists");
|
||||
assert_ne!(holder.encoding(), Encoding::None);
|
||||
assert!(holder.is_message());
|
||||
assert_eq!(
|
||||
holder.decoded().as_ref(),
|
||||
source,
|
||||
"source is not the decoded body"
|
||||
);
|
||||
}
|
||||
}
|
||||
assert!(within(nested.raw(), source));
|
||||
let root = nested.root_part();
|
||||
assert_eq!(root.message().id(), nested.id());
|
||||
assert!(root.parent().is_none());
|
||||
match nested.container() {
|
||||
None => assert_eq!(nested.id(), 0),
|
||||
Some(container) => {
|
||||
assert!(container.is_message());
|
||||
assert!(container.id() < root.id());
|
||||
assert_eq!(
|
||||
container.nested().map(|inner| inner.id()),
|
||||
Some(nested.id())
|
||||
);
|
||||
assert!(
|
||||
matches!(container.kind(), PartKind::Message(inner) if inner.id() == nested.id())
|
||||
);
|
||||
}
|
||||
}
|
||||
assert_eq!(nested.parts().next().map(|part| part.id()), Some(root.id()));
|
||||
let mut previous = None;
|
||||
for part in nested.parts() {
|
||||
assert_eq!(part.message().id(), nested.id());
|
||||
assert!(previous < Some(part.id()));
|
||||
previous = Some(part.id());
|
||||
}
|
||||
check_list(nested, nested.text_body(), MessagePart::in_text_body);
|
||||
check_list(nested, nested.html_body(), MessagePart::in_html_body);
|
||||
check_list(nested, nested.attachments(), MessagePart::is_attachment);
|
||||
assert_eq!(
|
||||
nested.has_attachments(),
|
||||
nested.attachments().any(|part| {
|
||||
!part
|
||||
.content_disposition()
|
||||
.is_some_and(|disposition| disposition.is_inline())
|
||||
})
|
||||
);
|
||||
assert!(
|
||||
nested
|
||||
.other_parts()
|
||||
.all(|part| part.role() == PartRole::Dropped)
|
||||
);
|
||||
check_bodies(nested);
|
||||
for max_len in PREVIEW_LENS {
|
||||
check_preview(nested, max_len);
|
||||
}
|
||||
assert_eq!(nested.headers().len(), root.headers().len());
|
||||
let _ = nested.is_content_type("text", "plain");
|
||||
nested.attachment_name().into_iter().for_each(valid);
|
||||
[nested.content_type(), nested.content_disposition()]
|
||||
.into_iter()
|
||||
.flatten()
|
||||
.for_each(content_type);
|
||||
headers::getters!(nested);
|
||||
debug(&nested);
|
||||
}
|
||||
|
||||
fn check_list<'m>(
|
||||
owner: MessageRef<'m>,
|
||||
list: impl ExactSizeIterator<Item = MessagePart<'m>>,
|
||||
member: fn(&MessagePart<'m>) -> bool,
|
||||
) {
|
||||
let len = list.len();
|
||||
let mut count = 0;
|
||||
for part in list {
|
||||
assert_eq!(part.message().id(), owner.id());
|
||||
assert!(member(&part));
|
||||
count += 1;
|
||||
}
|
||||
assert_eq!(count, len);
|
||||
assert_eq!(owner.parts().filter(member).count(), len);
|
||||
}
|
||||
|
||||
fn as_text(part: MessagePart<'_>) -> Option<Cow<'_, str>> {
|
||||
match part.kind() {
|
||||
PartKind::Text => part.text(),
|
||||
PartKind::Html => part.text().map(|html| Cow::Owned(html_to_text(&html))),
|
||||
_ => None,
|
||||
}
|
||||
}
|
||||
|
||||
fn as_html(part: MessagePart<'_>) -> Option<Cow<'_, str>> {
|
||||
match part.kind() {
|
||||
PartKind::Html => part.text(),
|
||||
PartKind::Text => part.text().map(|text| Cow::Owned(text_to_html(&text))),
|
||||
_ => None,
|
||||
}
|
||||
}
|
||||
|
||||
fn check_bodies(owner: MessageRef<'_>) {
|
||||
for (index, part) in owner.text_body().enumerate().take(CHECKED_BODIES) {
|
||||
assert_eq!(owner.body_text(index), as_text(part));
|
||||
}
|
||||
for (index, part) in owner.html_body().enumerate().take(CHECKED_BODIES) {
|
||||
assert_eq!(owner.body_html(index), as_html(part));
|
||||
}
|
||||
let texts = owner.text_body().filter_map(as_text);
|
||||
assert!(
|
||||
owner
|
||||
.text_bodies()
|
||||
.take(CHECKED_BODIES)
|
||||
.eq(texts.take(CHECKED_BODIES))
|
||||
);
|
||||
let htmls = owner.html_body().filter_map(as_html);
|
||||
assert!(
|
||||
owner
|
||||
.html_bodies()
|
||||
.take(CHECKED_BODIES)
|
||||
.eq(htmls.take(CHECKED_BODIES))
|
||||
);
|
||||
}
|
||||
|
||||
fn check_preview(owner: MessageRef<'_>, max_len: usize) {
|
||||
let preview = owner.body_preview(max_len);
|
||||
let expected = match (owner.text_body().next(), owner.html_body().next()) {
|
||||
(Some(part), _) => match part.kind() {
|
||||
PartKind::Text => part
|
||||
.text()
|
||||
.map(|text| preview_text(&text, max_len).into_owned()),
|
||||
PartKind::Html => part.text().map(|html| preview_html(&html, max_len)),
|
||||
_ => None,
|
||||
},
|
||||
(None, Some(part)) => match part.kind() {
|
||||
PartKind::Html => part.text().map(|html| preview_html(&html, max_len)),
|
||||
PartKind::Text => part
|
||||
.text()
|
||||
.map(|text| preview_html(&text_to_html(&text), max_len)),
|
||||
_ => None,
|
||||
},
|
||||
(None, None) => None,
|
||||
};
|
||||
assert_eq!(preview.as_deref(), expected.as_deref(), "body_preview");
|
||||
if let Some(preview) = preview {
|
||||
valid(&preview);
|
||||
assert!(preview.len() <= max_len);
|
||||
assert!(!preview.contains('\r'));
|
||||
}
|
||||
}
|
||||
|
||||
fn check_part(part: MessagePart<'_>) {
|
||||
let source = part.message().source_bytes();
|
||||
let (header, body, end) = (
|
||||
part.offset_header() as usize,
|
||||
part.offset_body() as usize,
|
||||
part.offset_end() as usize,
|
||||
);
|
||||
assert!(
|
||||
header <= body && body <= end && end <= source.len(),
|
||||
"part {} offsets {header}..{body}..{end} outside its source of {} bytes",
|
||||
part.id(),
|
||||
source.len()
|
||||
);
|
||||
assert_eq!(source.get(header..end), Some(part.raw()));
|
||||
assert_eq!(source.get(header..body), Some(part.raw_headers()));
|
||||
assert_eq!(source.get(body..end), Some(part.raw_body()));
|
||||
check_family(part, header, end);
|
||||
check_role(part);
|
||||
let flags = part.flags();
|
||||
assert_eq!(part.has_problems(), !flags.is_empty());
|
||||
assert_eq!(flags.names().count(), flags.bits().count_ones() as usize);
|
||||
debug(&flags);
|
||||
if let Some(boundary) = part.boundary() {
|
||||
valid(boundary);
|
||||
assert!(part.is_multipart());
|
||||
let declared = part.content_type().and_then(|ct| ct.attribute("boundary"));
|
||||
assert_eq!(declared, Some(boundary));
|
||||
}
|
||||
assert_eq!(
|
||||
part.delimiter(),
|
||||
part.parent().and_then(|parent| parent.boundary())
|
||||
);
|
||||
check_headers(part.headers(), source, header, body);
|
||||
[
|
||||
part.attachment_name(),
|
||||
part.content_id(),
|
||||
part.content_description(),
|
||||
part.content_location(),
|
||||
part.content_transfer_encoding(),
|
||||
]
|
||||
.into_iter()
|
||||
.flatten()
|
||||
.for_each(valid);
|
||||
[part.content_type(), part.content_disposition()]
|
||||
.into_iter()
|
||||
.flatten()
|
||||
.for_each(content_type);
|
||||
part.content_language().into_iter().for_each(text_list);
|
||||
if let Some(ct) = part.content_type()
|
||||
&& let Some(subtype) = ct.subtype()
|
||||
{
|
||||
assert!(part.is_content_type(ct.ctype(), subtype));
|
||||
}
|
||||
let _ = (part.is_inline(), part.encoding());
|
||||
body::check(part);
|
||||
debug(&part);
|
||||
debug(&part.kind());
|
||||
}
|
||||
|
||||
fn check_family(part: MessagePart<'_>, header: usize, end: usize) {
|
||||
if let Some(parent) = part.parent() {
|
||||
assert!(parent.is_multipart());
|
||||
assert!(parent.id() < part.id());
|
||||
assert_eq!(parent.message().id(), part.message().id());
|
||||
assert!(
|
||||
parent.offset_body() as usize <= header && end <= parent.offset_end() as usize,
|
||||
"part {} {header}..{end} outside its parent {} body {}..{}",
|
||||
part.id(),
|
||||
parent.id(),
|
||||
parent.offset_body(),
|
||||
parent.offset_end()
|
||||
);
|
||||
}
|
||||
let children = part.children();
|
||||
let len = children.len();
|
||||
let mut previous = part.id();
|
||||
let mut count = 0;
|
||||
for child in children {
|
||||
assert!(child.id() > previous);
|
||||
assert_eq!(child.parent().map(|parent| parent.id()), Some(part.id()));
|
||||
previous = child.id();
|
||||
count += 1;
|
||||
}
|
||||
assert_eq!(count, len);
|
||||
assert_eq!(part.children().rev().count(), len);
|
||||
if !part.is_multipart() {
|
||||
assert_eq!(len, 0);
|
||||
}
|
||||
let kind = part.kind();
|
||||
assert_eq!(
|
||||
part.is_text(),
|
||||
matches!(kind, PartKind::Text | PartKind::Html)
|
||||
);
|
||||
assert_eq!(part.is_multipart(), matches!(kind, PartKind::Multipart));
|
||||
assert_eq!(part.is_message(), matches!(kind, PartKind::Message(_)));
|
||||
assert_eq!(part.nested().is_some(), part.is_message());
|
||||
if let PartKind::Message(nested) = kind {
|
||||
assert_eq!(part.nested().map(|inner| inner.id()), Some(nested.id()));
|
||||
assert_eq!(
|
||||
nested.container().map(|container| container.id()),
|
||||
Some(part.id())
|
||||
);
|
||||
let root = nested.root_part();
|
||||
if ptr::eq(nested.source_bytes(), part.message().source_bytes()) {
|
||||
assert!(
|
||||
root.offset_header() >= part.offset_body()
|
||||
&& root.offset_end() <= part.offset_end(),
|
||||
"nested root {} {}..{} outside its container {} body {}..{}",
|
||||
root.id(),
|
||||
root.offset_header(),
|
||||
root.offset_end(),
|
||||
part.id(),
|
||||
part.offset_body(),
|
||||
part.offset_end()
|
||||
);
|
||||
} else {
|
||||
assert_eq!(nested.source(), Source::Decoded(part.id()));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
fn check_role(part: MessagePart<'_>) {
|
||||
let (text, html, attachment) = (
|
||||
part.in_text_body(),
|
||||
part.in_html_body(),
|
||||
part.is_attachment(),
|
||||
);
|
||||
match part.role() {
|
||||
PartRole::Container => {
|
||||
assert!(part.is_multipart());
|
||||
assert!(!text && !html && !attachment);
|
||||
}
|
||||
PartRole::CopiedBody => assert!(text && html),
|
||||
PartRole::TextBody => {
|
||||
assert!(matches!(part.kind(), PartKind::Text));
|
||||
assert!(text || html);
|
||||
}
|
||||
PartRole::HtmlBody => {
|
||||
assert!(matches!(part.kind(), PartKind::Html));
|
||||
assert!(text || html);
|
||||
}
|
||||
PartRole::MediaBody => {
|
||||
assert!(!part.is_text() && !part.is_multipart());
|
||||
assert!(text || html);
|
||||
}
|
||||
PartRole::Attachment => assert!(attachment && !text && !html),
|
||||
PartRole::Dropped => assert!(!text && !html && !attachment),
|
||||
}
|
||||
debug(&part.role());
|
||||
}
|
||||
|
||||
fn part_depth(part: MessagePart<'_>) -> usize {
|
||||
let mut depth = 0;
|
||||
let mut current = part;
|
||||
loop {
|
||||
depth += 1;
|
||||
current = match current.parent() {
|
||||
Some(parent) => parent,
|
||||
None => match current.message().container() {
|
||||
Some(container) => container,
|
||||
None => return depth,
|
||||
},
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
fn encoded_depth(nested: MessageRef<'_>) -> usize {
|
||||
let mut depth = 0;
|
||||
let mut current = nested.container();
|
||||
while let Some(container) = current {
|
||||
if container.encoding() != Encoding::None {
|
||||
depth += 1;
|
||||
}
|
||||
current = container.message().container();
|
||||
}
|
||||
depth
|
||||
}
|
||||
|
||||
pub fn check_limits(message: &Message<'_>, limits: Limits) {
|
||||
assert!(message.parts().len() <= limits.parts, "part limit exceeded");
|
||||
for part in message.parts() {
|
||||
assert!(part_depth(part) <= limits.depth, "depth limit exceeded");
|
||||
}
|
||||
for nested in message.messages() {
|
||||
assert!(
|
||||
encoded_depth(nested) <= limits.encoded,
|
||||
"encoded nesting limit exceeded"
|
||||
);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,209 @@
|
||||
use crate::{debug, display, valid};
|
||||
use mail_parser::{
|
||||
Address, AddressList, ContentType, DateTime, HeaderValue, Host, Mailbox, Received, TextList,
|
||||
};
|
||||
use std::cmp::Ordering;
|
||||
|
||||
const ZONES: [i64; 6] = [0, 3_600, -39_600, 50_400, i64::MIN, i64::MAX];
|
||||
const DAYS_PER_WEEK: u8 = 7;
|
||||
|
||||
pub fn header_value(value: HeaderValue<'_>) {
|
||||
assert_eq!(value.is_empty(), matches!(value, HeaderValue::Empty));
|
||||
match value {
|
||||
HeaderValue::Empty => assert_eq!(value.as_text(), None),
|
||||
HeaderValue::Text(text) => {
|
||||
valid(text);
|
||||
assert_eq!(value.as_text(), Some(text));
|
||||
}
|
||||
HeaderValue::TextList(list) => {
|
||||
text_list(list);
|
||||
assert_eq!(value.as_text(), list.last());
|
||||
assert_eq!(value.as_text_list(), Some(list));
|
||||
}
|
||||
HeaderValue::Address(list) => {
|
||||
addresses(list);
|
||||
assert_eq!(value.as_address(), Some(list));
|
||||
}
|
||||
HeaderValue::DateTime(date) => {
|
||||
datetime(date);
|
||||
assert_eq!(value.as_datetime(), Some(date));
|
||||
}
|
||||
HeaderValue::ContentType(ct) => {
|
||||
content_type(ct);
|
||||
assert_eq!(value.as_content_type(), Some(ct));
|
||||
}
|
||||
HeaderValue::Received(trace) => {
|
||||
received(trace);
|
||||
assert_eq!(value.as_received(), Some(trace));
|
||||
}
|
||||
}
|
||||
debug(&value);
|
||||
}
|
||||
|
||||
pub fn text_list(list: TextList<'_>) {
|
||||
let len = list.len();
|
||||
assert_eq!(list.is_empty(), len == 0);
|
||||
assert_eq!(list.iter().len(), len);
|
||||
assert_eq!(list.iter().rev().count(), len);
|
||||
for (index, item) in list.iter().enumerate() {
|
||||
valid(item);
|
||||
assert_eq!(list.get(index), Some(item));
|
||||
assert!(list.contains(item));
|
||||
}
|
||||
assert_eq!(list.get(len), None);
|
||||
assert_eq!(list.first(), list.iter().next());
|
||||
assert_eq!(list.last(), list.iter().next_back());
|
||||
let copy = list;
|
||||
assert!(copy == list);
|
||||
debug(&list);
|
||||
}
|
||||
|
||||
fn mailbox(mailbox: Mailbox<'_>, list: AddressList<'_>) {
|
||||
[mailbox.name(), mailbox.address()]
|
||||
.into_iter()
|
||||
.flatten()
|
||||
.for_each(valid);
|
||||
if let Some(address) = mailbox.address() {
|
||||
assert!(list.contains(address));
|
||||
}
|
||||
}
|
||||
|
||||
pub fn addresses(list: AddressList<'_>) {
|
||||
let flattened = list.iter().flat_map(|address| {
|
||||
let (single, members) = match address {
|
||||
Address::Mailbox(mailbox) => (Some(mailbox), None),
|
||||
Address::Group(group) => (None, Some(group.mailboxes())),
|
||||
};
|
||||
single.into_iter().chain(members.into_iter().flatten())
|
||||
});
|
||||
assert!(
|
||||
flattened.eq(list.mailboxes()),
|
||||
"iter() and mailboxes() differ"
|
||||
);
|
||||
let grouped = list.groups().flat_map(|(_, run)| run);
|
||||
assert!(
|
||||
grouped.eq(list.mailboxes()),
|
||||
"groups() and mailboxes() differ"
|
||||
);
|
||||
for (name, run) in list.groups() {
|
||||
name.into_iter().for_each(valid);
|
||||
debug(&run);
|
||||
}
|
||||
let mut has_groups = false;
|
||||
for address in list.iter() {
|
||||
if let Address::Group(group) = address {
|
||||
has_groups = true;
|
||||
group.name().into_iter().for_each(valid);
|
||||
let members = group.mailboxes();
|
||||
assert_eq!(group.len(), members.len());
|
||||
assert_eq!(group.is_empty(), members.len() == 0);
|
||||
assert_eq!(members.rev().count(), group.len());
|
||||
}
|
||||
debug(&address);
|
||||
}
|
||||
assert_eq!(list.has_groups(), has_groups);
|
||||
assert_eq!(list.is_empty(), list.iter().next().is_none());
|
||||
assert_eq!(list.first(), list.mailboxes().next());
|
||||
assert_eq!(list.last(), list.mailboxes().last());
|
||||
for entry in list.mailboxes() {
|
||||
mailbox(entry, list);
|
||||
}
|
||||
let copy = list;
|
||||
assert!(copy == list);
|
||||
debug(&list);
|
||||
}
|
||||
|
||||
pub fn content_type(ct: ContentType<'_>) {
|
||||
valid(ct.ctype());
|
||||
ct.subtype().into_iter().for_each(valid);
|
||||
let attributes = ct.attributes();
|
||||
let len = attributes.len();
|
||||
let mut count = 0;
|
||||
for (name, value) in attributes {
|
||||
valid(name);
|
||||
valid(value);
|
||||
assert!(ct.has_attribute(name));
|
||||
count += 1;
|
||||
}
|
||||
assert_eq!(count, len);
|
||||
assert_eq!(ct.attributes().rev().count(), len);
|
||||
let _ = (ct.is_attachment(), ct.is_inline());
|
||||
let copy = ct;
|
||||
assert!(copy == ct);
|
||||
debug(&ct);
|
||||
}
|
||||
|
||||
fn host(host: Host<'_>) {
|
||||
if let Host::Name(name) = host {
|
||||
valid(name);
|
||||
}
|
||||
display(&host);
|
||||
debug(&host);
|
||||
}
|
||||
|
||||
pub fn received(trace: Received<'_>) {
|
||||
[trace.from(), trace.by(), trace.helo()]
|
||||
.into_iter()
|
||||
.flatten()
|
||||
.for_each(host);
|
||||
[
|
||||
trace.from_iprev(),
|
||||
trace.for_(),
|
||||
trace.tls_cipher(),
|
||||
trace.id(),
|
||||
trace.ident(),
|
||||
trace.via(),
|
||||
]
|
||||
.into_iter()
|
||||
.flatten()
|
||||
.for_each(valid);
|
||||
let _ = trace.from_ip();
|
||||
if let Some(protocol) = trace.with() {
|
||||
valid(protocol.as_str());
|
||||
display(&protocol);
|
||||
}
|
||||
if let Some(version) = trace.tls_version() {
|
||||
valid(version.as_str());
|
||||
display(&version);
|
||||
}
|
||||
if let Some(greeting) = trace.helo_cmd() {
|
||||
valid(greeting.as_str());
|
||||
display(&greeting);
|
||||
}
|
||||
trace.date().into_iter().for_each(datetime);
|
||||
let copy = trace;
|
||||
assert!(copy == trace);
|
||||
debug(&trace);
|
||||
}
|
||||
|
||||
pub fn datetime(date: DateTime) {
|
||||
assert!(date.day_of_week() < DAYS_PER_WEEK);
|
||||
let _ = (date.julian_day(), date.to_timestamp_local());
|
||||
assert_eq!(date.cmp(&date), Ordering::Equal);
|
||||
valid(&date.to_rfc822());
|
||||
valid(&date.to_rfc3339());
|
||||
display(&date);
|
||||
for zone in ZONES {
|
||||
let shifted = date.to_timezone(zone);
|
||||
assert!(shifted.day_of_week() < DAYS_PER_WEEK);
|
||||
}
|
||||
let _ = i64::from(date);
|
||||
if date.is_valid() {
|
||||
let timestamp = date.to_timestamp();
|
||||
assert_eq!(
|
||||
DateTime::from_timestamp(timestamp).to_timestamp(),
|
||||
timestamp,
|
||||
"from_timestamp does not invert to_timestamp for {date:?}"
|
||||
);
|
||||
assert_eq!(
|
||||
DateTime::parse_rfc3339(&date.to_rfc3339()).map(|parsed| parsed.to_timestamp()),
|
||||
Some(timestamp),
|
||||
"RFC 3339 round trip of {date:?}"
|
||||
);
|
||||
assert_eq!(
|
||||
DateTime::parse_rfc822(&date.to_rfc822()).map(|parsed| parsed.to_timestamp()),
|
||||
Some(timestamp),
|
||||
"RFC 822 round trip of {date:?}"
|
||||
);
|
||||
}
|
||||
}
|
||||
+1353
-415
File diff suppressed because it is too large
Load Diff
@@ -1224,5 +1224,233 @@
|
||||
"c_type": "text",
|
||||
"c_subtype": "plain"
|
||||
}
|
||||
},
|
||||
{
|
||||
"header": "attachment; filename*=utf-8''O'Brien.txt\n",
|
||||
"expected": {
|
||||
"c_type": "attachment",
|
||||
"c_subtype": null,
|
||||
"attributes": [
|
||||
[
|
||||
"filename",
|
||||
"O'Brien.txt"
|
||||
]
|
||||
]
|
||||
}
|
||||
},
|
||||
{
|
||||
"header": "text/plain",
|
||||
"expected": {
|
||||
"c_type": "text",
|
||||
"c_subtype": "plain",
|
||||
"attributes": null
|
||||
}
|
||||
},
|
||||
{
|
||||
"header": "TEXT/HTML; CHARSET=UTF-8\r\n",
|
||||
"expected": {
|
||||
"c_type": "text",
|
||||
"c_subtype": "html",
|
||||
"attributes": [
|
||||
[
|
||||
"charset",
|
||||
"UTF-8"
|
||||
]
|
||||
]
|
||||
}
|
||||
},
|
||||
{
|
||||
"header": "image/png; name=\"=?utf-8?q?caf=C3=A9?=.png\"\n",
|
||||
"expected": {
|
||||
"c_type": "image",
|
||||
"c_subtype": "png",
|
||||
"attributes": [
|
||||
[
|
||||
"name",
|
||||
"café.png"
|
||||
]
|
||||
]
|
||||
}
|
||||
},
|
||||
{
|
||||
"header": "image/png; name=\"=?x?q?caf=C3=A9?=.png\"\n",
|
||||
"expected": {
|
||||
"c_type": "image",
|
||||
"c_subtype": "png",
|
||||
"attributes": [
|
||||
[
|
||||
"name",
|
||||
"café.png"
|
||||
]
|
||||
]
|
||||
}
|
||||
},
|
||||
{
|
||||
"header": "application/pdf; name*=\"iso-8859-1''abc%\"\n",
|
||||
"expected": {
|
||||
"c_type": "application",
|
||||
"c_subtype": "pdf",
|
||||
"attributes": [
|
||||
[
|
||||
"name",
|
||||
"abc"
|
||||
]
|
||||
]
|
||||
}
|
||||
},
|
||||
{
|
||||
"header": " text/plain; name*0*=utf-8''%E2%98; name*1*=%95.txt\n",
|
||||
"expected": {
|
||||
"c_type": "text",
|
||||
"c_subtype": "plain",
|
||||
"attributes": [
|
||||
[
|
||||
"name",
|
||||
"☕.txt"
|
||||
]
|
||||
]
|
||||
}
|
||||
},
|
||||
{
|
||||
"header": " text/plain; name*0*=iso-8859-1''caf; name*1*=%E9.txt\n",
|
||||
"expected": {
|
||||
"c_type": "text",
|
||||
"c_subtype": "plain",
|
||||
"attributes": [
|
||||
[
|
||||
"name",
|
||||
"café.txt"
|
||||
]
|
||||
]
|
||||
}
|
||||
},
|
||||
{
|
||||
"header": " text/plain; name*0*=utf-8''caf%C3; name*1*=%A9.txt\n",
|
||||
"expected": {
|
||||
"c_type": "text",
|
||||
"c_subtype": "plain",
|
||||
"attributes": [
|
||||
[
|
||||
"name",
|
||||
"café.txt"
|
||||
]
|
||||
]
|
||||
}
|
||||
},
|
||||
{
|
||||
"header": " text/plain; name*1*=%A9.txt; name*0*=utf-8''caf%C3\n",
|
||||
"expected": {
|
||||
"c_type": "text",
|
||||
"c_subtype": "plain",
|
||||
"attributes": [
|
||||
[
|
||||
"name",
|
||||
"café.txt"
|
||||
]
|
||||
]
|
||||
}
|
||||
},
|
||||
{
|
||||
"header": " text/plain; name*0*=utf-16le''%41%00; name*1=bc\n",
|
||||
"expected": {
|
||||
"c_type": "text",
|
||||
"c_subtype": "plain",
|
||||
"attributes": [
|
||||
[
|
||||
"name",
|
||||
"Abc"
|
||||
]
|
||||
]
|
||||
}
|
||||
},
|
||||
{
|
||||
"header": " text/plain; name*0=\"a\"; name*2=\"c\"; name*1=\"b\"\n",
|
||||
"expected": {
|
||||
"c_type": "text",
|
||||
"c_subtype": "plain",
|
||||
"attributes": [
|
||||
[
|
||||
"name",
|
||||
"abc"
|
||||
]
|
||||
]
|
||||
}
|
||||
},
|
||||
{
|
||||
"header": " text/plain; name*=utf-8''caf%C3%A9\n",
|
||||
"expected": {
|
||||
"c_type": "text",
|
||||
"c_subtype": "plain",
|
||||
"attributes": [
|
||||
[
|
||||
"name",
|
||||
"café"
|
||||
]
|
||||
]
|
||||
}
|
||||
},
|
||||
{
|
||||
"header": " text/plain; title*0*=us-ascii'en'a; title*1*=us-ascii'en'b\n",
|
||||
"expected": {
|
||||
"c_type": "text",
|
||||
"c_subtype": "plain",
|
||||
"attributes": [
|
||||
[
|
||||
"title-language",
|
||||
"en"
|
||||
],
|
||||
[
|
||||
"title",
|
||||
"ab"
|
||||
]
|
||||
]
|
||||
}
|
||||
},
|
||||
{
|
||||
"header": " text/plain; name*=iso-8859-1'en'caf%E9\n",
|
||||
"expected": {
|
||||
"c_type": "text",
|
||||
"c_subtype": "plain",
|
||||
"attributes": [
|
||||
[
|
||||
"name-language",
|
||||
"en"
|
||||
],
|
||||
[
|
||||
"name",
|
||||
"café"
|
||||
]
|
||||
]
|
||||
}
|
||||
},
|
||||
{
|
||||
"header": " text/plain; name*1=\"b\"; name=\"x\"; name*0=\"a\"\n",
|
||||
"expected": {
|
||||
"c_type": "text",
|
||||
"c_subtype": "plain",
|
||||
"attributes": [
|
||||
[
|
||||
"name",
|
||||
"xb"
|
||||
],
|
||||
[
|
||||
"name",
|
||||
"a"
|
||||
]
|
||||
]
|
||||
}
|
||||
},
|
||||
{
|
||||
"header": " attachment;\n filename*0*=utf-8''%E2%98%95%20tables%20and%20%E2;\n filename*1*=%98%95%20chairs.gif\n",
|
||||
"expected": {
|
||||
"c_type": "attachment",
|
||||
"c_subtype": null,
|
||||
"attributes": [
|
||||
[
|
||||
"filename",
|
||||
"☕ tables and ☕ chairs.gif"
|
||||
]
|
||||
]
|
||||
}
|
||||
}
|
||||
]
|
||||
@@ -488,5 +488,561 @@
|
||||
"tz_hour": 14,
|
||||
"tz_minute": 0
|
||||
}
|
||||
},
|
||||
{
|
||||
"header": "Tue, 1 Jul 2003 10:52:37 +5",
|
||||
"expected": {
|
||||
"year": 2003,
|
||||
"month": 7,
|
||||
"day": 1,
|
||||
"hour": 10,
|
||||
"minute": 52,
|
||||
"second": 37,
|
||||
"tz_before_gmt": false,
|
||||
"tz_hour": 5,
|
||||
"tz_minute": 0
|
||||
}
|
||||
},
|
||||
{
|
||||
"header": "Tue, 1 Jul 2003 10:52:37 -5\r\n",
|
||||
"expected": {
|
||||
"year": 2003,
|
||||
"month": 7,
|
||||
"day": 1,
|
||||
"hour": 10,
|
||||
"minute": 52,
|
||||
"second": 37,
|
||||
"tz_before_gmt": true,
|
||||
"tz_hour": 5,
|
||||
"tz_minute": 0
|
||||
}
|
||||
},
|
||||
{
|
||||
"header": "Tue, 1 Jul 2003 10:52:37 +5 \n",
|
||||
"expected": {
|
||||
"year": 2003,
|
||||
"month": 7,
|
||||
"day": 1,
|
||||
"hour": 10,
|
||||
"minute": 52,
|
||||
"second": 37,
|
||||
"tz_before_gmt": false,
|
||||
"tz_hour": 0,
|
||||
"tz_minute": 5
|
||||
}
|
||||
},
|
||||
{
|
||||
"header": "Tue, 1 Jul 2003 10:52:37 +530\n",
|
||||
"expected": {
|
||||
"year": 2003,
|
||||
"month": 7,
|
||||
"day": 1,
|
||||
"hour": 10,
|
||||
"minute": 52,
|
||||
"second": 37,
|
||||
"tz_before_gmt": false,
|
||||
"tz_hour": 5,
|
||||
"tz_minute": 0
|
||||
}
|
||||
},
|
||||
{
|
||||
"header": "Tue, 1 Jul 2003 10:52:37\n",
|
||||
"expected": null
|
||||
},
|
||||
{
|
||||
"header": "Tue, 1 Jul 2003 10:52:37 \n",
|
||||
"expected": {
|
||||
"year": 2003,
|
||||
"month": 7,
|
||||
"day": 1,
|
||||
"hour": 10,
|
||||
"minute": 52,
|
||||
"second": 37,
|
||||
"tz_before_gmt": false,
|
||||
"tz_hour": 0,
|
||||
"tz_minute": 0
|
||||
}
|
||||
},
|
||||
{
|
||||
"header": "Tue, 1 June 2003 10:52:37 +0200",
|
||||
"expected": null
|
||||
},
|
||||
{
|
||||
"header": "01-Jan-2021 10:52:37 +0200",
|
||||
"expected": null
|
||||
},
|
||||
{
|
||||
"header": "Tue, 1 Jul 2003 10:52:37 est",
|
||||
"expected": {
|
||||
"year": 2003,
|
||||
"month": 7,
|
||||
"day": 1,
|
||||
"hour": 10,
|
||||
"minute": 52,
|
||||
"second": 37,
|
||||
"tz_before_gmt": false,
|
||||
"tz_hour": 0,
|
||||
"tz_minute": 0
|
||||
}
|
||||
},
|
||||
{
|
||||
"header": " Fri, 07 Oct 1994 16:15:05 -0700 (PDT)\r\n",
|
||||
"expected": {
|
||||
"year": 1994,
|
||||
"month": 10,
|
||||
"day": 7,
|
||||
"hour": 16,
|
||||
"minute": 15,
|
||||
"second": 5,
|
||||
"tz_before_gmt": true,
|
||||
"tz_hour": 7,
|
||||
"tz_minute": 0
|
||||
}
|
||||
},
|
||||
{
|
||||
"header": "Thu, 10 Jul 1997 14:53:31 Z\nX-y: -0500",
|
||||
"expected": {
|
||||
"year": 1997,
|
||||
"month": 7,
|
||||
"day": 10,
|
||||
"hour": 14,
|
||||
"minute": 53,
|
||||
"second": 31,
|
||||
"tz_before_gmt": false,
|
||||
"tz_hour": 0,
|
||||
"tz_minute": 0
|
||||
}
|
||||
},
|
||||
{
|
||||
"header": "Tue, 1 Xul 2003 10:52:37 +0200",
|
||||
"expected": {
|
||||
"year": 2003,
|
||||
"month": 7,
|
||||
"day": 1,
|
||||
"hour": 10,
|
||||
"minute": 52,
|
||||
"second": 37,
|
||||
"tz_before_gmt": false,
|
||||
"tz_hour": 2,
|
||||
"tz_minute": 0
|
||||
}
|
||||
},
|
||||
{
|
||||
"header": "Tue, 1 Jul 2003 10:52:37 +0200 foo-bar",
|
||||
"expected": {
|
||||
"year": 2003,
|
||||
"month": 7,
|
||||
"day": 1,
|
||||
"hour": 10,
|
||||
"minute": 52,
|
||||
"second": 37,
|
||||
"tz_before_gmt": false,
|
||||
"tz_hour": 0,
|
||||
"tz_minute": 0
|
||||
}
|
||||
},
|
||||
{
|
||||
"header": "Tue, 1 Jul 2003 10:52:37 +0200; x",
|
||||
"expected": null
|
||||
},
|
||||
{
|
||||
"header": "Wed, 27 Jun 99 04:11 GMT \n",
|
||||
"expected": {
|
||||
"year": 1999,
|
||||
"month": 6,
|
||||
"day": 27,
|
||||
"hour": 4,
|
||||
"minute": 11,
|
||||
"second": 0,
|
||||
"tz_before_gmt": false,
|
||||
"tz_hour": 0,
|
||||
"tz_minute": 0
|
||||
}
|
||||
},
|
||||
{
|
||||
"header": "Wed, 27 Jun 99 04:11 GMT\n",
|
||||
"expected": null
|
||||
},
|
||||
{
|
||||
"header": "Mon, 5 Jan 2004 10:00:00 +0100 (GMT+01:00)",
|
||||
"expected": {
|
||||
"year": 2004,
|
||||
"month": 1,
|
||||
"day": 5,
|
||||
"hour": 10,
|
||||
"minute": 0,
|
||||
"second": 0,
|
||||
"tz_before_gmt": false,
|
||||
"tz_hour": 1,
|
||||
"tz_minute": 0
|
||||
}
|
||||
},
|
||||
{
|
||||
"header": " Thu, 10 Jul 1997 14:53:31 Z\nFrom: x@y\n",
|
||||
"expected": {
|
||||
"year": 1997,
|
||||
"month": 7,
|
||||
"day": 10,
|
||||
"hour": 14,
|
||||
"minute": 53,
|
||||
"second": 31,
|
||||
"tz_before_gmt": false,
|
||||
"tz_hour": 0,
|
||||
"tz_minute": 0
|
||||
}
|
||||
},
|
||||
{
|
||||
"header": " Tue, 1 Jul 2003 10:52:37 +0200 (CEST)",
|
||||
"expected": {
|
||||
"year": 2003,
|
||||
"month": 7,
|
||||
"day": 1,
|
||||
"hour": 10,
|
||||
"minute": 52,
|
||||
"second": 37,
|
||||
"tz_before_gmt": false,
|
||||
"tz_hour": 2,
|
||||
"tz_minute": 0
|
||||
}
|
||||
},
|
||||
{
|
||||
"header": "Tue, 1 Jul 2003 10:52:37 GMT",
|
||||
"expected": {
|
||||
"year": 2003,
|
||||
"month": 7,
|
||||
"day": 1,
|
||||
"hour": 10,
|
||||
"minute": 52,
|
||||
"second": 37,
|
||||
"tz_before_gmt": false,
|
||||
"tz_hour": 0,
|
||||
"tz_minute": 0
|
||||
}
|
||||
},
|
||||
{
|
||||
"header": "1 Jul 2003 10:52 +0200",
|
||||
"expected": {
|
||||
"year": 2003,
|
||||
"month": 7,
|
||||
"day": 1,
|
||||
"hour": 10,
|
||||
"minute": 52,
|
||||
"second": 0,
|
||||
"tz_before_gmt": false,
|
||||
"tz_hour": 2,
|
||||
"tz_minute": 0
|
||||
}
|
||||
},
|
||||
{
|
||||
"header": "Tue, 1 Jul 2003 10:52:37",
|
||||
"expected": null
|
||||
},
|
||||
{
|
||||
"header": "Tue, 1 Jul 2003 10:52:37 (UTC)\n",
|
||||
"expected": {
|
||||
"year": 2003,
|
||||
"month": 7,
|
||||
"day": 1,
|
||||
"hour": 10,
|
||||
"minute": 52,
|
||||
"second": 37,
|
||||
"tz_before_gmt": false,
|
||||
"tz_hour": 0,
|
||||
"tz_minute": 0
|
||||
}
|
||||
},
|
||||
{
|
||||
"header": "Tue, 32 Jul 2003 25:61:61 +0200",
|
||||
"expected": {
|
||||
"year": 2003,
|
||||
"month": 7,
|
||||
"day": 32,
|
||||
"hour": 25,
|
||||
"minute": 61,
|
||||
"second": 61,
|
||||
"tz_before_gmt": false,
|
||||
"tz_hour": 2,
|
||||
"tz_minute": 0
|
||||
}
|
||||
},
|
||||
{
|
||||
"header": "Tue, 1 Xul 2003 10:52:37 -0000",
|
||||
"expected": {
|
||||
"year": 2003,
|
||||
"month": 7,
|
||||
"day": 1,
|
||||
"hour": 10,
|
||||
"minute": 52,
|
||||
"second": 37,
|
||||
"tz_before_gmt": true,
|
||||
"tz_hour": 0,
|
||||
"tz_minute": 0
|
||||
}
|
||||
},
|
||||
{
|
||||
"header": "1 Jul 121 10:52:37 +0200",
|
||||
"expected": {
|
||||
"year": 121,
|
||||
"month": 7,
|
||||
"day": 1,
|
||||
"hour": 10,
|
||||
"minute": 52,
|
||||
"second": 37,
|
||||
"tz_before_gmt": false,
|
||||
"tz_hour": 2,
|
||||
"tz_minute": 0
|
||||
}
|
||||
},
|
||||
{
|
||||
"header": "1 Jul 49 10:52:37 +0200",
|
||||
"expected": {
|
||||
"year": 2049,
|
||||
"month": 7,
|
||||
"day": 1,
|
||||
"hour": 10,
|
||||
"minute": 52,
|
||||
"second": 37,
|
||||
"tz_before_gmt": false,
|
||||
"tz_hour": 2,
|
||||
"tz_minute": 0
|
||||
}
|
||||
},
|
||||
{
|
||||
"header": "1 Jul 50 10:52:37 +0200",
|
||||
"expected": {
|
||||
"year": 1950,
|
||||
"month": 7,
|
||||
"day": 1,
|
||||
"hour": 10,
|
||||
"minute": 52,
|
||||
"second": 37,
|
||||
"tz_before_gmt": false,
|
||||
"tz_hour": 2,
|
||||
"tz_minute": 0
|
||||
}
|
||||
},
|
||||
{
|
||||
"header": "Tue, 1 Jul 2003 10:52:37 +0200 x-y",
|
||||
"expected": {
|
||||
"year": 2003,
|
||||
"month": 7,
|
||||
"day": 1,
|
||||
"hour": 10,
|
||||
"minute": 52,
|
||||
"second": 37,
|
||||
"tz_before_gmt": false,
|
||||
"tz_hour": 0,
|
||||
"tz_minute": 0
|
||||
}
|
||||
},
|
||||
{
|
||||
"header": "Tue, 1 Jul 2003 10:52:37 +0200 foo-",
|
||||
"expected": {
|
||||
"year": 2003,
|
||||
"month": 7,
|
||||
"day": 1,
|
||||
"hour": 10,
|
||||
"minute": 52,
|
||||
"second": 37,
|
||||
"tz_before_gmt": true,
|
||||
"tz_hour": 2,
|
||||
"tz_minute": 0
|
||||
}
|
||||
},
|
||||
{
|
||||
"header": "Tue, 1 Jul 2003 10:52:37 EST\n",
|
||||
"expected": {
|
||||
"year": 2003,
|
||||
"month": 7,
|
||||
"day": 1,
|
||||
"hour": 10,
|
||||
"minute": 52,
|
||||
"second": 37,
|
||||
"tz_before_gmt": true,
|
||||
"tz_hour": 5,
|
||||
"tz_minute": 0
|
||||
}
|
||||
},
|
||||
{
|
||||
"header": "Tue, 1 Jul 2003 10:52:37 PDT (Pacific)",
|
||||
"expected": {
|
||||
"year": 2003,
|
||||
"month": 7,
|
||||
"day": 1,
|
||||
"hour": 10,
|
||||
"minute": 52,
|
||||
"second": 37,
|
||||
"tz_before_gmt": true,
|
||||
"tz_hour": 7,
|
||||
"tz_minute": 0
|
||||
}
|
||||
},
|
||||
{
|
||||
"header": "Tue, 1 Jul 2003 10:52:37 +05\n",
|
||||
"expected": {
|
||||
"year": 2003,
|
||||
"month": 7,
|
||||
"day": 1,
|
||||
"hour": 10,
|
||||
"minute": 52,
|
||||
"second": 37,
|
||||
"tz_before_gmt": false,
|
||||
"tz_hour": 5,
|
||||
"tz_minute": 0
|
||||
}
|
||||
},
|
||||
{
|
||||
"header": "Tue, 1 Jul 2003 10:52:37 +9\n",
|
||||
"expected": {
|
||||
"year": 2003,
|
||||
"month": 7,
|
||||
"day": 1,
|
||||
"hour": 10,
|
||||
"minute": 52,
|
||||
"second": 37,
|
||||
"tz_before_gmt": false,
|
||||
"tz_hour": 9,
|
||||
"tz_minute": 0
|
||||
}
|
||||
},
|
||||
{
|
||||
"header": "Tue, 1 Jul 2003 10:52:37 +020",
|
||||
"expected": {
|
||||
"year": 2003,
|
||||
"month": 7,
|
||||
"day": 1,
|
||||
"hour": 10,
|
||||
"minute": 52,
|
||||
"second": 37,
|
||||
"tz_before_gmt": false,
|
||||
"tz_hour": 2,
|
||||
"tz_minute": 0
|
||||
}
|
||||
},
|
||||
{
|
||||
"header": "Tue, 1 Jul 2003 10:52:37 +0530\n",
|
||||
"expected": {
|
||||
"year": 2003,
|
||||
"month": 7,
|
||||
"day": 1,
|
||||
"hour": 10,
|
||||
"minute": 52,
|
||||
"second": 37,
|
||||
"tz_before_gmt": false,
|
||||
"tz_hour": 5,
|
||||
"tz_minute": 30
|
||||
}
|
||||
},
|
||||
{
|
||||
"header": "Tue, 1 Jul 2003 10:52:37 5\n",
|
||||
"expected": {
|
||||
"year": 2003,
|
||||
"month": 7,
|
||||
"day": 1,
|
||||
"hour": 10,
|
||||
"minute": 52,
|
||||
"second": 37,
|
||||
"tz_before_gmt": false,
|
||||
"tz_hour": 2,
|
||||
"tz_minute": 0
|
||||
}
|
||||
},
|
||||
{
|
||||
"header": "Tue, 1 Jul 2003 10:52:37 +02\r0\n",
|
||||
"expected": {
|
||||
"year": 2003,
|
||||
"month": 7,
|
||||
"day": 1,
|
||||
"hour": 10,
|
||||
"minute": 52,
|
||||
"second": 37,
|
||||
"tz_before_gmt": false,
|
||||
"tz_hour": 2,
|
||||
"tz_minute": 0
|
||||
}
|
||||
},
|
||||
{
|
||||
"header": "Tue, 1 Jul 2003 10:52:37 +05 (IST)\n",
|
||||
"expected": {
|
||||
"year": 2003,
|
||||
"month": 7,
|
||||
"day": 1,
|
||||
"hour": 10,
|
||||
"minute": 52,
|
||||
"second": 37,
|
||||
"tz_before_gmt": false,
|
||||
"tz_hour": 0,
|
||||
"tz_minute": 5
|
||||
}
|
||||
},
|
||||
{
|
||||
"header": "Tue, 1 Jul 2003 10:52:37 +530 \n",
|
||||
"expected": {
|
||||
"year": 2003,
|
||||
"month": 7,
|
||||
"day": 1,
|
||||
"hour": 10,
|
||||
"minute": 52,
|
||||
"second": 37,
|
||||
"tz_before_gmt": false,
|
||||
"tz_hour": 5,
|
||||
"tz_minute": 30
|
||||
}
|
||||
},
|
||||
{
|
||||
"header": "Tue, 1 Jul 2003 10:52:37 +1 x-\n",
|
||||
"expected": {
|
||||
"year": 2003,
|
||||
"month": 7,
|
||||
"day": 1,
|
||||
"hour": 10,
|
||||
"minute": 52,
|
||||
"second": 37,
|
||||
"tz_before_gmt": true,
|
||||
"tz_hour": 0,
|
||||
"tz_minute": 1
|
||||
}
|
||||
},
|
||||
{
|
||||
"header": "Tue, 1 Jul 2003 10:52:37 +3(7 +5",
|
||||
"expected": {
|
||||
"year": 2003,
|
||||
"month": 7,
|
||||
"day": 1,
|
||||
"hour": 10,
|
||||
"minute": 52,
|
||||
"second": 37,
|
||||
"tz_before_gmt": false,
|
||||
"tz_hour": 6,
|
||||
"tz_minute": 0
|
||||
}
|
||||
},
|
||||
{
|
||||
"header": "Tue, 1 Jul 2003 10:52:37 5+,",
|
||||
"expected": {
|
||||
"year": 2003,
|
||||
"month": 7,
|
||||
"day": 1,
|
||||
"hour": 10,
|
||||
"minute": 52,
|
||||
"second": 37,
|
||||
"tz_before_gmt": false,
|
||||
"tz_hour": 2,
|
||||
"tz_minute": 0
|
||||
}
|
||||
},
|
||||
{
|
||||
"header": "Tue, 1 Jul 2003 10:52:37 -+5\n",
|
||||
"expected": {
|
||||
"year": 2003,
|
||||
"month": 7,
|
||||
"day": 1,
|
||||
"hour": 10,
|
||||
"minute": 52,
|
||||
"second": 37,
|
||||
"tz_before_gmt": true,
|
||||
"tz_hour": 5,
|
||||
"tz_minute": 0
|
||||
}
|
||||
}
|
||||
]
|
||||
@@ -0,0 +1,46 @@
|
||||
Message-ID: <39235EAD.E48E2160@example.com>
|
||||
Date: Wed, 17 May 2000 23:08:29 -0400
|
||||
From: Doug Sauder <dwsauder@example.com>
|
||||
MIME-Version: 1.0
|
||||
To: Joe Blow <blow@example.com>
|
||||
Subject: Inline image before the alternative
|
||||
Content-Type: multipart/mixed;
|
||||
boundary="------------C78F594988075E36AE03C243"
|
||||
|
||||
This is a multi-part message in MIME format.
|
||||
--------------C78F594988075E36AE03C243
|
||||
Content-Type: image/png;
|
||||
name="greenball.png"
|
||||
Content-Transfer-Encoding: base64
|
||||
Content-Disposition: inline;
|
||||
filename="greenball.png"
|
||||
|
||||
iVBORw0KGgo=
|
||||
--------------C78F594988075E36AE03C243
|
||||
Content-Type: multipart/alternative;
|
||||
boundary="------------D74AE2393FB01D1B284AE257"
|
||||
|
||||
|
||||
--------------D74AE2393FB01D1B284AE257
|
||||
Content-Type: text/plain; charset=us-ascii
|
||||
Content-Transfer-Encoding: 7bit
|
||||
|
||||
Die Hasen und die Froesche
|
||||
|
||||
--------------D74AE2393FB01D1B284AE257
|
||||
Content-Type: text/html; charset=us-ascii
|
||||
Content-Transfer-Encoding: 7bit
|
||||
|
||||
<html><b>Die Hasen und die Frösche</b></html>
|
||||
|
||||
--------------D74AE2393FB01D1B284AE257--
|
||||
|
||||
--------------C78F594988075E36AE03C243
|
||||
Content-Type: image/png;
|
||||
name="blueball.png"
|
||||
Content-Transfer-Encoding: base64
|
||||
Content-Disposition: inline;
|
||||
filename="blueball.png"
|
||||
|
||||
iVBORw0KGgo=
|
||||
--------------C78F594988075E36AE03C243--
|
||||
@@ -0,0 +1,23 @@
|
||||
Content-Type: multipart/alternative;
|
||||
boundary="_000_965A26A6D93540AD9522027B9387AAACXXX_"
|
||||
|
||||
--_000_965A26A6D93540AD9522027B9387AAACXXX_
|
||||
Content-Type: text/plain; charset="Windows-1252"
|
||||
Content-Transfer-Encoding: quoted-printable
|
||||
|
||||
=97
|
||||
|
||||
--_000_965A26A6D93540AD9522027B9387AAACXXX_
|
||||
Content-Type: text/html; charset="Windows-1252"
|
||||
Content-Transfer-Encoding: quoted-printable
|
||||
|
||||
<html>
|
||||
<head>
|
||||
<meta charset=3D"Windows-1252">
|
||||
</head>
|
||||
<body dir=3D"auto">
|
||||
=97
|
||||
</body>
|
||||
</html>
|
||||
|
||||
--_000_965A26A6D93540AD9522027B9387AAACXXX_--
|
||||
@@ -0,0 +1,23 @@
|
||||
Content-Type: multipart/alternative;
|
||||
boundary="_000_965A26A6D93540AD9522027B9387AAACXXX_"
|
||||
|
||||
--_000_965A26A6D93540AD9522027B9387AAACXXX_
|
||||
Content-Type: text/plain; charset="Windows-1252"
|
||||
Content-Transfer-Encoding: quoted-printable
|
||||
|
||||
=97
|
||||
|
||||
--_000_965A26A6D93540AD9522027B9387AAACXXX_
|
||||
Content-Type: text/html; charset="Windows-1252"
|
||||
Content-Transfer-Encoding: quoted-printable
|
||||
|
||||
<html>
|
||||
<head>
|
||||
<meta charset=3DWindows-1252>
|
||||
</head>
|
||||
<body dir=3D"auto">
|
||||
=97
|
||||
</body>
|
||||
</html>
|
||||
|
||||
--_000_965A26A6D93540AD9522027B9387AAACXXX_--
|
||||
@@ -0,0 +1,23 @@
|
||||
Content-Type: multipart/alternative;
|
||||
boundary="_000_965A26A6D93540AD9522027B9387AAACXXX_"
|
||||
|
||||
--_000_965A26A6D93540AD9522027B9387AAACXXX_
|
||||
Content-Type: text/plain; charset="Windows-1252"
|
||||
Content-Transfer-Encoding: quoted-printable
|
||||
|
||||
=97
|
||||
|
||||
--_000_965A26A6D93540AD9522027B9387AAACXXX_
|
||||
Content-Type: text/html; charset="Windows-1252"
|
||||
Content-Transfer-Encoding: quoted-printable
|
||||
|
||||
<html>
|
||||
<head>
|
||||
<meta http-equiv=3D"Content-Type" content=3D"text/html; charset=3D"Windows-1252"">
|
||||
</head>
|
||||
<body dir=3D"auto">
|
||||
=97
|
||||
</body>
|
||||
</html>
|
||||
|
||||
--_000_965A26A6D93540AD9522027B9387AAACXXX_--
|
||||
@@ -0,0 +1,23 @@
|
||||
Content-Type: multipart/alternative;
|
||||
boundary="_000_965A26A6D93540AD9522027B9387AAACXXX_"
|
||||
|
||||
--_000_965A26A6D93540AD9522027B9387AAACXXX_
|
||||
Content-Type: text/plain; charset="Windows-1252"
|
||||
Content-Transfer-Encoding: quoted-printable
|
||||
|
||||
=97
|
||||
|
||||
--_000_965A26A6D93540AD9522027B9387AAACXXX_
|
||||
Content-Type: text/html; charset="Windows-1252"
|
||||
Content-Transfer-Encoding: quoted-printable
|
||||
|
||||
<html>
|
||||
<head>
|
||||
<meta http-equiv=3D"Content-Type" content=3D"text/html; charset=3DWindows-1252">
|
||||
</head>
|
||||
<body dir=3D"auto">
|
||||
=97
|
||||
</body>
|
||||
</html>
|
||||
|
||||
--_000_965A26A6D93540AD9522027B9387AAACXXX_--
|
||||
@@ -0,0 +1,24 @@
|
||||
Content-Type: multipart/alternative;
|
||||
boundary="_000_965A26A6D93540AD9522027B9387AAACXXX_"
|
||||
|
||||
--_000_965A26A6D93540AD9522027B9387AAACXXX_
|
||||
Content-Type: text/plain; charset="Windows-1252"
|
||||
Content-Transfer-Encoding: quoted-printable
|
||||
|
||||
=97
|
||||
|
||||
--_000_965A26A6D93540AD9522027B9387AAACXXX_
|
||||
Content-Type: text/html; charset="Windows-1252"
|
||||
Content-Transfer-Encoding: quoted-printable
|
||||
|
||||
<html>
|
||||
<head>
|
||||
<meta http-equiv=3D"Content-Type" content=3D"text/html; charset=3DWindows-1=
|
||||
252">
|
||||
</head>
|
||||
<body dir=3D"auto">
|
||||
=97
|
||||
</body>
|
||||
</html>
|
||||
|
||||
--_000_965A26A6D93540AD9522027B9387AAACXXX_--
|
||||
@@ -0,0 +1,41 @@
|
||||
From: Boundary Tester <tester@example.com>
|
||||
To: Recipient <recipient@example.com>
|
||||
Subject: Boundaries of every part
|
||||
MIME-Version: 1.0
|
||||
Content-Type: multipart/mixed; boundary="outer-mixed"
|
||||
|
||||
This is the preamble.
|
||||
--outer-mixed
|
||||
Content-Type: multipart/alternative; boundary="inner-alternative"
|
||||
|
||||
--inner-alternative
|
||||
Content-Type: text/plain; charset=us-ascii
|
||||
|
||||
Plain version.
|
||||
--inner-alternative
|
||||
Content-Type: text/html; charset=us-ascii
|
||||
|
||||
<p>HTML version.</p>
|
||||
--inner-alternative--
|
||||
Alternative epilogue.
|
||||
--outer-mixed
|
||||
Content-Type: message/rfc822
|
||||
Content-Disposition: inline
|
||||
|
||||
From: Nested Sender <nested@example.com>
|
||||
Subject: Nested message
|
||||
MIME-Version: 1.0
|
||||
Content-Type: multipart/mixed; boundary="nested-mixed"
|
||||
|
||||
--nested-mixed
|
||||
Content-Type: text/plain; charset=us-ascii
|
||||
|
||||
Nested text.
|
||||
--nested-mixed
|
||||
Content-Type: application/octet-stream
|
||||
Content-Transfer-Encoding: base64
|
||||
|
||||
AAECAw==
|
||||
--nested-mixed--
|
||||
--outer-mixed--
|
||||
Outer epilogue.
|
||||
@@ -0,0 +1,10 @@
|
||||
Content-Type: multipart/mixed; boundary="BND"
|
||||
|
||||
--BND
|
||||
Content-Type: text/plain
|
||||
|
||||
first part
|
||||
--BND
|
||||
Content-Type: text/plain
|
||||
|
||||
second part ends here--BND--
|
||||
@@ -0,0 +1,9 @@
|
||||
Content-Type: multipart/mixed; boundary="BND"
|
||||
|
||||
--BND
|
||||
Content-Type: text/plain
|
||||
|
||||
first
|
||||
--BNDX not a delimiter
|
||||
last
|
||||
--BND--
|
||||
@@ -0,0 +1,8 @@
|
||||
Content-Type: multipart/mixed; boundary="BND"
|
||||
|
||||
--BND
|
||||
Content-Type: text/plain
|
||||
|
||||
visit --BND for details
|
||||
SECRET
|
||||
--BND--
|
||||
@@ -0,0 +1,17 @@
|
||||
From: Sender <sender@example.com>
|
||||
To: Recipient <recipient@example.com>
|
||||
Subject: Plain text with an inline image as its alternative
|
||||
MIME-Version: 1.0
|
||||
Content-Type: multipart/alternative; boundary="alt"
|
||||
|
||||
--alt
|
||||
Content-Type: text/plain; charset=us-ascii
|
||||
|
||||
The text version.
|
||||
--alt
|
||||
Content-Type: image/png
|
||||
Content-Disposition: inline; filename="version.png"
|
||||
Content-Transfer-Encoding: base64
|
||||
|
||||
iVBORw0KGgo=
|
||||
--alt--
|
||||
@@ -0,0 +1,57 @@
|
||||
From: X <X@X.org>
|
||||
To: Y <Y@Y.org>
|
||||
Date: Mon, 13 Feb 2018 12:00:00 -0400
|
||||
Subject: Example inline
|
||||
Mime-Version: 1.0
|
||||
Content-Type: multipart/related; boundary="_005_C4D89E21F64B_"
|
||||
|
||||
--_005_C4D89E21F64B_
|
||||
Content-Type: multipart/alternative;
|
||||
boundary="_000_C4D89E21F64B_"
|
||||
|
||||
|
||||
--_000_C4D89E21F64B_
|
||||
Content-Type: text/plain; charset=iso-8859-1
|
||||
Content-Transfer-Encoding: quoted-printable
|
||||
|
||||
[cid:3302530593_302033]
|
||||
|
||||
[cid:3302530593_275216]
|
||||
|
||||
--_000_C4D89E21F64B_
|
||||
Content-Type: text/html; charset=iso-8859-1
|
||||
Content-Transfer-Encoding: quoted-printable
|
||||
|
||||
<HTML>
|
||||
<HEAD>
|
||||
<TITLE></TITLE>
|
||||
</HEAD>
|
||||
<BODY>
|
||||
<IMG src=3D"cid:3302530593_302033" >
|
||||
<IMG src=3D"cid:3302530593_275216" >
|
||||
</BODY>
|
||||
</HTML>
|
||||
|
||||
--_000_C4D89E21F64B_--
|
||||
|
||||
--_005_C4D89E21F64B_
|
||||
Content-Type: image/jpeg
|
||||
Content-Transfer-Encoding: plain
|
||||
Content-Disposition: inline;
|
||||
filename="image.jpg"
|
||||
Content-Description: image.jpg
|
||||
Content-ID: <3302530593_302033>
|
||||
|
||||
A
|
||||
|
||||
--_005_C4D89E21F64B_
|
||||
Content-Type: image/jpeg
|
||||
Content-Transfer-Encoding: plain
|
||||
Content-Disposition: inline;
|
||||
filename="image.jpg"
|
||||
Content-Description: image.jpg
|
||||
Content-ID: <3302530593_275216>
|
||||
|
||||
B
|
||||
|
||||
--_005_C4D89E21F64B_--
|
||||
@@ -0,0 +1,11 @@
|
||||
From: Art Vandelay <art@vandelay.com>
|
||||
To: Colleagues <colleagues@vandelay.com>
|
||||
Subject: HTML only alternative
|
||||
MIME-Version: 1.0
|
||||
Content-Type: multipart/alternative; boundary="festivus"
|
||||
|
||||
--festivus
|
||||
Content-Type: text/html; charset="us-ascii"
|
||||
|
||||
<html><p>I was thinking about quitting the “exporting” to focus just on the “importing”,</p><p>but then I thought, why not do both?</p></html>
|
||||
--festivus--
|
||||
@@ -0,0 +1,6 @@
|
||||
From: sender@example.com
|
||||
To: one: a@b.c; two: d@e.f;
|
||||
Subject: issue 98
|
||||
Content-Type: text/plain
|
||||
|
||||
body
|
||||
@@ -0,0 +1,6 @@
|
||||
From: sender@example.com
|
||||
To: first: a@b.c, d@e.f; <x@y.com>
|
||||
Subject: issue 98
|
||||
Content-Type: text/plain
|
||||
|
||||
body
|
||||
@@ -0,0 +1,6 @@
|
||||
From: sender@example.com
|
||||
To: <x@y.com>, last: a@b.c;
|
||||
Subject: issue 98
|
||||
Content-Type: text/plain
|
||||
|
||||
body
|
||||
@@ -0,0 +1,6 @@
|
||||
From: sender@example.com
|
||||
To: <x@y.com>, <x@y.com>
|
||||
Subject: issue 98
|
||||
Content-Type: text/plain
|
||||
|
||||
body
|
||||
@@ -0,0 +1,6 @@
|
||||
From: sender@example.com
|
||||
To: <x@y.com>, group: (some text);, <x@y.com>
|
||||
Subject: issue 98
|
||||
Content-Type: text/plain
|
||||
|
||||
body
|
||||
+78
-1521
File diff suppressed because it is too large
Load Diff
+78
-1521
File diff suppressed because it is too large
Load Diff
@@ -1,63 +1,88 @@
|
||||
{
|
||||
"html_body": [
|
||||
0
|
||||
"messages": [
|
||||
{
|
||||
"id": 0,
|
||||
"root": 0,
|
||||
"container": null,
|
||||
"source": "raw",
|
||||
"text_body": [
|
||||
0
|
||||
],
|
||||
"html_body": [
|
||||
0
|
||||
],
|
||||
"attachments": [],
|
||||
"has_attachments": false
|
||||
}
|
||||
],
|
||||
"text_body": [
|
||||
0
|
||||
],
|
||||
"attachments": [],
|
||||
"parts": [
|
||||
{
|
||||
"id": 0,
|
||||
"message": 0,
|
||||
"parent": null,
|
||||
"kind": "text",
|
||||
"encoding": "quoted-printable",
|
||||
"flags": [],
|
||||
"roles": [
|
||||
"text_body",
|
||||
"html_body"
|
||||
],
|
||||
"role": "text_body",
|
||||
"offset_header": 0,
|
||||
"offset_body": 630,
|
||||
"offset_end": 1525,
|
||||
"headers": [
|
||||
{
|
||||
"name": "from",
|
||||
"name": "From",
|
||||
"value": {
|
||||
"Address": {
|
||||
"List": [
|
||||
{
|
||||
"address": [
|
||||
{
|
||||
"mailbox": {
|
||||
"name": "Doug Sauder",
|
||||
"address": "doug@example.com"
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
"offset_field": 0,
|
||||
"offset_start": 5,
|
||||
"offset_end": 40
|
||||
},
|
||||
{
|
||||
"name": "to",
|
||||
"name": "To",
|
||||
"value": {
|
||||
"Address": {
|
||||
"List": [
|
||||
{
|
||||
"address": [
|
||||
{
|
||||
"mailbox": {
|
||||
"name": "Joe Blow",
|
||||
"address": "jblow@example.com"
|
||||
},
|
||||
{
|
||||
}
|
||||
},
|
||||
{
|
||||
"mailbox": {
|
||||
"name": "Jürgen Schmürgen",
|
||||
"address": "schmuergen@example.com"
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
"offset_field": 40,
|
||||
"offset_start": 43,
|
||||
"offset_end": 149
|
||||
},
|
||||
{
|
||||
"name": "subject",
|
||||
"name": "Subject",
|
||||
"value": {
|
||||
"Text": "Die Hasen und die Frösche (Microsoft Outlook 00)"
|
||||
"text": "Die Hasen und die Frösche (Microsoft Outlook 00)"
|
||||
},
|
||||
"offset_field": 149,
|
||||
"offset_start": 157,
|
||||
"offset_end": 228
|
||||
},
|
||||
{
|
||||
"name": "date",
|
||||
"name": "Date",
|
||||
"value": {
|
||||
"DateTime": {
|
||||
"date_time": {
|
||||
"year": 2000,
|
||||
"month": 5,
|
||||
"day": 17,
|
||||
@@ -74,34 +99,36 @@
|
||||
"offset_end": 267
|
||||
},
|
||||
{
|
||||
"name": "message_id",
|
||||
"name": "Message-ID",
|
||||
"value": {
|
||||
"Text": "NDBBIAKOPKHFGPLCODIGMEKCCHAA.doug@example.com"
|
||||
"text_list": [
|
||||
"NDBBIAKOPKHFGPLCODIGMEKCCHAA.doug@example.com"
|
||||
]
|
||||
},
|
||||
"offset_field": 267,
|
||||
"offset_start": 278,
|
||||
"offset_end": 328
|
||||
},
|
||||
{
|
||||
"name": "mime_version",
|
||||
"name": "MIME-Version",
|
||||
"value": {
|
||||
"Text": "1.0"
|
||||
"text": "1.0"
|
||||
},
|
||||
"offset_field": 328,
|
||||
"offset_start": 341,
|
||||
"offset_end": 347
|
||||
},
|
||||
{
|
||||
"name": "content_type",
|
||||
"name": "Content-Type",
|
||||
"value": {
|
||||
"ContentType": {
|
||||
"c_type": "text",
|
||||
"c_subtype": "plain",
|
||||
"content_type": {
|
||||
"type": "text",
|
||||
"subtype": "plain",
|
||||
"attributes": [
|
||||
{
|
||||
"name": "charset",
|
||||
"value": "utf-7"
|
||||
}
|
||||
[
|
||||
"charset",
|
||||
"utf-7"
|
||||
]
|
||||
]
|
||||
}
|
||||
},
|
||||
@@ -110,75 +137,62 @@
|
||||
"offset_end": 392
|
||||
},
|
||||
{
|
||||
"name": "content_transfer_encoding",
|
||||
"name": "Content-Transfer-Encoding",
|
||||
"value": {
|
||||
"Text": "quoted-printable"
|
||||
"text": "quoted-printable"
|
||||
},
|
||||
"offset_field": 392,
|
||||
"offset_start": 418,
|
||||
"offset_end": 437
|
||||
},
|
||||
{
|
||||
"name": {
|
||||
"other": "X-Priority"
|
||||
},
|
||||
"name": "X-Priority",
|
||||
"value": {
|
||||
"Text": "3 (Normal)"
|
||||
"text": "3 (Normal)"
|
||||
},
|
||||
"offset_field": 437,
|
||||
"offset_start": 448,
|
||||
"offset_end": 461
|
||||
},
|
||||
{
|
||||
"name": {
|
||||
"other": "X-MSMail-Priority"
|
||||
},
|
||||
"name": "X-MSMail-Priority",
|
||||
"value": {
|
||||
"Text": "Normal"
|
||||
"text": "Normal"
|
||||
},
|
||||
"offset_field": 461,
|
||||
"offset_start": 479,
|
||||
"offset_end": 488
|
||||
},
|
||||
{
|
||||
"name": {
|
||||
"other": "X-Mailer"
|
||||
},
|
||||
"name": "X-Mailer",
|
||||
"value": {
|
||||
"Text": "Microsoft Outlook IMO, Build 9.0.2416 (9.0.2910.0)"
|
||||
"text": "Microsoft Outlook IMO, Build 9.0.2416 (9.0.2910.0)"
|
||||
},
|
||||
"offset_field": 488,
|
||||
"offset_start": 497,
|
||||
"offset_end": 550
|
||||
},
|
||||
{
|
||||
"name": "importance",
|
||||
"name": "Importance",
|
||||
"value": {
|
||||
"Text": "Normal"
|
||||
"text": "Normal"
|
||||
},
|
||||
"offset_field": 550,
|
||||
"offset_start": 561,
|
||||
"offset_end": 570
|
||||
},
|
||||
{
|
||||
"name": {
|
||||
"other": "X-MimeOLE"
|
||||
},
|
||||
"name": "X-MimeOLE",
|
||||
"value": {
|
||||
"Text": "Produced By Microsoft MimeOLE V5.00.2314.1300"
|
||||
"text": "Produced By Microsoft MimeOLE V5.00.2314.1300"
|
||||
},
|
||||
"offset_field": 570,
|
||||
"offset_start": 580,
|
||||
"offset_end": 628
|
||||
}
|
||||
],
|
||||
"is_encoding_problem": false,
|
||||
"body": {
|
||||
"Text": "Die Hasen und die Frösche\r\n\r\nDie Hasen klagten einst über ihre mißliche Lage; \"wir leben\", sprach ein Redner, \"in steter Furcht vor Menschen und Tieren, eine Beute der Hunde, der Adler, ja fast aller Raubtiere! Unsere stete Angst ist ärger als der Tod selbst. Auf, laßt uns ein für allemal sterben.\" \r\n\r\nIn einem nahen Teich wollten sie sich nun ersäufen; sie eilten ihm zu; allein das außerordentliche Getöse und ihre wunderbare Gestalt erschreckte eine Menge Frösche, die am Ufer saßen, so sehr, daß sie aufs schnellste untertauchten. \r\n\r\n\"Halt\", rief nun eben dieser Sprecher, \"wir wollen das Ersäufen noch ein wenig aufschieben, denn auch uns fürchten, wie ihr seht, einige Tiere, welche also wohl noch unglücklicher sein müssen als wir.\" \r\n\r\n"
|
||||
},
|
||||
"offset_header": 0,
|
||||
"offset_body": 630,
|
||||
"offset_end": 1525
|
||||
"text": "Die Hasen und die Frösche\r\n\r\nDie Hasen klagten einst über ihre mißliche Lage; \"wir leben\", sprach ein Redner, \"in steter Furcht vor Menschen und Tieren, eine Beute der Hunde, der Adler, ja fast aller Raubtiere! Unsere stete Angst ist ärger als der Tod selbst. Auf, laßt uns ein für allemal sterben.\" \r\n\r\nIn einem nahen Teich wollten sie sich nun ersäufen; sie eilten ihm zu; allein das außerordentliche Getöse und ihre wunderbare Gestalt erschreckte eine Menge Frösche, die am Ufer saßen, so sehr, daß sie aufs schnellste untertauchten. \r\n\r\n\"Halt\", rief nun eben dieser Sprecher, \"wir wollen das Ersäufen noch ein wenig aufschieben, denn auch uns fürchten, wie ihr seht, einige Tiere, welche also wohl noch unglücklicher sein müssen als wir.\" \r\n\r\n",
|
||||
"decode_problems": []
|
||||
}
|
||||
]
|
||||
}
|
||||
@@ -1,63 +1,88 @@
|
||||
{
|
||||
"html_body": [
|
||||
0
|
||||
"messages": [
|
||||
{
|
||||
"id": 0,
|
||||
"root": 0,
|
||||
"container": null,
|
||||
"source": "raw",
|
||||
"text_body": [
|
||||
0
|
||||
],
|
||||
"html_body": [
|
||||
0
|
||||
],
|
||||
"attachments": [],
|
||||
"has_attachments": false
|
||||
}
|
||||
],
|
||||
"text_body": [
|
||||
0
|
||||
],
|
||||
"attachments": [],
|
||||
"parts": [
|
||||
{
|
||||
"id": 0,
|
||||
"message": 0,
|
||||
"parent": null,
|
||||
"kind": "text",
|
||||
"encoding": "quoted-printable",
|
||||
"flags": [],
|
||||
"roles": [
|
||||
"text_body",
|
||||
"html_body"
|
||||
],
|
||||
"role": "text_body",
|
||||
"offset_header": 0,
|
||||
"offset_body": 614,
|
||||
"offset_end": 1491,
|
||||
"headers": [
|
||||
{
|
||||
"name": "from",
|
||||
"name": "From",
|
||||
"value": {
|
||||
"Address": {
|
||||
"List": [
|
||||
{
|
||||
"address": [
|
||||
{
|
||||
"mailbox": {
|
||||
"name": "Doug Sauder",
|
||||
"address": "doug@example.com"
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
"offset_field": 0,
|
||||
"offset_start": 5,
|
||||
"offset_end": 39
|
||||
},
|
||||
{
|
||||
"name": "to",
|
||||
"name": "To",
|
||||
"value": {
|
||||
"Address": {
|
||||
"List": [
|
||||
{
|
||||
"address": [
|
||||
{
|
||||
"mailbox": {
|
||||
"name": "Joe Blow",
|
||||
"address": "jblow@example.com"
|
||||
},
|
||||
{
|
||||
}
|
||||
},
|
||||
{
|
||||
"mailbox": {
|
||||
"name": "Jürgen Schmürgen",
|
||||
"address": "schmuergen@example.com"
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
"offset_field": 39,
|
||||
"offset_start": 42,
|
||||
"offset_end": 146
|
||||
},
|
||||
{
|
||||
"name": "subject",
|
||||
"name": "Subject",
|
||||
"value": {
|
||||
"Text": "Die Hasen und die Frösche (Microsoft Outlook 00)"
|
||||
"text": "Die Hasen und die Frösche (Microsoft Outlook 00)"
|
||||
},
|
||||
"offset_field": 146,
|
||||
"offset_start": 154,
|
||||
"offset_end": 224
|
||||
},
|
||||
{
|
||||
"name": "date",
|
||||
"name": "Date",
|
||||
"value": {
|
||||
"DateTime": {
|
||||
"date_time": {
|
||||
"year": 2000,
|
||||
"month": 5,
|
||||
"day": 17,
|
||||
@@ -74,34 +99,36 @@
|
||||
"offset_end": 262
|
||||
},
|
||||
{
|
||||
"name": "message_id",
|
||||
"name": "Message-ID",
|
||||
"value": {
|
||||
"Text": "NDBBIAKOPKHFGPLCODIGMEKCCHAA.doug@example.com"
|
||||
"text_list": [
|
||||
"NDBBIAKOPKHFGPLCODIGMEKCCHAA.doug@example.com"
|
||||
]
|
||||
},
|
||||
"offset_field": 262,
|
||||
"offset_start": 273,
|
||||
"offset_end": 322
|
||||
},
|
||||
{
|
||||
"name": "mime_version",
|
||||
"name": "MIME-Version",
|
||||
"value": {
|
||||
"Text": "1.0"
|
||||
"text": "1.0"
|
||||
},
|
||||
"offset_field": 322,
|
||||
"offset_start": 335,
|
||||
"offset_end": 340
|
||||
},
|
||||
{
|
||||
"name": "content_type",
|
||||
"name": "Content-Type",
|
||||
"value": {
|
||||
"ContentType": {
|
||||
"c_type": "text",
|
||||
"c_subtype": "plain",
|
||||
"content_type": {
|
||||
"type": "text",
|
||||
"subtype": "plain",
|
||||
"attributes": [
|
||||
{
|
||||
"name": "charset",
|
||||
"value": "utf-7"
|
||||
}
|
||||
[
|
||||
"charset",
|
||||
"utf-7"
|
||||
]
|
||||
]
|
||||
}
|
||||
},
|
||||
@@ -110,75 +137,62 @@
|
||||
"offset_end": 383
|
||||
},
|
||||
{
|
||||
"name": "content_transfer_encoding",
|
||||
"name": "Content-Transfer-Encoding",
|
||||
"value": {
|
||||
"Text": "quoted-printable"
|
||||
"text": "quoted-printable"
|
||||
},
|
||||
"offset_field": 383,
|
||||
"offset_start": 409,
|
||||
"offset_end": 427
|
||||
},
|
||||
{
|
||||
"name": {
|
||||
"other": "X-Priority"
|
||||
},
|
||||
"name": "X-Priority",
|
||||
"value": {
|
||||
"Text": "3 (Normal)"
|
||||
"text": "3 (Normal)"
|
||||
},
|
||||
"offset_field": 427,
|
||||
"offset_start": 438,
|
||||
"offset_end": 450
|
||||
},
|
||||
{
|
||||
"name": {
|
||||
"other": "X-MSMail-Priority"
|
||||
},
|
||||
"name": "X-MSMail-Priority",
|
||||
"value": {
|
||||
"Text": "Normal"
|
||||
"text": "Normal"
|
||||
},
|
||||
"offset_field": 450,
|
||||
"offset_start": 468,
|
||||
"offset_end": 476
|
||||
},
|
||||
{
|
||||
"name": {
|
||||
"other": "X-Mailer"
|
||||
},
|
||||
"name": "X-Mailer",
|
||||
"value": {
|
||||
"Text": "Microsoft Outlook IMO, Build 9.0.2416 (9.0.2910.0)"
|
||||
"text": "Microsoft Outlook IMO, Build 9.0.2416 (9.0.2910.0)"
|
||||
},
|
||||
"offset_field": 476,
|
||||
"offset_start": 485,
|
||||
"offset_end": 537
|
||||
},
|
||||
{
|
||||
"name": "importance",
|
||||
"name": "Importance",
|
||||
"value": {
|
||||
"Text": "Normal"
|
||||
"text": "Normal"
|
||||
},
|
||||
"offset_field": 537,
|
||||
"offset_start": 548,
|
||||
"offset_end": 556
|
||||
},
|
||||
{
|
||||
"name": {
|
||||
"other": "X-MimeOLE"
|
||||
},
|
||||
"name": "X-MimeOLE",
|
||||
"value": {
|
||||
"Text": "Produced By Microsoft MimeOLE V5.00.2314.1300"
|
||||
"text": "Produced By Microsoft MimeOLE V5.00.2314.1300"
|
||||
},
|
||||
"offset_field": 556,
|
||||
"offset_start": 566,
|
||||
"offset_end": 613
|
||||
}
|
||||
],
|
||||
"is_encoding_problem": false,
|
||||
"body": {
|
||||
"Text": "Die Hasen und die Frösche\n\nDie Hasen klagten einst über ihre mißliche Lage; \"wir leben\", sprach ein Redner, \"in steter Furcht vor Menschen und Tieren, eine Beute der Hunde, der Adler, ja fast aller Raubtiere! Unsere stete Angst ist ärger als der Tod selbst. Auf, laßt uns ein für allemal sterben.\" \n\nIn einem nahen Teich wollten sie sich nun ersäufen; sie eilten ihm zu; allein das außerordentliche Getöse und ihre wunderbare Gestalt erschreckte eine Menge Frösche, die am Ufer saßen, so sehr, daß sie aufs schnellste untertauchten. \n\n\"Halt\", rief nun eben dieser Sprecher, \"wir wollen das Ersäufen noch ein wenig aufschieben, denn auch uns fürchten, wie ihr seht, einige Tiere, welche also wohl noch unglücklicher sein müssen als wir.\" \n\n"
|
||||
},
|
||||
"offset_header": 0,
|
||||
"offset_body": 614,
|
||||
"offset_end": 1491
|
||||
"text": "Die Hasen und die Frösche\n\nDie Hasen klagten einst über ihre mißliche Lage; \"wir leben\", sprach ein Redner, \"in steter Furcht vor Menschen und Tieren, eine Beute der Hunde, der Adler, ja fast aller Raubtiere! Unsere stete Angst ist ärger als der Tod selbst. Auf, laßt uns ein für allemal sterben.\" \n\nIn einem nahen Teich wollten sie sich nun ersäufen; sie eilten ihm zu; allein das außerordentliche Getöse und ihre wunderbare Gestalt erschreckte eine Menge Frösche, die am Ufer saßen, so sehr, daß sie aufs schnellste untertauchten. \n\n\"Halt\", rief nun eben dieser Sprecher, \"wir wollen das Ersäufen noch ein wenig aufschieben, denn auch uns fürchten, wie ihr seht, einige Tiere, welche also wohl noch unglücklicher sein müssen als wir.\" \n\n",
|
||||
"decode_problems": []
|
||||
}
|
||||
]
|
||||
}
|
||||
@@ -1,60 +1,79 @@
|
||||
{
|
||||
"html_body": [
|
||||
0
|
||||
"messages": [
|
||||
{
|
||||
"id": 0,
|
||||
"root": 0,
|
||||
"container": null,
|
||||
"source": "raw",
|
||||
"text_body": [
|
||||
0
|
||||
],
|
||||
"html_body": [
|
||||
0
|
||||
],
|
||||
"attachments": [],
|
||||
"has_attachments": false
|
||||
}
|
||||
],
|
||||
"text_body": [
|
||||
0
|
||||
],
|
||||
"attachments": [],
|
||||
"parts": [
|
||||
{
|
||||
"id": 0,
|
||||
"message": 0,
|
||||
"parent": null,
|
||||
"kind": "html",
|
||||
"encoding": "quoted-printable",
|
||||
"flags": [],
|
||||
"roles": [
|
||||
"text_body",
|
||||
"html_body"
|
||||
],
|
||||
"role": "html_body",
|
||||
"offset_header": 0,
|
||||
"offset_body": 500,
|
||||
"offset_end": 1499,
|
||||
"headers": [
|
||||
{
|
||||
"name": "message_id",
|
||||
"name": "Message-Id",
|
||||
"value": {
|
||||
"Text": "4.2.0.58.20000519003052.00a89c40@pop.example.com"
|
||||
"text_list": [
|
||||
"4.2.0.58.20000519003052.00a89c40@pop.example.com"
|
||||
]
|
||||
},
|
||||
"offset_field": 0,
|
||||
"offset_start": 11,
|
||||
"offset_end": 64
|
||||
},
|
||||
{
|
||||
"name": {
|
||||
"other": "X-Sender"
|
||||
},
|
||||
"name": "X-Sender",
|
||||
"value": {
|
||||
"Text": "dwsauder@pop.example.com (Unverified)"
|
||||
"text": "dwsauder@pop.example.com (Unverified)"
|
||||
},
|
||||
"offset_field": 64,
|
||||
"offset_start": 73,
|
||||
"offset_end": 113
|
||||
},
|
||||
{
|
||||
"name": {
|
||||
"other": "X-Mailer"
|
||||
},
|
||||
"name": "X-Mailer",
|
||||
"value": {
|
||||
"Text": "QUALCOMM Windows Eudora Pro Version 4.2.0.58"
|
||||
"text": "QUALCOMM Windows Eudora Pro Version 4.2.0.58"
|
||||
},
|
||||
"offset_field": 113,
|
||||
"offset_start": 122,
|
||||
"offset_end": 170
|
||||
},
|
||||
{
|
||||
"name": {
|
||||
"other": "X-Priority"
|
||||
},
|
||||
"name": "X-Priority",
|
||||
"value": {
|
||||
"Text": "2 (High)"
|
||||
"text": "2 (High)"
|
||||
},
|
||||
"offset_field": 170,
|
||||
"offset_start": 181,
|
||||
"offset_end": 192
|
||||
},
|
||||
{
|
||||
"name": "date",
|
||||
"name": "Date",
|
||||
"value": {
|
||||
"DateTime": {
|
||||
"date_time": {
|
||||
"year": 2000,
|
||||
"month": 5,
|
||||
"day": 19,
|
||||
@@ -71,66 +90,66 @@
|
||||
"offset_end": 231
|
||||
},
|
||||
{
|
||||
"name": "to",
|
||||
"name": "To",
|
||||
"value": {
|
||||
"Address": {
|
||||
"List": [
|
||||
{
|
||||
"address": [
|
||||
{
|
||||
"mailbox": {
|
||||
"name": "Heinz Müller",
|
||||
"address": "mueller@example.com"
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
"offset_field": 231,
|
||||
"offset_start": 234,
|
||||
"offset_end": 290
|
||||
},
|
||||
{
|
||||
"name": "from",
|
||||
"name": "From",
|
||||
"value": {
|
||||
"Address": {
|
||||
"List": [
|
||||
{
|
||||
"address": [
|
||||
{
|
||||
"mailbox": {
|
||||
"name": "Doug Sauder",
|
||||
"address": "dwsauder@example.com"
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
"offset_field": 290,
|
||||
"offset_start": 295,
|
||||
"offset_end": 332
|
||||
},
|
||||
{
|
||||
"name": "subject",
|
||||
"name": "Subject",
|
||||
"value": {
|
||||
"Text": "Die Hasen und die Frösche"
|
||||
"text": "Die Hasen und die Frösche"
|
||||
},
|
||||
"offset_field": 332,
|
||||
"offset_start": 340,
|
||||
"offset_end": 387
|
||||
},
|
||||
{
|
||||
"name": "mime_version",
|
||||
"name": "Mime-Version",
|
||||
"value": {
|
||||
"Text": "1.0"
|
||||
"text": "1.0"
|
||||
},
|
||||
"offset_field": 387,
|
||||
"offset_start": 400,
|
||||
"offset_end": 406
|
||||
},
|
||||
{
|
||||
"name": "content_type",
|
||||
"name": "Content-Type",
|
||||
"value": {
|
||||
"ContentType": {
|
||||
"c_type": "text",
|
||||
"c_subtype": "html",
|
||||
"content_type": {
|
||||
"type": "text",
|
||||
"subtype": "html",
|
||||
"attributes": [
|
||||
{
|
||||
"name": "charset",
|
||||
"value": "iso-8859-1"
|
||||
}
|
||||
[
|
||||
"charset",
|
||||
"iso-8859-1"
|
||||
]
|
||||
]
|
||||
}
|
||||
},
|
||||
@@ -139,22 +158,17 @@
|
||||
"offset_end": 453
|
||||
},
|
||||
{
|
||||
"name": "content_transfer_encoding",
|
||||
"name": "Content-Transfer-Encoding",
|
||||
"value": {
|
||||
"Text": "quoted-printable"
|
||||
"text": "quoted-printable"
|
||||
},
|
||||
"offset_field": 453,
|
||||
"offset_start": 479,
|
||||
"offset_end": 498
|
||||
}
|
||||
],
|
||||
"is_encoding_problem": false,
|
||||
"body": {
|
||||
"Html": "<html>\r\n<font face=\"Arial, Helvetica\" size=5 color=\"#0000FF\"><b>Die Hasen und die\r\nFrösche<br>\r\n<br>\r\n</font></b><font face=\"Arial, Helvetica\">Die Hasen klagten einst über\r\nihre mißliche Lage; "wir leben", sprach ein Redner, "in\r\nsteter Furcht vor Menschen und Tieren, eine Beute der Hunde, der Adler,\r\nja fast aller Raubtiere! Unsere stete Angst ist ärger als der Tod selbst.\r\nAuf, laßt uns ein für allemal sterben." <br>\r\n<br>\r\nIn einem nahen Teich wollten sie sich nun ersäufen; sie eilten ihm zu;\r\nallein das außerordentliche Getöse und ihre wunderbare Gestalt\r\nerschreckte eine Menge Frösche, die am Ufer saßen, so sehr, daß sie aufs\r\nschnellste untertauchten. <br>\r\n<br>\r\n"Halt", rief nun eben dieser Sprecher, "wir wollen das\r\nErsäufen noch ein wenig aufschieben, denn auch uns fürchten, wie ihr\r\nseht, einige Tiere, welche also wohl noch unglücklicher sein müssen als\r\nwir." <br>\r\n<br>\r\n</font></html>\r\n\r\n"
|
||||
},
|
||||
"offset_header": 0,
|
||||
"offset_body": 500,
|
||||
"offset_end": 1499
|
||||
"text": "<html>\r\n<font face=\"Arial, Helvetica\" size=5 color=\"#0000FF\"><b>Die Hasen und die\r\nFrösche<br>\r\n<br>\r\n</font></b><font face=\"Arial, Helvetica\">Die Hasen klagten einst über\r\nihre mißliche Lage; "wir leben", sprach ein Redner, "in\r\nsteter Furcht vor Menschen und Tieren, eine Beute der Hunde, der Adler,\r\nja fast aller Raubtiere! Unsere stete Angst ist ärger als der Tod selbst.\r\nAuf, laßt uns ein für allemal sterben." <br>\r\n<br>\r\nIn einem nahen Teich wollten sie sich nun ersäufen; sie eilten ihm zu;\r\nallein das außerordentliche Getöse und ihre wunderbare Gestalt\r\nerschreckte eine Menge Frösche, die am Ufer saßen, so sehr, daß sie aufs\r\nschnellste untertauchten. <br>\r\n<br>\r\n"Halt", rief nun eben dieser Sprecher, "wir wollen das\r\nErsäufen noch ein wenig aufschieben, denn auch uns fürchten, wie ihr\r\nseht, einige Tiere, welche also wohl noch unglücklicher sein müssen als\r\nwir." <br>\r\n<br>\r\n</font></html>\r\n\r\n",
|
||||
"decode_problems": []
|
||||
}
|
||||
]
|
||||
}
|
||||
@@ -1,60 +1,79 @@
|
||||
{
|
||||
"html_body": [
|
||||
0
|
||||
"messages": [
|
||||
{
|
||||
"id": 0,
|
||||
"root": 0,
|
||||
"container": null,
|
||||
"source": "raw",
|
||||
"text_body": [
|
||||
0
|
||||
],
|
||||
"html_body": [
|
||||
0
|
||||
],
|
||||
"attachments": [],
|
||||
"has_attachments": false
|
||||
}
|
||||
],
|
||||
"text_body": [
|
||||
0
|
||||
],
|
||||
"attachments": [],
|
||||
"parts": [
|
||||
{
|
||||
"id": 0,
|
||||
"message": 0,
|
||||
"parent": null,
|
||||
"kind": "html",
|
||||
"encoding": "quoted-printable",
|
||||
"flags": [],
|
||||
"roles": [
|
||||
"text_body",
|
||||
"html_body"
|
||||
],
|
||||
"role": "html_body",
|
||||
"offset_header": 0,
|
||||
"offset_body": 488,
|
||||
"offset_end": 1463,
|
||||
"headers": [
|
||||
{
|
||||
"name": "message_id",
|
||||
"name": "Message-Id",
|
||||
"value": {
|
||||
"Text": "4.2.0.58.20000519003052.00a89c40@pop.example.com"
|
||||
"text_list": [
|
||||
"4.2.0.58.20000519003052.00a89c40@pop.example.com"
|
||||
]
|
||||
},
|
||||
"offset_field": 0,
|
||||
"offset_start": 11,
|
||||
"offset_end": 63
|
||||
},
|
||||
{
|
||||
"name": {
|
||||
"other": "X-Sender"
|
||||
},
|
||||
"name": "X-Sender",
|
||||
"value": {
|
||||
"Text": "dwsauder@pop.example.com (Unverified)"
|
||||
"text": "dwsauder@pop.example.com (Unverified)"
|
||||
},
|
||||
"offset_field": 63,
|
||||
"offset_start": 72,
|
||||
"offset_end": 111
|
||||
},
|
||||
{
|
||||
"name": {
|
||||
"other": "X-Mailer"
|
||||
},
|
||||
"name": "X-Mailer",
|
||||
"value": {
|
||||
"Text": "QUALCOMM Windows Eudora Pro Version 4.2.0.58"
|
||||
"text": "QUALCOMM Windows Eudora Pro Version 4.2.0.58"
|
||||
},
|
||||
"offset_field": 111,
|
||||
"offset_start": 120,
|
||||
"offset_end": 167
|
||||
},
|
||||
{
|
||||
"name": {
|
||||
"other": "X-Priority"
|
||||
},
|
||||
"name": "X-Priority",
|
||||
"value": {
|
||||
"Text": "2 (High)"
|
||||
"text": "2 (High)"
|
||||
},
|
||||
"offset_field": 167,
|
||||
"offset_start": 178,
|
||||
"offset_end": 188
|
||||
},
|
||||
{
|
||||
"name": "date",
|
||||
"name": "Date",
|
||||
"value": {
|
||||
"DateTime": {
|
||||
"date_time": {
|
||||
"year": 2000,
|
||||
"month": 5,
|
||||
"day": 19,
|
||||
@@ -71,66 +90,66 @@
|
||||
"offset_end": 226
|
||||
},
|
||||
{
|
||||
"name": "to",
|
||||
"name": "To",
|
||||
"value": {
|
||||
"Address": {
|
||||
"List": [
|
||||
{
|
||||
"address": [
|
||||
{
|
||||
"mailbox": {
|
||||
"name": "Heinz Müller",
|
||||
"address": "mueller@example.com"
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
"offset_field": 226,
|
||||
"offset_start": 229,
|
||||
"offset_end": 284
|
||||
},
|
||||
{
|
||||
"name": "from",
|
||||
"name": "From",
|
||||
"value": {
|
||||
"Address": {
|
||||
"List": [
|
||||
{
|
||||
"address": [
|
||||
{
|
||||
"mailbox": {
|
||||
"name": "Doug Sauder",
|
||||
"address": "dwsauder@example.com"
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
"offset_field": 284,
|
||||
"offset_start": 289,
|
||||
"offset_end": 325
|
||||
},
|
||||
{
|
||||
"name": "subject",
|
||||
"name": "Subject",
|
||||
"value": {
|
||||
"Text": "Die Hasen und die Frösche"
|
||||
"text": "Die Hasen und die Frösche"
|
||||
},
|
||||
"offset_field": 325,
|
||||
"offset_start": 333,
|
||||
"offset_end": 379
|
||||
},
|
||||
{
|
||||
"name": "mime_version",
|
||||
"name": "Mime-Version",
|
||||
"value": {
|
||||
"Text": "1.0"
|
||||
"text": "1.0"
|
||||
},
|
||||
"offset_field": 379,
|
||||
"offset_start": 392,
|
||||
"offset_end": 397
|
||||
},
|
||||
{
|
||||
"name": "content_type",
|
||||
"name": "Content-Type",
|
||||
"value": {
|
||||
"ContentType": {
|
||||
"c_type": "text",
|
||||
"c_subtype": "html",
|
||||
"content_type": {
|
||||
"type": "text",
|
||||
"subtype": "html",
|
||||
"attributes": [
|
||||
{
|
||||
"name": "charset",
|
||||
"value": "iso-8859-1"
|
||||
}
|
||||
[
|
||||
"charset",
|
||||
"iso-8859-1"
|
||||
]
|
||||
]
|
||||
}
|
||||
},
|
||||
@@ -139,22 +158,17 @@
|
||||
"offset_end": 443
|
||||
},
|
||||
{
|
||||
"name": "content_transfer_encoding",
|
||||
"name": "Content-Transfer-Encoding",
|
||||
"value": {
|
||||
"Text": "quoted-printable"
|
||||
"text": "quoted-printable"
|
||||
},
|
||||
"offset_field": 443,
|
||||
"offset_start": 469,
|
||||
"offset_end": 487
|
||||
}
|
||||
],
|
||||
"is_encoding_problem": false,
|
||||
"body": {
|
||||
"Html": "<html>\n<font face=\"Arial, Helvetica\" size=5 color=\"#0000FF\"><b>Die Hasen und die\nFrösche<br>\n<br>\n</font></b><font face=\"Arial, Helvetica\">Die Hasen klagten einst über\nihre mißliche Lage; "wir leben", sprach ein Redner, "in\nsteter Furcht vor Menschen und Tieren, eine Beute der Hunde, der Adler,\nja fast aller Raubtiere! Unsere stete Angst ist ärger als der Tod selbst.\nAuf, laßt uns ein für allemal sterben." <br>\n<br>\nIn einem nahen Teich wollten sie sich nun ersäufen; sie eilten ihm zu;\nallein das außerordentliche Getöse und ihre wunderbare Gestalt\nerschreckte eine Menge Frösche, die am Ufer saßen, so sehr, daß sie aufs\nschnellste untertauchten. <br>\n<br>\n"Halt", rief nun eben dieser Sprecher, "wir wollen das\nErsäufen noch ein wenig aufschieben, denn auch uns fürchten, wie ihr\nseht, einige Tiere, welche also wohl noch unglücklicher sein müssen als\nwir." <br>\n<br>\n</font></html>\n\n"
|
||||
},
|
||||
"offset_header": 0,
|
||||
"offset_body": 488,
|
||||
"offset_end": 1463
|
||||
"text": "<html>\n<font face=\"Arial, Helvetica\" size=5 color=\"#0000FF\"><b>Die Hasen und die\nFrösche<br>\n<br>\n</font></b><font face=\"Arial, Helvetica\">Die Hasen klagten einst über\nihre mißliche Lage; "wir leben", sprach ein Redner, "in\nsteter Furcht vor Menschen und Tieren, eine Beute der Hunde, der Adler,\nja fast aller Raubtiere! Unsere stete Angst ist ärger als der Tod selbst.\nAuf, laßt uns ein für allemal sterben." <br>\n<br>\nIn einem nahen Teich wollten sie sich nun ersäufen; sie eilten ihm zu;\nallein das außerordentliche Getöse und ihre wunderbare Gestalt\nerschreckte eine Menge Frösche, die am Ufer saßen, so sehr, daß sie aufs\nschnellste untertauchten. <br>\n<br>\n"Halt", rief nun eben dieser Sprecher, "wir wollen das\nErsäufen noch ein wenig aufschieben, denn auch uns fürchten, wie ihr\nseht, einige Tiere, welche also wohl noch unglücklicher sein müssen als\nwir." <br>\n<br>\n</font></html>\n\n",
|
||||
"decode_problems": []
|
||||
}
|
||||
]
|
||||
}
|
||||
@@ -1,60 +1,80 @@
|
||||
{
|
||||
"html_body": [
|
||||
2
|
||||
"messages": [
|
||||
{
|
||||
"id": 0,
|
||||
"root": 0,
|
||||
"container": null,
|
||||
"source": "raw",
|
||||
"text_body": [
|
||||
1
|
||||
],
|
||||
"html_body": [
|
||||
2
|
||||
],
|
||||
"attachments": [],
|
||||
"has_attachments": false
|
||||
}
|
||||
],
|
||||
"text_body": [
|
||||
1
|
||||
],
|
||||
"attachments": [],
|
||||
"parts": [
|
||||
{
|
||||
"id": 0,
|
||||
"message": 0,
|
||||
"parent": null,
|
||||
"kind": "multipart",
|
||||
"children": [
|
||||
1,
|
||||
2
|
||||
],
|
||||
"encoding": "none",
|
||||
"flags": [],
|
||||
"roles": [],
|
||||
"role": "container",
|
||||
"offset_header": 0,
|
||||
"offset_body": 498,
|
||||
"offset_end": 2627,
|
||||
"headers": [
|
||||
{
|
||||
"name": "message_id",
|
||||
"name": "Message-Id",
|
||||
"value": {
|
||||
"Text": "4.2.0.58.20000519002557.00a88870@pop.example.com"
|
||||
"text_list": [
|
||||
"4.2.0.58.20000519002557.00a88870@pop.example.com"
|
||||
]
|
||||
},
|
||||
"offset_field": 0,
|
||||
"offset_start": 11,
|
||||
"offset_end": 64
|
||||
},
|
||||
{
|
||||
"name": {
|
||||
"other": "X-Sender"
|
||||
},
|
||||
"name": "X-Sender",
|
||||
"value": {
|
||||
"Text": "dwsauder@pop.example.com (Unverified)"
|
||||
"text": "dwsauder@pop.example.com (Unverified)"
|
||||
},
|
||||
"offset_field": 64,
|
||||
"offset_start": 73,
|
||||
"offset_end": 113
|
||||
},
|
||||
{
|
||||
"name": {
|
||||
"other": "X-Mailer"
|
||||
},
|
||||
"name": "X-Mailer",
|
||||
"value": {
|
||||
"Text": "QUALCOMM Windows Eudora Pro Version 4.2.0.58"
|
||||
"text": "QUALCOMM Windows Eudora Pro Version 4.2.0.58"
|
||||
},
|
||||
"offset_field": 113,
|
||||
"offset_start": 122,
|
||||
"offset_end": 170
|
||||
},
|
||||
{
|
||||
"name": {
|
||||
"other": "X-Priority"
|
||||
},
|
||||
"name": "X-Priority",
|
||||
"value": {
|
||||
"Text": "2 (High)"
|
||||
"text": "2 (High)"
|
||||
},
|
||||
"offset_field": 170,
|
||||
"offset_start": 181,
|
||||
"offset_end": 192
|
||||
},
|
||||
{
|
||||
"name": "date",
|
||||
"name": "Date",
|
||||
"value": {
|
||||
"DateTime": {
|
||||
"date_time": {
|
||||
"year": 2000,
|
||||
"month": 5,
|
||||
"day": 19,
|
||||
@@ -71,66 +91,66 @@
|
||||
"offset_end": 231
|
||||
},
|
||||
{
|
||||
"name": "to",
|
||||
"name": "To",
|
||||
"value": {
|
||||
"Address": {
|
||||
"List": [
|
||||
{
|
||||
"address": [
|
||||
{
|
||||
"mailbox": {
|
||||
"name": "Heinz Müller",
|
||||
"address": "mueller@example.com"
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
"offset_field": 231,
|
||||
"offset_start": 234,
|
||||
"offset_end": 290
|
||||
},
|
||||
{
|
||||
"name": "from",
|
||||
"name": "From",
|
||||
"value": {
|
||||
"Address": {
|
||||
"List": [
|
||||
{
|
||||
"address": [
|
||||
{
|
||||
"mailbox": {
|
||||
"name": "Doug Sauder",
|
||||
"address": "dwsauder@example.com"
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
"offset_field": 290,
|
||||
"offset_start": 295,
|
||||
"offset_end": 332
|
||||
},
|
||||
{
|
||||
"name": "subject",
|
||||
"name": "Subject",
|
||||
"value": {
|
||||
"Text": "Die Hasen und die Frösche"
|
||||
"text": "Die Hasen und die Frösche"
|
||||
},
|
||||
"offset_field": 332,
|
||||
"offset_start": 340,
|
||||
"offset_end": 387
|
||||
},
|
||||
{
|
||||
"name": "mime_version",
|
||||
"name": "Mime-Version",
|
||||
"value": {
|
||||
"Text": "1.0"
|
||||
"text": "1.0"
|
||||
},
|
||||
"offset_field": 387,
|
||||
"offset_start": 400,
|
||||
"offset_end": 406
|
||||
},
|
||||
{
|
||||
"name": "content_type",
|
||||
"name": "Content-Type",
|
||||
"value": {
|
||||
"ContentType": {
|
||||
"c_type": "multipart",
|
||||
"c_subtype": "alternative",
|
||||
"content_type": {
|
||||
"type": "multipart",
|
||||
"subtype": "alternative",
|
||||
"attributes": [
|
||||
{
|
||||
"name": "boundary",
|
||||
"value": "=====================_714967308==_.ALT"
|
||||
}
|
||||
[
|
||||
"boundary",
|
||||
"=====================_714967308==_.ALT"
|
||||
]
|
||||
]
|
||||
}
|
||||
},
|
||||
@@ -138,31 +158,34 @@
|
||||
"offset_start": 419,
|
||||
"offset_end": 496
|
||||
}
|
||||
],
|
||||
"is_encoding_problem": false,
|
||||
"body": {
|
||||
"Multipart": [
|
||||
1,
|
||||
2
|
||||
]
|
||||
},
|
||||
"offset_header": 0,
|
||||
"offset_body": 498,
|
||||
"offset_end": 2627
|
||||
]
|
||||
},
|
||||
{
|
||||
"id": 1,
|
||||
"message": 0,
|
||||
"parent": 0,
|
||||
"kind": "text",
|
||||
"encoding": "quoted-printable",
|
||||
"flags": [],
|
||||
"roles": [
|
||||
"text_body"
|
||||
],
|
||||
"role": "text_body",
|
||||
"offset_header": 540,
|
||||
"offset_body": 635,
|
||||
"offset_end": 1444,
|
||||
"headers": [
|
||||
{
|
||||
"name": "content_type",
|
||||
"name": "Content-Type",
|
||||
"value": {
|
||||
"ContentType": {
|
||||
"c_type": "text",
|
||||
"c_subtype": "plain",
|
||||
"content_type": {
|
||||
"type": "text",
|
||||
"subtype": "plain",
|
||||
"attributes": [
|
||||
{
|
||||
"name": "charset",
|
||||
"value": "iso-8859-1"
|
||||
}
|
||||
[
|
||||
"charset",
|
||||
"iso-8859-1"
|
||||
]
|
||||
]
|
||||
}
|
||||
},
|
||||
@@ -171,36 +194,44 @@
|
||||
"offset_end": 588
|
||||
},
|
||||
{
|
||||
"name": "content_transfer_encoding",
|
||||
"name": "Content-Transfer-Encoding",
|
||||
"value": {
|
||||
"Text": "quoted-printable"
|
||||
"text": "quoted-printable"
|
||||
},
|
||||
"offset_field": 588,
|
||||
"offset_start": 614,
|
||||
"offset_end": 633
|
||||
}
|
||||
],
|
||||
"is_encoding_problem": false,
|
||||
"body": {
|
||||
"Text": "Die Hasen und die Frösche\r\n\r\nDie Hasen klagten einst über ihre mißliche Lage; \"wir leben\", sprach ein Redner, \"in steter Furcht vor Menschen und Tieren, eine Beute der Hunde, der Adler, ja fast aller Raubtiere! Unsere stete Angst ist ärger als der Tod selbst. Auf, laßt uns ein für allemal sterben.\" \r\n\r\nIn einem nahen Teich wollten sie sich nun ersäufen; sie eilten ihm zu; allein das außerordentliche Getöse und ihre wunderbare Gestalt erschreckte eine Menge Frösche, die am Ufer saßen, so sehr, daß sie aufs schnellste untertauchten. \r\n\r\n\"Halt\", rief nun eben dieser Sprecher, \"wir wollen das Ersäufen noch ein wenig aufschieben, denn auch uns fürchten, wie ihr seht, einige Tiere, welche also wohl noch unglücklicher sein müssen als wir.\" \r\n\r\n"
|
||||
},
|
||||
"offset_header": 540,
|
||||
"offset_body": 635,
|
||||
"offset_end": 1444
|
||||
"text": "Die Hasen und die Frösche\r\n\r\nDie Hasen klagten einst über ihre mißliche Lage; \"wir leben\", sprach ein Redner, \"in steter Furcht vor Menschen und Tieren, eine Beute der Hunde, der Adler, ja fast aller Raubtiere! Unsere stete Angst ist ärger als der Tod selbst. Auf, laßt uns ein für allemal sterben.\" \r\n\r\nIn einem nahen Teich wollten sie sich nun ersäufen; sie eilten ihm zu; allein das außerordentliche Getöse und ihre wunderbare Gestalt erschreckte eine Menge Frösche, die am Ufer saßen, so sehr, daß sie aufs schnellste untertauchten. \r\n\r\n\"Halt\", rief nun eben dieser Sprecher, \"wir wollen das Ersäufen noch ein wenig aufschieben, denn auch uns fürchten, wie ihr seht, einige Tiere, welche also wohl noch unglücklicher sein müssen als wir.\" \r\n\r\n",
|
||||
"decode_problems": []
|
||||
},
|
||||
{
|
||||
"id": 2,
|
||||
"message": 0,
|
||||
"parent": 0,
|
||||
"kind": "html",
|
||||
"encoding": "quoted-printable",
|
||||
"flags": [],
|
||||
"roles": [
|
||||
"html_body"
|
||||
],
|
||||
"role": "html_body",
|
||||
"offset_header": 1488,
|
||||
"offset_body": 1582,
|
||||
"offset_end": 2579,
|
||||
"headers": [
|
||||
{
|
||||
"name": "content_type",
|
||||
"name": "Content-Type",
|
||||
"value": {
|
||||
"ContentType": {
|
||||
"c_type": "text",
|
||||
"c_subtype": "html",
|
||||
"content_type": {
|
||||
"type": "text",
|
||||
"subtype": "html",
|
||||
"attributes": [
|
||||
{
|
||||
"name": "charset",
|
||||
"value": "iso-8859-1"
|
||||
}
|
||||
[
|
||||
"charset",
|
||||
"iso-8859-1"
|
||||
]
|
||||
]
|
||||
}
|
||||
},
|
||||
@@ -209,22 +240,17 @@
|
||||
"offset_end": 1535
|
||||
},
|
||||
{
|
||||
"name": "content_transfer_encoding",
|
||||
"name": "Content-Transfer-Encoding",
|
||||
"value": {
|
||||
"Text": "quoted-printable"
|
||||
"text": "quoted-printable"
|
||||
},
|
||||
"offset_field": 1535,
|
||||
"offset_start": 1561,
|
||||
"offset_end": 1580
|
||||
}
|
||||
],
|
||||
"is_encoding_problem": false,
|
||||
"body": {
|
||||
"Html": "<html>\r\n<font face=\"Arial, Helvetica\" size=5 color=\"#0000FF\"><b>Die Hasen und die\r\nFrösche<br>\r\n<br>\r\n</font></b><font face=\"Arial, Helvetica\">Die Hasen klagten einst über\r\nihre mißliche Lage; "wir leben", sprach ein Redner, "in\r\nsteter Furcht vor Menschen und Tieren, eine Beute der Hunde, der Adler,\r\nja fast aller Raubtiere! Unsere stete Angst ist ärger als der Tod selbst.\r\nAuf, laßt uns ein für allemal sterben." <br>\r\n<br>\r\nIn einem nahen Teich wollten sie sich nun ersäufen; sie eilten ihm zu;\r\nallein das außerordentliche Getöse und ihre wunderbare Gestalt\r\nerschreckte eine Menge Frösche, die am Ufer saßen, so sehr, daß sie aufs\r\nschnellste untertauchten. <br>\r\n<br>\r\n"Halt", rief nun eben dieser Sprecher, "wir wollen das\r\nErsäufen noch ein wenig aufschieben, denn auch uns fürchten, wie ihr\r\nseht, einige Tiere, welche also wohl noch unglücklicher sein müssen als\r\nwir." <br>\r\n<br>\r\n</font></html>\r\n"
|
||||
},
|
||||
"offset_header": 1488,
|
||||
"offset_body": 1582,
|
||||
"offset_end": 2579
|
||||
"text": "<html>\r\n<font face=\"Arial, Helvetica\" size=5 color=\"#0000FF\"><b>Die Hasen und die\r\nFrösche<br>\r\n<br>\r\n</font></b><font face=\"Arial, Helvetica\">Die Hasen klagten einst über\r\nihre mißliche Lage; "wir leben", sprach ein Redner, "in\r\nsteter Furcht vor Menschen und Tieren, eine Beute der Hunde, der Adler,\r\nja fast aller Raubtiere! Unsere stete Angst ist ärger als der Tod selbst.\r\nAuf, laßt uns ein für allemal sterben." <br>\r\n<br>\r\nIn einem nahen Teich wollten sie sich nun ersäufen; sie eilten ihm zu;\r\nallein das außerordentliche Getöse und ihre wunderbare Gestalt\r\nerschreckte eine Menge Frösche, die am Ufer saßen, so sehr, daß sie aufs\r\nschnellste untertauchten. <br>\r\n<br>\r\n"Halt", rief nun eben dieser Sprecher, "wir wollen das\r\nErsäufen noch ein wenig aufschieben, denn auch uns fürchten, wie ihr\r\nseht, einige Tiere, welche also wohl noch unglücklicher sein müssen als\r\nwir." <br>\r\n<br>\r\n</font></html>\r\n",
|
||||
"decode_problems": []
|
||||
}
|
||||
]
|
||||
}
|
||||
+117
-91
@@ -1,60 +1,80 @@
|
||||
{
|
||||
"html_body": [
|
||||
2
|
||||
"messages": [
|
||||
{
|
||||
"id": 0,
|
||||
"root": 0,
|
||||
"container": null,
|
||||
"source": "raw",
|
||||
"text_body": [
|
||||
1
|
||||
],
|
||||
"html_body": [
|
||||
2
|
||||
],
|
||||
"attachments": [],
|
||||
"has_attachments": false
|
||||
}
|
||||
],
|
||||
"text_body": [
|
||||
1
|
||||
],
|
||||
"attachments": [],
|
||||
"parts": [
|
||||
{
|
||||
"id": 0,
|
||||
"message": 0,
|
||||
"parent": null,
|
||||
"kind": "multipart",
|
||||
"children": [
|
||||
1,
|
||||
2
|
||||
],
|
||||
"encoding": "none",
|
||||
"flags": [],
|
||||
"roles": [],
|
||||
"role": "container",
|
||||
"offset_header": 0,
|
||||
"offset_body": 486,
|
||||
"offset_end": 2564,
|
||||
"headers": [
|
||||
{
|
||||
"name": "message_id",
|
||||
"name": "Message-Id",
|
||||
"value": {
|
||||
"Text": "4.2.0.58.20000519002557.00a88870@pop.example.com"
|
||||
"text_list": [
|
||||
"4.2.0.58.20000519002557.00a88870@pop.example.com"
|
||||
]
|
||||
},
|
||||
"offset_field": 0,
|
||||
"offset_start": 11,
|
||||
"offset_end": 63
|
||||
},
|
||||
{
|
||||
"name": {
|
||||
"other": "X-Sender"
|
||||
},
|
||||
"name": "X-Sender",
|
||||
"value": {
|
||||
"Text": "dwsauder@pop.example.com (Unverified)"
|
||||
"text": "dwsauder@pop.example.com (Unverified)"
|
||||
},
|
||||
"offset_field": 63,
|
||||
"offset_start": 72,
|
||||
"offset_end": 111
|
||||
},
|
||||
{
|
||||
"name": {
|
||||
"other": "X-Mailer"
|
||||
},
|
||||
"name": "X-Mailer",
|
||||
"value": {
|
||||
"Text": "QUALCOMM Windows Eudora Pro Version 4.2.0.58"
|
||||
"text": "QUALCOMM Windows Eudora Pro Version 4.2.0.58"
|
||||
},
|
||||
"offset_field": 111,
|
||||
"offset_start": 120,
|
||||
"offset_end": 167
|
||||
},
|
||||
{
|
||||
"name": {
|
||||
"other": "X-Priority"
|
||||
},
|
||||
"name": "X-Priority",
|
||||
"value": {
|
||||
"Text": "2 (High)"
|
||||
"text": "2 (High)"
|
||||
},
|
||||
"offset_field": 167,
|
||||
"offset_start": 178,
|
||||
"offset_end": 188
|
||||
},
|
||||
{
|
||||
"name": "date",
|
||||
"name": "Date",
|
||||
"value": {
|
||||
"DateTime": {
|
||||
"date_time": {
|
||||
"year": 2000,
|
||||
"month": 5,
|
||||
"day": 19,
|
||||
@@ -71,66 +91,66 @@
|
||||
"offset_end": 226
|
||||
},
|
||||
{
|
||||
"name": "to",
|
||||
"name": "To",
|
||||
"value": {
|
||||
"Address": {
|
||||
"List": [
|
||||
{
|
||||
"address": [
|
||||
{
|
||||
"mailbox": {
|
||||
"name": "Heinz Müller",
|
||||
"address": "mueller@example.com"
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
"offset_field": 226,
|
||||
"offset_start": 229,
|
||||
"offset_end": 284
|
||||
},
|
||||
{
|
||||
"name": "from",
|
||||
"name": "From",
|
||||
"value": {
|
||||
"Address": {
|
||||
"List": [
|
||||
{
|
||||
"address": [
|
||||
{
|
||||
"mailbox": {
|
||||
"name": "Doug Sauder",
|
||||
"address": "dwsauder@example.com"
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
"offset_field": 284,
|
||||
"offset_start": 289,
|
||||
"offset_end": 325
|
||||
},
|
||||
{
|
||||
"name": "subject",
|
||||
"name": "Subject",
|
||||
"value": {
|
||||
"Text": "Die Hasen und die Frösche"
|
||||
"text": "Die Hasen und die Frösche"
|
||||
},
|
||||
"offset_field": 325,
|
||||
"offset_start": 333,
|
||||
"offset_end": 379
|
||||
},
|
||||
{
|
||||
"name": "mime_version",
|
||||
"name": "Mime-Version",
|
||||
"value": {
|
||||
"Text": "1.0"
|
||||
"text": "1.0"
|
||||
},
|
||||
"offset_field": 379,
|
||||
"offset_start": 392,
|
||||
"offset_end": 397
|
||||
},
|
||||
{
|
||||
"name": "content_type",
|
||||
"name": "Content-Type",
|
||||
"value": {
|
||||
"ContentType": {
|
||||
"c_type": "multipart",
|
||||
"c_subtype": "alternative",
|
||||
"content_type": {
|
||||
"type": "multipart",
|
||||
"subtype": "alternative",
|
||||
"attributes": [
|
||||
{
|
||||
"name": "boundary",
|
||||
"value": "=====================_714967308==_.ALT"
|
||||
}
|
||||
[
|
||||
"boundary",
|
||||
"=====================_714967308==_.ALT"
|
||||
]
|
||||
]
|
||||
}
|
||||
},
|
||||
@@ -138,31 +158,34 @@
|
||||
"offset_start": 410,
|
||||
"offset_end": 485
|
||||
}
|
||||
],
|
||||
"is_encoding_problem": false,
|
||||
"body": {
|
||||
"Multipart": [
|
||||
1,
|
||||
2
|
||||
]
|
||||
},
|
||||
"offset_header": 0,
|
||||
"offset_body": 486,
|
||||
"offset_end": 2564
|
||||
]
|
||||
},
|
||||
{
|
||||
"id": 1,
|
||||
"message": 0,
|
||||
"parent": 0,
|
||||
"kind": "text",
|
||||
"encoding": "quoted-printable",
|
||||
"flags": [],
|
||||
"roles": [
|
||||
"text_body"
|
||||
],
|
||||
"role": "text_body",
|
||||
"offset_header": 527,
|
||||
"offset_body": 619,
|
||||
"offset_end": 1412,
|
||||
"headers": [
|
||||
{
|
||||
"name": "content_type",
|
||||
"name": "Content-Type",
|
||||
"value": {
|
||||
"ContentType": {
|
||||
"c_type": "text",
|
||||
"c_subtype": "plain",
|
||||
"content_type": {
|
||||
"type": "text",
|
||||
"subtype": "plain",
|
||||
"attributes": [
|
||||
{
|
||||
"name": "charset",
|
||||
"value": "iso-8859-1"
|
||||
}
|
||||
[
|
||||
"charset",
|
||||
"iso-8859-1"
|
||||
]
|
||||
]
|
||||
}
|
||||
},
|
||||
@@ -171,36 +194,44 @@
|
||||
"offset_end": 574
|
||||
},
|
||||
{
|
||||
"name": "content_transfer_encoding",
|
||||
"name": "Content-Transfer-Encoding",
|
||||
"value": {
|
||||
"Text": "quoted-printable"
|
||||
"text": "quoted-printable"
|
||||
},
|
||||
"offset_field": 574,
|
||||
"offset_start": 600,
|
||||
"offset_end": 618
|
||||
}
|
||||
],
|
||||
"is_encoding_problem": false,
|
||||
"body": {
|
||||
"Text": "Die Hasen und die Frösche\n\nDie Hasen klagten einst über ihre mißliche Lage; \"wir leben\", sprach ein Redner, \"in steter Furcht vor Menschen und Tieren, eine Beute der Hunde, der Adler, ja fast aller Raubtiere! Unsere stete Angst ist ärger als der Tod selbst. Auf, laßt uns ein für allemal sterben.\" \n\nIn einem nahen Teich wollten sie sich nun ersäufen; sie eilten ihm zu; allein das außerordentliche Getöse und ihre wunderbare Gestalt erschreckte eine Menge Frösche, die am Ufer saßen, so sehr, daß sie aufs schnellste untertauchten. \n\n\"Halt\", rief nun eben dieser Sprecher, \"wir wollen das Ersäufen noch ein wenig aufschieben, denn auch uns fürchten, wie ihr seht, einige Tiere, welche also wohl noch unglücklicher sein müssen als wir.\" \n\n"
|
||||
},
|
||||
"offset_header": 527,
|
||||
"offset_body": 619,
|
||||
"offset_end": 1412
|
||||
"text": "Die Hasen und die Frösche\n\nDie Hasen klagten einst über ihre mißliche Lage; \"wir leben\", sprach ein Redner, \"in steter Furcht vor Menschen und Tieren, eine Beute der Hunde, der Adler, ja fast aller Raubtiere! Unsere stete Angst ist ärger als der Tod selbst. Auf, laßt uns ein für allemal sterben.\" \n\nIn einem nahen Teich wollten sie sich nun ersäufen; sie eilten ihm zu; allein das außerordentliche Getöse und ihre wunderbare Gestalt erschreckte eine Menge Frösche, die am Ufer saßen, so sehr, daß sie aufs schnellste untertauchten. \n\n\"Halt\", rief nun eben dieser Sprecher, \"wir wollen das Ersäufen noch ein wenig aufschieben, denn auch uns fürchten, wie ihr seht, einige Tiere, welche also wohl noch unglücklicher sein müssen als wir.\" \n\n",
|
||||
"decode_problems": []
|
||||
},
|
||||
{
|
||||
"id": 2,
|
||||
"message": 0,
|
||||
"parent": 0,
|
||||
"kind": "html",
|
||||
"encoding": "quoted-printable",
|
||||
"flags": [],
|
||||
"roles": [
|
||||
"html_body"
|
||||
],
|
||||
"role": "html_body",
|
||||
"offset_header": 1454,
|
||||
"offset_body": 1545,
|
||||
"offset_end": 2519,
|
||||
"headers": [
|
||||
{
|
||||
"name": "content_type",
|
||||
"name": "Content-Type",
|
||||
"value": {
|
||||
"ContentType": {
|
||||
"c_type": "text",
|
||||
"c_subtype": "html",
|
||||
"content_type": {
|
||||
"type": "text",
|
||||
"subtype": "html",
|
||||
"attributes": [
|
||||
{
|
||||
"name": "charset",
|
||||
"value": "iso-8859-1"
|
||||
}
|
||||
[
|
||||
"charset",
|
||||
"iso-8859-1"
|
||||
]
|
||||
]
|
||||
}
|
||||
},
|
||||
@@ -209,22 +240,17 @@
|
||||
"offset_end": 1500
|
||||
},
|
||||
{
|
||||
"name": "content_transfer_encoding",
|
||||
"name": "Content-Transfer-Encoding",
|
||||
"value": {
|
||||
"Text": "quoted-printable"
|
||||
"text": "quoted-printable"
|
||||
},
|
||||
"offset_field": 1500,
|
||||
"offset_start": 1526,
|
||||
"offset_end": 1544
|
||||
}
|
||||
],
|
||||
"is_encoding_problem": false,
|
||||
"body": {
|
||||
"Html": "<html>\n<font face=\"Arial, Helvetica\" size=5 color=\"#0000FF\"><b>Die Hasen und die\nFrösche<br>\n<br>\n</font></b><font face=\"Arial, Helvetica\">Die Hasen klagten einst über\nihre mißliche Lage; "wir leben", sprach ein Redner, "in\nsteter Furcht vor Menschen und Tieren, eine Beute der Hunde, der Adler,\nja fast aller Raubtiere! Unsere stete Angst ist ärger als der Tod selbst.\nAuf, laßt uns ein für allemal sterben." <br>\n<br>\nIn einem nahen Teich wollten sie sich nun ersäufen; sie eilten ihm zu;\nallein das außerordentliche Getöse und ihre wunderbare Gestalt\nerschreckte eine Menge Frösche, die am Ufer saßen, so sehr, daß sie aufs\nschnellste untertauchten. <br>\n<br>\n"Halt", rief nun eben dieser Sprecher, "wir wollen das\nErsäufen noch ein wenig aufschieben, denn auch uns fürchten, wie ihr\nseht, einige Tiere, welche also wohl noch unglücklicher sein müssen als\nwir." <br>\n<br>\n</font></html>\n"
|
||||
},
|
||||
"offset_header": 1454,
|
||||
"offset_body": 1545,
|
||||
"offset_end": 2519
|
||||
"text": "<html>\n<font face=\"Arial, Helvetica\" size=5 color=\"#0000FF\"><b>Die Hasen und die\nFrösche<br>\n<br>\n</font></b><font face=\"Arial, Helvetica\">Die Hasen klagten einst über\nihre mißliche Lage; "wir leben", sprach ein Redner, "in\nsteter Furcht vor Menschen und Tieren, eine Beute der Hunde, der Adler,\nja fast aller Raubtiere! Unsere stete Angst ist ärger als der Tod selbst.\nAuf, laßt uns ein für allemal sterben." <br>\n<br>\nIn einem nahen Teich wollten sie sich nun ersäufen; sie eilten ihm zu;\nallein das außerordentliche Getöse und ihre wunderbare Gestalt\nerschreckte eine Menge Frösche, die am Ufer saßen, so sehr, daß sie aufs\nschnellste untertauchten. <br>\n<br>\n"Halt", rief nun eben dieser Sprecher, "wir wollen das\nErsäufen noch ein wenig aufschieben, denn auch uns fürchten, wie ihr\nseht, einige Tiere, welche also wohl noch unglücklicher sein müssen als\nwir." <br>\n<br>\n</font></html>\n",
|
||||
"decode_problems": []
|
||||
}
|
||||
]
|
||||
}
|
||||
@@ -1,60 +1,79 @@
|
||||
{
|
||||
"html_body": [
|
||||
0
|
||||
"messages": [
|
||||
{
|
||||
"id": 0,
|
||||
"root": 0,
|
||||
"container": null,
|
||||
"source": "raw",
|
||||
"text_body": [
|
||||
0
|
||||
],
|
||||
"html_body": [
|
||||
0
|
||||
],
|
||||
"attachments": [],
|
||||
"has_attachments": false
|
||||
}
|
||||
],
|
||||
"text_body": [
|
||||
0
|
||||
],
|
||||
"attachments": [],
|
||||
"parts": [
|
||||
{
|
||||
"id": 0,
|
||||
"message": 0,
|
||||
"parent": null,
|
||||
"kind": "text",
|
||||
"encoding": "none",
|
||||
"flags": [],
|
||||
"roles": [
|
||||
"text_body",
|
||||
"html_body"
|
||||
],
|
||||
"role": "text_body",
|
||||
"offset_header": 0,
|
||||
"offset_body": 411,
|
||||
"offset_end": 1177,
|
||||
"headers": [
|
||||
{
|
||||
"name": "message_id",
|
||||
"name": "Message-Id",
|
||||
"value": {
|
||||
"Text": "4.2.0.58.20000519011207.00a8cd70@pop.example.com"
|
||||
"text_list": [
|
||||
"4.2.0.58.20000519011207.00a8cd70@pop.example.com"
|
||||
]
|
||||
},
|
||||
"offset_field": 0,
|
||||
"offset_start": 11,
|
||||
"offset_end": 64
|
||||
},
|
||||
{
|
||||
"name": {
|
||||
"other": "X-Sender"
|
||||
},
|
||||
"name": "X-Sender",
|
||||
"value": {
|
||||
"Text": "dwsauder@pop.example.com (Unverified)"
|
||||
"text": "dwsauder@pop.example.com (Unverified)"
|
||||
},
|
||||
"offset_field": 64,
|
||||
"offset_start": 73,
|
||||
"offset_end": 113
|
||||
},
|
||||
{
|
||||
"name": {
|
||||
"other": "X-Mailer"
|
||||
},
|
||||
"name": "X-Mailer",
|
||||
"value": {
|
||||
"Text": "QUALCOMM Windows Eudora Pro Version 4.2.0.58"
|
||||
"text": "QUALCOMM Windows Eudora Pro Version 4.2.0.58"
|
||||
},
|
||||
"offset_field": 113,
|
||||
"offset_start": 122,
|
||||
"offset_end": 170
|
||||
},
|
||||
{
|
||||
"name": {
|
||||
"other": "X-Priority"
|
||||
},
|
||||
"name": "X-Priority",
|
||||
"value": {
|
||||
"Text": "5 (Lowest)"
|
||||
"text": "5 (Lowest)"
|
||||
},
|
||||
"offset_field": 170,
|
||||
"offset_start": 181,
|
||||
"offset_end": 194
|
||||
},
|
||||
{
|
||||
"name": "date",
|
||||
"name": "Date",
|
||||
"value": {
|
||||
"DateTime": {
|
||||
"date_time": {
|
||||
"year": 2000,
|
||||
"month": 5,
|
||||
"day": 19,
|
||||
@@ -71,66 +90,66 @@
|
||||
"offset_end": 233
|
||||
},
|
||||
{
|
||||
"name": "to",
|
||||
"name": "To",
|
||||
"value": {
|
||||
"Address": {
|
||||
"List": [
|
||||
{
|
||||
"address": [
|
||||
{
|
||||
"mailbox": {
|
||||
"name": "Joe Blow",
|
||||
"address": "blow@example.com"
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
"offset_field": 233,
|
||||
"offset_start": 236,
|
||||
"offset_end": 266
|
||||
},
|
||||
{
|
||||
"name": "from",
|
||||
"name": "From",
|
||||
"value": {
|
||||
"Address": {
|
||||
"List": [
|
||||
{
|
||||
"address": [
|
||||
{
|
||||
"mailbox": {
|
||||
"name": "Doug Sauder",
|
||||
"address": "dwsauder@example.com"
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
"offset_field": 266,
|
||||
"offset_start": 271,
|
||||
"offset_end": 308
|
||||
},
|
||||
{
|
||||
"name": "subject",
|
||||
"name": "Subject",
|
||||
"value": {
|
||||
"Text": "The Hare and the Tortoise"
|
||||
"text": "The Hare and the Tortoise"
|
||||
},
|
||||
"offset_field": 308,
|
||||
"offset_start": 316,
|
||||
"offset_end": 344
|
||||
},
|
||||
{
|
||||
"name": "mime_version",
|
||||
"name": "Mime-Version",
|
||||
"value": {
|
||||
"Text": "1.0"
|
||||
"text": "1.0"
|
||||
},
|
||||
"offset_field": 344,
|
||||
"offset_start": 357,
|
||||
"offset_end": 363
|
||||
},
|
||||
{
|
||||
"name": "content_type",
|
||||
"name": "Content-Type",
|
||||
"value": {
|
||||
"ContentType": {
|
||||
"c_type": "text",
|
||||
"c_subtype": "plain",
|
||||
"content_type": {
|
||||
"type": "text",
|
||||
"subtype": "plain",
|
||||
"attributes": [
|
||||
{
|
||||
"name": "charset",
|
||||
"value": "us-ascii"
|
||||
}
|
||||
[
|
||||
"charset",
|
||||
"us-ascii"
|
||||
]
|
||||
]
|
||||
}
|
||||
},
|
||||
@@ -139,13 +158,8 @@
|
||||
"offset_end": 409
|
||||
}
|
||||
],
|
||||
"is_encoding_problem": false,
|
||||
"body": {
|
||||
"Text": "\r\nThe Hare and the Tortoise \r\n \r\nA HARE one day ridiculed the short feet and slow pace of the Tortoise, who replied, laughing: \"Though you be swift as the wind, I will beat you in a race.\" The Hare, believing her assertion to be simply impossible, assented to the proposal; and they agreed that the Fox should choose the course and fix the goal. On the day appointed for the race the two started together. The Tortoise never for a moment stopped, but went on with a slow but steady pace straight to the end of the course. The Hare, lying down by the wayside, fell fast asleep. At last waking up, and moving as fast as he could, he saw the Tortoise had reached the goal, and was comfortably dozing after her fatigue. \r\n \r\nSlow but steady wins the race. \r\n\r\n"
|
||||
},
|
||||
"offset_header": 0,
|
||||
"offset_body": 411,
|
||||
"offset_end": 1177
|
||||
"text": "\r\nThe Hare and the Tortoise \r\n \r\nA HARE one day ridiculed the short feet and slow pace of the Tortoise, who replied, laughing: \"Though you be swift as the wind, I will beat you in a race.\" The Hare, believing her assertion to be simply impossible, assented to the proposal; and they agreed that the Fox should choose the course and fix the goal. On the day appointed for the race the two started together. The Tortoise never for a moment stopped, but went on with a slow but steady pace straight to the end of the course. The Hare, lying down by the wayside, fell fast asleep. At last waking up, and moving as fast as he could, he saw the Tortoise had reached the goal, and was comfortably dozing after her fatigue. \r\n \r\nSlow but steady wins the race. \r\n\r\n",
|
||||
"decode_problems": []
|
||||
}
|
||||
]
|
||||
}
|
||||
@@ -1,60 +1,79 @@
|
||||
{
|
||||
"html_body": [
|
||||
0
|
||||
"messages": [
|
||||
{
|
||||
"id": 0,
|
||||
"root": 0,
|
||||
"container": null,
|
||||
"source": "raw",
|
||||
"text_body": [
|
||||
0
|
||||
],
|
||||
"html_body": [
|
||||
0
|
||||
],
|
||||
"attachments": [],
|
||||
"has_attachments": false
|
||||
}
|
||||
],
|
||||
"text_body": [
|
||||
0
|
||||
],
|
||||
"attachments": [],
|
||||
"parts": [
|
||||
{
|
||||
"id": 0,
|
||||
"message": 0,
|
||||
"parent": null,
|
||||
"kind": "text",
|
||||
"encoding": "none",
|
||||
"flags": [],
|
||||
"roles": [
|
||||
"text_body",
|
||||
"html_body"
|
||||
],
|
||||
"role": "text_body",
|
||||
"offset_header": 0,
|
||||
"offset_body": 400,
|
||||
"offset_end": 1159,
|
||||
"headers": [
|
||||
{
|
||||
"name": "message_id",
|
||||
"name": "Message-Id",
|
||||
"value": {
|
||||
"Text": "4.2.0.58.20000519011207.00a8cd70@pop.example.com"
|
||||
"text_list": [
|
||||
"4.2.0.58.20000519011207.00a8cd70@pop.example.com"
|
||||
]
|
||||
},
|
||||
"offset_field": 0,
|
||||
"offset_start": 11,
|
||||
"offset_end": 63
|
||||
},
|
||||
{
|
||||
"name": {
|
||||
"other": "X-Sender"
|
||||
},
|
||||
"name": "X-Sender",
|
||||
"value": {
|
||||
"Text": "dwsauder@pop.example.com (Unverified)"
|
||||
"text": "dwsauder@pop.example.com (Unverified)"
|
||||
},
|
||||
"offset_field": 63,
|
||||
"offset_start": 72,
|
||||
"offset_end": 111
|
||||
},
|
||||
{
|
||||
"name": {
|
||||
"other": "X-Mailer"
|
||||
},
|
||||
"name": "X-Mailer",
|
||||
"value": {
|
||||
"Text": "QUALCOMM Windows Eudora Pro Version 4.2.0.58"
|
||||
"text": "QUALCOMM Windows Eudora Pro Version 4.2.0.58"
|
||||
},
|
||||
"offset_field": 111,
|
||||
"offset_start": 120,
|
||||
"offset_end": 167
|
||||
},
|
||||
{
|
||||
"name": {
|
||||
"other": "X-Priority"
|
||||
},
|
||||
"name": "X-Priority",
|
||||
"value": {
|
||||
"Text": "5 (Lowest)"
|
||||
"text": "5 (Lowest)"
|
||||
},
|
||||
"offset_field": 167,
|
||||
"offset_start": 178,
|
||||
"offset_end": 190
|
||||
},
|
||||
{
|
||||
"name": "date",
|
||||
"name": "Date",
|
||||
"value": {
|
||||
"DateTime": {
|
||||
"date_time": {
|
||||
"year": 2000,
|
||||
"month": 5,
|
||||
"day": 19,
|
||||
@@ -71,66 +90,66 @@
|
||||
"offset_end": 228
|
||||
},
|
||||
{
|
||||
"name": "to",
|
||||
"name": "To",
|
||||
"value": {
|
||||
"Address": {
|
||||
"List": [
|
||||
{
|
||||
"address": [
|
||||
{
|
||||
"mailbox": {
|
||||
"name": "Joe Blow",
|
||||
"address": "blow@example.com"
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
"offset_field": 228,
|
||||
"offset_start": 231,
|
||||
"offset_end": 260
|
||||
},
|
||||
{
|
||||
"name": "from",
|
||||
"name": "From",
|
||||
"value": {
|
||||
"Address": {
|
||||
"List": [
|
||||
{
|
||||
"address": [
|
||||
{
|
||||
"mailbox": {
|
||||
"name": "Doug Sauder",
|
||||
"address": "dwsauder@example.com"
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
"offset_field": 260,
|
||||
"offset_start": 265,
|
||||
"offset_end": 301
|
||||
},
|
||||
{
|
||||
"name": "subject",
|
||||
"name": "Subject",
|
||||
"value": {
|
||||
"Text": "The Hare and the Tortoise"
|
||||
"text": "The Hare and the Tortoise"
|
||||
},
|
||||
"offset_field": 301,
|
||||
"offset_start": 309,
|
||||
"offset_end": 336
|
||||
},
|
||||
{
|
||||
"name": "mime_version",
|
||||
"name": "Mime-Version",
|
||||
"value": {
|
||||
"Text": "1.0"
|
||||
"text": "1.0"
|
||||
},
|
||||
"offset_field": 336,
|
||||
"offset_start": 349,
|
||||
"offset_end": 354
|
||||
},
|
||||
{
|
||||
"name": "content_type",
|
||||
"name": "Content-Type",
|
||||
"value": {
|
||||
"ContentType": {
|
||||
"c_type": "text",
|
||||
"c_subtype": "plain",
|
||||
"content_type": {
|
||||
"type": "text",
|
||||
"subtype": "plain",
|
||||
"attributes": [
|
||||
{
|
||||
"name": "charset",
|
||||
"value": "us-ascii"
|
||||
}
|
||||
[
|
||||
"charset",
|
||||
"us-ascii"
|
||||
]
|
||||
]
|
||||
}
|
||||
},
|
||||
@@ -139,13 +158,8 @@
|
||||
"offset_end": 399
|
||||
}
|
||||
],
|
||||
"is_encoding_problem": false,
|
||||
"body": {
|
||||
"Text": "\nThe Hare and the Tortoise \n \nA HARE one day ridiculed the short feet and slow pace of the Tortoise, who replied, laughing: \"Though you be swift as the wind, I will beat you in a race.\" The Hare, believing her assertion to be simply impossible, assented to the proposal; and they agreed that the Fox should choose the course and fix the goal. On the day appointed for the race the two started together. The Tortoise never for a moment stopped, but went on with a slow but steady pace straight to the end of the course. The Hare, lying down by the wayside, fell fast asleep. At last waking up, and moving as fast as he could, he saw the Tortoise had reached the goal, and was comfortably dozing after her fatigue. \n \nSlow but steady wins the race. \n\n"
|
||||
},
|
||||
"offset_header": 0,
|
||||
"offset_body": 400,
|
||||
"offset_end": 1159
|
||||
"text": "\nThe Hare and the Tortoise \n \nA HARE one day ridiculed the short feet and slow pace of the Tortoise, who replied, laughing: \"Though you be swift as the wind, I will beat you in a race.\" The Hare, believing her assertion to be simply impossible, assented to the proposal; and they agreed that the Fox should choose the course and fix the goal. On the day appointed for the race the two started together. The Tortoise never for a moment stopped, but went on with a slow but steady pace straight to the end of the course. The Hare, lying down by the wayside, fell fast asleep. At last waking up, and moving as fast as he could, he saw the Tortoise had reached the goal, and was comfortably dozing after her fatigue. \n \nSlow but steady wins the race. \n\n",
|
||||
"decode_problems": []
|
||||
}
|
||||
]
|
||||
}
|
||||
@@ -1,59 +1,82 @@
|
||||
{
|
||||
"html_body": [
|
||||
0
|
||||
"messages": [
|
||||
{
|
||||
"id": 0,
|
||||
"root": 0,
|
||||
"container": null,
|
||||
"source": "raw",
|
||||
"text_body": [
|
||||
0
|
||||
],
|
||||
"html_body": [
|
||||
0
|
||||
],
|
||||
"attachments": [],
|
||||
"has_attachments": false
|
||||
}
|
||||
],
|
||||
"text_body": [
|
||||
0
|
||||
],
|
||||
"attachments": [],
|
||||
"parts": [
|
||||
{
|
||||
"id": 0,
|
||||
"message": 0,
|
||||
"parent": null,
|
||||
"kind": "text",
|
||||
"encoding": "quoted-printable",
|
||||
"flags": [],
|
||||
"roles": [
|
||||
"text_body",
|
||||
"html_body"
|
||||
],
|
||||
"role": "text_body",
|
||||
"offset_header": 0,
|
||||
"offset_body": 577,
|
||||
"offset_end": 1470,
|
||||
"headers": [
|
||||
{
|
||||
"name": "from",
|
||||
"name": "From",
|
||||
"value": {
|
||||
"Address": {
|
||||
"List": [
|
||||
{
|
||||
"address": [
|
||||
{
|
||||
"mailbox": {
|
||||
"name": "Doug Sauder",
|
||||
"address": "doug@example.com"
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
"offset_field": 0,
|
||||
"offset_start": 5,
|
||||
"offset_end": 40
|
||||
},
|
||||
{
|
||||
"name": "to",
|
||||
"name": "To",
|
||||
"value": {
|
||||
"Address": {
|
||||
"List": [
|
||||
{
|
||||
"address": [
|
||||
{
|
||||
"mailbox": {
|
||||
"name": "Heinz Müller",
|
||||
"address": "mueller@example.com"
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
"offset_field": 40,
|
||||
"offset_start": 43,
|
||||
"offset_end": 96
|
||||
},
|
||||
{
|
||||
"name": "subject",
|
||||
"name": "Subject",
|
||||
"value": {
|
||||
"Text": "Die Hasen und die Frösche (Microsoft Outlook 00)"
|
||||
"text": "Die Hasen und die Frösche (Microsoft Outlook 00)"
|
||||
},
|
||||
"offset_field": 96,
|
||||
"offset_start": 104,
|
||||
"offset_end": 175
|
||||
},
|
||||
{
|
||||
"name": "date",
|
||||
"name": "Date",
|
||||
"value": {
|
||||
"DateTime": {
|
||||
"date_time": {
|
||||
"year": 2000,
|
||||
"month": 5,
|
||||
"day": 17,
|
||||
@@ -70,34 +93,36 @@
|
||||
"offset_end": 214
|
||||
},
|
||||
{
|
||||
"name": "message_id",
|
||||
"name": "Message-ID",
|
||||
"value": {
|
||||
"Text": "NDBBIAKOPKHFGPLCODIGCEKDCHAA.doug@example.com"
|
||||
"text_list": [
|
||||
"NDBBIAKOPKHFGPLCODIGCEKDCHAA.doug@example.com"
|
||||
]
|
||||
},
|
||||
"offset_field": 214,
|
||||
"offset_start": 225,
|
||||
"offset_end": 275
|
||||
},
|
||||
{
|
||||
"name": "mime_version",
|
||||
"name": "MIME-Version",
|
||||
"value": {
|
||||
"Text": "1.0"
|
||||
"text": "1.0"
|
||||
},
|
||||
"offset_field": 275,
|
||||
"offset_start": 288,
|
||||
"offset_end": 294
|
||||
},
|
||||
{
|
||||
"name": "content_type",
|
||||
"name": "Content-Type",
|
||||
"value": {
|
||||
"ContentType": {
|
||||
"c_type": "text",
|
||||
"c_subtype": "plain",
|
||||
"content_type": {
|
||||
"type": "text",
|
||||
"subtype": "plain",
|
||||
"attributes": [
|
||||
{
|
||||
"name": "charset",
|
||||
"value": "utf-7"
|
||||
}
|
||||
[
|
||||
"charset",
|
||||
"utf-7"
|
||||
]
|
||||
]
|
||||
}
|
||||
},
|
||||
@@ -106,75 +131,62 @@
|
||||
"offset_end": 339
|
||||
},
|
||||
{
|
||||
"name": "content_transfer_encoding",
|
||||
"name": "Content-Transfer-Encoding",
|
||||
"value": {
|
||||
"Text": "quoted-printable"
|
||||
"text": "quoted-printable"
|
||||
},
|
||||
"offset_field": 339,
|
||||
"offset_start": 365,
|
||||
"offset_end": 384
|
||||
},
|
||||
{
|
||||
"name": {
|
||||
"other": "X-Priority"
|
||||
},
|
||||
"name": "X-Priority",
|
||||
"value": {
|
||||
"Text": "3 (Normal)"
|
||||
"text": "3 (Normal)"
|
||||
},
|
||||
"offset_field": 384,
|
||||
"offset_start": 395,
|
||||
"offset_end": 408
|
||||
},
|
||||
{
|
||||
"name": {
|
||||
"other": "X-MSMail-Priority"
|
||||
},
|
||||
"name": "X-MSMail-Priority",
|
||||
"value": {
|
||||
"Text": "Normal"
|
||||
"text": "Normal"
|
||||
},
|
||||
"offset_field": 408,
|
||||
"offset_start": 426,
|
||||
"offset_end": 435
|
||||
},
|
||||
{
|
||||
"name": {
|
||||
"other": "X-Mailer"
|
||||
},
|
||||
"name": "X-Mailer",
|
||||
"value": {
|
||||
"Text": "Microsoft Outlook IMO, Build 9.0.2416 (9.0.2910.0)"
|
||||
"text": "Microsoft Outlook IMO, Build 9.0.2416 (9.0.2910.0)"
|
||||
},
|
||||
"offset_field": 435,
|
||||
"offset_start": 444,
|
||||
"offset_end": 497
|
||||
},
|
||||
{
|
||||
"name": "importance",
|
||||
"name": "Importance",
|
||||
"value": {
|
||||
"Text": "Normal"
|
||||
"text": "Normal"
|
||||
},
|
||||
"offset_field": 497,
|
||||
"offset_start": 508,
|
||||
"offset_end": 517
|
||||
},
|
||||
{
|
||||
"name": {
|
||||
"other": "X-MimeOLE"
|
||||
},
|
||||
"name": "X-MimeOLE",
|
||||
"value": {
|
||||
"Text": "Produced By Microsoft MimeOLE V5.00.2314.1300"
|
||||
"text": "Produced By Microsoft MimeOLE V5.00.2314.1300"
|
||||
},
|
||||
"offset_field": 517,
|
||||
"offset_start": 527,
|
||||
"offset_end": 575
|
||||
}
|
||||
],
|
||||
"is_encoding_problem": false,
|
||||
"body": {
|
||||
"Text": "Die Hasen und die Frösche\r\n\r\nDie Hasen klagten einst über ihre mißliche Lage; \"wir leben\", sprach ein Redner, \"in steter Furcht vor Menschen und Tieren, eine Beute der Hunde, der Adler, ja fast aller Raubtiere! Unsere stete Angst ist ärger als der Tod selbst. Auf, laßt uns ein für allemal sterben.\" \r\n\r\nIn einem nahen Teich wollten sie sich nun ersäufen; sie eilten ihm zu; allein das außerordentliche Getöse und ihre wunderbare Gestalt erschreckte eine Menge Frösche, die am Ufer saßen, so sehr, daß sie aufs schnellste untertauchten. \r\n\r\n\"Halt\", rief nun eben dieser Sprecher, \"wir wollen das Ersäufen noch ein wenig aufschieben, denn auch uns fürchten, wie ihr seht, einige Tiere, welche also wohl noch unglücklicher sein müssen als wir.\" \r\n"
|
||||
},
|
||||
"offset_header": 0,
|
||||
"offset_body": 577,
|
||||
"offset_end": 1470
|
||||
"text": "Die Hasen und die Frösche\r\n\r\nDie Hasen klagten einst über ihre mißliche Lage; \"wir leben\", sprach ein Redner, \"in steter Furcht vor Menschen und Tieren, eine Beute der Hunde, der Adler, ja fast aller Raubtiere! Unsere stete Angst ist ärger als der Tod selbst. Auf, laßt uns ein für allemal sterben.\" \r\n\r\nIn einem nahen Teich wollten sie sich nun ersäufen; sie eilten ihm zu; allein das außerordentliche Getöse und ihre wunderbare Gestalt erschreckte eine Menge Frösche, die am Ufer saßen, so sehr, daß sie aufs schnellste untertauchten. \r\n\r\n\"Halt\", rief nun eben dieser Sprecher, \"wir wollen das Ersäufen noch ein wenig aufschieben, denn auch uns fürchten, wie ihr seht, einige Tiere, welche also wohl noch unglücklicher sein müssen als wir.\" \r\n",
|
||||
"decode_problems": []
|
||||
}
|
||||
]
|
||||
}
|
||||
@@ -1,59 +1,82 @@
|
||||
{
|
||||
"html_body": [
|
||||
0
|
||||
"messages": [
|
||||
{
|
||||
"id": 0,
|
||||
"root": 0,
|
||||
"container": null,
|
||||
"source": "raw",
|
||||
"text_body": [
|
||||
0
|
||||
],
|
||||
"html_body": [
|
||||
0
|
||||
],
|
||||
"attachments": [],
|
||||
"has_attachments": false
|
||||
}
|
||||
],
|
||||
"text_body": [
|
||||
0
|
||||
],
|
||||
"attachments": [],
|
||||
"parts": [
|
||||
{
|
||||
"id": 0,
|
||||
"message": 0,
|
||||
"parent": null,
|
||||
"kind": "text",
|
||||
"encoding": "quoted-printable",
|
||||
"flags": [],
|
||||
"roles": [
|
||||
"text_body",
|
||||
"html_body"
|
||||
],
|
||||
"role": "text_body",
|
||||
"offset_header": 0,
|
||||
"offset_body": 562,
|
||||
"offset_end": 1438,
|
||||
"headers": [
|
||||
{
|
||||
"name": "from",
|
||||
"name": "From",
|
||||
"value": {
|
||||
"Address": {
|
||||
"List": [
|
||||
{
|
||||
"address": [
|
||||
{
|
||||
"mailbox": {
|
||||
"name": "Doug Sauder",
|
||||
"address": "doug@example.com"
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
"offset_field": 0,
|
||||
"offset_start": 5,
|
||||
"offset_end": 39
|
||||
},
|
||||
{
|
||||
"name": "to",
|
||||
"name": "To",
|
||||
"value": {
|
||||
"Address": {
|
||||
"List": [
|
||||
{
|
||||
"address": [
|
||||
{
|
||||
"mailbox": {
|
||||
"name": "Heinz Müller",
|
||||
"address": "mueller@example.com"
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
"offset_field": 39,
|
||||
"offset_start": 42,
|
||||
"offset_end": 94
|
||||
},
|
||||
{
|
||||
"name": "subject",
|
||||
"name": "Subject",
|
||||
"value": {
|
||||
"Text": "Die Hasen und die Frösche (Microsoft Outlook 00)"
|
||||
"text": "Die Hasen und die Frösche (Microsoft Outlook 00)"
|
||||
},
|
||||
"offset_field": 94,
|
||||
"offset_start": 102,
|
||||
"offset_end": 172
|
||||
},
|
||||
{
|
||||
"name": "date",
|
||||
"name": "Date",
|
||||
"value": {
|
||||
"DateTime": {
|
||||
"date_time": {
|
||||
"year": 2000,
|
||||
"month": 5,
|
||||
"day": 17,
|
||||
@@ -70,34 +93,36 @@
|
||||
"offset_end": 210
|
||||
},
|
||||
{
|
||||
"name": "message_id",
|
||||
"name": "Message-ID",
|
||||
"value": {
|
||||
"Text": "NDBBIAKOPKHFGPLCODIGCEKDCHAA.doug@example.com"
|
||||
"text_list": [
|
||||
"NDBBIAKOPKHFGPLCODIGCEKDCHAA.doug@example.com"
|
||||
]
|
||||
},
|
||||
"offset_field": 210,
|
||||
"offset_start": 221,
|
||||
"offset_end": 270
|
||||
},
|
||||
{
|
||||
"name": "mime_version",
|
||||
"name": "MIME-Version",
|
||||
"value": {
|
||||
"Text": "1.0"
|
||||
"text": "1.0"
|
||||
},
|
||||
"offset_field": 270,
|
||||
"offset_start": 283,
|
||||
"offset_end": 288
|
||||
},
|
||||
{
|
||||
"name": "content_type",
|
||||
"name": "Content-Type",
|
||||
"value": {
|
||||
"ContentType": {
|
||||
"c_type": "text",
|
||||
"c_subtype": "plain",
|
||||
"content_type": {
|
||||
"type": "text",
|
||||
"subtype": "plain",
|
||||
"attributes": [
|
||||
{
|
||||
"name": "charset",
|
||||
"value": "utf-7"
|
||||
}
|
||||
[
|
||||
"charset",
|
||||
"utf-7"
|
||||
]
|
||||
]
|
||||
}
|
||||
},
|
||||
@@ -106,75 +131,62 @@
|
||||
"offset_end": 331
|
||||
},
|
||||
{
|
||||
"name": "content_transfer_encoding",
|
||||
"name": "Content-Transfer-Encoding",
|
||||
"value": {
|
||||
"Text": "quoted-printable"
|
||||
"text": "quoted-printable"
|
||||
},
|
||||
"offset_field": 331,
|
||||
"offset_start": 357,
|
||||
"offset_end": 375
|
||||
},
|
||||
{
|
||||
"name": {
|
||||
"other": "X-Priority"
|
||||
},
|
||||
"name": "X-Priority",
|
||||
"value": {
|
||||
"Text": "3 (Normal)"
|
||||
"text": "3 (Normal)"
|
||||
},
|
||||
"offset_field": 375,
|
||||
"offset_start": 386,
|
||||
"offset_end": 398
|
||||
},
|
||||
{
|
||||
"name": {
|
||||
"other": "X-MSMail-Priority"
|
||||
},
|
||||
"name": "X-MSMail-Priority",
|
||||
"value": {
|
||||
"Text": "Normal"
|
||||
"text": "Normal"
|
||||
},
|
||||
"offset_field": 398,
|
||||
"offset_start": 416,
|
||||
"offset_end": 424
|
||||
},
|
||||
{
|
||||
"name": {
|
||||
"other": "X-Mailer"
|
||||
},
|
||||
"name": "X-Mailer",
|
||||
"value": {
|
||||
"Text": "Microsoft Outlook IMO, Build 9.0.2416 (9.0.2910.0)"
|
||||
"text": "Microsoft Outlook IMO, Build 9.0.2416 (9.0.2910.0)"
|
||||
},
|
||||
"offset_field": 424,
|
||||
"offset_start": 433,
|
||||
"offset_end": 485
|
||||
},
|
||||
{
|
||||
"name": "importance",
|
||||
"name": "Importance",
|
||||
"value": {
|
||||
"Text": "Normal"
|
||||
"text": "Normal"
|
||||
},
|
||||
"offset_field": 485,
|
||||
"offset_start": 496,
|
||||
"offset_end": 504
|
||||
},
|
||||
{
|
||||
"name": {
|
||||
"other": "X-MimeOLE"
|
||||
},
|
||||
"name": "X-MimeOLE",
|
||||
"value": {
|
||||
"Text": "Produced By Microsoft MimeOLE V5.00.2314.1300"
|
||||
"text": "Produced By Microsoft MimeOLE V5.00.2314.1300"
|
||||
},
|
||||
"offset_field": 504,
|
||||
"offset_start": 514,
|
||||
"offset_end": 561
|
||||
}
|
||||
],
|
||||
"is_encoding_problem": false,
|
||||
"body": {
|
||||
"Text": "Die Hasen und die Frösche\n\nDie Hasen klagten einst über ihre mißliche Lage; \"wir leben\", sprach ein Redner, \"in steter Furcht vor Menschen und Tieren, eine Beute der Hunde, der Adler, ja fast aller Raubtiere! Unsere stete Angst ist ärger als der Tod selbst. Auf, laßt uns ein für allemal sterben.\" \n\nIn einem nahen Teich wollten sie sich nun ersäufen; sie eilten ihm zu; allein das außerordentliche Getöse und ihre wunderbare Gestalt erschreckte eine Menge Frösche, die am Ufer saßen, so sehr, daß sie aufs schnellste untertauchten. \n\n\"Halt\", rief nun eben dieser Sprecher, \"wir wollen das Ersäufen noch ein wenig aufschieben, denn auch uns fürchten, wie ihr seht, einige Tiere, welche also wohl noch unglücklicher sein müssen als wir.\" \n"
|
||||
},
|
||||
"offset_header": 0,
|
||||
"offset_body": 562,
|
||||
"offset_end": 1438
|
||||
"text": "Die Hasen und die Frösche\n\nDie Hasen klagten einst über ihre mißliche Lage; \"wir leben\", sprach ein Redner, \"in steter Furcht vor Menschen und Tieren, eine Beute der Hunde, der Adler, ja fast aller Raubtiere! Unsere stete Angst ist ärger als der Tod selbst. Auf, laßt uns ein für allemal sterben.\" \n\nIn einem nahen Teich wollten sie sich nun ersäufen; sie eilten ihm zu; allein das außerordentliche Getöse und ihre wunderbare Gestalt erschreckte eine Menge Frösche, die am Ufer saßen, so sehr, daß sie aufs schnellste untertauchten. \n\n\"Halt\", rief nun eben dieser Sprecher, \"wir wollen das Ersäufen noch ein wenig aufschieben, denn auch uns fürchten, wie ihr seht, einige Tiere, welche also wohl noch unglücklicher sein müssen als wir.\" \n",
|
||||
"decode_problems": []
|
||||
}
|
||||
]
|
||||
}
|
||||
+136
-2892
File diff suppressed because it is too large
Load Diff
+136
-2892
File diff suppressed because it is too large
Load Diff
@@ -1,59 +1,82 @@
|
||||
{
|
||||
"html_body": [
|
||||
0
|
||||
"messages": [
|
||||
{
|
||||
"id": 0,
|
||||
"root": 0,
|
||||
"container": null,
|
||||
"source": "raw",
|
||||
"text_body": [
|
||||
0
|
||||
],
|
||||
"html_body": [
|
||||
0
|
||||
],
|
||||
"attachments": [],
|
||||
"has_attachments": false
|
||||
}
|
||||
],
|
||||
"text_body": [
|
||||
0
|
||||
],
|
||||
"attachments": [],
|
||||
"parts": [
|
||||
{
|
||||
"id": 0,
|
||||
"message": 0,
|
||||
"parent": null,
|
||||
"kind": "text",
|
||||
"encoding": "quoted-printable",
|
||||
"flags": [],
|
||||
"roles": [
|
||||
"text_body",
|
||||
"html_body"
|
||||
],
|
||||
"role": "text_body",
|
||||
"offset_header": 0,
|
||||
"offset_body": 601,
|
||||
"offset_end": 1410,
|
||||
"headers": [
|
||||
{
|
||||
"name": "from",
|
||||
"name": "From",
|
||||
"value": {
|
||||
"Address": {
|
||||
"List": [
|
||||
{
|
||||
"address": [
|
||||
{
|
||||
"mailbox": {
|
||||
"name": "Doug Sauder",
|
||||
"address": "doug@example.com"
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
"offset_field": 0,
|
||||
"offset_start": 5,
|
||||
"offset_end": 40
|
||||
},
|
||||
{
|
||||
"name": "to",
|
||||
"name": "To",
|
||||
"value": {
|
||||
"Address": {
|
||||
"List": [
|
||||
{
|
||||
"address": [
|
||||
{
|
||||
"mailbox": {
|
||||
"name": "Jürgen Schmürgen",
|
||||
"address": "schmuergen@example.com"
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
"offset_field": 40,
|
||||
"offset_start": 43,
|
||||
"offset_end": 112
|
||||
},
|
||||
{
|
||||
"name": "subject",
|
||||
"name": "Subject",
|
||||
"value": {
|
||||
"Text": "Die Hasen und die Frösche (Microsoft Outlook 00)"
|
||||
"text": "Die Hasen und die Frösche (Microsoft Outlook 00)"
|
||||
},
|
||||
"offset_field": 112,
|
||||
"offset_start": 120,
|
||||
"offset_end": 194
|
||||
},
|
||||
{
|
||||
"name": "date",
|
||||
"name": "Date",
|
||||
"value": {
|
||||
"DateTime": {
|
||||
"date_time": {
|
||||
"year": 2000,
|
||||
"month": 5,
|
||||
"day": 17,
|
||||
@@ -70,34 +93,36 @@
|
||||
"offset_end": 233
|
||||
},
|
||||
{
|
||||
"name": "message_id",
|
||||
"name": "Message-ID",
|
||||
"value": {
|
||||
"Text": "NDBBIAKOPKHFGPLCODIGIEKCCHAA.doug@example.com"
|
||||
"text_list": [
|
||||
"NDBBIAKOPKHFGPLCODIGIEKCCHAA.doug@example.com"
|
||||
]
|
||||
},
|
||||
"offset_field": 233,
|
||||
"offset_start": 244,
|
||||
"offset_end": 294
|
||||
},
|
||||
{
|
||||
"name": "mime_version",
|
||||
"name": "MIME-Version",
|
||||
"value": {
|
||||
"Text": "1.0"
|
||||
"text": "1.0"
|
||||
},
|
||||
"offset_field": 294,
|
||||
"offset_start": 307,
|
||||
"offset_end": 313
|
||||
},
|
||||
{
|
||||
"name": "content_type",
|
||||
"name": "Content-Type",
|
||||
"value": {
|
||||
"ContentType": {
|
||||
"c_type": "text",
|
||||
"c_subtype": "plain",
|
||||
"content_type": {
|
||||
"type": "text",
|
||||
"subtype": "plain",
|
||||
"attributes": [
|
||||
{
|
||||
"name": "charset",
|
||||
"value": "iso-8859-1"
|
||||
}
|
||||
[
|
||||
"charset",
|
||||
"iso-8859-1"
|
||||
]
|
||||
]
|
||||
}
|
||||
},
|
||||
@@ -106,75 +131,62 @@
|
||||
"offset_end": 363
|
||||
},
|
||||
{
|
||||
"name": "content_transfer_encoding",
|
||||
"name": "Content-Transfer-Encoding",
|
||||
"value": {
|
||||
"Text": "quoted-printable"
|
||||
"text": "quoted-printable"
|
||||
},
|
||||
"offset_field": 363,
|
||||
"offset_start": 389,
|
||||
"offset_end": 408
|
||||
},
|
||||
{
|
||||
"name": {
|
||||
"other": "X-Priority"
|
||||
},
|
||||
"name": "X-Priority",
|
||||
"value": {
|
||||
"Text": "3 (Normal)"
|
||||
"text": "3 (Normal)"
|
||||
},
|
||||
"offset_field": 408,
|
||||
"offset_start": 419,
|
||||
"offset_end": 432
|
||||
},
|
||||
{
|
||||
"name": {
|
||||
"other": "X-MSMail-Priority"
|
||||
},
|
||||
"name": "X-MSMail-Priority",
|
||||
"value": {
|
||||
"Text": "Normal"
|
||||
"text": "Normal"
|
||||
},
|
||||
"offset_field": 432,
|
||||
"offset_start": 450,
|
||||
"offset_end": 459
|
||||
},
|
||||
{
|
||||
"name": {
|
||||
"other": "X-Mailer"
|
||||
},
|
||||
"name": "X-Mailer",
|
||||
"value": {
|
||||
"Text": "Microsoft Outlook IMO, Build 9.0.2416 (9.0.2910.0)"
|
||||
"text": "Microsoft Outlook IMO, Build 9.0.2416 (9.0.2910.0)"
|
||||
},
|
||||
"offset_field": 459,
|
||||
"offset_start": 468,
|
||||
"offset_end": 521
|
||||
},
|
||||
{
|
||||
"name": "importance",
|
||||
"name": "Importance",
|
||||
"value": {
|
||||
"Text": "Normal"
|
||||
"text": "Normal"
|
||||
},
|
||||
"offset_field": 521,
|
||||
"offset_start": 532,
|
||||
"offset_end": 541
|
||||
},
|
||||
{
|
||||
"name": {
|
||||
"other": "X-MimeOLE"
|
||||
},
|
||||
"name": "X-MimeOLE",
|
||||
"value": {
|
||||
"Text": "Produced By Microsoft MimeOLE V5.00.2314.1300"
|
||||
"text": "Produced By Microsoft MimeOLE V5.00.2314.1300"
|
||||
},
|
||||
"offset_field": 541,
|
||||
"offset_start": 551,
|
||||
"offset_end": 599
|
||||
}
|
||||
],
|
||||
"is_encoding_problem": false,
|
||||
"body": {
|
||||
"Text": "Die Hasen und die Frösche\r\n\r\nDie Hasen klagten einst über ihre mißliche Lage; \"wir leben\", sprach ein Redner, \"in steter Furcht vor Menschen und Tieren, eine Beute der Hunde, der Adler, ja fast aller Raubtiere! Unsere stete Angst ist ärger als der Tod selbst. Auf, laßt uns ein für allemal sterben.\" \r\n\r\nIn einem nahen Teich wollten sie sich nun ersäufen; sie eilten ihm zu; allein das außerordentliche Getöse und ihre wunderbare Gestalt erschreckte eine Menge Frösche, die am Ufer saßen, so sehr, daß sie aufs schnellste untertauchten. \r\n\r\n\"Halt\", rief nun eben dieser Sprecher, \"wir wollen das Ersäufen noch ein wenig aufschieben, denn auch uns fürchten, wie ihr seht, einige Tiere, welche also wohl noch unglücklicher sein müssen als wir.\" \r\n\r\n"
|
||||
},
|
||||
"offset_header": 0,
|
||||
"offset_body": 601,
|
||||
"offset_end": 1410
|
||||
"text": "Die Hasen und die Frösche\r\n\r\nDie Hasen klagten einst über ihre mißliche Lage; \"wir leben\", sprach ein Redner, \"in steter Furcht vor Menschen und Tieren, eine Beute der Hunde, der Adler, ja fast aller Raubtiere! Unsere stete Angst ist ärger als der Tod selbst. Auf, laßt uns ein für allemal sterben.\" \r\n\r\nIn einem nahen Teich wollten sie sich nun ersäufen; sie eilten ihm zu; allein das außerordentliche Getöse und ihre wunderbare Gestalt erschreckte eine Menge Frösche, die am Ufer saßen, so sehr, daß sie aufs schnellste untertauchten. \r\n\r\n\"Halt\", rief nun eben dieser Sprecher, \"wir wollen das Ersäufen noch ein wenig aufschieben, denn auch uns fürchten, wie ihr seht, einige Tiere, welche also wohl noch unglücklicher sein müssen als wir.\" \r\n\r\n",
|
||||
"decode_problems": []
|
||||
}
|
||||
]
|
||||
}
|
||||
@@ -1,59 +1,82 @@
|
||||
{
|
||||
"html_body": [
|
||||
0
|
||||
"messages": [
|
||||
{
|
||||
"id": 0,
|
||||
"root": 0,
|
||||
"container": null,
|
||||
"source": "raw",
|
||||
"text_body": [
|
||||
0
|
||||
],
|
||||
"html_body": [
|
||||
0
|
||||
],
|
||||
"attachments": [],
|
||||
"has_attachments": false
|
||||
}
|
||||
],
|
||||
"text_body": [
|
||||
0
|
||||
],
|
||||
"attachments": [],
|
||||
"parts": [
|
||||
{
|
||||
"id": 0,
|
||||
"message": 0,
|
||||
"parent": null,
|
||||
"kind": "text",
|
||||
"encoding": "quoted-printable",
|
||||
"flags": [],
|
||||
"roles": [
|
||||
"text_body",
|
||||
"html_body"
|
||||
],
|
||||
"role": "text_body",
|
||||
"offset_header": 0,
|
||||
"offset_body": 586,
|
||||
"offset_end": 1379,
|
||||
"headers": [
|
||||
{
|
||||
"name": "from",
|
||||
"name": "From",
|
||||
"value": {
|
||||
"Address": {
|
||||
"List": [
|
||||
{
|
||||
"address": [
|
||||
{
|
||||
"mailbox": {
|
||||
"name": "Doug Sauder",
|
||||
"address": "doug@example.com"
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
"offset_field": 0,
|
||||
"offset_start": 5,
|
||||
"offset_end": 39
|
||||
},
|
||||
{
|
||||
"name": "to",
|
||||
"name": "To",
|
||||
"value": {
|
||||
"Address": {
|
||||
"List": [
|
||||
{
|
||||
"address": [
|
||||
{
|
||||
"mailbox": {
|
||||
"name": "Jürgen Schmürgen",
|
||||
"address": "schmuergen@example.com"
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
"offset_field": 39,
|
||||
"offset_start": 42,
|
||||
"offset_end": 110
|
||||
},
|
||||
{
|
||||
"name": "subject",
|
||||
"name": "Subject",
|
||||
"value": {
|
||||
"Text": "Die Hasen und die Frösche (Microsoft Outlook 00)"
|
||||
"text": "Die Hasen und die Frösche (Microsoft Outlook 00)"
|
||||
},
|
||||
"offset_field": 110,
|
||||
"offset_start": 118,
|
||||
"offset_end": 191
|
||||
},
|
||||
{
|
||||
"name": "date",
|
||||
"name": "Date",
|
||||
"value": {
|
||||
"DateTime": {
|
||||
"date_time": {
|
||||
"year": 2000,
|
||||
"month": 5,
|
||||
"day": 17,
|
||||
@@ -70,34 +93,36 @@
|
||||
"offset_end": 229
|
||||
},
|
||||
{
|
||||
"name": "message_id",
|
||||
"name": "Message-ID",
|
||||
"value": {
|
||||
"Text": "NDBBIAKOPKHFGPLCODIGIEKCCHAA.doug@example.com"
|
||||
"text_list": [
|
||||
"NDBBIAKOPKHFGPLCODIGIEKCCHAA.doug@example.com"
|
||||
]
|
||||
},
|
||||
"offset_field": 229,
|
||||
"offset_start": 240,
|
||||
"offset_end": 289
|
||||
},
|
||||
{
|
||||
"name": "mime_version",
|
||||
"name": "MIME-Version",
|
||||
"value": {
|
||||
"Text": "1.0"
|
||||
"text": "1.0"
|
||||
},
|
||||
"offset_field": 289,
|
||||
"offset_start": 302,
|
||||
"offset_end": 307
|
||||
},
|
||||
{
|
||||
"name": "content_type",
|
||||
"name": "Content-Type",
|
||||
"value": {
|
||||
"ContentType": {
|
||||
"c_type": "text",
|
||||
"c_subtype": "plain",
|
||||
"content_type": {
|
||||
"type": "text",
|
||||
"subtype": "plain",
|
||||
"attributes": [
|
||||
{
|
||||
"name": "charset",
|
||||
"value": "iso-8859-1"
|
||||
}
|
||||
[
|
||||
"charset",
|
||||
"iso-8859-1"
|
||||
]
|
||||
]
|
||||
}
|
||||
},
|
||||
@@ -106,75 +131,62 @@
|
||||
"offset_end": 355
|
||||
},
|
||||
{
|
||||
"name": "content_transfer_encoding",
|
||||
"name": "Content-Transfer-Encoding",
|
||||
"value": {
|
||||
"Text": "quoted-printable"
|
||||
"text": "quoted-printable"
|
||||
},
|
||||
"offset_field": 355,
|
||||
"offset_start": 381,
|
||||
"offset_end": 399
|
||||
},
|
||||
{
|
||||
"name": {
|
||||
"other": "X-Priority"
|
||||
},
|
||||
"name": "X-Priority",
|
||||
"value": {
|
||||
"Text": "3 (Normal)"
|
||||
"text": "3 (Normal)"
|
||||
},
|
||||
"offset_field": 399,
|
||||
"offset_start": 410,
|
||||
"offset_end": 422
|
||||
},
|
||||
{
|
||||
"name": {
|
||||
"other": "X-MSMail-Priority"
|
||||
},
|
||||
"name": "X-MSMail-Priority",
|
||||
"value": {
|
||||
"Text": "Normal"
|
||||
"text": "Normal"
|
||||
},
|
||||
"offset_field": 422,
|
||||
"offset_start": 440,
|
||||
"offset_end": 448
|
||||
},
|
||||
{
|
||||
"name": {
|
||||
"other": "X-Mailer"
|
||||
},
|
||||
"name": "X-Mailer",
|
||||
"value": {
|
||||
"Text": "Microsoft Outlook IMO, Build 9.0.2416 (9.0.2910.0)"
|
||||
"text": "Microsoft Outlook IMO, Build 9.0.2416 (9.0.2910.0)"
|
||||
},
|
||||
"offset_field": 448,
|
||||
"offset_start": 457,
|
||||
"offset_end": 509
|
||||
},
|
||||
{
|
||||
"name": "importance",
|
||||
"name": "Importance",
|
||||
"value": {
|
||||
"Text": "Normal"
|
||||
"text": "Normal"
|
||||
},
|
||||
"offset_field": 509,
|
||||
"offset_start": 520,
|
||||
"offset_end": 528
|
||||
},
|
||||
{
|
||||
"name": {
|
||||
"other": "X-MimeOLE"
|
||||
},
|
||||
"name": "X-MimeOLE",
|
||||
"value": {
|
||||
"Text": "Produced By Microsoft MimeOLE V5.00.2314.1300"
|
||||
"text": "Produced By Microsoft MimeOLE V5.00.2314.1300"
|
||||
},
|
||||
"offset_field": 528,
|
||||
"offset_start": 538,
|
||||
"offset_end": 585
|
||||
}
|
||||
],
|
||||
"is_encoding_problem": false,
|
||||
"body": {
|
||||
"Text": "Die Hasen und die Frösche\n\nDie Hasen klagten einst über ihre mißliche Lage; \"wir leben\", sprach ein Redner, \"in steter Furcht vor Menschen und Tieren, eine Beute der Hunde, der Adler, ja fast aller Raubtiere! Unsere stete Angst ist ärger als der Tod selbst. Auf, laßt uns ein für allemal sterben.\" \n\nIn einem nahen Teich wollten sie sich nun ersäufen; sie eilten ihm zu; allein das außerordentliche Getöse und ihre wunderbare Gestalt erschreckte eine Menge Frösche, die am Ufer saßen, so sehr, daß sie aufs schnellste untertauchten. \n\n\"Halt\", rief nun eben dieser Sprecher, \"wir wollen das Ersäufen noch ein wenig aufschieben, denn auch uns fürchten, wie ihr seht, einige Tiere, welche also wohl noch unglücklicher sein müssen als wir.\" \n\n"
|
||||
},
|
||||
"offset_header": 0,
|
||||
"offset_body": 586,
|
||||
"offset_end": 1379
|
||||
"text": "Die Hasen und die Frösche\n\nDie Hasen klagten einst über ihre mißliche Lage; \"wir leben\", sprach ein Redner, \"in steter Furcht vor Menschen und Tieren, eine Beute der Hunde, der Adler, ja fast aller Raubtiere! Unsere stete Angst ist ärger als der Tod selbst. Auf, laßt uns ein für allemal sterben.\" \n\nIn einem nahen Teich wollten sie sich nun ersäufen; sie eilten ihm zu; allein das außerordentliche Getöse und ihre wunderbare Gestalt erschreckte eine Menge Frösche, die am Ufer saßen, so sehr, daß sie aufs schnellste untertauchten. \n\n\"Halt\", rief nun eben dieser Sprecher, \"wir wollen das Ersäufen noch ein wenig aufschieben, denn auch uns fürchten, wie ihr seht, einige Tiere, welche also wohl noch unglücklicher sein müssen als wir.\" \n\n",
|
||||
"decode_problems": []
|
||||
}
|
||||
]
|
||||
}
|
||||
+202
-4240
File diff suppressed because it is too large
Load Diff
+202
-4240
File diff suppressed because it is too large
Load Diff
@@ -1,69 +1,88 @@
|
||||
{
|
||||
"html_body": [
|
||||
0
|
||||
"messages": [
|
||||
{
|
||||
"id": 0,
|
||||
"root": 0,
|
||||
"container": null,
|
||||
"source": "raw",
|
||||
"text_body": [
|
||||
0
|
||||
],
|
||||
"html_body": [
|
||||
0
|
||||
],
|
||||
"attachments": [],
|
||||
"has_attachments": false
|
||||
}
|
||||
],
|
||||
"text_body": [
|
||||
0
|
||||
],
|
||||
"attachments": [],
|
||||
"parts": [
|
||||
{
|
||||
"id": 0,
|
||||
"message": 0,
|
||||
"parent": null,
|
||||
"kind": "text",
|
||||
"encoding": "quoted-printable",
|
||||
"flags": [],
|
||||
"roles": [
|
||||
"text_body",
|
||||
"html_body"
|
||||
],
|
||||
"role": "text_body",
|
||||
"offset_header": 0,
|
||||
"offset_body": 597,
|
||||
"offset_end": 1422,
|
||||
"headers": [
|
||||
{
|
||||
"name": "message_id",
|
||||
"name": "Message-Id",
|
||||
"value": {
|
||||
"Text": "4.2.0.58.20000519010441.00a8d140@pop.example.com"
|
||||
"text_list": [
|
||||
"4.2.0.58.20000519010441.00a8d140@pop.example.com"
|
||||
]
|
||||
},
|
||||
"offset_field": 0,
|
||||
"offset_start": 11,
|
||||
"offset_end": 64
|
||||
},
|
||||
{
|
||||
"name": {
|
||||
"other": "X-Sender"
|
||||
},
|
||||
"name": "X-Sender",
|
||||
"value": {
|
||||
"Text": "dwsauder@pop.example.com (Unverified)"
|
||||
"text": "dwsauder@pop.example.com (Unverified)"
|
||||
},
|
||||
"offset_field": 64,
|
||||
"offset_start": 73,
|
||||
"offset_end": 113
|
||||
},
|
||||
{
|
||||
"name": "disposition_notification_to",
|
||||
"name": "Disposition-Notification-To",
|
||||
"value": {
|
||||
"Text": "<dwsauder@example.com>"
|
||||
"text": "<dwsauder@example.com>"
|
||||
},
|
||||
"offset_field": 113,
|
||||
"offset_start": 141,
|
||||
"offset_end": 166
|
||||
},
|
||||
{
|
||||
"name": {
|
||||
"other": "X-Mailer"
|
||||
},
|
||||
"name": "X-Mailer",
|
||||
"value": {
|
||||
"Text": "QUALCOMM Windows Eudora Pro Version 4.2.0.58"
|
||||
"text": "QUALCOMM Windows Eudora Pro Version 4.2.0.58"
|
||||
},
|
||||
"offset_field": 166,
|
||||
"offset_start": 175,
|
||||
"offset_end": 223
|
||||
},
|
||||
{
|
||||
"name": {
|
||||
"other": "X-Priority"
|
||||
},
|
||||
"name": "X-Priority",
|
||||
"value": {
|
||||
"Text": "1 (Highest)"
|
||||
"text": "1 (Highest)"
|
||||
},
|
||||
"offset_field": 223,
|
||||
"offset_start": 234,
|
||||
"offset_end": 248
|
||||
},
|
||||
{
|
||||
"name": "date",
|
||||
"name": "Date",
|
||||
"value": {
|
||||
"DateTime": {
|
||||
"date_time": {
|
||||
"year": 2000,
|
||||
"month": 5,
|
||||
"day": 19,
|
||||
@@ -80,70 +99,70 @@
|
||||
"offset_end": 287
|
||||
},
|
||||
{
|
||||
"name": "to",
|
||||
"name": "To",
|
||||
"value": {
|
||||
"Address": {
|
||||
"List": [
|
||||
{
|
||||
"address": [
|
||||
{
|
||||
"mailbox": {
|
||||
"name": "Jürgen Schmürgen",
|
||||
"address": "jschmuergen@example.com"
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
"offset_field": 287,
|
||||
"offset_start": 290,
|
||||
"offset_end": 373
|
||||
},
|
||||
{
|
||||
"name": "from",
|
||||
"name": "From",
|
||||
"value": {
|
||||
"Address": {
|
||||
"List": [
|
||||
{
|
||||
"address": [
|
||||
{
|
||||
"mailbox": {
|
||||
"name": "Doug Sauder",
|
||||
"address": "dwsauder@example.com"
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
"offset_field": 373,
|
||||
"offset_start": 378,
|
||||
"offset_end": 415
|
||||
},
|
||||
{
|
||||
"name": "subject",
|
||||
"name": "Subject",
|
||||
"value": {
|
||||
"Text": "Die Hasen und die Frösche"
|
||||
"text": "Die Hasen und die Frösche"
|
||||
},
|
||||
"offset_field": 415,
|
||||
"offset_start": 423,
|
||||
"offset_end": 468
|
||||
},
|
||||
{
|
||||
"name": "mime_version",
|
||||
"name": "Mime-Version",
|
||||
"value": {
|
||||
"Text": "1.0"
|
||||
"text": "1.0"
|
||||
},
|
||||
"offset_field": 468,
|
||||
"offset_start": 481,
|
||||
"offset_end": 487
|
||||
},
|
||||
{
|
||||
"name": "content_type",
|
||||
"name": "Content-Type",
|
||||
"value": {
|
||||
"ContentType": {
|
||||
"c_type": "text",
|
||||
"c_subtype": "plain",
|
||||
"content_type": {
|
||||
"type": "text",
|
||||
"subtype": "plain",
|
||||
"attributes": [
|
||||
{
|
||||
"name": "charset",
|
||||
"value": "iso-8859-1"
|
||||
},
|
||||
{
|
||||
"name": "format",
|
||||
"value": "flowed"
|
||||
}
|
||||
[
|
||||
"charset",
|
||||
"iso-8859-1"
|
||||
],
|
||||
[
|
||||
"format",
|
||||
"flowed"
|
||||
]
|
||||
]
|
||||
}
|
||||
},
|
||||
@@ -152,22 +171,17 @@
|
||||
"offset_end": 550
|
||||
},
|
||||
{
|
||||
"name": "content_transfer_encoding",
|
||||
"name": "Content-Transfer-Encoding",
|
||||
"value": {
|
||||
"Text": "quoted-printable"
|
||||
"text": "quoted-printable"
|
||||
},
|
||||
"offset_field": 550,
|
||||
"offset_start": 576,
|
||||
"offset_end": 595
|
||||
}
|
||||
],
|
||||
"is_encoding_problem": false,
|
||||
"body": {
|
||||
"Text": "Die Hasen und die Frösche\r\n\r\nDie Hasen klagten einst über ihre mißliche Lage; \"wir leben\", sprach ein \r\nRedner, \"in steter Furcht vor Menschen und Tieren, eine Beute der Hunde, \r\nder Adler, ja fast aller Raubtiere! Unsere stete Angst ist ärger als der \r\nTod selbst. Auf, laßt uns ein für allemal sterben.\"\r\n\r\nIn einem nahen Teich wollten sie sich nun ersäufen; sie eilten ihm zu; \r\nallein das außerordentliche Getöse und ihre wunderbare Gestalt erschreckte \r\neine Menge Frösche, die am Ufer saßen, so sehr, daß sie aufs schnellste \r\nuntertauchten.\r\n\r\n\"Halt\", rief nun eben dieser Sprecher, \"wir wollen das Ersäufen noch ein \r\nwenig aufschieben, denn auch uns fürchten, wie ihr seht, einige Tiere, \r\nwelche also wohl noch unglücklicher sein müssen als wir.\"\r\n\r\n\r\n"
|
||||
},
|
||||
"offset_header": 0,
|
||||
"offset_body": 597,
|
||||
"offset_end": 1422
|
||||
"text": "Die Hasen und die Frösche\r\n\r\nDie Hasen klagten einst über ihre mißliche Lage; \"wir leben\", sprach ein \r\nRedner, \"in steter Furcht vor Menschen und Tieren, eine Beute der Hunde, \r\nder Adler, ja fast aller Raubtiere! Unsere stete Angst ist ärger als der \r\nTod selbst. Auf, laßt uns ein für allemal sterben.\"\r\n\r\nIn einem nahen Teich wollten sie sich nun ersäufen; sie eilten ihm zu; \r\nallein das außerordentliche Getöse und ihre wunderbare Gestalt erschreckte \r\neine Menge Frösche, die am Ufer saßen, so sehr, daß sie aufs schnellste \r\nuntertauchten.\r\n\r\n\"Halt\", rief nun eben dieser Sprecher, \"wir wollen das Ersäufen noch ein \r\nwenig aufschieben, denn auch uns fürchten, wie ihr seht, einige Tiere, \r\nwelche also wohl noch unglücklicher sein müssen als wir.\"\r\n\r\n\r\n",
|
||||
"decode_problems": []
|
||||
}
|
||||
]
|
||||
}
|
||||
@@ -1,69 +1,88 @@
|
||||
{
|
||||
"html_body": [
|
||||
0
|
||||
"messages": [
|
||||
{
|
||||
"id": 0,
|
||||
"root": 0,
|
||||
"container": null,
|
||||
"source": "raw",
|
||||
"text_body": [
|
||||
0
|
||||
],
|
||||
"html_body": [
|
||||
0
|
||||
],
|
||||
"attachments": [],
|
||||
"has_attachments": false
|
||||
}
|
||||
],
|
||||
"text_body": [
|
||||
0
|
||||
],
|
||||
"attachments": [],
|
||||
"parts": [
|
||||
{
|
||||
"id": 0,
|
||||
"message": 0,
|
||||
"parent": null,
|
||||
"kind": "text",
|
||||
"encoding": "quoted-printable",
|
||||
"flags": [],
|
||||
"roles": [
|
||||
"text_body",
|
||||
"html_body"
|
||||
],
|
||||
"role": "text_body",
|
||||
"offset_header": 0,
|
||||
"offset_body": 583,
|
||||
"offset_end": 1386,
|
||||
"headers": [
|
||||
{
|
||||
"name": "message_id",
|
||||
"name": "Message-Id",
|
||||
"value": {
|
||||
"Text": "4.2.0.58.20000519010441.00a8d140@pop.example.com"
|
||||
"text_list": [
|
||||
"4.2.0.58.20000519010441.00a8d140@pop.example.com"
|
||||
]
|
||||
},
|
||||
"offset_field": 0,
|
||||
"offset_start": 11,
|
||||
"offset_end": 63
|
||||
},
|
||||
{
|
||||
"name": {
|
||||
"other": "X-Sender"
|
||||
},
|
||||
"name": "X-Sender",
|
||||
"value": {
|
||||
"Text": "dwsauder@pop.example.com (Unverified)"
|
||||
"text": "dwsauder@pop.example.com (Unverified)"
|
||||
},
|
||||
"offset_field": 63,
|
||||
"offset_start": 72,
|
||||
"offset_end": 111
|
||||
},
|
||||
{
|
||||
"name": "disposition_notification_to",
|
||||
"name": "Disposition-Notification-To",
|
||||
"value": {
|
||||
"Text": "<dwsauder@example.com>"
|
||||
"text": "<dwsauder@example.com>"
|
||||
},
|
||||
"offset_field": 111,
|
||||
"offset_start": 139,
|
||||
"offset_end": 163
|
||||
},
|
||||
{
|
||||
"name": {
|
||||
"other": "X-Mailer"
|
||||
},
|
||||
"name": "X-Mailer",
|
||||
"value": {
|
||||
"Text": "QUALCOMM Windows Eudora Pro Version 4.2.0.58"
|
||||
"text": "QUALCOMM Windows Eudora Pro Version 4.2.0.58"
|
||||
},
|
||||
"offset_field": 163,
|
||||
"offset_start": 172,
|
||||
"offset_end": 219
|
||||
},
|
||||
{
|
||||
"name": {
|
||||
"other": "X-Priority"
|
||||
},
|
||||
"name": "X-Priority",
|
||||
"value": {
|
||||
"Text": "1 (Highest)"
|
||||
"text": "1 (Highest)"
|
||||
},
|
||||
"offset_field": 219,
|
||||
"offset_start": 230,
|
||||
"offset_end": 243
|
||||
},
|
||||
{
|
||||
"name": "date",
|
||||
"name": "Date",
|
||||
"value": {
|
||||
"DateTime": {
|
||||
"date_time": {
|
||||
"year": 2000,
|
||||
"month": 5,
|
||||
"day": 19,
|
||||
@@ -80,70 +99,70 @@
|
||||
"offset_end": 281
|
||||
},
|
||||
{
|
||||
"name": "to",
|
||||
"name": "To",
|
||||
"value": {
|
||||
"Address": {
|
||||
"List": [
|
||||
{
|
||||
"address": [
|
||||
{
|
||||
"mailbox": {
|
||||
"name": "Jürgen Schmürgen",
|
||||
"address": "jschmuergen@example.com"
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
"offset_field": 281,
|
||||
"offset_start": 284,
|
||||
"offset_end": 365
|
||||
},
|
||||
{
|
||||
"name": "from",
|
||||
"name": "From",
|
||||
"value": {
|
||||
"Address": {
|
||||
"List": [
|
||||
{
|
||||
"address": [
|
||||
{
|
||||
"mailbox": {
|
||||
"name": "Doug Sauder",
|
||||
"address": "dwsauder@example.com"
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
"offset_field": 365,
|
||||
"offset_start": 370,
|
||||
"offset_end": 406
|
||||
},
|
||||
{
|
||||
"name": "subject",
|
||||
"name": "Subject",
|
||||
"value": {
|
||||
"Text": "Die Hasen und die Frösche"
|
||||
"text": "Die Hasen und die Frösche"
|
||||
},
|
||||
"offset_field": 406,
|
||||
"offset_start": 414,
|
||||
"offset_end": 458
|
||||
},
|
||||
{
|
||||
"name": "mime_version",
|
||||
"name": "Mime-Version",
|
||||
"value": {
|
||||
"Text": "1.0"
|
||||
"text": "1.0"
|
||||
},
|
||||
"offset_field": 458,
|
||||
"offset_start": 471,
|
||||
"offset_end": 476
|
||||
},
|
||||
{
|
||||
"name": "content_type",
|
||||
"name": "Content-Type",
|
||||
"value": {
|
||||
"ContentType": {
|
||||
"c_type": "text",
|
||||
"c_subtype": "plain",
|
||||
"content_type": {
|
||||
"type": "text",
|
||||
"subtype": "plain",
|
||||
"attributes": [
|
||||
{
|
||||
"name": "charset",
|
||||
"value": "iso-8859-1"
|
||||
},
|
||||
{
|
||||
"name": "format",
|
||||
"value": "flowed"
|
||||
}
|
||||
[
|
||||
"charset",
|
||||
"iso-8859-1"
|
||||
],
|
||||
[
|
||||
"format",
|
||||
"flowed"
|
||||
]
|
||||
]
|
||||
}
|
||||
},
|
||||
@@ -152,22 +171,17 @@
|
||||
"offset_end": 538
|
||||
},
|
||||
{
|
||||
"name": "content_transfer_encoding",
|
||||
"name": "Content-Transfer-Encoding",
|
||||
"value": {
|
||||
"Text": "quoted-printable"
|
||||
"text": "quoted-printable"
|
||||
},
|
||||
"offset_field": 538,
|
||||
"offset_start": 564,
|
||||
"offset_end": 582
|
||||
}
|
||||
],
|
||||
"is_encoding_problem": false,
|
||||
"body": {
|
||||
"Text": "Die Hasen und die Frösche\n\nDie Hasen klagten einst über ihre mißliche Lage; \"wir leben\", sprach ein \nRedner, \"in steter Furcht vor Menschen und Tieren, eine Beute der Hunde, \nder Adler, ja fast aller Raubtiere! Unsere stete Angst ist ärger als der \nTod selbst. Auf, laßt uns ein für allemal sterben.\"\n\nIn einem nahen Teich wollten sie sich nun ersäufen; sie eilten ihm zu; \nallein das außerordentliche Getöse und ihre wunderbare Gestalt erschreckte \neine Menge Frösche, die am Ufer saßen, so sehr, daß sie aufs schnellste \nuntertauchten.\n\n\"Halt\", rief nun eben dieser Sprecher, \"wir wollen das Ersäufen noch ein \nwenig aufschieben, denn auch uns fürchten, wie ihr seht, einige Tiere, \nwelche also wohl noch unglücklicher sein müssen als wir.\"\n\n\n"
|
||||
},
|
||||
"offset_header": 0,
|
||||
"offset_body": 583,
|
||||
"offset_end": 1386
|
||||
"text": "Die Hasen und die Frösche\n\nDie Hasen klagten einst über ihre mißliche Lage; \"wir leben\", sprach ein \nRedner, \"in steter Furcht vor Menschen und Tieren, eine Beute der Hunde, \nder Adler, ja fast aller Raubtiere! Unsere stete Angst ist ärger als der \nTod selbst. Auf, laßt uns ein für allemal sterben.\"\n\nIn einem nahen Teich wollten sie sich nun ersäufen; sie eilten ihm zu; \nallein das außerordentliche Getöse und ihre wunderbare Gestalt erschreckte \neine Menge Frösche, die am Ufer saßen, so sehr, daß sie aufs schnellste \nuntertauchten.\n\n\"Halt\", rief nun eben dieser Sprecher, \"wir wollen das Ersäufen noch ein \nwenig aufschieben, denn auch uns fürchten, wie ihr seht, einige Tiere, \nwelche also wohl noch unglücklicher sein müssen als wir.\"\n\n\n",
|
||||
"decode_problems": []
|
||||
}
|
||||
]
|
||||
}
|
||||
@@ -1,60 +1,79 @@
|
||||
{
|
||||
"html_body": [
|
||||
0
|
||||
"messages": [
|
||||
{
|
||||
"id": 0,
|
||||
"root": 0,
|
||||
"container": null,
|
||||
"source": "raw",
|
||||
"text_body": [
|
||||
0
|
||||
],
|
||||
"html_body": [
|
||||
0
|
||||
],
|
||||
"attachments": [],
|
||||
"has_attachments": false
|
||||
}
|
||||
],
|
||||
"text_body": [
|
||||
0
|
||||
],
|
||||
"attachments": [],
|
||||
"parts": [
|
||||
{
|
||||
"id": 0,
|
||||
"message": 0,
|
||||
"parent": null,
|
||||
"kind": "text",
|
||||
"encoding": "none",
|
||||
"flags": [],
|
||||
"roles": [
|
||||
"text_body",
|
||||
"html_body"
|
||||
],
|
||||
"role": "text_body",
|
||||
"offset_header": 0,
|
||||
"offset_body": 454,
|
||||
"offset_end": 1203,
|
||||
"headers": [
|
||||
{
|
||||
"name": "message_id",
|
||||
"name": "Message-Id",
|
||||
"value": {
|
||||
"Text": "4.2.0.58.20000519010842.00a8c7f0@pop.example.com"
|
||||
"text_list": [
|
||||
"4.2.0.58.20000519010842.00a8c7f0@pop.example.com"
|
||||
]
|
||||
},
|
||||
"offset_field": 0,
|
||||
"offset_start": 11,
|
||||
"offset_end": 64
|
||||
},
|
||||
{
|
||||
"name": {
|
||||
"other": "X-Sender"
|
||||
},
|
||||
"name": "X-Sender",
|
||||
"value": {
|
||||
"Text": "dwsauder@pop.example.com (Unverified)"
|
||||
"text": "dwsauder@pop.example.com (Unverified)"
|
||||
},
|
||||
"offset_field": 64,
|
||||
"offset_start": 73,
|
||||
"offset_end": 113
|
||||
},
|
||||
{
|
||||
"name": {
|
||||
"other": "X-Mailer"
|
||||
},
|
||||
"name": "X-Mailer",
|
||||
"value": {
|
||||
"Text": "QUALCOMM Windows Eudora Pro Version 4.2.0.58"
|
||||
"text": "QUALCOMM Windows Eudora Pro Version 4.2.0.58"
|
||||
},
|
||||
"offset_field": 113,
|
||||
"offset_start": 122,
|
||||
"offset_end": 170
|
||||
},
|
||||
{
|
||||
"name": {
|
||||
"other": "X-Priority"
|
||||
},
|
||||
"name": "X-Priority",
|
||||
"value": {
|
||||
"Text": "1 (Highest)"
|
||||
"text": "1 (Highest)"
|
||||
},
|
||||
"offset_field": 170,
|
||||
"offset_start": 181,
|
||||
"offset_end": 195
|
||||
},
|
||||
{
|
||||
"name": "date",
|
||||
"name": "Date",
|
||||
"value": {
|
||||
"DateTime": {
|
||||
"date_time": {
|
||||
"year": 2000,
|
||||
"month": 5,
|
||||
"day": 19,
|
||||
@@ -71,66 +90,66 @@
|
||||
"offset_end": 234
|
||||
},
|
||||
{
|
||||
"name": "to",
|
||||
"name": "To",
|
||||
"value": {
|
||||
"Address": {
|
||||
"List": [
|
||||
{
|
||||
"address": [
|
||||
{
|
||||
"mailbox": {
|
||||
"name": "Heinz M�ller",
|
||||
"address": "mueller@example.com"
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
"offset_field": 234,
|
||||
"offset_start": 237,
|
||||
"offset_end": 274
|
||||
},
|
||||
{
|
||||
"name": "from",
|
||||
"name": "From",
|
||||
"value": {
|
||||
"Address": {
|
||||
"List": [
|
||||
{
|
||||
"address": [
|
||||
{
|
||||
"mailbox": {
|
||||
"name": "Doug Sauder",
|
||||
"address": "dwsauder@example.com"
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
"offset_field": 274,
|
||||
"offset_start": 279,
|
||||
"offset_end": 316
|
||||
},
|
||||
{
|
||||
"name": "subject",
|
||||
"name": "Subject",
|
||||
"value": {
|
||||
"Text": "Die Hasen und die Fr�sche"
|
||||
"text": "Die Hasen und die Fr�sche"
|
||||
},
|
||||
"offset_field": 316,
|
||||
"offset_start": 324,
|
||||
"offset_end": 352
|
||||
},
|
||||
{
|
||||
"name": "mime_version",
|
||||
"name": "Mime-Version",
|
||||
"value": {
|
||||
"Text": "1.0"
|
||||
"text": "1.0"
|
||||
},
|
||||
"offset_field": 352,
|
||||
"offset_start": 365,
|
||||
"offset_end": 371
|
||||
},
|
||||
{
|
||||
"name": "content_type",
|
||||
"name": "Content-Type",
|
||||
"value": {
|
||||
"ContentType": {
|
||||
"c_type": "text",
|
||||
"c_subtype": "plain",
|
||||
"content_type": {
|
||||
"type": "text",
|
||||
"subtype": "plain",
|
||||
"attributes": [
|
||||
{
|
||||
"name": "charset",
|
||||
"value": "iso-8859-1"
|
||||
}
|
||||
[
|
||||
"charset",
|
||||
"iso-8859-1"
|
||||
]
|
||||
]
|
||||
}
|
||||
},
|
||||
@@ -139,22 +158,17 @@
|
||||
"offset_end": 419
|
||||
},
|
||||
{
|
||||
"name": "content_transfer_encoding",
|
||||
"name": "Content-Transfer-Encoding",
|
||||
"value": {
|
||||
"Text": "8bit"
|
||||
"text": "8bit"
|
||||
},
|
||||
"offset_field": 419,
|
||||
"offset_start": 445,
|
||||
"offset_end": 452
|
||||
}
|
||||
],
|
||||
"is_encoding_problem": false,
|
||||
"body": {
|
||||
"Text": "Die Hasen und die Frösche\r\n\r\nDie Hasen klagten einst über ihre mißliche Lage; \"wir leben\", sprach ein Redner, \"in steter Furcht vor Menschen und Tieren, eine Beute der Hunde, der Adler, ja fast aller Raubtiere! Unsere stete Angst ist ärger als der Tod selbst. Auf, laßt uns ein für allemal sterben.\" \r\n\r\nIn einem nahen Teich wollten sie sich nun ersäufen; sie eilten ihm zu; allein das außerordentliche Getöse und ihre wunderbare Gestalt erschreckte eine Menge Frösche, die am Ufer saßen, so sehr, daß sie aufs schnellste untertauchten. \r\n\r\n\"Halt\", rief nun eben dieser Sprecher, \"wir wollen das Ersäufen noch ein wenig aufschieben, denn auch uns fürchten, wie ihr seht, einige Tiere, welche also wohl noch unglücklicher sein müssen als wir.\" \r\n\r\n\r\n"
|
||||
},
|
||||
"offset_header": 0,
|
||||
"offset_body": 454,
|
||||
"offset_end": 1203
|
||||
"text": "Die Hasen und die Frösche\r\n\r\nDie Hasen klagten einst über ihre mißliche Lage; \"wir leben\", sprach ein Redner, \"in steter Furcht vor Menschen und Tieren, eine Beute der Hunde, der Adler, ja fast aller Raubtiere! Unsere stete Angst ist ärger als der Tod selbst. Auf, laßt uns ein für allemal sterben.\" \r\n\r\nIn einem nahen Teich wollten sie sich nun ersäufen; sie eilten ihm zu; allein das außerordentliche Getöse und ihre wunderbare Gestalt erschreckte eine Menge Frösche, die am Ufer saßen, so sehr, daß sie aufs schnellste untertauchten. \r\n\r\n\"Halt\", rief nun eben dieser Sprecher, \"wir wollen das Ersäufen noch ein wenig aufschieben, denn auch uns fürchten, wie ihr seht, einige Tiere, welche also wohl noch unglücklicher sein müssen als wir.\" \r\n\r\n\r\n",
|
||||
"decode_problems": []
|
||||
}
|
||||
]
|
||||
}
|
||||
@@ -1,60 +1,79 @@
|
||||
{
|
||||
"html_body": [
|
||||
0
|
||||
"messages": [
|
||||
{
|
||||
"id": 0,
|
||||
"root": 0,
|
||||
"container": null,
|
||||
"source": "raw",
|
||||
"text_body": [
|
||||
0
|
||||
],
|
||||
"html_body": [
|
||||
0
|
||||
],
|
||||
"attachments": [],
|
||||
"has_attachments": false
|
||||
}
|
||||
],
|
||||
"text_body": [
|
||||
0
|
||||
],
|
||||
"attachments": [],
|
||||
"parts": [
|
||||
{
|
||||
"id": 0,
|
||||
"message": 0,
|
||||
"parent": null,
|
||||
"kind": "text",
|
||||
"encoding": "none",
|
||||
"flags": [],
|
||||
"roles": [
|
||||
"text_body",
|
||||
"html_body"
|
||||
],
|
||||
"role": "text_body",
|
||||
"offset_header": 0,
|
||||
"offset_body": 442,
|
||||
"offset_end": 1182,
|
||||
"headers": [
|
||||
{
|
||||
"name": "message_id",
|
||||
"name": "Message-Id",
|
||||
"value": {
|
||||
"Text": "4.2.0.58.20000519010842.00a8c7f0@pop.example.com"
|
||||
"text_list": [
|
||||
"4.2.0.58.20000519010842.00a8c7f0@pop.example.com"
|
||||
]
|
||||
},
|
||||
"offset_field": 0,
|
||||
"offset_start": 11,
|
||||
"offset_end": 63
|
||||
},
|
||||
{
|
||||
"name": {
|
||||
"other": "X-Sender"
|
||||
},
|
||||
"name": "X-Sender",
|
||||
"value": {
|
||||
"Text": "dwsauder@pop.example.com (Unverified)"
|
||||
"text": "dwsauder@pop.example.com (Unverified)"
|
||||
},
|
||||
"offset_field": 63,
|
||||
"offset_start": 72,
|
||||
"offset_end": 111
|
||||
},
|
||||
{
|
||||
"name": {
|
||||
"other": "X-Mailer"
|
||||
},
|
||||
"name": "X-Mailer",
|
||||
"value": {
|
||||
"Text": "QUALCOMM Windows Eudora Pro Version 4.2.0.58"
|
||||
"text": "QUALCOMM Windows Eudora Pro Version 4.2.0.58"
|
||||
},
|
||||
"offset_field": 111,
|
||||
"offset_start": 120,
|
||||
"offset_end": 167
|
||||
},
|
||||
{
|
||||
"name": {
|
||||
"other": "X-Priority"
|
||||
},
|
||||
"name": "X-Priority",
|
||||
"value": {
|
||||
"Text": "1 (Highest)"
|
||||
"text": "1 (Highest)"
|
||||
},
|
||||
"offset_field": 167,
|
||||
"offset_start": 178,
|
||||
"offset_end": 191
|
||||
},
|
||||
{
|
||||
"name": "date",
|
||||
"name": "Date",
|
||||
"value": {
|
||||
"DateTime": {
|
||||
"date_time": {
|
||||
"year": 2000,
|
||||
"month": 5,
|
||||
"day": 19,
|
||||
@@ -71,66 +90,66 @@
|
||||
"offset_end": 229
|
||||
},
|
||||
{
|
||||
"name": "to",
|
||||
"name": "To",
|
||||
"value": {
|
||||
"Address": {
|
||||
"List": [
|
||||
{
|
||||
"address": [
|
||||
{
|
||||
"mailbox": {
|
||||
"name": "Heinz M�ller",
|
||||
"address": "mueller@example.com"
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
"offset_field": 229,
|
||||
"offset_start": 232,
|
||||
"offset_end": 268
|
||||
},
|
||||
{
|
||||
"name": "from",
|
||||
"name": "From",
|
||||
"value": {
|
||||
"Address": {
|
||||
"List": [
|
||||
{
|
||||
"address": [
|
||||
{
|
||||
"mailbox": {
|
||||
"name": "Doug Sauder",
|
||||
"address": "dwsauder@example.com"
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
"offset_field": 268,
|
||||
"offset_start": 273,
|
||||
"offset_end": 309
|
||||
},
|
||||
{
|
||||
"name": "subject",
|
||||
"name": "Subject",
|
||||
"value": {
|
||||
"Text": "Die Hasen und die Fr�sche"
|
||||
"text": "Die Hasen und die Fr�sche"
|
||||
},
|
||||
"offset_field": 309,
|
||||
"offset_start": 317,
|
||||
"offset_end": 344
|
||||
},
|
||||
{
|
||||
"name": "mime_version",
|
||||
"name": "Mime-Version",
|
||||
"value": {
|
||||
"Text": "1.0"
|
||||
"text": "1.0"
|
||||
},
|
||||
"offset_field": 344,
|
||||
"offset_start": 357,
|
||||
"offset_end": 362
|
||||
},
|
||||
{
|
||||
"name": "content_type",
|
||||
"name": "Content-Type",
|
||||
"value": {
|
||||
"ContentType": {
|
||||
"c_type": "text",
|
||||
"c_subtype": "plain",
|
||||
"content_type": {
|
||||
"type": "text",
|
||||
"subtype": "plain",
|
||||
"attributes": [
|
||||
{
|
||||
"name": "charset",
|
||||
"value": "iso-8859-1"
|
||||
}
|
||||
[
|
||||
"charset",
|
||||
"iso-8859-1"
|
||||
]
|
||||
]
|
||||
}
|
||||
},
|
||||
@@ -139,22 +158,17 @@
|
||||
"offset_end": 409
|
||||
},
|
||||
{
|
||||
"name": "content_transfer_encoding",
|
||||
"name": "Content-Transfer-Encoding",
|
||||
"value": {
|
||||
"Text": "8bit"
|
||||
"text": "8bit"
|
||||
},
|
||||
"offset_field": 409,
|
||||
"offset_start": 435,
|
||||
"offset_end": 441
|
||||
}
|
||||
],
|
||||
"is_encoding_problem": false,
|
||||
"body": {
|
||||
"Text": "Die Hasen und die Frösche\n\nDie Hasen klagten einst über ihre mißliche Lage; \"wir leben\", sprach ein Redner, \"in steter Furcht vor Menschen und Tieren, eine Beute der Hunde, der Adler, ja fast aller Raubtiere! Unsere stete Angst ist ärger als der Tod selbst. Auf, laßt uns ein für allemal sterben.\" \n\nIn einem nahen Teich wollten sie sich nun ersäufen; sie eilten ihm zu; allein das außerordentliche Getöse und ihre wunderbare Gestalt erschreckte eine Menge Frösche, die am Ufer saßen, so sehr, daß sie aufs schnellste untertauchten. \n\n\"Halt\", rief nun eben dieser Sprecher, \"wir wollen das Ersäufen noch ein wenig aufschieben, denn auch uns fürchten, wie ihr seht, einige Tiere, welche also wohl noch unglücklicher sein müssen als wir.\" \n\n\n"
|
||||
},
|
||||
"offset_header": 0,
|
||||
"offset_body": 442,
|
||||
"offset_end": 1182
|
||||
"text": "Die Hasen und die Frösche\n\nDie Hasen klagten einst über ihre mißliche Lage; \"wir leben\", sprach ein Redner, \"in steter Furcht vor Menschen und Tieren, eine Beute der Hunde, der Adler, ja fast aller Raubtiere! Unsere stete Angst ist ärger als der Tod selbst. Auf, laßt uns ein für allemal sterben.\" \n\nIn einem nahen Teich wollten sie sich nun ersäufen; sie eilten ihm zu; allein das außerordentliche Getöse und ihre wunderbare Gestalt erschreckte eine Menge Frösche, die am Ufer saßen, so sehr, daß sie aufs schnellste untertauchten. \n\n\"Halt\", rief nun eben dieser Sprecher, \"wir wollen das Ersäufen noch ein wenig aufschieben, denn auch uns fürchten, wie ihr seht, einige Tiere, welche also wohl noch unglücklicher sein müssen als wir.\" \n\n\n",
|
||||
"decode_problems": []
|
||||
}
|
||||
]
|
||||
}
|
||||
@@ -1,49 +1,70 @@
|
||||
{
|
||||
"html_body": [
|
||||
0
|
||||
"messages": [
|
||||
{
|
||||
"id": 0,
|
||||
"root": 0,
|
||||
"container": null,
|
||||
"source": "raw",
|
||||
"text_body": [
|
||||
0
|
||||
],
|
||||
"html_body": [
|
||||
0
|
||||
],
|
||||
"attachments": [],
|
||||
"has_attachments": false
|
||||
}
|
||||
],
|
||||
"text_body": [
|
||||
0
|
||||
],
|
||||
"attachments": [],
|
||||
"parts": [
|
||||
{
|
||||
"id": 0,
|
||||
"message": 0,
|
||||
"parent": null,
|
||||
"kind": "text",
|
||||
"encoding": "quoted-printable",
|
||||
"flags": [],
|
||||
"roles": [
|
||||
"text_body",
|
||||
"html_body"
|
||||
],
|
||||
"role": "text_body",
|
||||
"offset_header": 0,
|
||||
"offset_body": 510,
|
||||
"offset_end": 1321,
|
||||
"headers": [
|
||||
{
|
||||
"name": "message_id",
|
||||
"name": "Message-Id",
|
||||
"value": {
|
||||
"Text": "4.2.0.58.20000519001217.00a85b60@pop.example.com"
|
||||
"text_list": [
|
||||
"4.2.0.58.20000519001217.00a85b60@pop.example.com"
|
||||
]
|
||||
},
|
||||
"offset_field": 0,
|
||||
"offset_start": 11,
|
||||
"offset_end": 64
|
||||
},
|
||||
{
|
||||
"name": {
|
||||
"other": "X-Sender"
|
||||
},
|
||||
"name": "X-Sender",
|
||||
"value": {
|
||||
"Text": "dwsauder@pop.example.com (Unverified)"
|
||||
"text": "dwsauder@pop.example.com (Unverified)"
|
||||
},
|
||||
"offset_field": 64,
|
||||
"offset_start": 73,
|
||||
"offset_end": 113
|
||||
},
|
||||
{
|
||||
"name": {
|
||||
"other": "X-Mailer"
|
||||
},
|
||||
"name": "X-Mailer",
|
||||
"value": {
|
||||
"Text": "QUALCOMM Windows Eudora Pro Version 4.2.0.58"
|
||||
"text": "QUALCOMM Windows Eudora Pro Version 4.2.0.58"
|
||||
},
|
||||
"offset_field": 113,
|
||||
"offset_start": 122,
|
||||
"offset_end": 170
|
||||
},
|
||||
{
|
||||
"name": "date",
|
||||
"name": "Date",
|
||||
"value": {
|
||||
"DateTime": {
|
||||
"date_time": {
|
||||
"year": 2000,
|
||||
"month": 5,
|
||||
"day": 19,
|
||||
@@ -60,66 +81,66 @@
|
||||
"offset_end": 209
|
||||
},
|
||||
{
|
||||
"name": "to",
|
||||
"name": "To",
|
||||
"value": {
|
||||
"Address": {
|
||||
"List": [
|
||||
{
|
||||
"address": [
|
||||
{
|
||||
"mailbox": {
|
||||
"name": "Jürgen Schmürgen",
|
||||
"address": "jschmuergen@example.com"
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
"offset_field": 209,
|
||||
"offset_start": 212,
|
||||
"offset_end": 299
|
||||
},
|
||||
{
|
||||
"name": "from",
|
||||
"name": "From",
|
||||
"value": {
|
||||
"Address": {
|
||||
"List": [
|
||||
{
|
||||
"address": [
|
||||
{
|
||||
"mailbox": {
|
||||
"name": "Doug Sauder",
|
||||
"address": "dwsauder@example.com"
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
"offset_field": 299,
|
||||
"offset_start": 304,
|
||||
"offset_end": 341
|
||||
},
|
||||
{
|
||||
"name": "subject",
|
||||
"name": "Subject",
|
||||
"value": {
|
||||
"Text": "Die Hasen und die Frösche"
|
||||
"text": "Die Hasen und die Frösche"
|
||||
},
|
||||
"offset_field": 341,
|
||||
"offset_start": 349,
|
||||
"offset_end": 396
|
||||
},
|
||||
{
|
||||
"name": "mime_version",
|
||||
"name": "Mime-Version",
|
||||
"value": {
|
||||
"Text": "1.0"
|
||||
"text": "1.0"
|
||||
},
|
||||
"offset_field": 396,
|
||||
"offset_start": 409,
|
||||
"offset_end": 415
|
||||
},
|
||||
{
|
||||
"name": "content_type",
|
||||
"name": "Content-Type",
|
||||
"value": {
|
||||
"ContentType": {
|
||||
"c_type": "text",
|
||||
"c_subtype": "plain",
|
||||
"content_type": {
|
||||
"type": "text",
|
||||
"subtype": "plain",
|
||||
"attributes": [
|
||||
{
|
||||
"name": "charset",
|
||||
"value": "iso-8859-1"
|
||||
}
|
||||
[
|
||||
"charset",
|
||||
"iso-8859-1"
|
||||
]
|
||||
]
|
||||
}
|
||||
},
|
||||
@@ -128,22 +149,17 @@
|
||||
"offset_end": 463
|
||||
},
|
||||
{
|
||||
"name": "content_transfer_encoding",
|
||||
"name": "Content-Transfer-Encoding",
|
||||
"value": {
|
||||
"Text": "quoted-printable"
|
||||
"text": "quoted-printable"
|
||||
},
|
||||
"offset_field": 463,
|
||||
"offset_start": 489,
|
||||
"offset_end": 508
|
||||
}
|
||||
],
|
||||
"is_encoding_problem": false,
|
||||
"body": {
|
||||
"Text": "Die Hasen und die Frösche\r\n\r\nDie Hasen klagten einst über ihre mißliche Lage; \"wir leben\", sprach ein Redner, \"in steter Furcht vor Menschen und Tieren, eine Beute der Hunde, der Adler, ja fast aller Raubtiere! Unsere stete Angst ist ärger als der Tod selbst. Auf, laßt uns ein für allemal sterben.\" \r\n\r\nIn einem nahen Teich wollten sie sich nun ersäufen; sie eilten ihm zu; allein das außerordentliche Getöse und ihre wunderbare Gestalt erschreckte eine Menge Frösche, die am Ufer saßen, so sehr, daß sie aufs schnellste untertauchten. \r\n\r\n\"Halt\", rief nun eben dieser Sprecher, \"wir wollen das Ersäufen noch ein wenig aufschieben, denn auch uns fürchten, wie ihr seht, einige Tiere, welche also wohl noch unglücklicher sein müssen als wir.\" \r\n\r\n\r\n"
|
||||
},
|
||||
"offset_header": 0,
|
||||
"offset_body": 510,
|
||||
"offset_end": 1321
|
||||
"text": "Die Hasen und die Frösche\r\n\r\nDie Hasen klagten einst über ihre mißliche Lage; \"wir leben\", sprach ein Redner, \"in steter Furcht vor Menschen und Tieren, eine Beute der Hunde, der Adler, ja fast aller Raubtiere! Unsere stete Angst ist ärger als der Tod selbst. Auf, laßt uns ein für allemal sterben.\" \r\n\r\nIn einem nahen Teich wollten sie sich nun ersäufen; sie eilten ihm zu; allein das außerordentliche Getöse und ihre wunderbare Gestalt erschreckte eine Menge Frösche, die am Ufer saßen, so sehr, daß sie aufs schnellste untertauchten. \r\n\r\n\"Halt\", rief nun eben dieser Sprecher, \"wir wollen das Ersäufen noch ein wenig aufschieben, denn auch uns fürchten, wie ihr seht, einige Tiere, welche also wohl noch unglücklicher sein müssen als wir.\" \r\n\r\n\r\n",
|
||||
"decode_problems": []
|
||||
}
|
||||
]
|
||||
}
|
||||
@@ -1,49 +1,70 @@
|
||||
{
|
||||
"html_body": [
|
||||
0
|
||||
"messages": [
|
||||
{
|
||||
"id": 0,
|
||||
"root": 0,
|
||||
"container": null,
|
||||
"source": "raw",
|
||||
"text_body": [
|
||||
0
|
||||
],
|
||||
"html_body": [
|
||||
0
|
||||
],
|
||||
"attachments": [],
|
||||
"has_attachments": false
|
||||
}
|
||||
],
|
||||
"text_body": [
|
||||
0
|
||||
],
|
||||
"attachments": [],
|
||||
"parts": [
|
||||
{
|
||||
"id": 0,
|
||||
"message": 0,
|
||||
"parent": null,
|
||||
"kind": "text",
|
||||
"encoding": "quoted-printable",
|
||||
"flags": [],
|
||||
"roles": [
|
||||
"text_body",
|
||||
"html_body"
|
||||
],
|
||||
"role": "text_body",
|
||||
"offset_header": 0,
|
||||
"offset_body": 498,
|
||||
"offset_end": 1292,
|
||||
"headers": [
|
||||
{
|
||||
"name": "message_id",
|
||||
"name": "Message-Id",
|
||||
"value": {
|
||||
"Text": "4.2.0.58.20000519001217.00a85b60@pop.example.com"
|
||||
"text_list": [
|
||||
"4.2.0.58.20000519001217.00a85b60@pop.example.com"
|
||||
]
|
||||
},
|
||||
"offset_field": 0,
|
||||
"offset_start": 11,
|
||||
"offset_end": 63
|
||||
},
|
||||
{
|
||||
"name": {
|
||||
"other": "X-Sender"
|
||||
},
|
||||
"name": "X-Sender",
|
||||
"value": {
|
||||
"Text": "dwsauder@pop.example.com (Unverified)"
|
||||
"text": "dwsauder@pop.example.com (Unverified)"
|
||||
},
|
||||
"offset_field": 63,
|
||||
"offset_start": 72,
|
||||
"offset_end": 111
|
||||
},
|
||||
{
|
||||
"name": {
|
||||
"other": "X-Mailer"
|
||||
},
|
||||
"name": "X-Mailer",
|
||||
"value": {
|
||||
"Text": "QUALCOMM Windows Eudora Pro Version 4.2.0.58"
|
||||
"text": "QUALCOMM Windows Eudora Pro Version 4.2.0.58"
|
||||
},
|
||||
"offset_field": 111,
|
||||
"offset_start": 120,
|
||||
"offset_end": 167
|
||||
},
|
||||
{
|
||||
"name": "date",
|
||||
"name": "Date",
|
||||
"value": {
|
||||
"DateTime": {
|
||||
"date_time": {
|
||||
"year": 2000,
|
||||
"month": 5,
|
||||
"day": 19,
|
||||
@@ -60,66 +81,66 @@
|
||||
"offset_end": 205
|
||||
},
|
||||
{
|
||||
"name": "to",
|
||||
"name": "To",
|
||||
"value": {
|
||||
"Address": {
|
||||
"List": [
|
||||
{
|
||||
"address": [
|
||||
{
|
||||
"mailbox": {
|
||||
"name": "Jürgen Schmürgen",
|
||||
"address": "jschmuergen@example.com"
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
"offset_field": 205,
|
||||
"offset_start": 208,
|
||||
"offset_end": 293
|
||||
},
|
||||
{
|
||||
"name": "from",
|
||||
"name": "From",
|
||||
"value": {
|
||||
"Address": {
|
||||
"List": [
|
||||
{
|
||||
"address": [
|
||||
{
|
||||
"mailbox": {
|
||||
"name": "Doug Sauder",
|
||||
"address": "dwsauder@example.com"
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
"offset_field": 293,
|
||||
"offset_start": 298,
|
||||
"offset_end": 334
|
||||
},
|
||||
{
|
||||
"name": "subject",
|
||||
"name": "Subject",
|
||||
"value": {
|
||||
"Text": "Die Hasen und die Frösche"
|
||||
"text": "Die Hasen und die Frösche"
|
||||
},
|
||||
"offset_field": 334,
|
||||
"offset_start": 342,
|
||||
"offset_end": 388
|
||||
},
|
||||
{
|
||||
"name": "mime_version",
|
||||
"name": "Mime-Version",
|
||||
"value": {
|
||||
"Text": "1.0"
|
||||
"text": "1.0"
|
||||
},
|
||||
"offset_field": 388,
|
||||
"offset_start": 401,
|
||||
"offset_end": 406
|
||||
},
|
||||
{
|
||||
"name": "content_type",
|
||||
"name": "Content-Type",
|
||||
"value": {
|
||||
"ContentType": {
|
||||
"c_type": "text",
|
||||
"c_subtype": "plain",
|
||||
"content_type": {
|
||||
"type": "text",
|
||||
"subtype": "plain",
|
||||
"attributes": [
|
||||
{
|
||||
"name": "charset",
|
||||
"value": "iso-8859-1"
|
||||
}
|
||||
[
|
||||
"charset",
|
||||
"iso-8859-1"
|
||||
]
|
||||
]
|
||||
}
|
||||
},
|
||||
@@ -128,22 +149,17 @@
|
||||
"offset_end": 453
|
||||
},
|
||||
{
|
||||
"name": "content_transfer_encoding",
|
||||
"name": "Content-Transfer-Encoding",
|
||||
"value": {
|
||||
"Text": "quoted-printable"
|
||||
"text": "quoted-printable"
|
||||
},
|
||||
"offset_field": 453,
|
||||
"offset_start": 479,
|
||||
"offset_end": 497
|
||||
}
|
||||
],
|
||||
"is_encoding_problem": false,
|
||||
"body": {
|
||||
"Text": "Die Hasen und die Frösche\n\nDie Hasen klagten einst über ihre mißliche Lage; \"wir leben\", sprach ein Redner, \"in steter Furcht vor Menschen und Tieren, eine Beute der Hunde, der Adler, ja fast aller Raubtiere! Unsere stete Angst ist ärger als der Tod selbst. Auf, laßt uns ein für allemal sterben.\" \n\nIn einem nahen Teich wollten sie sich nun ersäufen; sie eilten ihm zu; allein das außerordentliche Getöse und ihre wunderbare Gestalt erschreckte eine Menge Frösche, die am Ufer saßen, so sehr, daß sie aufs schnellste untertauchten. \n\n\"Halt\", rief nun eben dieser Sprecher, \"wir wollen das Ersäufen noch ein wenig aufschieben, denn auch uns fürchten, wie ihr seht, einige Tiere, welche also wohl noch unglücklicher sein müssen als wir.\" \n\n\n"
|
||||
},
|
||||
"offset_header": 0,
|
||||
"offset_body": 498,
|
||||
"offset_end": 1292
|
||||
"text": "Die Hasen und die Frösche\n\nDie Hasen klagten einst über ihre mißliche Lage; \"wir leben\", sprach ein Redner, \"in steter Furcht vor Menschen und Tieren, eine Beute der Hunde, der Adler, ja fast aller Raubtiere! Unsere stete Angst ist ärger als der Tod selbst. Auf, laßt uns ein für allemal sterben.\" \n\nIn einem nahen Teich wollten sie sich nun ersäufen; sie eilten ihm zu; allein das außerordentliche Getöse und ihre wunderbare Gestalt erschreckte eine Menge Frösche, die am Ufer saßen, so sehr, daß sie aufs schnellste untertauchten. \n\n\"Halt\", rief nun eben dieser Sprecher, \"wir wollen das Ersäufen noch ein wenig aufschieben, denn auch uns fürchten, wie ihr seht, einige Tiere, welche also wohl noch unglücklicher sein müssen als wir.\" \n\n\n",
|
||||
"decode_problems": []
|
||||
}
|
||||
]
|
||||
}
|
||||
@@ -1,59 +1,82 @@
|
||||
{
|
||||
"html_body": [
|
||||
0
|
||||
"messages": [
|
||||
{
|
||||
"id": 0,
|
||||
"root": 0,
|
||||
"container": null,
|
||||
"source": "raw",
|
||||
"text_body": [
|
||||
0
|
||||
],
|
||||
"html_body": [
|
||||
0
|
||||
],
|
||||
"attachments": [],
|
||||
"has_attachments": false
|
||||
}
|
||||
],
|
||||
"text_body": [
|
||||
0
|
||||
],
|
||||
"attachments": [],
|
||||
"parts": [
|
||||
{
|
||||
"id": 0,
|
||||
"message": 0,
|
||||
"parent": null,
|
||||
"kind": "text",
|
||||
"encoding": "quoted-printable",
|
||||
"flags": [],
|
||||
"roles": [
|
||||
"text_body",
|
||||
"html_body"
|
||||
],
|
||||
"role": "text_body",
|
||||
"offset_header": 0,
|
||||
"offset_body": 594,
|
||||
"offset_end": 1401,
|
||||
"headers": [
|
||||
{
|
||||
"name": "from",
|
||||
"name": "From",
|
||||
"value": {
|
||||
"Address": {
|
||||
"List": [
|
||||
{
|
||||
"address": [
|
||||
{
|
||||
"mailbox": {
|
||||
"name": "Doug Sauder",
|
||||
"address": "doug@example.com"
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
"offset_field": 0,
|
||||
"offset_start": 5,
|
||||
"offset_end": 40
|
||||
},
|
||||
{
|
||||
"name": "to",
|
||||
"name": "To",
|
||||
"value": {
|
||||
"Address": {
|
||||
"List": [
|
||||
{
|
||||
"address": [
|
||||
{
|
||||
"mailbox": {
|
||||
"name": "Heinz Müller",
|
||||
"address": "mueller@example.com"
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
"offset_field": 40,
|
||||
"offset_start": 43,
|
||||
"offset_end": 101
|
||||
},
|
||||
{
|
||||
"name": "subject",
|
||||
"name": "Subject",
|
||||
"value": {
|
||||
"Text": "Die Hasen und die Frösche (Microsoft Outlook 00)"
|
||||
"text": "Die Hasen und die Frösche (Microsoft Outlook 00)"
|
||||
},
|
||||
"offset_field": 101,
|
||||
"offset_start": 109,
|
||||
"offset_end": 185
|
||||
},
|
||||
{
|
||||
"name": "date",
|
||||
"name": "Date",
|
||||
"value": {
|
||||
"DateTime": {
|
||||
"date_time": {
|
||||
"year": 2000,
|
||||
"month": 5,
|
||||
"day": 17,
|
||||
@@ -70,34 +93,36 @@
|
||||
"offset_end": 224
|
||||
},
|
||||
{
|
||||
"name": "message_id",
|
||||
"name": "Message-ID",
|
||||
"value": {
|
||||
"Text": "NDBBIAKOPKHFGPLCODIGCEKECHAA.doug@example.com"
|
||||
"text_list": [
|
||||
"NDBBIAKOPKHFGPLCODIGCEKECHAA.doug@example.com"
|
||||
]
|
||||
},
|
||||
"offset_field": 224,
|
||||
"offset_start": 235,
|
||||
"offset_end": 285
|
||||
},
|
||||
{
|
||||
"name": "mime_version",
|
||||
"name": "MIME-Version",
|
||||
"value": {
|
||||
"Text": "1.0"
|
||||
"text": "1.0"
|
||||
},
|
||||
"offset_field": 285,
|
||||
"offset_start": 298,
|
||||
"offset_end": 304
|
||||
},
|
||||
{
|
||||
"name": "content_type",
|
||||
"name": "Content-Type",
|
||||
"value": {
|
||||
"ContentType": {
|
||||
"c_type": "text",
|
||||
"c_subtype": "plain",
|
||||
"content_type": {
|
||||
"type": "text",
|
||||
"subtype": "plain",
|
||||
"attributes": [
|
||||
{
|
||||
"name": "charset",
|
||||
"value": "Windows-1252"
|
||||
}
|
||||
[
|
||||
"charset",
|
||||
"Windows-1252"
|
||||
]
|
||||
]
|
||||
}
|
||||
},
|
||||
@@ -106,75 +131,62 @@
|
||||
"offset_end": 356
|
||||
},
|
||||
{
|
||||
"name": "content_transfer_encoding",
|
||||
"name": "Content-Transfer-Encoding",
|
||||
"value": {
|
||||
"Text": "quoted-printable"
|
||||
"text": "quoted-printable"
|
||||
},
|
||||
"offset_field": 356,
|
||||
"offset_start": 382,
|
||||
"offset_end": 401
|
||||
},
|
||||
{
|
||||
"name": {
|
||||
"other": "X-Priority"
|
||||
},
|
||||
"name": "X-Priority",
|
||||
"value": {
|
||||
"Text": "3 (Normal)"
|
||||
"text": "3 (Normal)"
|
||||
},
|
||||
"offset_field": 401,
|
||||
"offset_start": 412,
|
||||
"offset_end": 425
|
||||
},
|
||||
{
|
||||
"name": {
|
||||
"other": "X-MSMail-Priority"
|
||||
},
|
||||
"name": "X-MSMail-Priority",
|
||||
"value": {
|
||||
"Text": "Normal"
|
||||
"text": "Normal"
|
||||
},
|
||||
"offset_field": 425,
|
||||
"offset_start": 443,
|
||||
"offset_end": 452
|
||||
},
|
||||
{
|
||||
"name": {
|
||||
"other": "X-Mailer"
|
||||
},
|
||||
"name": "X-Mailer",
|
||||
"value": {
|
||||
"Text": "Microsoft Outlook IMO, Build 9.0.2416 (9.0.2910.0)"
|
||||
"text": "Microsoft Outlook IMO, Build 9.0.2416 (9.0.2910.0)"
|
||||
},
|
||||
"offset_field": 452,
|
||||
"offset_start": 461,
|
||||
"offset_end": 514
|
||||
},
|
||||
{
|
||||
"name": "importance",
|
||||
"name": "Importance",
|
||||
"value": {
|
||||
"Text": "Normal"
|
||||
"text": "Normal"
|
||||
},
|
||||
"offset_field": 514,
|
||||
"offset_start": 525,
|
||||
"offset_end": 534
|
||||
},
|
||||
{
|
||||
"name": {
|
||||
"other": "X-MimeOLE"
|
||||
},
|
||||
"name": "X-MimeOLE",
|
||||
"value": {
|
||||
"Text": "Produced By Microsoft MimeOLE V5.00.2314.1300"
|
||||
"text": "Produced By Microsoft MimeOLE V5.00.2314.1300"
|
||||
},
|
||||
"offset_field": 534,
|
||||
"offset_start": 544,
|
||||
"offset_end": 592
|
||||
}
|
||||
],
|
||||
"is_encoding_problem": false,
|
||||
"body": {
|
||||
"Text": "Die Hasen und die Frösche\r\n\r\nDie Hasen klagten einst über ihre mißliche Lage; \"wir leben\", sprach ein Redner, \"in steter Furcht vor Menschen und Tieren, eine Beute der Hunde, der Adler, ja fast aller Raubtiere! Unsere stete Angst ist ärger als der Tod selbst. Auf, laßt uns ein für allemal sterben.\" \r\n\r\nIn einem nahen Teich wollten sie sich nun ersäufen; sie eilten ihm zu; allein das außerordentliche Getöse und ihre wunderbare Gestalt erschreckte eine Menge Frösche, die am Ufer saßen, so sehr, daß sie aufs schnellste untertauchten. \r\n\r\n\"Halt\", rief nun eben dieser Sprecher, \"wir wollen das Ersäufen noch ein wenig aufschieben, denn auch uns fürchten, wie ihr seht, einige Tiere, welche also wohl noch unglücklicher sein müssen als wir.\" \r\n"
|
||||
},
|
||||
"offset_header": 0,
|
||||
"offset_body": 594,
|
||||
"offset_end": 1401
|
||||
"text": "Die Hasen und die Frösche\r\n\r\nDie Hasen klagten einst über ihre mißliche Lage; \"wir leben\", sprach ein Redner, \"in steter Furcht vor Menschen und Tieren, eine Beute der Hunde, der Adler, ja fast aller Raubtiere! Unsere stete Angst ist ärger als der Tod selbst. Auf, laßt uns ein für allemal sterben.\" \r\n\r\nIn einem nahen Teich wollten sie sich nun ersäufen; sie eilten ihm zu; allein das außerordentliche Getöse und ihre wunderbare Gestalt erschreckte eine Menge Frösche, die am Ufer saßen, so sehr, daß sie aufs schnellste untertauchten. \r\n\r\n\"Halt\", rief nun eben dieser Sprecher, \"wir wollen das Ersäufen noch ein wenig aufschieben, denn auch uns fürchten, wie ihr seht, einige Tiere, welche also wohl noch unglücklicher sein müssen als wir.\" \r\n",
|
||||
"decode_problems": []
|
||||
}
|
||||
]
|
||||
}
|
||||
@@ -1,59 +1,82 @@
|
||||
{
|
||||
"html_body": [
|
||||
0
|
||||
"messages": [
|
||||
{
|
||||
"id": 0,
|
||||
"root": 0,
|
||||
"container": null,
|
||||
"source": "raw",
|
||||
"text_body": [
|
||||
0
|
||||
],
|
||||
"html_body": [
|
||||
0
|
||||
],
|
||||
"attachments": [],
|
||||
"has_attachments": false
|
||||
}
|
||||
],
|
||||
"text_body": [
|
||||
0
|
||||
],
|
||||
"attachments": [],
|
||||
"parts": [
|
||||
{
|
||||
"id": 0,
|
||||
"message": 0,
|
||||
"parent": null,
|
||||
"kind": "text",
|
||||
"encoding": "quoted-printable",
|
||||
"flags": [],
|
||||
"roles": [
|
||||
"text_body",
|
||||
"html_body"
|
||||
],
|
||||
"role": "text_body",
|
||||
"offset_header": 0,
|
||||
"offset_body": 579,
|
||||
"offset_end": 1371,
|
||||
"headers": [
|
||||
{
|
||||
"name": "from",
|
||||
"name": "From",
|
||||
"value": {
|
||||
"Address": {
|
||||
"List": [
|
||||
{
|
||||
"address": [
|
||||
{
|
||||
"mailbox": {
|
||||
"name": "Doug Sauder",
|
||||
"address": "doug@example.com"
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
"offset_field": 0,
|
||||
"offset_start": 5,
|
||||
"offset_end": 39
|
||||
},
|
||||
{
|
||||
"name": "to",
|
||||
"name": "To",
|
||||
"value": {
|
||||
"Address": {
|
||||
"List": [
|
||||
{
|
||||
"address": [
|
||||
{
|
||||
"mailbox": {
|
||||
"name": "Heinz Müller",
|
||||
"address": "mueller@example.com"
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
"offset_field": 39,
|
||||
"offset_start": 42,
|
||||
"offset_end": 99
|
||||
},
|
||||
{
|
||||
"name": "subject",
|
||||
"name": "Subject",
|
||||
"value": {
|
||||
"Text": "Die Hasen und die Frösche (Microsoft Outlook 00)"
|
||||
"text": "Die Hasen und die Frösche (Microsoft Outlook 00)"
|
||||
},
|
||||
"offset_field": 99,
|
||||
"offset_start": 107,
|
||||
"offset_end": 182
|
||||
},
|
||||
{
|
||||
"name": "date",
|
||||
"name": "Date",
|
||||
"value": {
|
||||
"DateTime": {
|
||||
"date_time": {
|
||||
"year": 2000,
|
||||
"month": 5,
|
||||
"day": 17,
|
||||
@@ -70,34 +93,36 @@
|
||||
"offset_end": 220
|
||||
},
|
||||
{
|
||||
"name": "message_id",
|
||||
"name": "Message-ID",
|
||||
"value": {
|
||||
"Text": "NDBBIAKOPKHFGPLCODIGCEKECHAA.doug@example.com"
|
||||
"text_list": [
|
||||
"NDBBIAKOPKHFGPLCODIGCEKECHAA.doug@example.com"
|
||||
]
|
||||
},
|
||||
"offset_field": 220,
|
||||
"offset_start": 231,
|
||||
"offset_end": 280
|
||||
},
|
||||
{
|
||||
"name": "mime_version",
|
||||
"name": "MIME-Version",
|
||||
"value": {
|
||||
"Text": "1.0"
|
||||
"text": "1.0"
|
||||
},
|
||||
"offset_field": 280,
|
||||
"offset_start": 293,
|
||||
"offset_end": 298
|
||||
},
|
||||
{
|
||||
"name": "content_type",
|
||||
"name": "Content-Type",
|
||||
"value": {
|
||||
"ContentType": {
|
||||
"c_type": "text",
|
||||
"c_subtype": "plain",
|
||||
"content_type": {
|
||||
"type": "text",
|
||||
"subtype": "plain",
|
||||
"attributes": [
|
||||
{
|
||||
"name": "charset",
|
||||
"value": "Windows-1252"
|
||||
}
|
||||
[
|
||||
"charset",
|
||||
"Windows-1252"
|
||||
]
|
||||
]
|
||||
}
|
||||
},
|
||||
@@ -106,75 +131,62 @@
|
||||
"offset_end": 348
|
||||
},
|
||||
{
|
||||
"name": "content_transfer_encoding",
|
||||
"name": "Content-Transfer-Encoding",
|
||||
"value": {
|
||||
"Text": "quoted-printable"
|
||||
"text": "quoted-printable"
|
||||
},
|
||||
"offset_field": 348,
|
||||
"offset_start": 374,
|
||||
"offset_end": 392
|
||||
},
|
||||
{
|
||||
"name": {
|
||||
"other": "X-Priority"
|
||||
},
|
||||
"name": "X-Priority",
|
||||
"value": {
|
||||
"Text": "3 (Normal)"
|
||||
"text": "3 (Normal)"
|
||||
},
|
||||
"offset_field": 392,
|
||||
"offset_start": 403,
|
||||
"offset_end": 415
|
||||
},
|
||||
{
|
||||
"name": {
|
||||
"other": "X-MSMail-Priority"
|
||||
},
|
||||
"name": "X-MSMail-Priority",
|
||||
"value": {
|
||||
"Text": "Normal"
|
||||
"text": "Normal"
|
||||
},
|
||||
"offset_field": 415,
|
||||
"offset_start": 433,
|
||||
"offset_end": 441
|
||||
},
|
||||
{
|
||||
"name": {
|
||||
"other": "X-Mailer"
|
||||
},
|
||||
"name": "X-Mailer",
|
||||
"value": {
|
||||
"Text": "Microsoft Outlook IMO, Build 9.0.2416 (9.0.2910.0)"
|
||||
"text": "Microsoft Outlook IMO, Build 9.0.2416 (9.0.2910.0)"
|
||||
},
|
||||
"offset_field": 441,
|
||||
"offset_start": 450,
|
||||
"offset_end": 502
|
||||
},
|
||||
{
|
||||
"name": "importance",
|
||||
"name": "Importance",
|
||||
"value": {
|
||||
"Text": "Normal"
|
||||
"text": "Normal"
|
||||
},
|
||||
"offset_field": 502,
|
||||
"offset_start": 513,
|
||||
"offset_end": 521
|
||||
},
|
||||
{
|
||||
"name": {
|
||||
"other": "X-MimeOLE"
|
||||
},
|
||||
"name": "X-MimeOLE",
|
||||
"value": {
|
||||
"Text": "Produced By Microsoft MimeOLE V5.00.2314.1300"
|
||||
"text": "Produced By Microsoft MimeOLE V5.00.2314.1300"
|
||||
},
|
||||
"offset_field": 521,
|
||||
"offset_start": 531,
|
||||
"offset_end": 578
|
||||
}
|
||||
],
|
||||
"is_encoding_problem": false,
|
||||
"body": {
|
||||
"Text": "Die Hasen und die Frösche\n\nDie Hasen klagten einst über ihre mißliche Lage; \"wir leben\", sprach ein Redner, \"in steter Furcht vor Menschen und Tieren, eine Beute der Hunde, der Adler, ja fast aller Raubtiere! Unsere stete Angst ist ärger als der Tod selbst. Auf, laßt uns ein für allemal sterben.\" \n\nIn einem nahen Teich wollten sie sich nun ersäufen; sie eilten ihm zu; allein das außerordentliche Getöse und ihre wunderbare Gestalt erschreckte eine Menge Frösche, die am Ufer saßen, so sehr, daß sie aufs schnellste untertauchten. \n\n\"Halt\", rief nun eben dieser Sprecher, \"wir wollen das Ersäufen noch ein wenig aufschieben, denn auch uns fürchten, wie ihr seht, einige Tiere, welche also wohl noch unglücklicher sein müssen als wir.\" \n"
|
||||
},
|
||||
"offset_header": 0,
|
||||
"offset_body": 579,
|
||||
"offset_end": 1371
|
||||
"text": "Die Hasen und die Frösche\n\nDie Hasen klagten einst über ihre mißliche Lage; \"wir leben\", sprach ein Redner, \"in steter Furcht vor Menschen und Tieren, eine Beute der Hunde, der Adler, ja fast aller Raubtiere! Unsere stete Angst ist ärger als der Tod selbst. Auf, laßt uns ein für allemal sterben.\" \n\nIn einem nahen Teich wollten sie sich nun ersäufen; sie eilten ihm zu; allein das außerordentliche Getöse und ihre wunderbare Gestalt erschreckte eine Menge Frösche, die am Ufer saßen, so sehr, daß sie aufs schnellste untertauchten. \n\n\"Halt\", rief nun eben dieser Sprecher, \"wir wollen das Ersäufen noch ein wenig aufschieben, denn auch uns fürchten, wie ihr seht, einige Tiere, welche also wohl noch unglücklicher sein müssen als wir.\" \n",
|
||||
"decode_problems": []
|
||||
}
|
||||
]
|
||||
}
|
||||
@@ -1,59 +1,82 @@
|
||||
{
|
||||
"html_body": [
|
||||
0
|
||||
"messages": [
|
||||
{
|
||||
"id": 0,
|
||||
"root": 0,
|
||||
"container": null,
|
||||
"source": "raw",
|
||||
"text_body": [
|
||||
0
|
||||
],
|
||||
"html_body": [
|
||||
0
|
||||
],
|
||||
"attachments": [],
|
||||
"has_attachments": false
|
||||
}
|
||||
],
|
||||
"text_body": [
|
||||
0
|
||||
],
|
||||
"attachments": [],
|
||||
"parts": [
|
||||
{
|
||||
"id": 0,
|
||||
"message": 0,
|
||||
"parent": null,
|
||||
"kind": "text",
|
||||
"encoding": "none",
|
||||
"flags": [],
|
||||
"roles": [
|
||||
"text_body",
|
||||
"html_body"
|
||||
],
|
||||
"role": "text_body",
|
||||
"offset_header": 0,
|
||||
"offset_body": 589,
|
||||
"offset_end": 1341,
|
||||
"headers": [
|
||||
{
|
||||
"name": "from",
|
||||
"name": "From",
|
||||
"value": {
|
||||
"Address": {
|
||||
"List": [
|
||||
{
|
||||
"address": [
|
||||
{
|
||||
"mailbox": {
|
||||
"name": "Doug Sauder",
|
||||
"address": "doug@example.com"
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
"offset_field": 0,
|
||||
"offset_start": 5,
|
||||
"offset_end": 40
|
||||
},
|
||||
{
|
||||
"name": "to",
|
||||
"name": "To",
|
||||
"value": {
|
||||
"Address": {
|
||||
"List": [
|
||||
{
|
||||
"address": [
|
||||
{
|
||||
"mailbox": {
|
||||
"name": "Jürgen Schmürgen",
|
||||
"address": "schmuergen@example.com"
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
"offset_field": 40,
|
||||
"offset_start": 43,
|
||||
"offset_end": 112
|
||||
},
|
||||
{
|
||||
"name": "subject",
|
||||
"name": "Subject",
|
||||
"value": {
|
||||
"Text": "Die Hasen und die Frösche (Microsoft Outlook 00)"
|
||||
"text": "Die Hasen und die Frösche (Microsoft Outlook 00)"
|
||||
},
|
||||
"offset_field": 112,
|
||||
"offset_start": 120,
|
||||
"offset_end": 194
|
||||
},
|
||||
{
|
||||
"name": "date",
|
||||
"name": "Date",
|
||||
"value": {
|
||||
"DateTime": {
|
||||
"date_time": {
|
||||
"year": 2000,
|
||||
"month": 5,
|
||||
"day": 17,
|
||||
@@ -70,34 +93,36 @@
|
||||
"offset_end": 233
|
||||
},
|
||||
{
|
||||
"name": "message_id",
|
||||
"name": "Message-ID",
|
||||
"value": {
|
||||
"Text": "NDBBIAKOPKHFGPLCODIGEEKCCHAA.doug@example.com"
|
||||
"text_list": [
|
||||
"NDBBIAKOPKHFGPLCODIGEEKCCHAA.doug@example.com"
|
||||
]
|
||||
},
|
||||
"offset_field": 233,
|
||||
"offset_start": 244,
|
||||
"offset_end": 294
|
||||
},
|
||||
{
|
||||
"name": "mime_version",
|
||||
"name": "MIME-Version",
|
||||
"value": {
|
||||
"Text": "1.0"
|
||||
"text": "1.0"
|
||||
},
|
||||
"offset_field": 294,
|
||||
"offset_start": 307,
|
||||
"offset_end": 313
|
||||
},
|
||||
{
|
||||
"name": "content_type",
|
||||
"name": "Content-Type",
|
||||
"value": {
|
||||
"ContentType": {
|
||||
"c_type": "text",
|
||||
"c_subtype": "plain",
|
||||
"content_type": {
|
||||
"type": "text",
|
||||
"subtype": "plain",
|
||||
"attributes": [
|
||||
{
|
||||
"name": "charset",
|
||||
"value": "iso-8859-1"
|
||||
}
|
||||
[
|
||||
"charset",
|
||||
"iso-8859-1"
|
||||
]
|
||||
]
|
||||
}
|
||||
},
|
||||
@@ -106,75 +131,62 @@
|
||||
"offset_end": 363
|
||||
},
|
||||
{
|
||||
"name": "content_transfer_encoding",
|
||||
"name": "Content-Transfer-Encoding",
|
||||
"value": {
|
||||
"Text": "8bit"
|
||||
"text": "8bit"
|
||||
},
|
||||
"offset_field": 363,
|
||||
"offset_start": 389,
|
||||
"offset_end": 396
|
||||
},
|
||||
{
|
||||
"name": {
|
||||
"other": "X-Priority"
|
||||
},
|
||||
"name": "X-Priority",
|
||||
"value": {
|
||||
"Text": "3 (Normal)"
|
||||
"text": "3 (Normal)"
|
||||
},
|
||||
"offset_field": 396,
|
||||
"offset_start": 407,
|
||||
"offset_end": 420
|
||||
},
|
||||
{
|
||||
"name": {
|
||||
"other": "X-MSMail-Priority"
|
||||
},
|
||||
"name": "X-MSMail-Priority",
|
||||
"value": {
|
||||
"Text": "Normal"
|
||||
"text": "Normal"
|
||||
},
|
||||
"offset_field": 420,
|
||||
"offset_start": 438,
|
||||
"offset_end": 447
|
||||
},
|
||||
{
|
||||
"name": {
|
||||
"other": "X-Mailer"
|
||||
},
|
||||
"name": "X-Mailer",
|
||||
"value": {
|
||||
"Text": "Microsoft Outlook IMO, Build 9.0.2416 (9.0.2910.0)"
|
||||
"text": "Microsoft Outlook IMO, Build 9.0.2416 (9.0.2910.0)"
|
||||
},
|
||||
"offset_field": 447,
|
||||
"offset_start": 456,
|
||||
"offset_end": 509
|
||||
},
|
||||
{
|
||||
"name": "importance",
|
||||
"name": "Importance",
|
||||
"value": {
|
||||
"Text": "Normal"
|
||||
"text": "Normal"
|
||||
},
|
||||
"offset_field": 509,
|
||||
"offset_start": 520,
|
||||
"offset_end": 529
|
||||
},
|
||||
{
|
||||
"name": {
|
||||
"other": "X-MimeOLE"
|
||||
},
|
||||
"name": "X-MimeOLE",
|
||||
"value": {
|
||||
"Text": "Produced By Microsoft MimeOLE V5.00.2314.1300"
|
||||
"text": "Produced By Microsoft MimeOLE V5.00.2314.1300"
|
||||
},
|
||||
"offset_field": 529,
|
||||
"offset_start": 539,
|
||||
"offset_end": 587
|
||||
}
|
||||
],
|
||||
"is_encoding_problem": false,
|
||||
"body": {
|
||||
"Text": "Die Hasen und die Frösche\r\n\r\nDie Hasen klagten einst über ihre mißliche Lage; \"wir leben\", sprach ein\r\nRedner, \"in steter Furcht vor Menschen und Tieren, eine Beute der Hunde, der\r\nAdler, ja fast aller Raubtiere! Unsere stete Angst ist ärger als der Tod\r\nselbst. Auf, laßt uns ein für allemal sterben.\"\r\n\r\nIn einem nahen Teich wollten sie sich nun ersäufen; sie eilten ihm zu;\r\nallein das außerordentliche Getöse und ihre wunderbare Gestalt erschreckte\r\neine Menge Frösche, die am Ufer saßen, so sehr, daß sie aufs schnellste\r\nuntertauchten.\r\n\r\n\"Halt\", rief nun eben dieser Sprecher, \"wir wollen das Ersäufen noch ein\r\nwenig aufschieben, denn auch uns fürchten, wie ihr seht, einige Tiere,\r\nwelche also wohl noch unglücklicher sein müssen als wir.\"\r\n\r\n"
|
||||
},
|
||||
"offset_header": 0,
|
||||
"offset_body": 589,
|
||||
"offset_end": 1341
|
||||
"text": "Die Hasen und die Frösche\r\n\r\nDie Hasen klagten einst über ihre mißliche Lage; \"wir leben\", sprach ein\r\nRedner, \"in steter Furcht vor Menschen und Tieren, eine Beute der Hunde, der\r\nAdler, ja fast aller Raubtiere! Unsere stete Angst ist ärger als der Tod\r\nselbst. Auf, laßt uns ein für allemal sterben.\"\r\n\r\nIn einem nahen Teich wollten sie sich nun ersäufen; sie eilten ihm zu;\r\nallein das außerordentliche Getöse und ihre wunderbare Gestalt erschreckte\r\neine Menge Frösche, die am Ufer saßen, so sehr, daß sie aufs schnellste\r\nuntertauchten.\r\n\r\n\"Halt\", rief nun eben dieser Sprecher, \"wir wollen das Ersäufen noch ein\r\nwenig aufschieben, denn auch uns fürchten, wie ihr seht, einige Tiere,\r\nwelche also wohl noch unglücklicher sein müssen als wir.\"\r\n\r\n",
|
||||
"decode_problems": []
|
||||
}
|
||||
]
|
||||
}
|
||||
@@ -1,59 +1,82 @@
|
||||
{
|
||||
"html_body": [
|
||||
0
|
||||
"messages": [
|
||||
{
|
||||
"id": 0,
|
||||
"root": 0,
|
||||
"container": null,
|
||||
"source": "raw",
|
||||
"text_body": [
|
||||
0
|
||||
],
|
||||
"html_body": [
|
||||
0
|
||||
],
|
||||
"attachments": [],
|
||||
"has_attachments": false
|
||||
}
|
||||
],
|
||||
"text_body": [
|
||||
0
|
||||
],
|
||||
"attachments": [],
|
||||
"parts": [
|
||||
{
|
||||
"id": 0,
|
||||
"message": 0,
|
||||
"parent": null,
|
||||
"kind": "text",
|
||||
"encoding": "none",
|
||||
"flags": [],
|
||||
"roles": [
|
||||
"text_body",
|
||||
"html_body"
|
||||
],
|
||||
"role": "text_body",
|
||||
"offset_header": 0,
|
||||
"offset_body": 574,
|
||||
"offset_end": 1310,
|
||||
"headers": [
|
||||
{
|
||||
"name": "from",
|
||||
"name": "From",
|
||||
"value": {
|
||||
"Address": {
|
||||
"List": [
|
||||
{
|
||||
"address": [
|
||||
{
|
||||
"mailbox": {
|
||||
"name": "Doug Sauder",
|
||||
"address": "doug@example.com"
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
"offset_field": 0,
|
||||
"offset_start": 5,
|
||||
"offset_end": 39
|
||||
},
|
||||
{
|
||||
"name": "to",
|
||||
"name": "To",
|
||||
"value": {
|
||||
"Address": {
|
||||
"List": [
|
||||
{
|
||||
"address": [
|
||||
{
|
||||
"mailbox": {
|
||||
"name": "Jürgen Schmürgen",
|
||||
"address": "schmuergen@example.com"
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
"offset_field": 39,
|
||||
"offset_start": 42,
|
||||
"offset_end": 110
|
||||
},
|
||||
{
|
||||
"name": "subject",
|
||||
"name": "Subject",
|
||||
"value": {
|
||||
"Text": "Die Hasen und die Frösche (Microsoft Outlook 00)"
|
||||
"text": "Die Hasen und die Frösche (Microsoft Outlook 00)"
|
||||
},
|
||||
"offset_field": 110,
|
||||
"offset_start": 118,
|
||||
"offset_end": 191
|
||||
},
|
||||
{
|
||||
"name": "date",
|
||||
"name": "Date",
|
||||
"value": {
|
||||
"DateTime": {
|
||||
"date_time": {
|
||||
"year": 2000,
|
||||
"month": 5,
|
||||
"day": 17,
|
||||
@@ -70,34 +93,36 @@
|
||||
"offset_end": 229
|
||||
},
|
||||
{
|
||||
"name": "message_id",
|
||||
"name": "Message-ID",
|
||||
"value": {
|
||||
"Text": "NDBBIAKOPKHFGPLCODIGEEKCCHAA.doug@example.com"
|
||||
"text_list": [
|
||||
"NDBBIAKOPKHFGPLCODIGEEKCCHAA.doug@example.com"
|
||||
]
|
||||
},
|
||||
"offset_field": 229,
|
||||
"offset_start": 240,
|
||||
"offset_end": 289
|
||||
},
|
||||
{
|
||||
"name": "mime_version",
|
||||
"name": "MIME-Version",
|
||||
"value": {
|
||||
"Text": "1.0"
|
||||
"text": "1.0"
|
||||
},
|
||||
"offset_field": 289,
|
||||
"offset_start": 302,
|
||||
"offset_end": 307
|
||||
},
|
||||
{
|
||||
"name": "content_type",
|
||||
"name": "Content-Type",
|
||||
"value": {
|
||||
"ContentType": {
|
||||
"c_type": "text",
|
||||
"c_subtype": "plain",
|
||||
"content_type": {
|
||||
"type": "text",
|
||||
"subtype": "plain",
|
||||
"attributes": [
|
||||
{
|
||||
"name": "charset",
|
||||
"value": "iso-8859-1"
|
||||
}
|
||||
[
|
||||
"charset",
|
||||
"iso-8859-1"
|
||||
]
|
||||
]
|
||||
}
|
||||
},
|
||||
@@ -106,75 +131,62 @@
|
||||
"offset_end": 355
|
||||
},
|
||||
{
|
||||
"name": "content_transfer_encoding",
|
||||
"name": "Content-Transfer-Encoding",
|
||||
"value": {
|
||||
"Text": "8bit"
|
||||
"text": "8bit"
|
||||
},
|
||||
"offset_field": 355,
|
||||
"offset_start": 381,
|
||||
"offset_end": 387
|
||||
},
|
||||
{
|
||||
"name": {
|
||||
"other": "X-Priority"
|
||||
},
|
||||
"name": "X-Priority",
|
||||
"value": {
|
||||
"Text": "3 (Normal)"
|
||||
"text": "3 (Normal)"
|
||||
},
|
||||
"offset_field": 387,
|
||||
"offset_start": 398,
|
||||
"offset_end": 410
|
||||
},
|
||||
{
|
||||
"name": {
|
||||
"other": "X-MSMail-Priority"
|
||||
},
|
||||
"name": "X-MSMail-Priority",
|
||||
"value": {
|
||||
"Text": "Normal"
|
||||
"text": "Normal"
|
||||
},
|
||||
"offset_field": 410,
|
||||
"offset_start": 428,
|
||||
"offset_end": 436
|
||||
},
|
||||
{
|
||||
"name": {
|
||||
"other": "X-Mailer"
|
||||
},
|
||||
"name": "X-Mailer",
|
||||
"value": {
|
||||
"Text": "Microsoft Outlook IMO, Build 9.0.2416 (9.0.2910.0)"
|
||||
"text": "Microsoft Outlook IMO, Build 9.0.2416 (9.0.2910.0)"
|
||||
},
|
||||
"offset_field": 436,
|
||||
"offset_start": 445,
|
||||
"offset_end": 497
|
||||
},
|
||||
{
|
||||
"name": "importance",
|
||||
"name": "Importance",
|
||||
"value": {
|
||||
"Text": "Normal"
|
||||
"text": "Normal"
|
||||
},
|
||||
"offset_field": 497,
|
||||
"offset_start": 508,
|
||||
"offset_end": 516
|
||||
},
|
||||
{
|
||||
"name": {
|
||||
"other": "X-MimeOLE"
|
||||
},
|
||||
"name": "X-MimeOLE",
|
||||
"value": {
|
||||
"Text": "Produced By Microsoft MimeOLE V5.00.2314.1300"
|
||||
"text": "Produced By Microsoft MimeOLE V5.00.2314.1300"
|
||||
},
|
||||
"offset_field": 516,
|
||||
"offset_start": 526,
|
||||
"offset_end": 573
|
||||
}
|
||||
],
|
||||
"is_encoding_problem": false,
|
||||
"body": {
|
||||
"Text": "Die Hasen und die Frösche\n\nDie Hasen klagten einst über ihre mißliche Lage; \"wir leben\", sprach ein\nRedner, \"in steter Furcht vor Menschen und Tieren, eine Beute der Hunde, der\nAdler, ja fast aller Raubtiere! Unsere stete Angst ist ärger als der Tod\nselbst. Auf, laßt uns ein für allemal sterben.\"\n\nIn einem nahen Teich wollten sie sich nun ersäufen; sie eilten ihm zu;\nallein das außerordentliche Getöse und ihre wunderbare Gestalt erschreckte\neine Menge Frösche, die am Ufer saßen, so sehr, daß sie aufs schnellste\nuntertauchten.\n\n\"Halt\", rief nun eben dieser Sprecher, \"wir wollen das Ersäufen noch ein\nwenig aufschieben, denn auch uns fürchten, wie ihr seht, einige Tiere,\nwelche also wohl noch unglücklicher sein müssen als wir.\"\n\n"
|
||||
},
|
||||
"offset_header": 0,
|
||||
"offset_body": 574,
|
||||
"offset_end": 1310
|
||||
"text": "Die Hasen und die Frösche\n\nDie Hasen klagten einst über ihre mißliche Lage; \"wir leben\", sprach ein\nRedner, \"in steter Furcht vor Menschen und Tieren, eine Beute der Hunde, der\nAdler, ja fast aller Raubtiere! Unsere stete Angst ist ärger als der Tod\nselbst. Auf, laßt uns ein für allemal sterben.\"\n\nIn einem nahen Teich wollten sie sich nun ersäufen; sie eilten ihm zu;\nallein das außerordentliche Getöse und ihre wunderbare Gestalt erschreckte\neine Menge Frösche, die am Ufer saßen, so sehr, daß sie aufs schnellste\nuntertauchten.\n\n\"Halt\", rief nun eben dieser Sprecher, \"wir wollen das Ersäufen noch ein\nwenig aufschieben, denn auch uns fürchten, wie ihr seht, einige Tiere,\nwelche also wohl noch unglücklicher sein müssen als wir.\"\n\n",
|
||||
"decode_problems": []
|
||||
}
|
||||
]
|
||||
}
|
||||
@@ -1,59 +1,83 @@
|
||||
{
|
||||
"html_body": [
|
||||
2
|
||||
"messages": [
|
||||
{
|
||||
"id": 0,
|
||||
"root": 0,
|
||||
"container": null,
|
||||
"source": "raw",
|
||||
"text_body": [
|
||||
1
|
||||
],
|
||||
"html_body": [
|
||||
2
|
||||
],
|
||||
"attachments": [],
|
||||
"has_attachments": false
|
||||
}
|
||||
],
|
||||
"text_body": [
|
||||
1
|
||||
],
|
||||
"attachments": [],
|
||||
"parts": [
|
||||
{
|
||||
"id": 0,
|
||||
"message": 0,
|
||||
"parent": null,
|
||||
"kind": "multipart",
|
||||
"children": [
|
||||
1,
|
||||
2
|
||||
],
|
||||
"encoding": "none",
|
||||
"flags": [],
|
||||
"roles": [],
|
||||
"role": "container",
|
||||
"offset_header": 0,
|
||||
"offset_body": 530,
|
||||
"offset_end": 2903,
|
||||
"headers": [
|
||||
{
|
||||
"name": "from",
|
||||
"name": "From",
|
||||
"value": {
|
||||
"Address": {
|
||||
"List": [
|
||||
{
|
||||
"address": [
|
||||
{
|
||||
"mailbox": {
|
||||
"name": "Doug Sauder",
|
||||
"address": "doug@example.com"
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
"offset_field": 0,
|
||||
"offset_start": 5,
|
||||
"offset_end": 40
|
||||
},
|
||||
{
|
||||
"name": "to",
|
||||
"name": "To",
|
||||
"value": {
|
||||
"Address": {
|
||||
"List": [
|
||||
{
|
||||
"address": [
|
||||
{
|
||||
"mailbox": {
|
||||
"name": "Joe Blow",
|
||||
"address": "jblow@example.com"
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
"offset_field": 40,
|
||||
"offset_start": 43,
|
||||
"offset_end": 76
|
||||
},
|
||||
{
|
||||
"name": "subject",
|
||||
"name": "Subject",
|
||||
"value": {
|
||||
"Text": "Test message from Microsoft Outlook 00"
|
||||
"text": "Test message from Microsoft Outlook 00"
|
||||
},
|
||||
"offset_field": 76,
|
||||
"offset_start": 84,
|
||||
"offset_end": 125
|
||||
},
|
||||
{
|
||||
"name": "date",
|
||||
"name": "Date",
|
||||
"value": {
|
||||
"DateTime": {
|
||||
"date_time": {
|
||||
"year": 2000,
|
||||
"month": 5,
|
||||
"day": 17,
|
||||
@@ -70,34 +94,36 @@
|
||||
"offset_end": 164
|
||||
},
|
||||
{
|
||||
"name": "message_id",
|
||||
"name": "Message-ID",
|
||||
"value": {
|
||||
"Text": "NDBBIAKOPKHFGPLCODIGCEKFCHAA.doug@example.com"
|
||||
"text_list": [
|
||||
"NDBBIAKOPKHFGPLCODIGCEKFCHAA.doug@example.com"
|
||||
]
|
||||
},
|
||||
"offset_field": 164,
|
||||
"offset_start": 175,
|
||||
"offset_end": 225
|
||||
},
|
||||
{
|
||||
"name": "mime_version",
|
||||
"name": "MIME-Version",
|
||||
"value": {
|
||||
"Text": "1.0"
|
||||
"text": "1.0"
|
||||
},
|
||||
"offset_field": 225,
|
||||
"offset_start": 238,
|
||||
"offset_end": 244
|
||||
},
|
||||
{
|
||||
"name": "content_type",
|
||||
"name": "Content-Type",
|
||||
"value": {
|
||||
"ContentType": {
|
||||
"c_type": "multipart",
|
||||
"c_subtype": "alternative",
|
||||
"content_type": {
|
||||
"type": "multipart",
|
||||
"subtype": "alternative",
|
||||
"attributes": [
|
||||
{
|
||||
"name": "boundary",
|
||||
"value": "----=_NextPart_000_0005_01BFC037.799BEF60"
|
||||
}
|
||||
[
|
||||
"boundary",
|
||||
"----=_NextPart_000_0005_01BFC037.799BEF60"
|
||||
]
|
||||
]
|
||||
}
|
||||
},
|
||||
@@ -106,83 +132,78 @@
|
||||
"offset_end": 337
|
||||
},
|
||||
{
|
||||
"name": {
|
||||
"other": "X-Priority"
|
||||
},
|
||||
"name": "X-Priority",
|
||||
"value": {
|
||||
"Text": "3 (Normal)"
|
||||
"text": "3 (Normal)"
|
||||
},
|
||||
"offset_field": 337,
|
||||
"offset_start": 348,
|
||||
"offset_end": 361
|
||||
},
|
||||
{
|
||||
"name": {
|
||||
"other": "X-MSMail-Priority"
|
||||
},
|
||||
"name": "X-MSMail-Priority",
|
||||
"value": {
|
||||
"Text": "Normal"
|
||||
"text": "Normal"
|
||||
},
|
||||
"offset_field": 361,
|
||||
"offset_start": 379,
|
||||
"offset_end": 388
|
||||
},
|
||||
{
|
||||
"name": {
|
||||
"other": "X-Mailer"
|
||||
},
|
||||
"name": "X-Mailer",
|
||||
"value": {
|
||||
"Text": "Microsoft Outlook IMO, Build 9.0.2416 (9.0.2910.0)"
|
||||
"text": "Microsoft Outlook IMO, Build 9.0.2416 (9.0.2910.0)"
|
||||
},
|
||||
"offset_field": 388,
|
||||
"offset_start": 397,
|
||||
"offset_end": 450
|
||||
},
|
||||
{
|
||||
"name": "importance",
|
||||
"name": "Importance",
|
||||
"value": {
|
||||
"Text": "Normal"
|
||||
"text": "Normal"
|
||||
},
|
||||
"offset_field": 450,
|
||||
"offset_start": 461,
|
||||
"offset_end": 470
|
||||
},
|
||||
{
|
||||
"name": {
|
||||
"other": "X-MimeOLE"
|
||||
},
|
||||
"name": "X-MimeOLE",
|
||||
"value": {
|
||||
"Text": "Produced By Microsoft MimeOLE V5.00.2314.1300"
|
||||
"text": "Produced By Microsoft MimeOLE V5.00.2314.1300"
|
||||
},
|
||||
"offset_field": 470,
|
||||
"offset_start": 480,
|
||||
"offset_end": 528
|
||||
}
|
||||
],
|
||||
"is_encoding_problem": false,
|
||||
"body": {
|
||||
"Multipart": [
|
||||
1,
|
||||
2
|
||||
]
|
||||
},
|
||||
"offset_header": 0,
|
||||
"offset_body": 530,
|
||||
"offset_end": 2903
|
||||
]
|
||||
},
|
||||
{
|
||||
"id": 1,
|
||||
"message": 0,
|
||||
"parent": 0,
|
||||
"kind": "text",
|
||||
"encoding": "quoted-printable",
|
||||
"flags": [],
|
||||
"roles": [
|
||||
"text_body"
|
||||
],
|
||||
"role": "text_body",
|
||||
"offset_header": 623,
|
||||
"offset_body": 720,
|
||||
"offset_end": 1521,
|
||||
"headers": [
|
||||
{
|
||||
"name": "content_type",
|
||||
"name": "Content-Type",
|
||||
"value": {
|
||||
"ContentType": {
|
||||
"c_type": "text",
|
||||
"c_subtype": "plain",
|
||||
"content_type": {
|
||||
"type": "text",
|
||||
"subtype": "plain",
|
||||
"attributes": [
|
||||
{
|
||||
"name": "charset",
|
||||
"value": "iso-8859-1"
|
||||
}
|
||||
[
|
||||
"charset",
|
||||
"iso-8859-1"
|
||||
]
|
||||
]
|
||||
}
|
||||
},
|
||||
@@ -191,36 +212,44 @@
|
||||
"offset_end": 673
|
||||
},
|
||||
{
|
||||
"name": "content_transfer_encoding",
|
||||
"name": "Content-Transfer-Encoding",
|
||||
"value": {
|
||||
"Text": "quoted-printable"
|
||||
"text": "quoted-printable"
|
||||
},
|
||||
"offset_field": 673,
|
||||
"offset_start": 699,
|
||||
"offset_end": 718
|
||||
}
|
||||
],
|
||||
"is_encoding_problem": false,
|
||||
"body": {
|
||||
"Text": "\r\nThe Hare and the Tortoise \r\n \r\nA HARE one day ridiculed the short feet and slow pace of the Tortoise, who replied, laughing: \"Though you be swift as the wind, I will beat you in a race.\" The Hare, believing her assertion to be simply impossible, assented to the proposal; and they agreed that the Fox should choose the course and fix the goal. On the day appointed for the race the two started together. The Tortoise never for a moment stopped, but went on with a slow but steady pace straight to the end of the course. The Hare, lying down by the wayside, fell fast asleep. At last waking up, and moving as fast as he could, he saw the Tortoise had reached the goal, and was comfortably dozing after her fatigue. \r\n \r\nSlow but steady wins the race. \r\n\r\n"
|
||||
},
|
||||
"offset_header": 623,
|
||||
"offset_body": 720,
|
||||
"offset_end": 1521
|
||||
"text": "\r\nThe Hare and the Tortoise \r\n \r\nA HARE one day ridiculed the short feet and slow pace of the Tortoise, who replied, laughing: \"Though you be swift as the wind, I will beat you in a race.\" The Hare, believing her assertion to be simply impossible, assented to the proposal; and they agreed that the Fox should choose the course and fix the goal. On the day appointed for the race the two started together. The Tortoise never for a moment stopped, but went on with a slow but steady pace straight to the end of the course. The Hare, lying down by the wayside, fell fast asleep. At last waking up, and moving as fast as he could, he saw the Tortoise had reached the goal, and was comfortably dozing after her fatigue. \r\n \r\nSlow but steady wins the race. \r\n\r\n",
|
||||
"decode_problems": []
|
||||
},
|
||||
{
|
||||
"id": 2,
|
||||
"message": 0,
|
||||
"parent": 0,
|
||||
"kind": "html",
|
||||
"encoding": "quoted-printable",
|
||||
"flags": [],
|
||||
"roles": [
|
||||
"html_body"
|
||||
],
|
||||
"role": "html_body",
|
||||
"offset_header": 1568,
|
||||
"offset_body": 1664,
|
||||
"offset_end": 2854,
|
||||
"headers": [
|
||||
{
|
||||
"name": "content_type",
|
||||
"name": "Content-Type",
|
||||
"value": {
|
||||
"ContentType": {
|
||||
"c_type": "text",
|
||||
"c_subtype": "html",
|
||||
"content_type": {
|
||||
"type": "text",
|
||||
"subtype": "html",
|
||||
"attributes": [
|
||||
{
|
||||
"name": "charset",
|
||||
"value": "iso-8859-1"
|
||||
}
|
||||
[
|
||||
"charset",
|
||||
"iso-8859-1"
|
||||
]
|
||||
]
|
||||
}
|
||||
},
|
||||
@@ -229,22 +258,17 @@
|
||||
"offset_end": 1617
|
||||
},
|
||||
{
|
||||
"name": "content_transfer_encoding",
|
||||
"name": "Content-Transfer-Encoding",
|
||||
"value": {
|
||||
"Text": "quoted-printable"
|
||||
"text": "quoted-printable"
|
||||
},
|
||||
"offset_field": 1617,
|
||||
"offset_start": 1643,
|
||||
"offset_end": 1662
|
||||
}
|
||||
],
|
||||
"is_encoding_problem": false,
|
||||
"body": {
|
||||
"Html": "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.0 Transitional//EN\">\r\n<HTML><HEAD>\r\n<META content=\"text/html; charset=iso-8859-1\" http-equiv=Content-Type>\r\n<META content=\"MSHTML 5.00.2314.1000\" name=GENERATOR></HEAD>\r\n<BODY>\r\n<DIV><FONT face=Arial size=2><BR>The Hare and the Tortoise <BR> <BR>A HARE \r\none day ridiculed the short feet and slow pace of the Tortoise, who replied, \r\nlaughing: \"Though you be swift as the wind, I will beat you in a \r\nrace.\" The Hare, believing her assertion to be simply impossible, assented \r\nto the proposal; and they agreed that the Fox should choose the course and fix \r\nthe goal. On the day appointed for the race the two started \r\ntogether. The Tortoise never for a moment stopped, but went on with a slow \r\nbut steady pace straight to the end of the course. The Hare, lying down by \r\nthe wayside, fell fast asleep. At last waking up, and moving as fast as he \r\ncould, he saw the Tortoise had reached the goal, and was comfortably dozing \r\nafter her fatigue. <BR> <BR>Slow but steady wins the race. \r\n<BR></FONT></DIV></BODY></HTML>\r\n"
|
||||
},
|
||||
"offset_header": 1568,
|
||||
"offset_body": 1664,
|
||||
"offset_end": 2854
|
||||
"text": "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.0 Transitional//EN\">\r\n<HTML><HEAD>\r\n<META content=\"text/html; charset=iso-8859-1\" http-equiv=Content-Type>\r\n<META content=\"MSHTML 5.00.2314.1000\" name=GENERATOR></HEAD>\r\n<BODY>\r\n<DIV><FONT face=Arial size=2><BR>The Hare and the Tortoise <BR> <BR>A HARE \r\none day ridiculed the short feet and slow pace of the Tortoise, who replied, \r\nlaughing: \"Though you be swift as the wind, I will beat you in a \r\nrace.\" The Hare, believing her assertion to be simply impossible, assented \r\nto the proposal; and they agreed that the Fox should choose the course and fix \r\nthe goal. On the day appointed for the race the two started \r\ntogether. The Tortoise never for a moment stopped, but went on with a slow \r\nbut steady pace straight to the end of the course. The Hare, lying down by \r\nthe wayside, fell fast asleep. At last waking up, and moving as fast as he \r\ncould, he saw the Tortoise had reached the goal, and was comfortably dozing \r\nafter her fatigue. <BR> <BR>Slow but steady wins the race. \r\n<BR></FONT></DIV></BODY></HTML>\r\n",
|
||||
"decode_problems": []
|
||||
}
|
||||
]
|
||||
}
|
||||
+121
-97
@@ -1,59 +1,83 @@
|
||||
{
|
||||
"html_body": [
|
||||
2
|
||||
"messages": [
|
||||
{
|
||||
"id": 0,
|
||||
"root": 0,
|
||||
"container": null,
|
||||
"source": "raw",
|
||||
"text_body": [
|
||||
1
|
||||
],
|
||||
"html_body": [
|
||||
2
|
||||
],
|
||||
"attachments": [],
|
||||
"has_attachments": false
|
||||
}
|
||||
],
|
||||
"text_body": [
|
||||
1
|
||||
],
|
||||
"attachments": [],
|
||||
"parts": [
|
||||
{
|
||||
"id": 0,
|
||||
"message": 0,
|
||||
"parent": null,
|
||||
"kind": "multipart",
|
||||
"children": [
|
||||
1,
|
||||
2
|
||||
],
|
||||
"encoding": "none",
|
||||
"flags": [],
|
||||
"roles": [],
|
||||
"role": "container",
|
||||
"offset_header": 0,
|
||||
"offset_body": 516,
|
||||
"offset_end": 2831,
|
||||
"headers": [
|
||||
{
|
||||
"name": "from",
|
||||
"name": "From",
|
||||
"value": {
|
||||
"Address": {
|
||||
"List": [
|
||||
{
|
||||
"address": [
|
||||
{
|
||||
"mailbox": {
|
||||
"name": "Doug Sauder",
|
||||
"address": "doug@example.com"
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
"offset_field": 0,
|
||||
"offset_start": 5,
|
||||
"offset_end": 39
|
||||
},
|
||||
{
|
||||
"name": "to",
|
||||
"name": "To",
|
||||
"value": {
|
||||
"Address": {
|
||||
"List": [
|
||||
{
|
||||
"address": [
|
||||
{
|
||||
"mailbox": {
|
||||
"name": "Joe Blow",
|
||||
"address": "jblow@example.com"
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
"offset_field": 39,
|
||||
"offset_start": 42,
|
||||
"offset_end": 74
|
||||
},
|
||||
{
|
||||
"name": "subject",
|
||||
"name": "Subject",
|
||||
"value": {
|
||||
"Text": "Test message from Microsoft Outlook 00"
|
||||
"text": "Test message from Microsoft Outlook 00"
|
||||
},
|
||||
"offset_field": 74,
|
||||
"offset_start": 82,
|
||||
"offset_end": 122
|
||||
},
|
||||
{
|
||||
"name": "date",
|
||||
"name": "Date",
|
||||
"value": {
|
||||
"DateTime": {
|
||||
"date_time": {
|
||||
"year": 2000,
|
||||
"month": 5,
|
||||
"day": 17,
|
||||
@@ -70,34 +94,36 @@
|
||||
"offset_end": 160
|
||||
},
|
||||
{
|
||||
"name": "message_id",
|
||||
"name": "Message-ID",
|
||||
"value": {
|
||||
"Text": "NDBBIAKOPKHFGPLCODIGCEKFCHAA.doug@example.com"
|
||||
"text_list": [
|
||||
"NDBBIAKOPKHFGPLCODIGCEKFCHAA.doug@example.com"
|
||||
]
|
||||
},
|
||||
"offset_field": 160,
|
||||
"offset_start": 171,
|
||||
"offset_end": 220
|
||||
},
|
||||
{
|
||||
"name": "mime_version",
|
||||
"name": "MIME-Version",
|
||||
"value": {
|
||||
"Text": "1.0"
|
||||
"text": "1.0"
|
||||
},
|
||||
"offset_field": 220,
|
||||
"offset_start": 233,
|
||||
"offset_end": 238
|
||||
},
|
||||
{
|
||||
"name": "content_type",
|
||||
"name": "Content-Type",
|
||||
"value": {
|
||||
"ContentType": {
|
||||
"c_type": "multipart",
|
||||
"c_subtype": "alternative",
|
||||
"content_type": {
|
||||
"type": "multipart",
|
||||
"subtype": "alternative",
|
||||
"attributes": [
|
||||
{
|
||||
"name": "boundary",
|
||||
"value": "----=_NextPart_000_0005_01BFC037.799BEF60"
|
||||
}
|
||||
[
|
||||
"boundary",
|
||||
"----=_NextPart_000_0005_01BFC037.799BEF60"
|
||||
]
|
||||
]
|
||||
}
|
||||
},
|
||||
@@ -106,83 +132,78 @@
|
||||
"offset_end": 329
|
||||
},
|
||||
{
|
||||
"name": {
|
||||
"other": "X-Priority"
|
||||
},
|
||||
"name": "X-Priority",
|
||||
"value": {
|
||||
"Text": "3 (Normal)"
|
||||
"text": "3 (Normal)"
|
||||
},
|
||||
"offset_field": 329,
|
||||
"offset_start": 340,
|
||||
"offset_end": 352
|
||||
},
|
||||
{
|
||||
"name": {
|
||||
"other": "X-MSMail-Priority"
|
||||
},
|
||||
"name": "X-MSMail-Priority",
|
||||
"value": {
|
||||
"Text": "Normal"
|
||||
"text": "Normal"
|
||||
},
|
||||
"offset_field": 352,
|
||||
"offset_start": 370,
|
||||
"offset_end": 378
|
||||
},
|
||||
{
|
||||
"name": {
|
||||
"other": "X-Mailer"
|
||||
},
|
||||
"name": "X-Mailer",
|
||||
"value": {
|
||||
"Text": "Microsoft Outlook IMO, Build 9.0.2416 (9.0.2910.0)"
|
||||
"text": "Microsoft Outlook IMO, Build 9.0.2416 (9.0.2910.0)"
|
||||
},
|
||||
"offset_field": 378,
|
||||
"offset_start": 387,
|
||||
"offset_end": 439
|
||||
},
|
||||
{
|
||||
"name": "importance",
|
||||
"name": "Importance",
|
||||
"value": {
|
||||
"Text": "Normal"
|
||||
"text": "Normal"
|
||||
},
|
||||
"offset_field": 439,
|
||||
"offset_start": 450,
|
||||
"offset_end": 458
|
||||
},
|
||||
{
|
||||
"name": {
|
||||
"other": "X-MimeOLE"
|
||||
},
|
||||
"name": "X-MimeOLE",
|
||||
"value": {
|
||||
"Text": "Produced By Microsoft MimeOLE V5.00.2314.1300"
|
||||
"text": "Produced By Microsoft MimeOLE V5.00.2314.1300"
|
||||
},
|
||||
"offset_field": 458,
|
||||
"offset_start": 468,
|
||||
"offset_end": 515
|
||||
}
|
||||
],
|
||||
"is_encoding_problem": false,
|
||||
"body": {
|
||||
"Multipart": [
|
||||
1,
|
||||
2
|
||||
]
|
||||
},
|
||||
"offset_header": 0,
|
||||
"offset_body": 516,
|
||||
"offset_end": 2831
|
||||
]
|
||||
},
|
||||
{
|
||||
"id": 1,
|
||||
"message": 0,
|
||||
"parent": 0,
|
||||
"kind": "text",
|
||||
"encoding": "quoted-printable",
|
||||
"flags": [],
|
||||
"roles": [
|
||||
"text_body"
|
||||
],
|
||||
"role": "text_body",
|
||||
"offset_header": 606,
|
||||
"offset_body": 699,
|
||||
"offset_end": 1484,
|
||||
"headers": [
|
||||
{
|
||||
"name": "content_type",
|
||||
"name": "Content-Type",
|
||||
"value": {
|
||||
"ContentType": {
|
||||
"c_type": "text",
|
||||
"c_subtype": "plain",
|
||||
"content_type": {
|
||||
"type": "text",
|
||||
"subtype": "plain",
|
||||
"attributes": [
|
||||
{
|
||||
"name": "charset",
|
||||
"value": "iso-8859-1"
|
||||
}
|
||||
[
|
||||
"charset",
|
||||
"iso-8859-1"
|
||||
]
|
||||
]
|
||||
}
|
||||
},
|
||||
@@ -191,36 +212,44 @@
|
||||
"offset_end": 654
|
||||
},
|
||||
{
|
||||
"name": "content_transfer_encoding",
|
||||
"name": "Content-Transfer-Encoding",
|
||||
"value": {
|
||||
"Text": "quoted-printable"
|
||||
"text": "quoted-printable"
|
||||
},
|
||||
"offset_field": 654,
|
||||
"offset_start": 680,
|
||||
"offset_end": 698
|
||||
}
|
||||
],
|
||||
"is_encoding_problem": false,
|
||||
"body": {
|
||||
"Text": "\nThe Hare and the Tortoise \n \nA HARE one day ridiculed the short feet and slow pace of the Tortoise, who replied, laughing: \"Though you be swift as the wind, I will beat you in a race.\" The Hare, believing her assertion to be simply impossible, assented to the proposal; and they agreed that the Fox should choose the course and fix the goal. On the day appointed for the race the two started together. The Tortoise never for a moment stopped, but went on with a slow but steady pace straight to the end of the course. The Hare, lying down by the wayside, fell fast asleep. At last waking up, and moving as fast as he could, he saw the Tortoise had reached the goal, and was comfortably dozing after her fatigue. \n \nSlow but steady wins the race. \n\n"
|
||||
},
|
||||
"offset_header": 606,
|
||||
"offset_body": 699,
|
||||
"offset_end": 1484
|
||||
"text": "\nThe Hare and the Tortoise \n \nA HARE one day ridiculed the short feet and slow pace of the Tortoise, who replied, laughing: \"Though you be swift as the wind, I will beat you in a race.\" The Hare, believing her assertion to be simply impossible, assented to the proposal; and they agreed that the Fox should choose the course and fix the goal. On the day appointed for the race the two started together. The Tortoise never for a moment stopped, but went on with a slow but steady pace straight to the end of the course. The Hare, lying down by the wayside, fell fast asleep. At last waking up, and moving as fast as he could, he saw the Tortoise had reached the goal, and was comfortably dozing after her fatigue. \n \nSlow but steady wins the race. \n\n",
|
||||
"decode_problems": []
|
||||
},
|
||||
{
|
||||
"id": 2,
|
||||
"message": 0,
|
||||
"parent": 0,
|
||||
"kind": "html",
|
||||
"encoding": "quoted-printable",
|
||||
"flags": [],
|
||||
"roles": [
|
||||
"html_body"
|
||||
],
|
||||
"role": "html_body",
|
||||
"offset_header": 1529,
|
||||
"offset_body": 1621,
|
||||
"offset_end": 2784,
|
||||
"headers": [
|
||||
{
|
||||
"name": "content_type",
|
||||
"name": "Content-Type",
|
||||
"value": {
|
||||
"ContentType": {
|
||||
"c_type": "text",
|
||||
"c_subtype": "html",
|
||||
"content_type": {
|
||||
"type": "text",
|
||||
"subtype": "html",
|
||||
"attributes": [
|
||||
{
|
||||
"name": "charset",
|
||||
"value": "iso-8859-1"
|
||||
}
|
||||
[
|
||||
"charset",
|
||||
"iso-8859-1"
|
||||
]
|
||||
]
|
||||
}
|
||||
},
|
||||
@@ -229,22 +258,17 @@
|
||||
"offset_end": 1576
|
||||
},
|
||||
{
|
||||
"name": "content_transfer_encoding",
|
||||
"name": "Content-Transfer-Encoding",
|
||||
"value": {
|
||||
"Text": "quoted-printable"
|
||||
"text": "quoted-printable"
|
||||
},
|
||||
"offset_field": 1576,
|
||||
"offset_start": 1602,
|
||||
"offset_end": 1620
|
||||
}
|
||||
],
|
||||
"is_encoding_problem": false,
|
||||
"body": {
|
||||
"Html": "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.0 Transitional//EN\">\n<HTML><HEAD>\n<META content=\"text/html; charset=iso-8859-1\" http-equiv=Content-Type>\n<META content=\"MSHTML 5.00.2314.1000\" name=GENERATOR></HEAD>\n<BODY>\n<DIV><FONT face=Arial size=2><BR>The Hare and the Tortoise <BR> <BR>A HARE \none day ridiculed the short feet and slow pace of the Tortoise, who replied, \nlaughing: \"Though you be swift as the wind, I will beat you in a \nrace.\" The Hare, believing her assertion to be simply impossible, assented \nto the proposal; and they agreed that the Fox should choose the course and fix \nthe goal. On the day appointed for the race the two started \ntogether. The Tortoise never for a moment stopped, but went on with a slow \nbut steady pace straight to the end of the course. The Hare, lying down by \nthe wayside, fell fast asleep. At last waking up, and moving as fast as he \ncould, he saw the Tortoise had reached the goal, and was comfortably dozing \nafter her fatigue. <BR> <BR>Slow but steady wins the race. \n<BR></FONT></DIV></BODY></HTML>\n"
|
||||
},
|
||||
"offset_header": 1529,
|
||||
"offset_body": 1621,
|
||||
"offset_end": 2784
|
||||
"text": "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.0 Transitional//EN\">\n<HTML><HEAD>\n<META content=\"text/html; charset=iso-8859-1\" http-equiv=Content-Type>\n<META content=\"MSHTML 5.00.2314.1000\" name=GENERATOR></HEAD>\n<BODY>\n<DIV><FONT face=Arial size=2><BR>The Hare and the Tortoise <BR> <BR>A HARE \none day ridiculed the short feet and slow pace of the Tortoise, who replied, \nlaughing: \"Though you be swift as the wind, I will beat you in a \nrace.\" The Hare, believing her assertion to be simply impossible, assented \nto the proposal; and they agreed that the Fox should choose the course and fix \nthe goal. On the day appointed for the race the two started \ntogether. The Tortoise never for a moment stopped, but went on with a slow \nbut steady pace straight to the end of the course. The Hare, lying down by \nthe wayside, fell fast asleep. At last waking up, and moving as fast as he \ncould, he saw the Tortoise had reached the goal, and was comfortably dozing \nafter her fatigue. <BR> <BR>Slow but steady wins the race. \n<BR></FONT></DIV></BODY></HTML>\n",
|
||||
"decode_problems": []
|
||||
}
|
||||
]
|
||||
}
|
||||
+318
-5649
File diff suppressed because it is too large
Load Diff
+318
-5649
File diff suppressed because it is too large
Load Diff
+157
-3182
File diff suppressed because it is too large
Load Diff
+157
-3132
File diff suppressed because it is too large
Load Diff
+163
-3870
File diff suppressed because it is too large
Load Diff
+163
-3803
File diff suppressed because it is too large
Load Diff
+225
-2952
File diff suppressed because it is too large
Load Diff
+225
-2952
File diff suppressed because it is too large
Load Diff
+215
-2923
File diff suppressed because it is too large
Load Diff
+215
-2923
File diff suppressed because it is too large
Load Diff
@@ -1,59 +1,82 @@
|
||||
{
|
||||
"html_body": [
|
||||
0
|
||||
"messages": [
|
||||
{
|
||||
"id": 0,
|
||||
"root": 0,
|
||||
"container": null,
|
||||
"source": "raw",
|
||||
"text_body": [
|
||||
0
|
||||
],
|
||||
"html_body": [
|
||||
0
|
||||
],
|
||||
"attachments": [],
|
||||
"has_attachments": false
|
||||
}
|
||||
],
|
||||
"text_body": [
|
||||
0
|
||||
],
|
||||
"attachments": [],
|
||||
"parts": [
|
||||
{
|
||||
"id": 0,
|
||||
"message": 0,
|
||||
"parent": null,
|
||||
"kind": "text",
|
||||
"encoding": "none",
|
||||
"flags": [],
|
||||
"roles": [
|
||||
"text_body",
|
||||
"html_body"
|
||||
],
|
||||
"role": "text_body",
|
||||
"offset_header": 0,
|
||||
"offset_body": 543,
|
||||
"offset_end": 1295,
|
||||
"headers": [
|
||||
{
|
||||
"name": "from",
|
||||
"name": "From",
|
||||
"value": {
|
||||
"Address": {
|
||||
"List": [
|
||||
{
|
||||
"address": [
|
||||
{
|
||||
"mailbox": {
|
||||
"name": "Doug Sauder",
|
||||
"address": "doug@example.com"
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
"offset_field": 0,
|
||||
"offset_start": 5,
|
||||
"offset_end": 40
|
||||
},
|
||||
{
|
||||
"name": "to",
|
||||
"name": "To",
|
||||
"value": {
|
||||
"Address": {
|
||||
"List": [
|
||||
{
|
||||
"address": [
|
||||
{
|
||||
"mailbox": {
|
||||
"name": "J�rgen Schm�rgen",
|
||||
"address": "schmuergen@example.com"
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
"offset_field": 40,
|
||||
"offset_start": 43,
|
||||
"offset_end": 89
|
||||
},
|
||||
{
|
||||
"name": "subject",
|
||||
"name": "Subject",
|
||||
"value": {
|
||||
"Text": "Die Hasen und die Fr�sche (Microsoft Outlook 00)"
|
||||
"text": "Die Hasen und die Fr�sche (Microsoft Outlook 00)"
|
||||
},
|
||||
"offset_field": 89,
|
||||
"offset_start": 97,
|
||||
"offset_end": 148
|
||||
},
|
||||
{
|
||||
"name": "date",
|
||||
"name": "Date",
|
||||
"value": {
|
||||
"DateTime": {
|
||||
"date_time": {
|
||||
"year": 2000,
|
||||
"month": 5,
|
||||
"day": 17,
|
||||
@@ -70,34 +93,36 @@
|
||||
"offset_end": 187
|
||||
},
|
||||
{
|
||||
"name": "message_id",
|
||||
"name": "Message-ID",
|
||||
"value": {
|
||||
"Text": "NDBBIAKOPKHFGPLCODIGIEKBCHAA.doug@example.com"
|
||||
"text_list": [
|
||||
"NDBBIAKOPKHFGPLCODIGIEKBCHAA.doug@example.com"
|
||||
]
|
||||
},
|
||||
"offset_field": 187,
|
||||
"offset_start": 198,
|
||||
"offset_end": 248
|
||||
},
|
||||
{
|
||||
"name": "mime_version",
|
||||
"name": "MIME-Version",
|
||||
"value": {
|
||||
"Text": "1.0"
|
||||
"text": "1.0"
|
||||
},
|
||||
"offset_field": 248,
|
||||
"offset_start": 261,
|
||||
"offset_end": 267
|
||||
},
|
||||
{
|
||||
"name": "content_type",
|
||||
"name": "Content-Type",
|
||||
"value": {
|
||||
"ContentType": {
|
||||
"c_type": "text",
|
||||
"c_subtype": "plain",
|
||||
"content_type": {
|
||||
"type": "text",
|
||||
"subtype": "plain",
|
||||
"attributes": [
|
||||
{
|
||||
"name": "charset",
|
||||
"value": "iso-8859-1"
|
||||
}
|
||||
[
|
||||
"charset",
|
||||
"iso-8859-1"
|
||||
]
|
||||
]
|
||||
}
|
||||
},
|
||||
@@ -106,75 +131,62 @@
|
||||
"offset_end": 317
|
||||
},
|
||||
{
|
||||
"name": "content_transfer_encoding",
|
||||
"name": "Content-Transfer-Encoding",
|
||||
"value": {
|
||||
"Text": "8bit"
|
||||
"text": "8bit"
|
||||
},
|
||||
"offset_field": 317,
|
||||
"offset_start": 343,
|
||||
"offset_end": 350
|
||||
},
|
||||
{
|
||||
"name": {
|
||||
"other": "X-Priority"
|
||||
},
|
||||
"name": "X-Priority",
|
||||
"value": {
|
||||
"Text": "3 (Normal)"
|
||||
"text": "3 (Normal)"
|
||||
},
|
||||
"offset_field": 350,
|
||||
"offset_start": 361,
|
||||
"offset_end": 374
|
||||
},
|
||||
{
|
||||
"name": {
|
||||
"other": "X-MSMail-Priority"
|
||||
},
|
||||
"name": "X-MSMail-Priority",
|
||||
"value": {
|
||||
"Text": "Normal"
|
||||
"text": "Normal"
|
||||
},
|
||||
"offset_field": 374,
|
||||
"offset_start": 392,
|
||||
"offset_end": 401
|
||||
},
|
||||
{
|
||||
"name": {
|
||||
"other": "X-Mailer"
|
||||
},
|
||||
"name": "X-Mailer",
|
||||
"value": {
|
||||
"Text": "Microsoft Outlook IMO, Build 9.0.2416 (9.0.2910.0)"
|
||||
"text": "Microsoft Outlook IMO, Build 9.0.2416 (9.0.2910.0)"
|
||||
},
|
||||
"offset_field": 401,
|
||||
"offset_start": 410,
|
||||
"offset_end": 463
|
||||
},
|
||||
{
|
||||
"name": "importance",
|
||||
"name": "Importance",
|
||||
"value": {
|
||||
"Text": "Normal"
|
||||
"text": "Normal"
|
||||
},
|
||||
"offset_field": 463,
|
||||
"offset_start": 474,
|
||||
"offset_end": 483
|
||||
},
|
||||
{
|
||||
"name": {
|
||||
"other": "X-MimeOLE"
|
||||
},
|
||||
"name": "X-MimeOLE",
|
||||
"value": {
|
||||
"Text": "Produced By Microsoft MimeOLE V5.00.2314.1300"
|
||||
"text": "Produced By Microsoft MimeOLE V5.00.2314.1300"
|
||||
},
|
||||
"offset_field": 483,
|
||||
"offset_start": 493,
|
||||
"offset_end": 541
|
||||
}
|
||||
],
|
||||
"is_encoding_problem": false,
|
||||
"body": {
|
||||
"Text": "Die Hasen und die Frösche\r\n\r\nDie Hasen klagten einst über ihre mißliche Lage; \"wir leben\", sprach ein\r\nRedner, \"in steter Furcht vor Menschen und Tieren, eine Beute der Hunde, der\r\nAdler, ja fast aller Raubtiere! Unsere stete Angst ist ärger als der Tod\r\nselbst. Auf, laßt uns ein für allemal sterben.\"\r\n\r\nIn einem nahen Teich wollten sie sich nun ersäufen; sie eilten ihm zu;\r\nallein das außerordentliche Getöse und ihre wunderbare Gestalt erschreckte\r\neine Menge Frösche, die am Ufer saßen, so sehr, daß sie aufs schnellste\r\nuntertauchten.\r\n\r\n\"Halt\", rief nun eben dieser Sprecher, \"wir wollen das Ersäufen noch ein\r\nwenig aufschieben, denn auch uns fürchten, wie ihr seht, einige Tiere,\r\nwelche also wohl noch unglücklicher sein müssen als wir.\"\r\n\r\n"
|
||||
},
|
||||
"offset_header": 0,
|
||||
"offset_body": 543,
|
||||
"offset_end": 1295
|
||||
"text": "Die Hasen und die Frösche\r\n\r\nDie Hasen klagten einst über ihre mißliche Lage; \"wir leben\", sprach ein\r\nRedner, \"in steter Furcht vor Menschen und Tieren, eine Beute der Hunde, der\r\nAdler, ja fast aller Raubtiere! Unsere stete Angst ist ärger als der Tod\r\nselbst. Auf, laßt uns ein für allemal sterben.\"\r\n\r\nIn einem nahen Teich wollten sie sich nun ersäufen; sie eilten ihm zu;\r\nallein das außerordentliche Getöse und ihre wunderbare Gestalt erschreckte\r\neine Menge Frösche, die am Ufer saßen, so sehr, daß sie aufs schnellste\r\nuntertauchten.\r\n\r\n\"Halt\", rief nun eben dieser Sprecher, \"wir wollen das Ersäufen noch ein\r\nwenig aufschieben, denn auch uns fürchten, wie ihr seht, einige Tiere,\r\nwelche also wohl noch unglücklicher sein müssen als wir.\"\r\n\r\n",
|
||||
"decode_problems": []
|
||||
}
|
||||
]
|
||||
}
|
||||
@@ -1,59 +1,82 @@
|
||||
{
|
||||
"html_body": [
|
||||
0
|
||||
"messages": [
|
||||
{
|
||||
"id": 0,
|
||||
"root": 0,
|
||||
"container": null,
|
||||
"source": "raw",
|
||||
"text_body": [
|
||||
0
|
||||
],
|
||||
"html_body": [
|
||||
0
|
||||
],
|
||||
"attachments": [],
|
||||
"has_attachments": false
|
||||
}
|
||||
],
|
||||
"text_body": [
|
||||
0
|
||||
],
|
||||
"attachments": [],
|
||||
"parts": [
|
||||
{
|
||||
"id": 0,
|
||||
"message": 0,
|
||||
"parent": null,
|
||||
"kind": "text",
|
||||
"encoding": "none",
|
||||
"flags": [],
|
||||
"roles": [
|
||||
"text_body",
|
||||
"html_body"
|
||||
],
|
||||
"role": "text_body",
|
||||
"offset_header": 0,
|
||||
"offset_body": 528,
|
||||
"offset_end": 1264,
|
||||
"headers": [
|
||||
{
|
||||
"name": "from",
|
||||
"name": "From",
|
||||
"value": {
|
||||
"Address": {
|
||||
"List": [
|
||||
{
|
||||
"address": [
|
||||
{
|
||||
"mailbox": {
|
||||
"name": "Doug Sauder",
|
||||
"address": "doug@example.com"
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
"offset_field": 0,
|
||||
"offset_start": 5,
|
||||
"offset_end": 39
|
||||
},
|
||||
{
|
||||
"name": "to",
|
||||
"name": "To",
|
||||
"value": {
|
||||
"Address": {
|
||||
"List": [
|
||||
{
|
||||
"address": [
|
||||
{
|
||||
"mailbox": {
|
||||
"name": "J�rgen Schm�rgen",
|
||||
"address": "schmuergen@example.com"
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
"offset_field": 39,
|
||||
"offset_start": 42,
|
||||
"offset_end": 87
|
||||
},
|
||||
{
|
||||
"name": "subject",
|
||||
"name": "Subject",
|
||||
"value": {
|
||||
"Text": "Die Hasen und die Fr�sche (Microsoft Outlook 00)"
|
||||
"text": "Die Hasen und die Fr�sche (Microsoft Outlook 00)"
|
||||
},
|
||||
"offset_field": 87,
|
||||
"offset_start": 95,
|
||||
"offset_end": 145
|
||||
},
|
||||
{
|
||||
"name": "date",
|
||||
"name": "Date",
|
||||
"value": {
|
||||
"DateTime": {
|
||||
"date_time": {
|
||||
"year": 2000,
|
||||
"month": 5,
|
||||
"day": 17,
|
||||
@@ -70,34 +93,36 @@
|
||||
"offset_end": 183
|
||||
},
|
||||
{
|
||||
"name": "message_id",
|
||||
"name": "Message-ID",
|
||||
"value": {
|
||||
"Text": "NDBBIAKOPKHFGPLCODIGIEKBCHAA.doug@example.com"
|
||||
"text_list": [
|
||||
"NDBBIAKOPKHFGPLCODIGIEKBCHAA.doug@example.com"
|
||||
]
|
||||
},
|
||||
"offset_field": 183,
|
||||
"offset_start": 194,
|
||||
"offset_end": 243
|
||||
},
|
||||
{
|
||||
"name": "mime_version",
|
||||
"name": "MIME-Version",
|
||||
"value": {
|
||||
"Text": "1.0"
|
||||
"text": "1.0"
|
||||
},
|
||||
"offset_field": 243,
|
||||
"offset_start": 256,
|
||||
"offset_end": 261
|
||||
},
|
||||
{
|
||||
"name": "content_type",
|
||||
"name": "Content-Type",
|
||||
"value": {
|
||||
"ContentType": {
|
||||
"c_type": "text",
|
||||
"c_subtype": "plain",
|
||||
"content_type": {
|
||||
"type": "text",
|
||||
"subtype": "plain",
|
||||
"attributes": [
|
||||
{
|
||||
"name": "charset",
|
||||
"value": "iso-8859-1"
|
||||
}
|
||||
[
|
||||
"charset",
|
||||
"iso-8859-1"
|
||||
]
|
||||
]
|
||||
}
|
||||
},
|
||||
@@ -106,75 +131,62 @@
|
||||
"offset_end": 309
|
||||
},
|
||||
{
|
||||
"name": "content_transfer_encoding",
|
||||
"name": "Content-Transfer-Encoding",
|
||||
"value": {
|
||||
"Text": "8bit"
|
||||
"text": "8bit"
|
||||
},
|
||||
"offset_field": 309,
|
||||
"offset_start": 335,
|
||||
"offset_end": 341
|
||||
},
|
||||
{
|
||||
"name": {
|
||||
"other": "X-Priority"
|
||||
},
|
||||
"name": "X-Priority",
|
||||
"value": {
|
||||
"Text": "3 (Normal)"
|
||||
"text": "3 (Normal)"
|
||||
},
|
||||
"offset_field": 341,
|
||||
"offset_start": 352,
|
||||
"offset_end": 364
|
||||
},
|
||||
{
|
||||
"name": {
|
||||
"other": "X-MSMail-Priority"
|
||||
},
|
||||
"name": "X-MSMail-Priority",
|
||||
"value": {
|
||||
"Text": "Normal"
|
||||
"text": "Normal"
|
||||
},
|
||||
"offset_field": 364,
|
||||
"offset_start": 382,
|
||||
"offset_end": 390
|
||||
},
|
||||
{
|
||||
"name": {
|
||||
"other": "X-Mailer"
|
||||
},
|
||||
"name": "X-Mailer",
|
||||
"value": {
|
||||
"Text": "Microsoft Outlook IMO, Build 9.0.2416 (9.0.2910.0)"
|
||||
"text": "Microsoft Outlook IMO, Build 9.0.2416 (9.0.2910.0)"
|
||||
},
|
||||
"offset_field": 390,
|
||||
"offset_start": 399,
|
||||
"offset_end": 451
|
||||
},
|
||||
{
|
||||
"name": "importance",
|
||||
"name": "Importance",
|
||||
"value": {
|
||||
"Text": "Normal"
|
||||
"text": "Normal"
|
||||
},
|
||||
"offset_field": 451,
|
||||
"offset_start": 462,
|
||||
"offset_end": 470
|
||||
},
|
||||
{
|
||||
"name": {
|
||||
"other": "X-MimeOLE"
|
||||
},
|
||||
"name": "X-MimeOLE",
|
||||
"value": {
|
||||
"Text": "Produced By Microsoft MimeOLE V5.00.2314.1300"
|
||||
"text": "Produced By Microsoft MimeOLE V5.00.2314.1300"
|
||||
},
|
||||
"offset_field": 470,
|
||||
"offset_start": 480,
|
||||
"offset_end": 527
|
||||
}
|
||||
],
|
||||
"is_encoding_problem": false,
|
||||
"body": {
|
||||
"Text": "Die Hasen und die Frösche\n\nDie Hasen klagten einst über ihre mißliche Lage; \"wir leben\", sprach ein\nRedner, \"in steter Furcht vor Menschen und Tieren, eine Beute der Hunde, der\nAdler, ja fast aller Raubtiere! Unsere stete Angst ist ärger als der Tod\nselbst. Auf, laßt uns ein für allemal sterben.\"\n\nIn einem nahen Teich wollten sie sich nun ersäufen; sie eilten ihm zu;\nallein das außerordentliche Getöse und ihre wunderbare Gestalt erschreckte\neine Menge Frösche, die am Ufer saßen, so sehr, daß sie aufs schnellste\nuntertauchten.\n\n\"Halt\", rief nun eben dieser Sprecher, \"wir wollen das Ersäufen noch ein\nwenig aufschieben, denn auch uns fürchten, wie ihr seht, einige Tiere,\nwelche also wohl noch unglücklicher sein müssen als wir.\"\n\n"
|
||||
},
|
||||
"offset_header": 0,
|
||||
"offset_body": 528,
|
||||
"offset_end": 1264
|
||||
"text": "Die Hasen und die Frösche\n\nDie Hasen klagten einst über ihre mißliche Lage; \"wir leben\", sprach ein\nRedner, \"in steter Furcht vor Menschen und Tieren, eine Beute der Hunde, der\nAdler, ja fast aller Raubtiere! Unsere stete Angst ist ärger als der Tod\nselbst. Auf, laßt uns ein für allemal sterben.\"\n\nIn einem nahen Teich wollten sie sich nun ersäufen; sie eilten ihm zu;\nallein das außerordentliche Getöse und ihre wunderbare Gestalt erschreckte\neine Menge Frösche, die am Ufer saßen, so sehr, daß sie aufs schnellste\nuntertauchten.\n\n\"Halt\", rief nun eben dieser Sprecher, \"wir wollen das Ersäufen noch ein\nwenig aufschieben, denn auch uns fürchten, wie ihr seht, einige Tiere,\nwelche also wohl noch unglücklicher sein müssen als wir.\"\n\n",
|
||||
"decode_problems": []
|
||||
}
|
||||
]
|
||||
}
|
||||
+270
-4288
File diff suppressed because it is too large
Load Diff
+270
-4288
File diff suppressed because it is too large
Load Diff
@@ -1,59 +1,82 @@
|
||||
{
|
||||
"html_body": [
|
||||
0
|
||||
"messages": [
|
||||
{
|
||||
"id": 0,
|
||||
"root": 0,
|
||||
"container": null,
|
||||
"source": "raw",
|
||||
"text_body": [
|
||||
0
|
||||
],
|
||||
"html_body": [
|
||||
0
|
||||
],
|
||||
"attachments": [],
|
||||
"has_attachments": false
|
||||
}
|
||||
],
|
||||
"text_body": [
|
||||
0
|
||||
],
|
||||
"attachments": [],
|
||||
"parts": [
|
||||
{
|
||||
"id": 0,
|
||||
"message": 0,
|
||||
"parent": null,
|
||||
"kind": "text",
|
||||
"encoding": "base64",
|
||||
"flags": [],
|
||||
"roles": [
|
||||
"text_body",
|
||||
"html_body"
|
||||
],
|
||||
"role": "text_body",
|
||||
"offset_header": 0,
|
||||
"offset_body": 545,
|
||||
"offset_end": 1571,
|
||||
"headers": [
|
||||
{
|
||||
"name": "from",
|
||||
"name": "From",
|
||||
"value": {
|
||||
"Address": {
|
||||
"List": [
|
||||
{
|
||||
"address": [
|
||||
{
|
||||
"mailbox": {
|
||||
"name": "Doug Sauder",
|
||||
"address": "doug@example.com"
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
"offset_field": 0,
|
||||
"offset_start": 5,
|
||||
"offset_end": 40
|
||||
},
|
||||
{
|
||||
"name": "to",
|
||||
"name": "To",
|
||||
"value": {
|
||||
"Address": {
|
||||
"List": [
|
||||
{
|
||||
"address": [
|
||||
{
|
||||
"mailbox": {
|
||||
"name": "J�rgen Schm�rgen",
|
||||
"address": "schmuergen@example.com"
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
"offset_field": 40,
|
||||
"offset_start": 43,
|
||||
"offset_end": 89
|
||||
},
|
||||
{
|
||||
"name": "subject",
|
||||
"name": "Subject",
|
||||
"value": {
|
||||
"Text": "Die Hasen und die Fr�sche (Microsoft Outlook 00)"
|
||||
"text": "Die Hasen und die Fr�sche (Microsoft Outlook 00)"
|
||||
},
|
||||
"offset_field": 89,
|
||||
"offset_start": 97,
|
||||
"offset_end": 148
|
||||
},
|
||||
{
|
||||
"name": "date",
|
||||
"name": "Date",
|
||||
"value": {
|
||||
"DateTime": {
|
||||
"date_time": {
|
||||
"year": 2000,
|
||||
"month": 5,
|
||||
"day": 17,
|
||||
@@ -70,34 +93,36 @@
|
||||
"offset_end": 187
|
||||
},
|
||||
{
|
||||
"name": "message_id",
|
||||
"name": "Message-ID",
|
||||
"value": {
|
||||
"Text": "NDBBIAKOPKHFGPLCODIGAEKCCHAA.doug@example.com"
|
||||
"text_list": [
|
||||
"NDBBIAKOPKHFGPLCODIGAEKCCHAA.doug@example.com"
|
||||
]
|
||||
},
|
||||
"offset_field": 187,
|
||||
"offset_start": 198,
|
||||
"offset_end": 248
|
||||
},
|
||||
{
|
||||
"name": "mime_version",
|
||||
"name": "MIME-Version",
|
||||
"value": {
|
||||
"Text": "1.0"
|
||||
"text": "1.0"
|
||||
},
|
||||
"offset_field": 248,
|
||||
"offset_start": 261,
|
||||
"offset_end": 267
|
||||
},
|
||||
{
|
||||
"name": "content_type",
|
||||
"name": "Content-Type",
|
||||
"value": {
|
||||
"ContentType": {
|
||||
"c_type": "text",
|
||||
"c_subtype": "plain",
|
||||
"content_type": {
|
||||
"type": "text",
|
||||
"subtype": "plain",
|
||||
"attributes": [
|
||||
{
|
||||
"name": "charset",
|
||||
"value": "iso-8859-1"
|
||||
}
|
||||
[
|
||||
"charset",
|
||||
"iso-8859-1"
|
||||
]
|
||||
]
|
||||
}
|
||||
},
|
||||
@@ -106,75 +131,62 @@
|
||||
"offset_end": 317
|
||||
},
|
||||
{
|
||||
"name": "content_transfer_encoding",
|
||||
"name": "Content-Transfer-Encoding",
|
||||
"value": {
|
||||
"Text": "base64"
|
||||
"text": "base64"
|
||||
},
|
||||
"offset_field": 317,
|
||||
"offset_start": 343,
|
||||
"offset_end": 352
|
||||
},
|
||||
{
|
||||
"name": {
|
||||
"other": "X-Priority"
|
||||
},
|
||||
"name": "X-Priority",
|
||||
"value": {
|
||||
"Text": "3 (Normal)"
|
||||
"text": "3 (Normal)"
|
||||
},
|
||||
"offset_field": 352,
|
||||
"offset_start": 363,
|
||||
"offset_end": 376
|
||||
},
|
||||
{
|
||||
"name": {
|
||||
"other": "X-MSMail-Priority"
|
||||
},
|
||||
"name": "X-MSMail-Priority",
|
||||
"value": {
|
||||
"Text": "Normal"
|
||||
"text": "Normal"
|
||||
},
|
||||
"offset_field": 376,
|
||||
"offset_start": 394,
|
||||
"offset_end": 403
|
||||
},
|
||||
{
|
||||
"name": {
|
||||
"other": "X-Mailer"
|
||||
},
|
||||
"name": "X-Mailer",
|
||||
"value": {
|
||||
"Text": "Microsoft Outlook IMO, Build 9.0.2416 (9.0.2910.0)"
|
||||
"text": "Microsoft Outlook IMO, Build 9.0.2416 (9.0.2910.0)"
|
||||
},
|
||||
"offset_field": 403,
|
||||
"offset_start": 412,
|
||||
"offset_end": 465
|
||||
},
|
||||
{
|
||||
"name": "importance",
|
||||
"name": "Importance",
|
||||
"value": {
|
||||
"Text": "Normal"
|
||||
"text": "Normal"
|
||||
},
|
||||
"offset_field": 465,
|
||||
"offset_start": 476,
|
||||
"offset_end": 485
|
||||
},
|
||||
{
|
||||
"name": {
|
||||
"other": "X-MimeOLE"
|
||||
},
|
||||
"name": "X-MimeOLE",
|
||||
"value": {
|
||||
"Text": "Produced By Microsoft MimeOLE V5.00.2314.1300"
|
||||
"text": "Produced By Microsoft MimeOLE V5.00.2314.1300"
|
||||
},
|
||||
"offset_field": 485,
|
||||
"offset_start": 495,
|
||||
"offset_end": 543
|
||||
}
|
||||
],
|
||||
"is_encoding_problem": false,
|
||||
"body": {
|
||||
"Text": "Die Hasen und die Frösche\r\n\r\nDie Hasen klagten einst über ihre mißliche Lage; \"wir leben\", sprach ein Redner, \"in steter Furcht vor Menschen und Tieren, eine Beute der Hunde, der Adler, ja fast aller Raubtiere! Unsere stete Angst ist ärger als der Tod selbst. Auf, laßt uns ein für allemal sterben.\" \r\n\r\nIn einem nahen Teich wollten sie sich nun ersäufen; sie eilten ihm zu; allein das außerordentliche Getöse und ihre wunderbare Gestalt erschreckte eine Menge Frösche, die am Ufer saßen, so sehr, daß sie aufs schnellste untertauchten. \r\n\r\n\"Halt\", rief nun eben dieser Sprecher, \"wir wollen das Ersäufen noch ein wenig aufschieben, denn auch uns fürchten, wie ihr seht, einige Tiere, welche also wohl noch unglücklicher sein müssen als wir.\" \r\n"
|
||||
},
|
||||
"offset_header": 0,
|
||||
"offset_body": 545,
|
||||
"offset_end": 1571
|
||||
"text": "Die Hasen und die Frösche\r\n\r\nDie Hasen klagten einst über ihre mißliche Lage; \"wir leben\", sprach ein Redner, \"in steter Furcht vor Menschen und Tieren, eine Beute der Hunde, der Adler, ja fast aller Raubtiere! Unsere stete Angst ist ärger als der Tod selbst. Auf, laßt uns ein für allemal sterben.\" \r\n\r\nIn einem nahen Teich wollten sie sich nun ersäufen; sie eilten ihm zu; allein das außerordentliche Getöse und ihre wunderbare Gestalt erschreckte eine Menge Frösche, die am Ufer saßen, so sehr, daß sie aufs schnellste untertauchten. \r\n\r\n\"Halt\", rief nun eben dieser Sprecher, \"wir wollen das Ersäufen noch ein wenig aufschieben, denn auch uns fürchten, wie ihr seht, einige Tiere, welche also wohl noch unglücklicher sein müssen als wir.\" \r\n",
|
||||
"decode_problems": []
|
||||
}
|
||||
]
|
||||
}
|
||||
@@ -1,59 +1,82 @@
|
||||
{
|
||||
"html_body": [
|
||||
0
|
||||
"messages": [
|
||||
{
|
||||
"id": 0,
|
||||
"root": 0,
|
||||
"container": null,
|
||||
"source": "raw",
|
||||
"text_body": [
|
||||
0
|
||||
],
|
||||
"html_body": [
|
||||
0
|
||||
],
|
||||
"attachments": [],
|
||||
"has_attachments": false
|
||||
}
|
||||
],
|
||||
"text_body": [
|
||||
0
|
||||
],
|
||||
"attachments": [],
|
||||
"parts": [
|
||||
{
|
||||
"id": 0,
|
||||
"message": 0,
|
||||
"parent": null,
|
||||
"kind": "text",
|
||||
"encoding": "base64",
|
||||
"flags": [],
|
||||
"roles": [
|
||||
"text_body",
|
||||
"html_body"
|
||||
],
|
||||
"role": "text_body",
|
||||
"offset_header": 0,
|
||||
"offset_body": 530,
|
||||
"offset_end": 1541,
|
||||
"headers": [
|
||||
{
|
||||
"name": "from",
|
||||
"name": "From",
|
||||
"value": {
|
||||
"Address": {
|
||||
"List": [
|
||||
{
|
||||
"address": [
|
||||
{
|
||||
"mailbox": {
|
||||
"name": "Doug Sauder",
|
||||
"address": "doug@example.com"
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
"offset_field": 0,
|
||||
"offset_start": 5,
|
||||
"offset_end": 39
|
||||
},
|
||||
{
|
||||
"name": "to",
|
||||
"name": "To",
|
||||
"value": {
|
||||
"Address": {
|
||||
"List": [
|
||||
{
|
||||
"address": [
|
||||
{
|
||||
"mailbox": {
|
||||
"name": "J�rgen Schm�rgen",
|
||||
"address": "schmuergen@example.com"
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
"offset_field": 39,
|
||||
"offset_start": 42,
|
||||
"offset_end": 87
|
||||
},
|
||||
{
|
||||
"name": "subject",
|
||||
"name": "Subject",
|
||||
"value": {
|
||||
"Text": "Die Hasen und die Fr�sche (Microsoft Outlook 00)"
|
||||
"text": "Die Hasen und die Fr�sche (Microsoft Outlook 00)"
|
||||
},
|
||||
"offset_field": 87,
|
||||
"offset_start": 95,
|
||||
"offset_end": 145
|
||||
},
|
||||
{
|
||||
"name": "date",
|
||||
"name": "Date",
|
||||
"value": {
|
||||
"DateTime": {
|
||||
"date_time": {
|
||||
"year": 2000,
|
||||
"month": 5,
|
||||
"day": 17,
|
||||
@@ -70,34 +93,36 @@
|
||||
"offset_end": 183
|
||||
},
|
||||
{
|
||||
"name": "message_id",
|
||||
"name": "Message-ID",
|
||||
"value": {
|
||||
"Text": "NDBBIAKOPKHFGPLCODIGAEKCCHAA.doug@example.com"
|
||||
"text_list": [
|
||||
"NDBBIAKOPKHFGPLCODIGAEKCCHAA.doug@example.com"
|
||||
]
|
||||
},
|
||||
"offset_field": 183,
|
||||
"offset_start": 194,
|
||||
"offset_end": 243
|
||||
},
|
||||
{
|
||||
"name": "mime_version",
|
||||
"name": "MIME-Version",
|
||||
"value": {
|
||||
"Text": "1.0"
|
||||
"text": "1.0"
|
||||
},
|
||||
"offset_field": 243,
|
||||
"offset_start": 256,
|
||||
"offset_end": 261
|
||||
},
|
||||
{
|
||||
"name": "content_type",
|
||||
"name": "Content-Type",
|
||||
"value": {
|
||||
"ContentType": {
|
||||
"c_type": "text",
|
||||
"c_subtype": "plain",
|
||||
"content_type": {
|
||||
"type": "text",
|
||||
"subtype": "plain",
|
||||
"attributes": [
|
||||
{
|
||||
"name": "charset",
|
||||
"value": "iso-8859-1"
|
||||
}
|
||||
[
|
||||
"charset",
|
||||
"iso-8859-1"
|
||||
]
|
||||
]
|
||||
}
|
||||
},
|
||||
@@ -106,75 +131,62 @@
|
||||
"offset_end": 309
|
||||
},
|
||||
{
|
||||
"name": "content_transfer_encoding",
|
||||
"name": "Content-Transfer-Encoding",
|
||||
"value": {
|
||||
"Text": "base64"
|
||||
"text": "base64"
|
||||
},
|
||||
"offset_field": 309,
|
||||
"offset_start": 335,
|
||||
"offset_end": 343
|
||||
},
|
||||
{
|
||||
"name": {
|
||||
"other": "X-Priority"
|
||||
},
|
||||
"name": "X-Priority",
|
||||
"value": {
|
||||
"Text": "3 (Normal)"
|
||||
"text": "3 (Normal)"
|
||||
},
|
||||
"offset_field": 343,
|
||||
"offset_start": 354,
|
||||
"offset_end": 366
|
||||
},
|
||||
{
|
||||
"name": {
|
||||
"other": "X-MSMail-Priority"
|
||||
},
|
||||
"name": "X-MSMail-Priority",
|
||||
"value": {
|
||||
"Text": "Normal"
|
||||
"text": "Normal"
|
||||
},
|
||||
"offset_field": 366,
|
||||
"offset_start": 384,
|
||||
"offset_end": 392
|
||||
},
|
||||
{
|
||||
"name": {
|
||||
"other": "X-Mailer"
|
||||
},
|
||||
"name": "X-Mailer",
|
||||
"value": {
|
||||
"Text": "Microsoft Outlook IMO, Build 9.0.2416 (9.0.2910.0)"
|
||||
"text": "Microsoft Outlook IMO, Build 9.0.2416 (9.0.2910.0)"
|
||||
},
|
||||
"offset_field": 392,
|
||||
"offset_start": 401,
|
||||
"offset_end": 453
|
||||
},
|
||||
{
|
||||
"name": "importance",
|
||||
"name": "Importance",
|
||||
"value": {
|
||||
"Text": "Normal"
|
||||
"text": "Normal"
|
||||
},
|
||||
"offset_field": 453,
|
||||
"offset_start": 464,
|
||||
"offset_end": 472
|
||||
},
|
||||
{
|
||||
"name": {
|
||||
"other": "X-MimeOLE"
|
||||
},
|
||||
"name": "X-MimeOLE",
|
||||
"value": {
|
||||
"Text": "Produced By Microsoft MimeOLE V5.00.2314.1300"
|
||||
"text": "Produced By Microsoft MimeOLE V5.00.2314.1300"
|
||||
},
|
||||
"offset_field": 472,
|
||||
"offset_start": 482,
|
||||
"offset_end": 529
|
||||
}
|
||||
],
|
||||
"is_encoding_problem": false,
|
||||
"body": {
|
||||
"Text": "Die Hasen und die Frösche\r\n\r\nDie Hasen klagten einst über ihre mißliche Lage; \"wir leben\", sprach ein Redner, \"in steter Furcht vor Menschen und Tieren, eine Beute der Hunde, der Adler, ja fast aller Raubtiere! Unsere stete Angst ist ärger als der Tod selbst. Auf, laßt uns ein für allemal sterben.\" \r\n\r\nIn einem nahen Teich wollten sie sich nun ersäufen; sie eilten ihm zu; allein das außerordentliche Getöse und ihre wunderbare Gestalt erschreckte eine Menge Frösche, die am Ufer saßen, so sehr, daß sie aufs schnellste untertauchten. \r\n\r\n\"Halt\", rief nun eben dieser Sprecher, \"wir wollen das Ersäufen noch ein wenig aufschieben, denn auch uns fürchten, wie ihr seht, einige Tiere, welche also wohl noch unglücklicher sein müssen als wir.\" \r\n"
|
||||
},
|
||||
"offset_header": 0,
|
||||
"offset_body": 530,
|
||||
"offset_end": 1541
|
||||
"text": "Die Hasen und die Frösche\r\n\r\nDie Hasen klagten einst über ihre mißliche Lage; \"wir leben\", sprach ein Redner, \"in steter Furcht vor Menschen und Tieren, eine Beute der Hunde, der Adler, ja fast aller Raubtiere! Unsere stete Angst ist ärger als der Tod selbst. Auf, laßt uns ein für allemal sterben.\" \r\n\r\nIn einem nahen Teich wollten sie sich nun ersäufen; sie eilten ihm zu; allein das außerordentliche Getöse und ihre wunderbare Gestalt erschreckte eine Menge Frösche, die am Ufer saßen, so sehr, daß sie aufs schnellste untertauchten. \r\n\r\n\"Halt\", rief nun eben dieser Sprecher, \"wir wollen das Ersäufen noch ein wenig aufschieben, denn auch uns fürchten, wie ihr seht, einige Tiere, welche also wohl noch unglücklicher sein müssen als wir.\" \r\n",
|
||||
"decode_problems": []
|
||||
}
|
||||
]
|
||||
}
|
||||
+194
-1475
File diff suppressed because it is too large
Load Diff
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user