Bayesian email classifier written in Perl. Acts as a proxy between mail clients
and mail servers (POP3, SMTP, NNTP), inserting an X-Text-Classification: header
with the predicted category. Users correct misclassifications through the web UI,
which trains the classifier over time.
docker compose upcarton install
carton exec perl popfile.plThe web UI is available at http://localhost:8080 by default.
POPFILE_ROOT overrides the root directory for config, database, and message
cache (default: ./).
# Classify a message and show word scores
carton exec perl bayes.pl <message-file>
# Train a message into a bucket
carton exec perl insert.pl <bucket-name> <message-file>The frontend lives in ui/ and builds to public/.
cd ui && npm install
# Development (hot-reload, proxies /api to localhost:8080)
npm run dev
# Production build → public/
npm run buildcarton exec perl -I. t/mailparse.t| Path | Description |
|---|---|
popfile.cfg |
Generated configuration |
popfile.db |
SQLite database (corpus + history) |
messages/ |
Cached message files |
*.pid, *.log |
Runtime state |