- Python 52.7%
- JavaScript 47.1%
- Shell 0.1%
| Filename | Latest commit message | Latest commit date |
|---|---|---|
|
|
||
| .forgejo/workflows | ||
| app | ||
| docker | ||
| docs | ||
| scripts | ||
| tests | ||
| .dockerignore | ||
| .gitattributes | ||
| .gitignore | ||
| .python-version | ||
| CHANGELOG.md | ||
| docker-compose.yml | ||
| docker-stack-dev.yml | ||
| docker-stack.yml | ||
| Dockerfile | ||
| LICENSE | ||
| pyproject.toml | ||
| README.md | ||
| uv.lock | ||
Boxgent is a self-hosted web UI for managing IMAP email filter rules. Rules are defined in a browser and executed by a built-in Python IMAP engine that runs on new mail (IMAP IDLE) or on a schedule — no external filter daemon, no Lua scripting, no mail server changes required. Optionally, an AI of your choice (any OpenAI-compatible server, e.g. a local Ollama) can sort, categorize, summarize and draft replies — only for the accounts you allow it to read.
Built by gorgeIT · AGPL-3.0
Alpha. Until the first release candidate of 1.0 (v1.0_rc1), Boxgent is alpha software. The REST API, MCP, rule exports and settings backups are only guaranteed to work within one version and its bug-fix releases (v0.3.0, v0.3.1, … — not from v0.3 to v0.4). The database is always upgraded to a newer version automatically, but never back: back up your database yourself before every upgrade. Every incompatible change is listed under Breaking changes in the changelog. See Installation → Upgrading.
Why Boxgent
Most self-hosted email filtering tools require either deep server access (Sieve), a full mail stack (Roundcube, Mail-in-a-Box), or hand-written config files (imapfilter, fdm). Boxgent connects to any existing IMAP server as a client and gives you a point-and-click rule editor with live match previews and per-rule execution statistics.
Comparison with similar tools
| Boxgent | imapfilter | Roundcube + Sieve | Thunderbird rules | fdm / getmail | |
|---|---|---|---|---|---|
| Web UI | ✅ | ❌ Lua config | ✅ plugin | ❌ desktop app | ❌ config file |
| No server changes needed | ✅ | ✅ | ❌ needs ManageSieve | ✅ | ✅ |
| No mail server required | ✅ | ✅ | ❌ part of Roundcube | ✅ | ✅ |
| Multi-account | ✅ | ✅ | ✅ | ✅ | ✅ |
| Multi-user with roles | ✅ | ❌ | ❌ | ❌ | ❌ |
| Live match preview (dry run) | ✅ | ❌ | ❌ | ❌ | ❌ |
| IMAP IDLE (push triggers) | ✅ | ❌ | server-side | ❌ | ❌ |
| Per-rule match statistics | ✅ | ❌ | ❌ | ❌ | ❌ |
| AI conditions, categories, digests, reply drafts | ✅ optional | ❌ | ❌ | ❌ | ❌ |
| REST API and MCP (AI assistants) | ✅ | ❌ | ❌ | ❌ | ❌ |
| SSO / OIDC / proxy auth | ✅ | ❌ | ❌ | ❌ | ❌ |
| Single container deploy | ✅ | — | ❌ | — | — |
| PostgreSQL / MySQL support | ✅ optional | — | server DB | — | — |
Features
Rules
- Point-and-click rule editor — conditions on
from,to,subject, headers, spam score, message age and account (contains, not contains, regex); conditions are combined with AND, with drag-and-drop AND / OR / NOT cards for anything more - Actions — move or copy (also into another of your accounts), delete, mark read/unread, star/unstar, add tags (IMAP keywords, Thunderbird labels); several actions per rule; Stop and End to end processing for a mail
- Triggers — on new mail, on a schedule (every run, hourly, daily, weekly), in a date range or in an active time window on chosen weekdays, in your time zone
- Live match preview — dry-run a rule and see which messages it would touch before committing
- Duplicate, compress, import and export — merge neighbouring rules with the same actions into one; JSON export/import and a Sieve export
AI (optional, per account, off by default)
- AI conditions — AI filter (your yes/no question) and Mail is important (your own definition), with a confidence threshold
- AI categorize / AI yes/no — one AI question per mail, each answer runs its own actions
- AI digest — collects matching mail and writes one summary mail per day or week into a folder; never sent
- AI draft reply — writes a threaded reply into the Drafts folder; never sent
- Rules from the AI — describe a rule in your own words, or let the AI suggest rules from your inbox's senders and subjects; you review before saving
- Reads the new text of a mail (no quoted replies or signature) and PDF, Word and Excel attachments; works with any OpenAI-compatible server or SystemOne
Running and results
- IMAP IDLE — new mail triggers filter runs immediately; polling fallback for servers that don't support IDLE
- Per-rule match statistics with configurable time window, including how often each AI branch was taken
- Smart account setup — IMAP settings autodiscovered from an email address (autoconfig XML, DNS SRV records, provider heuristics)
Users and operation
- Multi-user with roles — admin, manager, and user roles; managers can view and edit team members' rules via the Team tab
- Authentication — local accounts (bcrypt), login with the mail account (per mail domain), reverse-proxy header trust (Authentik, Authelia), OpenID Connect / OAuth 2.0, SSO-only mode
- REST API and MCP — per-user API keys (read-only or without mail access); AI assistants such as Claude can list, preview and edit rules over MCP
- English and German interface, light and dark theme
- Settings backup and restore on the Admin page
- Multi-DB — SQLite by default; connect to PostgreSQL or MySQL via
DATABASE_URL; automatic one-time data migration from SQLite on first boot - Container deploy — Docker / Podman Compose, or a Docker Swarm stack with
PostgreSQL (
docker-stack.yml)
Quick start
# 1. Generate an encryption key
mkdir -p secrets
python3 -c "import base64, os; print(base64.urlsafe_b64encode(os.urandom(32)).decode())" \
> secrets/encryption_key
chmod 600 secrets/encryption_key
# 2. Start
podman-compose up -d # or: docker compose up -d
Open http://localhost:8080, log in as admin / boxgent, and change the
password when prompted.
See docs/installation.md for full installation instructions.
Documentation
| Installation | Container setup, volumes, first boot, upgrading |
| Configuration | All environment variables: database, authentication, API, AI |
| Usage | Accounts, rules, conditions, actions, AI, teams, REST API and MCP |
| Architecture | How the code is laid out: rules, conditions, actions, mailboxes |
| Brand | Logo, wordmark, colours, font and how to use them |
| Changelog | Every release, its breaking changes and upgrade notes |
Development
Requires Python 3.14+ and uv:
uv sync
uv run pytest -v
Install the pre-commit hook once per clone. It runs the secret scan (gitleaks,
on the staged changes) and the dependency audit (pip-audit, on uv.lock) of CI
before every commit; git commit --no-verify skips it:
ln -sf ../../scripts/git-hooks/pre-commit .git/hooks/pre-commit
License
AGPL-3.0 — © 2026 Michael Klamminger - gorgeIT (https://gorgeit.com)