Live-verified by sending a real test email through the production API
(mail-api.scribase.com) with a remote `path` attachment and a
`content_id` inline image: accepted by the OCI relay and sent with no
errors. Both features were already fully implemented (SSRF-guarded
server-side fetch for `path`, `cid` wired through to both the OCI and
SMTP providers) but the migration docs still told evaluators "Not
yet" and "use base64 content" instead — a false parity gap that would
make a developer comparing against Resend wrongly rule this out.
The Resend-migration parity table and the webhooks guide both still said
GET/POST /webhooks were "Coming soon" and that Svix-compatible signing was
"on the roadmap"/"coming in Wave 4". Both have actually been fully shipped
since commit b510307 (2026-10-07) — the docs were just never updated, so a
developer evaluating migration from Resend would read this and wrongly
conclude webhooks (a core Resend feature) don't work here at all.
Verified live end to end before fixing the docs: created a webhook via the
real POST /webhooks on mail-api.scribase.com (got back
signature_format: "svix" + a whsec_ secret), sent a real test email through
the public API, and confirmed the real email.sent/email.opened webhook
deliveries at a webhook.site endpoint with valid svix-id/svix-timestamp/
svix-signature headers — then recomputed the HMAC in Python and confirmed it
matches the delivered signature byte for byte. Also corrected the
"Inboxes/received email: Coming soon" row, which is likewise already fully
implemented (including reply/forward extensions Resend itself doesn't have).
Cleaned up the temporary webhook, temporary API key, and test webhook.site
token afterward.
Resend's migration guide listed "Custom tracking subdomain" as a hard
"Not yet" gap. Finishes and ships the mostly-complete prior WIP that
closed it, plus the piece it was missing: dashboard UI.
- domain-service: generate the CNAME DNS record for a saved tracking
label; updateDomain accepts trackingSubdomain.
- email-tracking: normalizeTrackingSubdomain + trackingLinkBaseUrl pick
https://{label}.{domain} for open/click links when a label is set,
falling back to the app origin otherwise.
- email-queue-service: wire the new base URL into the actual send path
(applyTracking), not just the API layer.
- Resend-compat public API (PATCH /domains/:id): accepts
tracking_subdomain (rejects clearing it, matching Resend's own rule).
- NEW: dashboard domain settings page gets an actual input + save
button for the subdomain (previously only settable via the raw API,
so no dashboard user could ever use the feature end to end) wired to
a new domainRouter.updateDomain trackingSubdomain field.
- docs/guides/resend-migration.mdx: flips the parity table row from
"Not yet" to how to use it.
Verified: apps/web `pnpm run typecheck` clean (0 errors), full
`pnpm run test:unit` 615/615 passing (44 in the directly touched
files), plus a real send through the live prod pipeline (see
plans/mail-studio.md for the HTTP/email evidence).
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Resend parity for delivery outcomes. OCI Email Delivery writes one
OutboundRelayed service-log record per recipient (relay, bounce, complaint);
a new one-minute BullMQ job reads them through the OCI Logging Search API
(no Connector Hub push: Notifications HTTPS caps at 60 msgs/min per topic)
and feeds Delivery / Bounce / Complaint events through processEmailEvent.
- Provider: ensureDeliveryLogs (idempotent, cached) creates the
"scribase-mail" log group and emaildelivery service logs
(outboundrelayed, outboundaccepted) per ACTIVE email domain;
listDeliveryEvents runs a compartment-scoped Logging Search
(oci-logging / oci-loggingsearch 2.142.2).
- Job provider-delivery-log-poll: appSetting cursor with 10 min overlap,
1 day max lookback, ProcessedProviderLogEvent dedupe table (pruned after
3 days), truncation-safe cursor, enables logs on verified domains with a
30 min back-off on failures. DELIVERY_LOG_POLL_CRON default every minute.
- relay -> DELIVERED, bounce hard/soft -> Permanent/Transient with category,
code and SMTP status, complaint -> COMPLAINED; open/click/unsubscribe ignored.
- processEmailEvent skips a Delivery/Bounce/Complaint already recorded for
the same recipient (log poll vs suppression poll), counts usage once per
email and only adds hardBounced when a soft bounce turns permanent.
- Domain create/verify call ensureDeliveryLogs without failing on errors.
- Docs: IAM policy (manage log-groups, read log-content), env vars.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- rename product to Scribase Mail across web app, emails, marketing and docs
- new monochrome mark/favicons and neutral black/white theme; remove emoji UI
- source code link (AGPL-3.0) in sidebar, login and unsubscribe pages
- rewrite marketing site and self-hosting docs for OCI Email Delivery,
add OCI notes page (event sources, unavailable features)
- add NOTICE and MERGE.md crediting useSend and listing changes
- add deploy/compose.scribase-mail.yml (web+postgres+redis, 1.47 GB limits),
deploy/.env.example, Caddy site and DEPLOY.md for mail.scribase.com
- replace legacy provider env vars in turbo.json, CI, env examples, docker files
- OCI SDK packages as server externals for the standalone build
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* fix: clear attachments and headers in the email cleanup job
The retention cleanup job only nulls text and html, but attachments
(base64-encoded, typically the largest column) and headers survive it.
Successful sends already clear both right after sending, so this mainly
affects failed, cancelled and stuck emails, which keep their attachments
forever even with EMAIL_CLEANUP_DAYS configured. Include both columns in
the cleanup update and extend the filter so already-clean rows are still
skipped.
* docs: document the EMAIL_CLEANUP_DAYS retention setting
The setting existed in the env schema but was not mentioned in the
self-hosting docs or the example env file.
* docs: clarify cleanup wording
Clears values, does not delete columns. Drop the claim about non-numeric
values, since the setting is parsed leniently.
* feat: support standard AWS env vars and default credential chain
Replace non-standard AWS_ACCESS_KEY / AWS_SECRET_KEY with the AWS-standard
AWS_ACCESS_KEY_ID / AWS_SECRET_ACCESS_KEY. The old names are kept as
fallbacks in the runtimeEnv for backward compatibility.
Both vars are now optional. When omitted, the credentials object is not
passed to SESv2Client, STSClient, or SNSClient — the AWS SDK then falls
back to its default provider chain (IAM roles, ECS task roles, instance
profiles, etc.), which is the recommended approach for cloud-native deployments.
Closes#316
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
* Potential fix for pull request finding
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
* refactor: extract shared getAwsCredentialOptions helper and add partial-config guard
- Move the credential spread logic into a single credentials.ts helper
so SESv2Client, STSClient, and SNSClient all share one implementation
- Throw a clear error if only one of AWS_ACCESS_KEY_ID / AWS_SECRET_ACCESS_KEY
is set, preventing silent fallback to the default provider chain with a
half-configured environment
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
* fix: align AWS env vars in docker and docs
* fix: use alias import for AWS credentials helper
---------
Co-authored-by: purva <purvahk08@gmail.com>
Co-authored-by: Purva Kandalgaonkar <136103488+purva-8@users.noreply.github.com>
* feat: add REDIS_KEY_PREFIX env var for Redis ACL namespace isolation
Adds optional REDIS_KEY_PREFIX env var that prefixes all Redis keys
(BullMQ queues via `prefix` option, cache/lock/rate-limit keys via
`redisKey()` helper). When unset, behavior is unchanged (BullMQ
defaults to "bull:", cache keys are unprefixed).
This enables self-hosters using Redis ACL multi-tenancy to restrict
useSend to its own key namespace (e.g. `~usesend:*`).
16 files changed across env schema, Redis module, 9 BullMQ queue/worker
files, and 5 direct Redis key operation sites.
* docs: add REDIS_KEY_PREFIX to self-host assets and fix docker run example
Add REDIS_KEY_PREFIX env var to docker/prod/compose.yml, .env.example,
.env.selfhost.example, and self-hosting docs. Fix missing trailing
backslashes in standalone docker run example.
* fix(redis): disable ioredis ready check and BullMQ version check
Redis ACL blocks INFO command (in @dangerous category). ioredis uses
INFO for ready check, BullMQ uses it for version detection. Without
these flags, BullMQ workers fail to initialize and silently stop
processing jobs.
- Add enableReadyCheck: false to ioredis connection
- Add skipVersionCheck: true to all 5 Queue + 5 Worker constructors
* fix(redis): add skipVersionCheck to remaining BullMQ job queues
Add skipVersionCheck: true to Queue and Worker constructors in all 4 job
files (campaign-scheduler, cleanup-email-bodies, usage-job,
webhook-cleanup) to match the pattern already used in service files.
This prevents BullMQ version mismatch errors when using REDIS_KEY_PREFIX
with Redis ACL namespace isolation.
* feat: add customizable contact double opt-in flow
* test: add double opt-in service coverage
* fix: address review comments for double opt-in PR
- Make pending status conditional on doubleOptInEnabled flag
- Backfill legacy unsubscribeReason for reliable pending detection
- Add doubleOptInContent to contact book listing select
- Fix duplicate toast on DOI editor subject save failure
- Harden searchParams parsing against string[] values
- Make default DOI template use link mark for clickable URL
- Make public API create+update atomic via transaction
- Prevent contact upsert failure when DOI email send fails
- Fix empty string template variable replacement
Co-authored-by: opencode <opencode@anthropic.com>
* fix: harden double opt-in confirmation safeguards
Preserve explicit unsubscribe intent in DOI flows and prevent confirmation links from re-subscribing opted-out contacts. Also sanitize subscribe-page error messaging and use timing-safe hash comparison for link verification.
* ui stuff
* fix: require doubleOptInUrl in double opt-in templates
* feat: add configurable from address for double opt-in emails
* feat: add resend confirmation flow for pending contacts
* fix: move subscribe confirmation to explicit POST flow
* test: add contact book public API endpoint coverage
* docs: add double opt-in documentation and update OpenAPI spec
Add a user guide for the double opt-in feature covering setup, contact
statuses, email customization, template variables, and best practices.
Update the OpenAPI spec to include doubleOptIn fields in all contactBook
request/response schemas.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
---------
Co-authored-by: opencode <opencode@anthropic.com>
Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
* fix: prevent premature webhook auto-disable and allow re-enable
Use persisted failure counters when deciding auto-disable status and restore dashboard re-enable flow so webhooks are not deactivated unexpectedly after reset.
* fix: count webhook failures per failed call
Only increment consecutive failure counters after a call exhausts retries, while keeping the 30-call auto-disable threshold and stale-state protection.
* fix(docs): correct webhook SDK package name (#363)
* test: isolate webhook unit suite from mailer deps
Mock limit service in webhook unit tests so Vitest does not resolve team-service and mailer paths requiring usesend-js during CI.
* Correct API reference in Go package documentation
Updated description to reference the useSend API instead of Unsend API.
* Update documentation to reflect useSend branding
Added a issue to the package maintainer.
If maintainer isn't actively maintaining the package. Will fork it.
* fix(docs): remove community section and update Go SDK documentation
- Remove community section until content is ready.
- Update Go SDK docs to useSend implementation.