{"id":42033440,"url":"https://github.com/taskinen/mailboxzero","last_synced_at":"2026-01-26T04:39:03.710Z","repository":{"id":311883206,"uuid":"1045391160","full_name":"taskinen/mailboxzero","owner":"taskinen","description":"A Go-based web application that helps you clean up your Fastmail inbox by finding and archiving similar emails using JMAP protocol.","archived":false,"fork":false,"pushed_at":"2025-11-21T08:04:58.000Z","size":75,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-11-21T09:19:52.131Z","etag":null,"topics":["cleanup","fastmail","fastmail-api","go","golang","inbox-zero","jmap","jmap-client","mail","organizer"],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/taskinen.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2025-08-27T05:07:41.000Z","updated_at":"2025-11-21T08:05:02.000Z","dependencies_parsed_at":"2025-08-27T16:16:32.826Z","dependency_job_id":"007c6354-43a6-44da-8ae3-6c0899040bda","html_url":"https://github.com/taskinen/mailboxzero","commit_stats":null,"previous_names":["taskinen/mailboxzero"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/taskinen/mailboxzero","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/taskinen%2Fmailboxzero","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/taskinen%2Fmailboxzero/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/taskinen%2Fmailboxzero/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/taskinen%2Fmailboxzero/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/taskinen","download_url":"https://codeload.github.com/taskinen/mailboxzero/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/taskinen%2Fmailboxzero/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28766889,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-26T03:54:34.369Z","status":"ssl_error","status_checked_at":"2026-01-26T03:54:33.031Z","response_time":59,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["cleanup","fastmail","fastmail-api","go","golang","inbox-zero","jmap","jmap-client","mail","organizer"],"created_at":"2026-01-26T04:39:03.036Z","updated_at":"2026-01-26T04:39:03.704Z","avatar_url":"https://github.com/taskinen.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Mailbox Zero - Email Cleanup Helper\n\n[![Test Suite](https://github.com/taskinen/mailboxzero/actions/workflows/test.yml/badge.svg)](https://github.com/taskinen/mailboxzero/actions/workflows/test.yml)\n[![Go Version](https://img.shields.io/badge/Go-1.21+-00ADD8?style=flat\u0026logo=go)](https://go.dev/)\n[![Go Report Card](https://goreportcard.com/badge/github.com/taskinen/mailboxzero)](https://goreportcard.com/report/github.com/taskinen/mailboxzero)\n[![Made with Go](https://img.shields.io/badge/Made%20with-Go-1f425f.svg)](https://go.dev/)\n\nA Go-based web application that helps you clean up your Fastmail inbox by finding and archiving similar emails using JMAP protocol.\n\n\u003cimg width=\"1457\" height=\"1169\" alt=\"SCR-20250827-psxl\" src=\"https://github.com/user-attachments/assets/2f1fe630-5ba7-4c8a-a610-6f32388654b5\" /\u003e\n\n## Features\n\n- **Safe Operations**: Built-in dry run mode prevents accidental changes\n- **Dual-pane Interface**: View inbox on left, grouped similar emails on right\n- **Smart Similarity Matching**: Fuzzy matching based on subject, sender, and email content\n- **Adjustable Similarity Threshold**: Fine-tune matching with a percentage slider\n- **Selective Archiving**: Choose which emails to archive with confirmation dialog\n- **Individual Email Selection**: Select specific emails to find similar matches\n\n## Safety Features\n\n- **DRY RUN MODE**: All write operations are disabled by default\n- **Archive Only**: The only write operation is moving emails to archive (never deletes)\n- **Confirmation Dialog**: Requires confirmation before archiving\n- **Visual Warnings**: Clear indication when in dry run mode\n\n## Setup\n\n### Prerequisites\n\n- Go 1.21 or later\n- Fastmail account with JMAP access\n- Fastmail API token (generated from account settings)\n\n### Installation\n\n1. Clone/download the project\n2. Install dependencies:\n   ```bash\n   go mod download\n   ```\n3. Create your configuration file:\n   ```bash\n   cp config.yaml.example config.yaml\n   ```\n\n4. Edit `config.yaml` with your Fastmail API token:\n   ```yaml\n   jmap:\n     endpoint: \"https://api.fastmail.com/jmap/session\"\n     api_token: \"your-api-token-here\"\n   \n   # IMPORTANT: Set to false only when ready for real changes\n   dry_run: true\n   ```\n\n### Getting Fastmail API Token\n\n1. Log into your Fastmail account\n2. Go to Settings → Privacy \u0026 Security → Integrations\n3. Click \"New API Token\"\n4. Set the scope to \"Mail\" access\n5. Generate the token and copy it to your config file\n\n### Running the Application\n\n1. Start the server:\n   ```bash\n   go run main.go\n   ```\n\n2. Open your browser to: http://localhost:8080\n\n3. The application will display a warning banner when in dry run mode\n\n## Usage\n\n### Basic Workflow\n\n1. **Load Inbox**: The left pane shows your current inbox emails\n2. **Find Similar Emails**: \n   - Click \"Find Similar Emails\" to find all similar email groups\n   - Or select a specific email and click \"Find Similar Emails\" to find matches for that email\n3. **Adjust Similarity**: Use the percentage slider to fine-tune matching sensitivity\n4. **Review Matches**: Similar emails appear in the right pane with checkboxes\n5. **Select for Archiving**: Choose which emails to archive (all selected by default)\n6. **Archive**: Click \"Archive Selected\" and confirm to move emails to archive folder\n\n### Key Features\n\n- **Similarity Slider**: Adjust from 0-100% to control how strict the matching should be\n- **Select All/None**: Quickly select or deselect all found similar emails\n- **Individual Selection**: Click on specific emails to select/deselect them\n- **Clear Results**: Remove all results from the right pane to start fresh\n\n### Enabling Real Changes\n\n**⚠️ WARNING**: Only disable dry run mode when you're confident the application works correctly with your mailbox.\n\n1. Edit `config.yaml`:\n   ```yaml\n   dry_run: false\n   ```\n\n2. Restart the application\n3. The warning banner will disappear\n4. Archive operations will now actually move emails\n\n## Configuration Options\n\n```yaml\nserver:\n  port: 8080              # Web server port\n  host: \"localhost\"       # Web server host\n\njmap:\n  endpoint: \"https://api.fastmail.com/jmap/session\"\n  api_token: \"\"           # Your Fastmail API token\n\ndry_run: true             # Safety feature - set to false to enable changes\ndefault_similarity: 75    # Default similarity percentage (0-100)\n```\n\n## How Similarity Matching Works\n\nThe application uses fuzzy matching with weighted scoring:\n\n- **Subject Similarity** (40%): Compares email subjects using Levenshtein distance\n- **Sender Similarity** (40%): Compares sender email addresses\n- **Content Similarity** (20%): Compares email preview/body content\n\nAdditional boosters:\n- Common words in subjects increase similarity\n- Normalized text (lowercase, punctuation removed) for better matching\n\n## Security Considerations\n\n- **API Tokens**: Use Fastmail API tokens for secure authentication\n- **Local Only**: All processing happens locally - no data sent to external servers\n- **Read-Heavy**: Only reads email data, minimal write operations\n- **Archive Only**: Never deletes emails, only moves them to archive\n\n## Troubleshooting\n\n### Authentication Errors\n- Verify your Fastmail API token is correct\n- Ensure JMAP is enabled in your Fastmail account\n- Check network connectivity\n\n### No Emails Found\n- Verify you have emails in your inbox\n- Check if your account has the expected mailbox structure\n\n### Similarity Issues\n- Try adjusting the similarity threshold\n- Some emails may have very little content to compare\n- Ensure emails have sufficient text in subject/preview\n\n## Development\n\nThe project structure:\n```\nmailboxzero/\n├── main.go                 # Application entry point\n├── config.yaml            # Configuration file\n├── internal/\n│   ├── config/            # Configuration handling\n│   ├── jmap/              # JMAP client implementation\n│   ├── server/            # Web server and API handlers\n│   └── similarity/        # Email similarity algorithms\n└── web/\n    ├── templates/         # HTML templates\n    └── static/           # CSS and JavaScript files\n```\n\n### Running Tests\n\nThe project includes comprehensive unit tests for all packages:\n\n```bash\n# Run all tests\ngo test ./...\n\n# Run tests with verbose output\ngo test ./... -v\n\n# Run tests with coverage\ngo test ./... -cover\n\n# Generate coverage report\ngo test ./... -coverprofile=coverage.out\ngo tool cover -html=coverage.out\n```\n\n## License\n\nThis project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftaskinen%2Fmailboxzero","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftaskinen%2Fmailboxzero","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftaskinen%2Fmailboxzero/lists"}