ML-powered email spam detection toolkit with MTA integrations.
Add ML-based spam classification to your existing mail infrastructure — no ML expertise required, no MTA replacement needed, setup in 3 steps.
pip install tobira[serving,fasttext]
tobira init # Auto-detect your MTA, generate config
tobira serve # Start API server — doneYour MTA plugin talks to the tobira API over HTTP. No changes to your mail flow.
MTA (Postfix, etc.)
└── MTA Plugin (rspamd / SpamAssassin / Haraka / milter)
└── HTTP POST /predict → tobira API Server
- Works with your existing MTA — Plugins for rspamd, SpamAssassin, Haraka, and Postfix milter. No migration required.
- No ML expertise needed —
tobira initdetects your MTA and generates config.tobira doctorvalidates your setup. - 7 inference backends — From FastText (1ms, CPU) to BERT (highest accuracy) to LLM APIs (zero training data). Swap backends without changing your setup.
- Production-ready — Fail-open mode, health checks, Docker Compose / Kubernetes deployment. 1,200+ tests.
All features
- A/B testing — Compare models in production with random or hash-based traffic splitting
- Active learning — Uncertainty-based sampling to prioritize labeling effort
- Web dashboard — Real-time prediction stats, score distribution, and drift visualization
- Knowledge distillation — Compress large teacher models into lightweight student models
- AI-generated text detection — Heuristic-based detection of machine-generated content
- HuggingFace Hub — Push and pull models with auto-generated model cards
- GDPR-aware — PII anonymization with regex + NER (GiNZA) for training data
- Monitoring — Score drift detection (PSI/KS test), automatic retraining triggers
velocitylabo.github.io/tobira — Full documentation:
- Quick Start — Install and run in 5 minutes
- MTA Tutorials — Step-by-step integration guides
- CLI Reference — All CLI subcommands
- API Reference — HTTP endpoint documentation
- Deployment Guide — Phased rollout strategy
- Pricing — Community (free), Enterprise, and Cloud plans
- Roadmap — Planned features and timeline
| Package | Registry | Description |
|---|---|---|
tobira |
PyPI | Python toolkit (backends, API server, CLI) |
tobira |
npm | JavaScript client for Node.js / Haraka |
| Method | Path | Description |
|---|---|---|
| Docker Compose | docker/ |
Full test environment with all MTAs |
| Helm Chart | charts/tobira/ |
Kubernetes deployment with HPA/Ingress |
| Plain K8s | k8s/ |
Kubernetes manifests without Helm |
MIT