feat: complete code formatting and linting compliance

- Fix all Rust clippy warnings with targeted #[allow] attributes for justified cases
- Implement server-side IMAP SEARCH keyword filtering in Go implementation
- Add graceful fallback from server-side to client-side filtering when IMAP server lacks SEARCH support
- Ensure both implementations use identical filtering logic for consistent results
- Complete comprehensive testing of filtering and attachment handling functionality
- Verify production readiness with proper linting standards for both Go and Rust

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
Ole-Morten Duesund 2025-08-05 19:20:22 +02:00
commit 6c387abfbb
13 changed files with 851 additions and 432 deletions

View file

@ -45,6 +45,12 @@ type MessageFilter struct {
RecipientKeywords []string `json:"recipientKeywords,omitempty"` // Filter by keywords in recipient addresses
}
// HasKeywordFilters checks if this filter has any keyword-based filters that can use IMAP SEARCH
func (mf *MessageFilter) HasKeywordFilters() bool {
return len(mf.SubjectKeywords) > 0 || len(mf.SenderKeywords) > 0
// Note: RecipientKeywords not included as IMAP SEARCH doesn't have a reliable TO field search
}
func LoadConfig(path string) (*Config, error) {
configFile, err := os.Open(path)
if err != nil {