refactor: replace rust-pop3-client with custom POP3 implementation

Replace third-party POP3 client with a custom implementation using
native-tls for direct TLS socket communication. This change ensures
email messages are retrieved as raw bytes without encoding conversions
that could corrupt email data.

Key improvements:
- Direct byte-level message retrieval preserves original email structure
- Proper handling of POP3 byte-stuffing (doubled leading dots)
- Eliminates dependency on rust-pop3-client which performed unwanted
  string conversions and line ending modifications
- Uses only native-tls for TLS connections (already a project dependency)
This commit is contained in:
2025-12-12 10:29:00 +01:00
parent e0b0c5e964
commit 113a72f1d6
3 changed files with 123 additions and 264 deletions

View File

@@ -1,6 +1,6 @@
[package]
name = "rs_pop_imap_importer"
version = "0.5.0"
version = "0.6.0"
edition = "2024"
[lib]
@@ -21,4 +21,3 @@ dotenvy = "0.15.7"
imap = "2.4.1"
imap-proto = "0.16.6"
native-tls = "0.2.14"
rust-pop3-client = "0.2.2"