You need Docker with Docker Compose.
git clone https://github.com/stefanpejcic/EmailFilter emailfilter
cd emailfilter
docker compose up -d
EmailFilter is now on http://localhost:8000, reachable from this machine only. Check an address:
curl -X POST http://localhost:8000/filter-email \
-H "Content-Type: application/json" \
-d '{"email": "test@mailinator.com"}'
Settings are in .env. Before you make EmailFilter reachable from other machines, set an API key:
echo "EMAILFILTER_API_KEY=$(openssl rand -hex 32)" >> .env
docker compose up -d
Every request except /healthz then needs the key in an X-API-Key header (or Authorization: Bearer).
The container runs as user and group 1000 so it can write to ./lists, ./config and ./data. If those folders belong to another user, set EMAILFILTER_UID and EMAILFILTER_GID in .env.
Outgoing connections the checks need: port 53 for DNS, port 25 for the SMTP check, port 443 for RDAP and port 43 for WHOIS.
Next steps
- Configuration: every setting.
- API reference: what you can ask.
- Postfix or Exim: check senders in your mail server.