Courier
Transaktionsmail-Gateway für die Apps auf Olares. Nimmt Mail per
Resend-kompatibler HTTP-API an, legt sie in eine Warteschlange und sendet über
Amazon SES. Absenderdomain: hubsport.club.
Status
- API, Queue, Retry, API-Keys, Web-Übersicht und Worker stehen.
- Transport
dry-runundresendsind eingebaut,sesist implementiert. - SES-Identity
hubsport.club(eu-west-1) ist angelegt, DKIM/DNS noch offen. - SES Production Access ist noch nicht freigegeben (Sandbox: 200/Tag).
Lokal
cp .env.example .env
npm ci
npm run db:migrate
npm run db:key -- --app plan --name Plan
npm run dev # http://127.0.0.1:3400
npm run worker # in einem zweiten Terminal
Ohne MAIL_TRANSPORT=ses landet jede Mail nur im Log (dry-run).
API
Deployed: https://ef0124d4.kaivostudio.olares.de/api (App-ID-Adresse der
Box). Ein stabiler Name (courier.hubsport.club) braucht noch einen
DNS-/Tunnel-Eintrag.
curl -X POST https://ef0124d4.kaivostudio.olares.de/api/emails/ \
-H "Authorization: Bearer ck_live_…" \
-H "Content-Type: application/json" \
-d '{
"from": "plan <plan@hubsport.club>",
"to": "kunde@example.com",
"subject": "Test",
"html": "<p>Hallo</p>"
}'
Unterstützt: from, to, cc, bcc, reply_to, subject, html, text,
headers, attachments, tags, Idempotency-Key; dazu
POST /api/emails/batch, GET /api/emails/:id und GET /api/health.
Fehler kommen im Resend-Format (statusCode, name, message).
SES
npm run ses:records
Gibt die Cloudflare-Records für DKIM, MAIL FROM und DMARC aus. Mit einem
Token (Zone → DNS → Edit) setzt CLOUDFLARE_API_TOKEN=… npm run ses:dns sie
automatisch. Danach im AWS-Console den Production Access beantragen
(SES → Account dashboard).
Zustellereignisse kommen per SNS auf /api/webhooks/ses?token=….
Resend-SDK
COURIER_KEY=ck_live_… \
COURIER_BASE_URL=https://ef0124d4.kaivostudio.olares.de/api \
npm run test:resend
Olares
Chart unter olares/. Werte für AWS und SNS kommen aus .secrets.md in
olares/values.yaml (nie committen). Prüfen:
helm lint olares -f olares/values-olares-stub.yaml
helm template courier olares -f olares/values-olares-stub.yaml >/dev/null
Die öffentlichen Pfade sind auf die Mail-API, den Health-Check und den SNS-Webhook begrenzt; die Oberfläche bleibt hinter Olares-Authelia.