caelum0x 15021a115e fix(deploy): wire AUTO_APPROVE_FREE_PROVIDERS into compose.scribase-mail.yml
env.js and waitlist-auto-approve-service.ts (526d6a9) already consume
AUTO_APPROVE_FREE_PROVIDERS and AUTO_APPROVE_FREE_PROVIDER_DAILY_CAP, but
the web service's environment allowlist in
deploy/compose.scribase-mail.yml never listed either var, and there is
no env_file fallback in this manifest. Setting them in deploy/.env alone
was a no-op: docker compose would not forward them into the container,
Zod would fall back to its "false" default, and free-provider
auto-approval stayed permanently off regardless of the env file.

Add both vars to the web service's environment block (default false /
10, matching the Zod schema defaults) and document them in
deploy/.env.example next to the existing AUTO_APPROVE_WAITLIST pair.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-11-04 23:26:48 +03:00

86 lines
3.4 KiB
Plaintext

# deploy/.env for compose.scribase-mail.yml. Never commit the real file.
# chmod 600 deploy/.env
NEXTAUTH_URL=https://mail.scribase.com
# openssl rand -base64 32
NEXTAUTH_SECRET=
# Must be on an ACTIVE OCI email domain: scribase.com is, mail.scribase.com is not.
FROM_EMAIL=Scribase Mail <no-reply@scribase.com>
# Required: this account approves waitlisted sign-ups at /admin/waitlist.
ADMIN_EMAIL=
# true = multi-tenant (waitlist, warm-up, reputation guard). Rebuild the image when changing.
IS_CLOUD=true
# Cloud only: let sign-ups from a company domain with MX skip the waitlist
# (free/disposable mailboxes stay waitlisted; one account per domain; daily cap).
AUTO_APPROVE_WAITLIST=true
AUTO_APPROVE_DAILY_CAP=25
# Also let a free/consumer inbox (gmail.com, outlook.com, ...) auto-approve,
# under its own smaller daily cap. Off by default; set to true once this is
# confirmed safe in production. See waitlist-auto-approve-service.ts.
AUTO_APPROVE_FREE_PROVIDERS=false
AUTO_APPROVE_FREE_PROVIDER_DAILY_CAP=10
POSTGRES_USER=scribase_mail
# openssl rand -hex 24
POSTGRES_PASSWORD=
POSTGRES_DB=scribase_mail
# Oracle Cloud Email Delivery: SMTP credential (sending)
SMTP_HOST=smtp.email.eu-frankfurt-1.oci.oraclecloud.com
SMTP_PORT=587
SMTP_USER=
SMTP_PASS=
# Oracle Cloud Email Delivery: API signing key (domains, DKIM, senders, suppressions)
OCI_REGION=eu-frankfurt-1
OCI_TENANCY=
OCI_USER=
OCI_FINGERPRINT=
OCI_COMPARTMENT_ID=
# Host path of the API private key, mounted read-only into the web container
OCI_PRIVATE_KEY_FILE=/etc/scribase-mail/oci_api_key.pem
# Delivered/bounced/complained events: the app enables the Email Delivery
# service logs (OutboundRelayed + OutboundAccepted) per verified domain in this
# OCI Logging log group and polls them with Logging Search. Needs the IAM
# policy in DEPLOY.md section 0.
# OCI_LOG_GROUP_NAME=scribase-mail
# DELIVERY_LOG_POLL_CRON=* * * * *
# Billing: Dodo Payments (merchant of record). Leave empty to run without
# paid plans; the billing page then shows "Billing not configured".
# Steps: deploy/DEPLOY.md section 8.
DODO_PAYMENTS_API_KEY=
# Webhook signing secret (whsec_...) of the https://mail.scribase.com/api/webhook/dodo endpoint
DODO_PAYMENTS_WEBHOOK_KEY=
# test_mode or live_mode (must match the API key)
DODO_PAYMENTS_ENVIRONMENT=test_mode
# Subscription product ids (pdt_...)
DODO_PRODUCT_ID_PRO=
DODO_PRODUCT_ID_SCALE=
# Usage meter id (mtr_...); usage reporting is off until set
DODO_USAGE_METER_ID=
# Must equal the meter's event name
DODO_USAGE_EVENT_NAME=email.sent
# Abuse controls: content screening + review queue (all optional)
# Screen every outgoing email for malicious links/attachments and spam signals.
CONTENT_SCREENING_ENABLED=true
# Threat feeds, comma separated, one domain/URL per line. Leave unset for the
# default (Phishing.Database active phishing domains, MIT). Set to empty to
# turn feeds off. Only add feeds whose terms allow commercial use.
# SCREENING_FEED_URLS=
# SCREENING_FEED_CRON=17 */6 * * *
# Domains never flagged by feeds (e.g. your own link domains), comma separated.
SCREENING_ALLOWLIST_DOMAINS=
# Domains always rejected, comma separated.
SCREENING_BLOCKED_DOMAINS=
# New teams' emails wait at /admin/review until the team has sent this many
# emails AND is this many hours old (defaults 20 and 48; both 0 = off).
FIRST_SENDS_REVIEW_EMAILS=
FIRST_SENDS_REVIEW_HOURS=
SCRIBASE_MAIL_PORT=4350
SCRIBASE_MAIL_DATA_DIR=/srv/scribase-mail/data
GIT_SHA=