[feat] Core Domain Types, Configuration & RFC Codecs #45

Closed
opened 2026-08-30 17:58:52 +03:00 by jalmari · 1 comment
Owner

Parent

#44: [spec] Port MailSweep to Synchronous Rust

What to build

Set up the root Cargo project structure and implement the core domain models (EmailHeader, Folder, UID, UIDVALIDITY, Config, MailSweepError), environment loading with dotenvy, and pure RFC codecs (multi-pass RFC 2047 MIME decoding, RFC 3501 Modified UTF-7 folder codec, BODYSTRUCTURE attachment inspection, and RFC 2369 / RFC 8058 List-Unsubscribe extraction) verified against test vectors.

Acceptance criteria

  • Root Cargo.toml configured with standard dependencies (email-encoding, encoding_rs, dotenvy, thiserror, serde, serde_json).
  • Pure RFC 2047 MIME decoder handles multi-pass encoded-words across UTF-8, ISO-8859-*, and Windows-125x charsets.
  • RFC 3501 Modified UTF-7 encoder/decoder handles non-ASCII international folder names without corruption.
  • BODYSTRUCTURE parser accurately detects PDF attachments and embedded media flags.
  • RFC 2369 / RFC 8058 parser extracts valid URL and mailto unsubscribe endpoints from headers.
  • Domain models (EmailHeader, Folder, UID, UIDVALIDITY, Config) and structured MailSweepError enums implemented.
  • cargo test, cargo fmt --check, and cargo clippy --all-targets --all-features -- -D warnings pass with 0 warnings.

Blocked by

  • None (can start immediately)
## Parent #44: [spec] Port MailSweep to Synchronous Rust ## What to build Set up the root Cargo project structure and implement the core domain models (`EmailHeader`, `Folder`, `UID`, `UIDVALIDITY`, `Config`, `MailSweepError`), environment loading with `dotenvy`, and pure RFC codecs (multi-pass RFC 2047 MIME decoding, RFC 3501 Modified UTF-7 folder codec, `BODYSTRUCTURE` attachment inspection, and RFC 2369 / RFC 8058 `List-Unsubscribe` extraction) verified against test vectors. ## Acceptance criteria - [ ] Root `Cargo.toml` configured with standard dependencies (`email-encoding`, `encoding_rs`, `dotenvy`, `thiserror`, `serde`, `serde_json`). - [ ] Pure RFC 2047 MIME decoder handles multi-pass encoded-words across UTF-8, ISO-8859-*, and Windows-125x charsets. - [ ] RFC 3501 Modified UTF-7 encoder/decoder handles non-ASCII international folder names without corruption. - [ ] `BODYSTRUCTURE` parser accurately detects PDF attachments and embedded media flags. - [ ] RFC 2369 / RFC 8058 parser extracts valid URL and mailto unsubscribe endpoints from headers. - [ ] Domain models (`EmailHeader`, `Folder`, `UID`, `UIDVALIDITY`, `Config`) and structured `MailSweepError` enums implemented. - [ ] `cargo test`, `cargo fmt --check`, and `cargo clippy --all-targets --all-features -- -D warnings` pass with 0 warnings. ## Blocked by - None (can start immediately)
Author
Owner

Implemented core domain models, configuration with dotenvy, structured MailSweepError enums, and pure RFC codecs (RFC 2047, RFC 3501 Modified UTF-7, BODYSTRUCTURE parser, List-Unsubscribe parser) with 100% test pass rate.

Implemented core domain models, configuration with dotenvy, structured MailSweepError enums, and pure RFC codecs (RFC 2047, RFC 3501 Modified UTF-7, BODYSTRUCTURE parser, List-Unsubscribe parser) with 100% test pass rate.
Sign in to join this conversation.
No description provided.