No description
  • Go 65.5%
  • TypeScript 14.2%
  • CSS 9.5%
  • Go Template 9.5%
  • HTML 1.3%
Find a file
jonasled aabedccfc4
All checks were successful
ci / frontend-build (push) Successful in 39s
ci / backend-test (push) Successful in 44s
ci / build-1 (push) Successful in 1m2s
ci / frontend-docker (push) Successful in 0s
ci / build-2 (push) Successful in 1m27s
ci / spamassassin-docker (push) Successful in 0s
ci / build (push) Successful in 2m37s
ci / backend-docker (push) Successful in 0s
ci / build-3 (push) Successful in 32s
ci / chart (push) Successful in 0s
revert c8fce0d253
revert Merge pull request 'Update dependency vite to v8' (#9) from renovate/vite-8.x into master
2026-11-18 08:48:07 +00:00
.forgejo/workflows Update dependency node to v26 2026-11-18 08:39:49 +00:00
backend Update module golang.org/x/net to v0.63.0 2026-11-17 23:50:03 +00:00
container Split frontend/backend images (scratch backend), Helm chart, multi-DB config, spamd sidecar 2026-11-16 11:31:37 +01:00
docs Docs: Stalwart validation off only for the test domain (rcpt_domain expressions) 2026-11-16 16:12:00 +01:00
frontend revert c8fce0d253 2026-11-18 08:48:07 +00:00
helm Run migrations in Helm post-install/upgrade hook Job (mysql/postgres) 2026-11-16 11:46:58 +01:00
.dockerignore Split frontend/backend images (scratch backend), Helm chart, multi-DB config, spamd sidecar 2026-11-16 11:31:37 +01:00
.env.example Split frontend/backend images (scratch backend), Helm chart, multi-DB config, spamd sidecar 2026-11-16 11:31:37 +01:00
.gitignore Add Go backend: JMAP poller, mail checks, scoring API, swagger docs 2026-11-16 11:18:49 +01:00
compose.yaml Split frontend/backend images (scratch backend), Helm chart, multi-DB config, spamd sidecar 2026-11-16 11:31:37 +01:00
Dockerfile.backend Update golang Docker tag to v1.27.4 2026-11-16 11:07:32 +00:00
Dockerfile.frontend Update dependency node to v26 2026-11-18 08:39:49 +00:00
Dockerfile.spamassassin Update alpine Docker tag to v3.24 2026-11-17 00:24:55 +00:00
README.md Run migrations in Helm post-install/upgrade hook Job (mysql/postgres) 2026-11-16 11:46:58 +01:00
renovate.json Add GitLab CI pipeline: tests, image builds, Helm OCI push 2026-11-16 11:33:21 +01:00

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 scales with replicaCountBackend on mysql/postgres; sqlite is limited to 1).

Migrations run at backend startup; EXECUTE_MIGRATIONS=false disables that and mailtester migrate applies them once and exits (the Helm chart does this in a post-install/post-upgrade hook Job for mysql/postgres).

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.