docs: add comprehensive keyword filtering specification
- Update CLAUDE.md with keyword filtering in Next Steps section - Add detailed TODO.md with feature specification, use cases, and implementation notes - Document subjectKeywords, senderKeywords, and recipientKeywords functionality - Include JSON configuration examples and priority assessment 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
parent
2ed5ce7ad2
commit
44efed908d
2 changed files with 55 additions and 4 deletions
12
CLAUDE.md
12
CLAUDE.md
|
|
@ -110,10 +110,14 @@ To complete the implementation, the following items need to be addressed:
|
||||||
|
|
||||||
1. **Real IMAP Message Parsing**: Replace placeholder message generation with actual IMAP message fetching and parsing using the correct go-imap/v2 API
|
1. **Real IMAP Message Parsing**: Replace placeholder message generation with actual IMAP message fetching and parsing using the correct go-imap/v2 API
|
||||||
2. **Message Body Extraction**: Implement proper text/plain and text/html body extraction from multipart messages
|
2. **Message Body Extraction**: Implement proper text/plain and text/html body extraction from multipart messages
|
||||||
3. **Attachment Handling**: Add support for email attachments (optional)
|
3. **Keyword Filtering**: Add support for filtering messages by keywords in:
|
||||||
4. **Error Recovery**: Add retry logic for network failures and partial sync recovery
|
- Subject line (`subjectKeywords`)
|
||||||
5. **Performance**: Add batch operations for better CouchDB insertion performance
|
- Sender addresses (`senderKeywords`)
|
||||||
6. **Testing**: Add unit tests for all major components
|
- Recipient addresses (`recipientKeywords`)
|
||||||
|
4. **Attachment Handling**: Add support for email attachments (optional)
|
||||||
|
5. **Error Recovery**: Add retry logic for network failures and partial sync recovery
|
||||||
|
6. **Performance**: Add batch operations for better CouchDB insertion performance
|
||||||
|
7. **Testing**: Add unit tests for all major components
|
||||||
|
|
||||||
## Development Guidelines
|
## Development Guidelines
|
||||||
|
|
||||||
|
|
|
||||||
47
TODO.md
Normal file
47
TODO.md
Normal file
|
|
@ -0,0 +1,47 @@
|
||||||
|
# mail2couch TODO and Feature Requests
|
||||||
|
|
||||||
|
## Planned Features
|
||||||
|
|
||||||
|
### Keyword Filtering for Messages
|
||||||
|
|
||||||
|
Add support for filtering messages by keywords in various message fields. This would extend the current `messageFilter` configuration.
|
||||||
|
|
||||||
|
**Proposed Configuration Extension:**
|
||||||
|
|
||||||
|
```json
|
||||||
|
{
|
||||||
|
"messageFilter": {
|
||||||
|
"since": "2024-01-01",
|
||||||
|
"subjectKeywords": ["urgent", "important", "meeting"],
|
||||||
|
"senderKeywords": ["@company.com", "notifications"],
|
||||||
|
"recipientKeywords": ["team@company.com", "all@"]
|
||||||
|
}
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
**Implementation Details:**
|
||||||
|
|
||||||
|
- `subjectKeywords`: Array of keywords to match in email subject lines
|
||||||
|
- `senderKeywords`: Array of keywords to match in sender email addresses or names
|
||||||
|
- `recipientKeywords`: Array of keywords to match in recipient (To/CC/BCC) addresses or names
|
||||||
|
- Keywords should support both inclusive (must contain) and exclusive (must not contain) patterns
|
||||||
|
- Case-insensitive matching by default
|
||||||
|
- Support for simple wildcards or regex patterns
|
||||||
|
|
||||||
|
**Use Cases:**
|
||||||
|
|
||||||
|
1. **Corporate Email Filtering**: Only backup emails from specific domains or containing work-related keywords
|
||||||
|
2. **Project-based Archiving**: Filter emails related to specific projects or clients
|
||||||
|
3. **Notification Management**: Exclude or include automated notifications based on sender patterns
|
||||||
|
4. **Security**: Filter out potential spam/phishing by excluding certain keywords or senders
|
||||||
|
|
||||||
|
**Implementation Priority:** Medium - useful for reducing storage requirements and focusing on relevant emails.
|
||||||
|
|
||||||
|
## Other Planned Improvements
|
||||||
|
|
||||||
|
1. **Real IMAP Message Parsing**: Replace placeholder data with actual message content
|
||||||
|
2. **Message Body Extraction**: Support for HTML/plain text and multipart messages
|
||||||
|
3. **Attachment Handling**: Optional support for email attachments
|
||||||
|
4. **Batch Operations**: Improve CouchDB insertion performance
|
||||||
|
5. **Error Recovery**: Retry logic and partial sync recovery
|
||||||
|
6. **Testing**: Comprehensive unit test coverage
|
||||||
Loading…
Add table
Add a link
Reference in a new issue