1faa8f1982241f09072745db638acc7f538b9900
Document the changes shipped since 0.2.0: the X-WS-* header detection fix (0.5.0), the custom POP3 implementation (0.6.0) and the dependency and toolchain upgrades (0.7.0). Retitle the 0.2.0 entry to 0.3.0 to match the version actually released in Cargo.toml.
POP to IMAP Importer
A Rust application that downloads emails from a POP3 server and imports them into an IMAP server's INBOX.
Features
- POP3 to IMAP Migration: Downloads all emails from a POP3 server and imports them to IMAP
- IMAP Email Normalization: Fix existing malformed emails already in your IMAP inbox
- Secure TLS connections
- Environment-based configuration
- Automatic email header normalization (RFC 5322 compliance)
- Fixes improperly formatted header continuation lines
- Ensures continuation lines start with proper whitespace
- Safe operation with dry-run mode and confirmation prompts
Setup
-
Copy
.env.exampleto.env:cp .env.example .env -
Edit
.envwith your server credentials:# POP3 Source Server Configuration POP3_HOST=pop.example.com POP3_PORT=995 POP3_USERNAME=your_pop3_username POP3_PASSWORD=your_pop3_password # IMAP Destination Server Configuration IMAP_HOST=imap.example.com IMAP_PORT=993 IMAP_USERNAME=your_imap_username IMAP_PASSWORD=your_imap_password
Usage
POP3 to IMAP Migration
Run the main importer to migrate emails from POP3 to IMAP:
cargo run --bin pop-to-imap
# or in release mode
cargo run --release --bin pop-to-imap
Normalize Existing IMAP Emails
If you already have malformed emails in your IMAP inbox, use the normalization tool:
# Dry run to see what would be changed
cargo run --release --bin normalize-imap -- --dry-run
# Actually normalize the emails (will prompt for confirmation)
cargo run --release --bin normalize-imap
# Skip confirmation prompt
cargo run --release --bin normalize-imap --yes
Note: The normalize-imap tool will:
- Fetch all emails from your IMAP INBOX
- Analyze which emails have malformed headers
- Show you a summary of what needs to be fixed
- Delete and re-import only the emails that need normalization
- Keep emails that are already RFC 5322 compliant unchanged
Languages
Rust
89.2%
Makefile
6.9%
Dockerfile
3.9%