- Removed attachment metadata from initial document storage
- Attachments are now stored separately using CouchDB native attachment API
- This matches the Go implementation approach and resolves CouchDB validation errors
- All messages with attachments now store successfully
🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <noreply@anthropic.com>
This commit completes the Rust implementation of mail2couch with full feature
parity to the Go version, including:
- Complete IMAP client with TLS support and retry logic
- Advanced email parsing with MIME multipart support using mail-parser
- Email attachment extraction and CouchDB storage
- Sync mode implementation with deleted message handling
- Enhanced error handling and retry mechanisms
- Identical command-line interface with bash completion
- Test configurations for both implementations
The Rust implementation now provides:
- Memory safety and type safety guarantees
- Modern async/await patterns with tokio/async-std
- Comprehensive error handling with anyhow/thiserror
- Structured logging and progress reporting
- Performance optimizations and retry logic
Test configurations created:
- rust/config-test-rust.json - Rust implementation test config
- go/config-test-go.json - Go implementation test config
- test-config-comparison.md - Detailed comparison documentation
- test-both-implementations.sh - Automated testing script
Both implementations can now be tested side-by-side with identical
configurations to validate feature parity and performance.
🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <noreply@anthropic.com>
- Add async-native-tls dependency for secure IMAP connections
- Implement ImapStream enum supporting both TLS and plain connections
- Add automatic TLS detection based on port (993=TLS, 143=plain, 3143=test)
- Add comprehensive Read/Write trait implementations for stream wrapper
- Add debug logging for connection type verification
- Create example configurations for Gmail, Outlook, and other providers
- Add TLS_SUPPORT.md documentation with security guidelines
- Test with existing test environment and TLS detection logic
- Maintain backward compatibility with plain IMAP for testing
The Rust implementation now supports secure connections to production
email providers while maintaining compatibility with test environments.
🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <noreply@anthropic.com>
- Add comprehensive Rust implementation matching Go functionality
- Configuration loading with automatic file discovery
- GNU-style command line parsing with clap (--config/-c, --max-messages/-m)
- CouchDB client integration with document storage and sync metadata
- IMAP client functionality with message fetching and parsing
- Folder filtering with wildcard pattern support (*, ?, [abc])
- Message filtering by subject, sender, and recipient keywords
- Incremental sync functionality with metadata tracking
- Bash completion generation matching Go implementation
- Cross-compatible document schemas and database structures
- Successfully tested with existing test environment
Note: TLS support and advanced email parsing features pending
🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <noreply@anthropic.com>
- Add complete CouchDB document schema specifications in couchdb-schemas.md
- Create example JSON documents for mail and sync metadata structures
- Implement Rust schema definitions with full serde support and type safety
- Add validation script to ensure schema consistency across implementations
- Document field definitions, data types, and validation rules
- Provide Rust Cargo.toml with appropriate dependencies for future implementation
This establishes a solid foundation for the planned Rust implementation while ensuring
100% compatibility with existing Go implementation databases. Both implementations will
use identical document structures, field names, and database naming conventions.
Schema Features:
- Mail documents with native CouchDB attachment support
- Sync metadata for incremental synchronization
- Predictable document ID patterns for efficient access
- Cross-language type mappings and validation rules
- Example documents for testing and reference
🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <noreply@anthropic.com>