- Go 65.5%
- TypeScript 14.2%
- CSS 9.5%
- Go Template 9.5%
- HTML 1.3%
|
|
||
|---|---|---|
| backend | ||
| container | ||
| docs | ||
| frontend | ||
| helm | ||
| .dockerignore | ||
| .env.example | ||
| .gitignore | ||
| .gitlab-ci.yml | ||
| compose.yaml | ||
| Dockerfile.backend | ||
| Dockerfile.frontend | ||
| Dockerfile.spamassassin | ||
| README.md | ||
| renovate.json | ||
Mail Tester
Open source alternative to mail-tester.com. Open the page, get a random address xxxxxxxxxx@your-domain,
send a mail to it, get a score out of 10.
Checks: SpamAssassin, SPF, DKIM, DMARC, reverse DNS (FCrDNS), MX record, A/AAAA of MX hosts, 7 DNS blacklists, TLS in transit, message format (Message-ID, Date, MIME, text alternative). Weights live in backend/checks.go; skipped checks (e.g. no spamd) don't count.
SpamAssassin runs as a sidecar container next to the backend (the backend image is scratch).
Stack: Go (Gin, Gorm + gormigrate, swaggo, godotenv), React + Vite, Stalwart via JMAP.
Run
# edit the environment block in compose.yaml, then:
docker compose up --build # frontend :8080, backend, spamassassin
Kubernetes: helm install mail-tester ./helm -f my-values.yaml (frontend and backend are separate deployments,
SpamAssassin is a sidecar of the backend; backend is deliberately a single replica).
Database: DB_DRIVER=sqlite|mysql|postgres with DB_HOST, DB_PORT, DB_USER, DB_PASSWORD, DB_NAME
(DB_SSLMODE for postgres; for sqlite DB_NAME is the file path). See .env.example.
Then set up Stalwart: docs/stalwart.md.
Dev: cd backend && go run . (reads .env) and cd frontend && npm i && npm run dev (proxies /api to :8080).
API
curl -X POST https://host/api/v1/tests # -> {"id","address",...}
curl https://host/api/v1/tests/<id> # status waiting|done|expired, score, checks[]
OpenAPI / Swagger UI at /api/docs/index.html. Regenerate with cd backend && swag init -g main.go -o docs.
Security
Strict CSP, HSTS, COOP/COEP/CORP, X-Frame-Options, Permissions-Policy etc. on every response
(Swagger UI path gets a relaxed script/style CSP). Create endpoint is rate limited per IP;
set TRUSTED_PROXIES behind a reverse proxy.