{"id":48121573,"url":"https://github.com/srmdn/maild","last_synced_at":"2026-04-14T08:01:03.525Z","repository":{"id":348147649,"uuid":"1195970472","full_name":"srmdn/maild","owner":"srmdn","description":"Lightweight outbound email operations platform with queueing, retries, suppression safety, domain readiness checks, and signed webhooks.","archived":false,"fork":false,"pushed_at":"2026-04-13T15:14:46.000Z","size":164,"stargazers_count":1,"open_issues_count":1,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-04-13T16:23:54.808Z","etag":null,"topics":["deliverability","email","go","golang","mail","opensource","postgresql","redis","smtp","webhooks"],"latest_commit_sha":null,"homepage":"https://srmdn.com","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"agpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/srmdn.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":"CODEOWNERS","security":"SECURITY.md","support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":"AGENTS.md","dco":null,"cla":null}},"created_at":"2026-03-30T08:40:43.000Z","updated_at":"2026-04-13T15:14:49.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/srmdn/maild","commit_stats":null,"previous_names":["srmdn/maild"],"tags_count":3,"template":false,"template_full_name":null,"purl":"pkg:github/srmdn/maild","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/srmdn%2Fmaild","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/srmdn%2Fmaild/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/srmdn%2Fmaild/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/srmdn%2Fmaild/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/srmdn","download_url":"https://codeload.github.com/srmdn/maild/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/srmdn%2Fmaild/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31787263,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-14T02:24:21.117Z","status":"ssl_error","status_checked_at":"2026-04-14T02:24:20.627Z","response_time":153,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["deliverability","email","go","golang","mail","opensource","postgresql","redis","smtp","webhooks"],"created_at":"2026-04-04T16:20:04.926Z","updated_at":"2026-04-14T08:01:03.496Z","avatar_url":"https://github.com/srmdn.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# maild\n\nLightweight outbound email operations platform.\n\n`maild` focuses on reliable sending workflows for transactional email and simple campaigns:\n- queueing and controlled delivery\n- retries and failure handling\n- suppression and unsubscribe safety\n- domain verification and deliverability checks\n- delivery event logs and webhooks\n\nIt is not a full mailbox server and does not include IMAP/POP webmail.\n\n## Project Status\n\nActively used v0.x control plane:\n- API -\u003e queue -\u003e worker delivery is implemented\n- operator console workflows are available at `/ui`, `/ui/logs`, `/ui/onboarding`, `/ui/incidents`, and `/ui/policy`\n- backend-first technical scope (Tracks A/B/C) is complete as of April 3, 2026\n- next focus is frontend product UX for broader operator workflows\n\n## Stack\n\n- Go (`cmd/server`, `internal/*`)\n- PostgreSQL\n- Redis\n- Server-rendered/web-first direction (no Node build chain)\n\n## Quick Start\n\n1. Bootstrap local development in one command:\n\n```sh\nmake setup\n```\n\n2. Run the app:\n\n```sh\nmake run\n```\n\nAt startup, `maild` applies embedded `up` migrations automatically.\n\n3. Check health:\n\n```sh\ncurl -sS http://localhost:8080/healthz\n```\n\n4. Open Mailpit UI (local SMTP inbox):\n\n```text\nhttp://localhost:8025\n```\n\n## Current Endpoints\n\n- `GET /`\n- `GET /healthz`\n- `GET /readyz`\n- `POST /v1/messages`\n- `POST /v1/messages/retry`\n- `GET /v1/ops/onboarding-checklist`\n- `GET /v1/incidents/bundle`\n- `POST /v1/webhooks/events` (only when `WEBHOOKS_ENABLED=true`)\n- `GET /v1/webhooks/logs`\n- `POST /v1/webhooks/replay`\n- `GET /v1/smtp-accounts/list`\n- `POST /v1/smtp-accounts/activate`\n- `GET/POST /v1/workspaces/policy`\n- `GET /ui/policy`\n- `GET /ui`\n- `GET /ui/onboarding`\n- `GET /ui/incidents`\n- `GET /v1/analytics/summary`\n- `GET /v1/analytics/export.csv`\n- `GET /v1/billing/metering`\n- `GET /ui/logs` (operator console: logs/timeline, queue-state summary, domain readiness, suppression tools)\n\nExample:\n\n```sh\ncurl -sS -X POST http://localhost:8080/v1/messages \\\n  -H \"X-API-Key: change-me-operator\" \\\n  -H \"Content-Type: application/json\" \\\n  -d '{\n    \"workspace_id\": 1,\n    \"from_email\": \"noreply@example.test\",\n    \"to_email\": \"user@example.test\",\n    \"subject\": \"Hello from maild\",\n    \"body_text\": \"maild first delivery test\"\n  }'\n```\n\nAdmin-only suppression example:\n\n```sh\ncurl -sS -X POST http://localhost:8080/v1/suppressions \\\n  -H \"X-API-Key: change-me-admin\" \\\n  -H \"Content-Type: application/json\" \\\n  -d '{\n    \"workspace_id\": 1,\n    \"email\": \"user@example.test\",\n    \"reason\": \"manual block\"\n  }'\n```\n\nAdmin-only unsubscribe example:\n\n```sh\ncurl -sS -X POST http://localhost:8080/v1/unsubscribes \\\n  -H \"X-API-Key: change-me-admin\" \\\n  -H \"Content-Type: application/json\" \\\n  -d '{\n    \"workspace_id\": 1,\n    \"email\": \"user@example.test\",\n    \"reason\": \"user clicked unsubscribe\"\n  }'\n```\n\nDomain readiness check example (SPF/DKIM/DMARC):\n\n```sh\ncurl -sS -X POST http://localhost:8080/v1/domains/readiness \\\n  -H \"X-API-Key: change-me-operator\" \\\n  -H \"Content-Type: application/json\" \\\n  -d '{\n    \"workspace_id\": 1,\n    \"domain\": \"example.test\",\n    \"dkim_selector\": \"default\"\n  }'\n```\n\nAdmin-only encrypted SMTP account config:\n\n```sh\ncurl -sS -X POST http://localhost:8080/v1/smtp-accounts \\\n  -H \"X-API-Key: change-me-admin\" \\\n  -H \"Content-Type: application/json\" \\\n  -d '{\n    \"workspace_id\": 1,\n    \"name\": \"primary-smtp\",\n    \"host\": \"smtp.example.com\",\n    \"port\": 587,\n    \"username\": \"user@example.test\",\n    \"password\": \"secret\",\n    \"from_email\": \"noreply@example.test\"\n  }'\n```\n\nAdmin-only SMTP provider validation:\n\n```sh\ncurl -sS -X POST http://localhost:8080/v1/smtp-accounts/validate \\\n  -H \"X-API-Key: change-me-admin\" \\\n  -H \"Content-Type: application/json\" \\\n  -d '{\"workspace_id\":1}'\n```\n\nSMTP account list and manual active-provider switch:\n\n```sh\ncurl -sS \"http://localhost:8080/v1/smtp-accounts/list?workspace_id=1\" \\\n  -H \"X-API-Key: change-me-operator\"\n\ncurl -sS -X POST http://localhost:8080/v1/smtp-accounts/activate \\\n  -H \"X-API-Key: change-me-admin\" \\\n  -H \"Content-Type: application/json\" \\\n  -d '{\"workspace_id\":1,\"name\":\"primary-smtp\"}'\n```\n\nOperator message logs view:\n\n```sh\ncurl -sS \"http://localhost:8080/v1/messages/logs?workspace_id=1\u0026limit=20\" \\\n  -H \"X-API-Key: change-me-operator\"\n```\n\nOperator message timeline view:\n\n```sh\ncurl -sS \"http://localhost:8080/v1/messages/timeline?message_id=1\" \\\n  -H \"X-API-Key: change-me-operator\"\n```\n\nOperator controlled retry:\n\n```sh\ncurl -sS -X POST http://localhost:8080/v1/messages/retry \\\n  -H \"X-API-Key: change-me-operator\" \\\n  -H \"Content-Type: application/json\" \\\n  -d '{\"workspace_id\":1,\"message_ids\":[1]}'\n```\n\nTechnical onboarding checklist:\n\n```sh\ncurl -sS \"http://localhost:8080/v1/ops/onboarding-checklist?workspace_id=1\u0026domain=example.test\u0026dkim_selector=default\" \\\n  -H \"X-API-Key: change-me-operator\"\n```\n\nIncident bundle export (timeline, attempts, webhook outcomes):\n\n```sh\ncurl -sS \"http://localhost:8080/v1/incidents/bundle?workspace_id=1\u0026message_id=1\" \\\n  -H \"X-API-Key: change-me-operator\"\n```\n\nProvider webhook event ingest (signature required):\n\n```sh\nbody='{\"workspace_id\":1,\"type\":\"bounce\",\"email\":\"user@example.test\",\"reason\":\"hard_bounce\"}'\nts=\"$(date +%s)\"\nsig=\"$(printf '%s.%s' \"$ts\" \"$body\" | openssl dgst -sha256 -hmac \"$WEBHOOK_SIGNING_SECRET\" -hex | sed 's/^.* //')\"\n\ncurl -sS -X POST http://localhost:8080/v1/webhooks/events \\\n  -H \"Content-Type: application/json\" \\\n  -H \"X-Webhook-Timestamp: $ts\" \\\n  -H \"X-Webhook-Signature: v1=$sig\" \\\n  -d \"$body\"\n```\n\nWebhook payload compatibility:\n- single event object (`workspace_id`, `type`/`event`, `email`/`recipient`, optional `reason`)\n- event arrays (for provider batch delivery)\n- common provider aliases map to internal types: `bounce`, `complaint`, `unsubscribe`\n\nFor mixed batches, the API returns `processed_count` and `rejected_count`.\n\nWebhook reliability behavior:\n- each webhook apply action uses bounded retries (`WEBHOOK_APPLY_MAX_ATTEMPTS`)\n- malformed/unsupported streams are persisted as dead-letter webhook events for audit\n\nProvider failover behavior:\n- manual switch via `POST /v1/smtp-accounts/activate`\n- automatic switch to standby account when active provider repeatedly fails (`AUTO_FAILOVER_*` settings)\n\nOperator webhook logs view:\n\n```sh\ncurl -sS \"http://localhost:8080/v1/webhooks/logs?workspace_id=1\u0026limit=20\u0026status=dead_letter\" \\\n  -H \"X-API-Key: change-me-operator\"\n```\n\nTenant policy controls:\n\n```sh\ncurl -sS \"http://localhost:8080/v1/workspaces/policy?workspace_id=1\" \\\n  -H \"X-API-Key: change-me-operator\"\n\ncurl -sS -X POST http://localhost:8080/v1/workspaces/policy \\\n  -H \"X-API-Key: change-me-admin\" \\\n  -H \"Content-Type: application/json\" \\\n  -d '{\n    \"workspace_id\": 1,\n    \"rate_limit_workspace_per_hour\": 600,\n    \"rate_limit_domain_per_hour\": 250,\n    \"blocked_recipient_domains\": [\"mailinator.com\", \"tempmail.com\"]\n  }'\n```\n\nPolicy UI:\n\n```text\nhttp://localhost:8080/ui/policy?workspace_id=1\n```\n\nOperator logs UI:\n\n```text\nhttp://localhost:8080/ui/logs?workspace_id=1\n```\n\nOperator dashboard UI:\n\n```text\nhttp://localhost:8080/ui?workspace_id=1\n```\n\nOperator onboarding UI:\n\n```text\nhttp://localhost:8080/ui/onboarding?workspace_id=1\n```\n\nOperator incidents UI:\n\n```text\nhttp://localhost:8080/ui/incidents?workspace_id=1\n```\n\n`/ui/logs` capabilities:\n- queue-state snapshot from recent message logs (`queued/sending/sent/failed/suppressed`)\n- timeline drill-down and controlled message retry by message ID\n- domain readiness check (SPF/DKIM/DMARC) via existing API\n- suppression/unsubscribe quick actions (requires admin API key for those writes)\n- webhook dead-letter view and replay controls\n- saved filter presets for `failed`, `suppressed`, and `dead_letter` views\n- time-range filtering (`from`/`to`) for message logs and webhook logs\n- bulk retry/replay actions with per-item outcomes\n- technical onboarding checklist workflow (optional domain readiness check)\n- incident bundle export flow for message timeline, attempts, and webhook outcomes\n\nAnalytics/export and billing metering:\n\n```sh\ncurl -sS \"http://localhost:8080/v1/analytics/summary?workspace_id=1\" \\\n  -H \"X-API-Key: change-me-operator\"\n\ncurl -sS \"http://localhost:8080/v1/analytics/export.csv?workspace_id=1\u0026limit=1000\" \\\n  -H \"X-API-Key: change-me-operator\"\n\ncurl -sS \"http://localhost:8080/v1/billing/metering?workspace_id=1\" \\\n  -H \"X-API-Key: change-me-operator\"\n```\n\n`/v1/*` endpoints require API key authentication using:\n- `API_KEY_HEADER`\n- `ADMIN_API_KEY`\n- `OPERATOR_API_KEY`\n\nSMTP account credentials saved through API are encrypted at rest in PostgreSQL using AES-GCM (`ENCRYPTION_KEY_BASE64`).\n\nBasic anti-abuse controls are enabled:\n- hourly workspace rate limit (`RATE_LIMIT_WORKSPACE_PER_HOUR`)\n- hourly recipient-domain rate limit (`RATE_LIMIT_DOMAIN_PER_HOUR`)\n- blocked recipient domain list (`BLOCKED_RECIPIENT_DOMAINS`)\n- signed webhook verification with replay window (`WEBHOOK_*` config, when enabled)\n\n## Architecture\n\n- [docs/ARCHITECTURE.md](docs/ARCHITECTURE.md)\n- [docs/release-risk-checklist.md](docs/release-risk-checklist.md)\n- [docs/v0.3.0-release-scope.md](docs/v0.3.0-release-scope.md)\n- [docs/PUBLIC-LAUNCH-CHECKLIST.md](docs/PUBLIC-LAUNCH-CHECKLIST.md)\n- [docs/BACKUP-RESTORE.md](docs/BACKUP-RESTORE.md)\n\n## License\n\nGNU Affero General Public License v3.0 (AGPL-3.0). See [LICENSE](LICENSE).\n\n## Governance Docs\n\n- [CONTRIBUTING.md](CONTRIBUTING.md)\n- [AGENTS.md](AGENTS.md)\n- [CLAUDE.md](CLAUDE.md)\n- [SECURITY.md](SECURITY.md)\n- [docs/AI-WORKFLOW.md](docs/AI-WORKFLOW.md)\n- [docs/release-risk-checklist.md](docs/release-risk-checklist.md)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsrmdn%2Fmaild","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsrmdn%2Fmaild","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsrmdn%2Fmaild/lists"}