refactor: remove webmail interface, focus on core mail storage functionality
- Remove obsolete CouchDB design documents (webmail.json, dashboard.json) - Clean up webmail-related code from couch/couch.go (WebmailViews, CreateWebmailViews, etc.) - Update documentation to focus on core mail-to-CouchDB storage functionality - Add Future Plans section describing planned webmail viewer as separate component - Apply go fmt formatting and ensure code quality standards - Update test documentation to show raw CouchDB API access patterns - Remove compiled binary from repository This refactor simplifies the codebase to focus on its core purpose: efficiently backing up emails from IMAP to CouchDB. The webmail interface will be developed as a separate, optional component to maintain clean separation of concerns. 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
parent
c2ad55eaaf
commit
e280aa0aaa
12 changed files with 147 additions and 49 deletions
|
|
@ -8,6 +8,7 @@ The test environment provides:
|
|||
- **CouchDB**: Database for storing email messages
|
||||
- **GreenMail IMAP Server**: Java-based mail server designed for testing with pre-populated test accounts and messages
|
||||
- **Test Configuration**: Ready-to-use config for testing both sync and archive modes
|
||||
- **HTML Webmail Interface**: Beautiful, responsive web interface for viewing archived emails
|
||||
|
||||
## Quick Start
|
||||
|
||||
|
|
@ -114,6 +115,20 @@ Each account contains:
|
|||
- **SMTP Port**: 3025
|
||||
- **Server**: GreenMail (Java-based test server)
|
||||
|
||||
### Accessing Test Data
|
||||
After running mail2couch, you can access the stored emails via CouchDB's REST API:
|
||||
|
||||
**📋 Database Access:**
|
||||
- All databases: http://localhost:5984/_all_dbs
|
||||
- Specific database: http://localhost:5984/m2c_specific_folders_only
|
||||
- All documents: http://localhost:5984/m2c_specific_folders_only/_all_docs
|
||||
- Individual message: http://localhost:5984/m2c_specific_folders_only/INBOX_12
|
||||
|
||||
**🔍 Raw Data Examples:**
|
||||
- Database info: http://localhost:5984/m2c_specific_folders_only
|
||||
- Document content: http://localhost:5984/m2c_specific_folders_only/INBOX_1
|
||||
- Email attachments: http://localhost:5984/m2c_specific_folders_only/INBOX_1/{attachment_name}
|
||||
|
||||
## Database Structure
|
||||
|
||||
mail2couch will create separate databases for each mail source (with `m2c_` prefix):
|
||||
|
|
@ -126,6 +141,7 @@ Each database contains documents with:
|
|||
- `mailbox` field indicating the origin folder
|
||||
- Native CouchDB attachments for email attachments
|
||||
- Full message headers and body content
|
||||
- JSON documents accessible via CouchDB REST API
|
||||
|
||||
## Testing Sync vs Archive Modes
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue