mirror of
https://github.com/Memo-2023/mana-monorepo.git
synced 2026-05-14 23:01:09 +02:00
Closes the last plan milestone. Users can verify their sending-domain setup without leaving the broadcast settings page. Server (mana-mail) - services/dns-check.ts: parseSpf / parseDkim / parseDmarc are pure functions. SPF accepts include:<mailDomain>, flags weak (+all) and wrong (include missing) and multi-record (RFC 7208 §3.2). DKIM needs v=DKIM1 + a p= public-key segment. DMARC requires v=DMARC1, flags p=none as weak (monitoring only), ok on quarantine/reject. All three are case-insensitive. - lookupTxt(): DNS-over-HTTPS against Cloudflare 1.1.1.1 — avoids the Bun/container udp-resolver flakiness and works everywhere. Multi-string TXT (`"a" "b"`) get concatenated before parsing. - checkDomain(): one call, three parallel DoH lookups, returns a structured result with suggested copy-paste records scoped to the user's actual mail domain from config. - Route: GET /v1/mail/dns-check?domain=&selector= (JWT auth). Zod validates the domain looks sensible before hitting DoH. - 16 unit tests covering all three parsers + multi-record edge case. Client - api.ts: runDnsCheck(domain, selector?) helper with typed result. - components/DnsCheckBanner.svelte: derives domain from the default from-email (after @), calls the check on-demand, renders per-record status chips (ok / weak / wrong / missing) with messages, exposes copy-pasteable SPF + DMARC records when anything's off. DKIM setup is provider-specific so we show a hint rather than a canned record. Last-check timestamp persists to settings.dnsCheck so the banner survives a reload without re-hitting the API. - Wired into SettingsForm between Impressum and Standard-Footer — where the user is already thinking about "what's required to actually send". All checks clean: - webapp pnpm check: 0 broadcast errors (4 pre-existing articles errors from parallel Spaces work, unrelated) - mana-mail tests: 36/36 across tracking-token + link-rewriter + dns-check - mana-mail build: 2.51 MB (+8 KB for juice — dns-check itself is ~3 KB) Plan: docs/plans/broadcast-module.md §M8. All 10 milestones now done. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com> |
||
|---|---|---|
| .. | ||
| mana-ai | ||
| mana-analytics | ||
| mana-api-gateway | ||
| mana-auth | ||
| mana-crawler | ||
| mana-credits | ||
| mana-events | ||
| mana-geocoding | ||
| mana-image-gen | ||
| mana-landing-builder | ||
| mana-llm | ||
| mana-mail | ||
| mana-media | ||
| mana-notify | ||
| mana-research | ||
| mana-search | ||
| mana-stt | ||
| mana-subscriptions | ||
| mana-sync | ||
| mana-tts | ||
| mana-user | ||
| mana-video-gen | ||
| mana-voice-bot | ||
| news-ingester | ||