From 1f97a2ceba25ad5e6ba088f20cb0d73c94012078 Mon Sep 17 00:00:00 2001 From: Jeff Emmett Date: Mon, 16 Mar 2026 21:00:12 -0700 Subject: [PATCH] fix(smtp): use noreply@rmail.online as sender across all modules Mailcow rejects noreply@rspace.online because the authenticated user is noreply@rmail.online. Updated all SMTP_FROM and SMTP_USER defaults to use rmail.online consistently: spaces invites, rSplat notifications, EncryptID auth emails, and rCart payment receipts. Co-Authored-By: Claude Opus 4.6 --- docker-compose.yml | 4 ++-- modules/rcart/mod.ts | 4 ++-- server/index.ts | 4 ++-- server/spaces.ts | 4 ++-- src/encryptid/server.ts | 4 ++-- 5 files changed, 10 insertions(+), 10 deletions(-) diff --git a/docker-compose.yml b/docker-compose.yml index bc8d33b..07561e0 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -216,9 +216,9 @@ services: - DATABASE_URL=postgres://encryptid:${ENCRYPTID_DB_PASSWORD}@encryptid-db:5432/encryptid - SMTP_HOST=${SMTP_HOST:-mailcowdockerized-postfix-mailcow-1} - SMTP_PORT=${SMTP_PORT:-587} - - SMTP_USER=${SMTP_USER:-noreply@rspace.online} + - SMTP_USER=${SMTP_USER:-noreply@rmail.online} - SMTP_PASS=${SMTP_PASS} - - SMTP_FROM=${SMTP_FROM:-EncryptID } + - SMTP_FROM=${SMTP_FROM:-EncryptID } - RECOVERY_URL=${RECOVERY_URL:-https://auth.rspace.online/recover} - MAILCOW_API_URL=${MAILCOW_API_URL:-http://nginx-mailcow:8080} - MAILCOW_API_KEY=${MAILCOW_API_KEY:-} diff --git a/modules/rcart/mod.ts b/modules/rcart/mod.ts index f8e4822..07a6e79 100644 --- a/modules/rcart/mod.ts +++ b/modules/rcart/mod.ts @@ -2120,7 +2120,7 @@ async function sendPaymentSuccessEmail( ].join('\n'); await transport.sendMail({ - from: 'rSpace ', + from: process.env.SMTP_FROM || 'rSpace ', to: email, subject: `Payment confirmed \u2014 ${p.amount} ${p.token}`, html, @@ -2196,7 +2196,7 @@ async function sendPaymentReceivedEmail( ].join('\n'); await transport.sendMail({ - from: 'rSpace ', + from: process.env.SMTP_FROM || 'rSpace ', to: email, subject: `Payment received \u2014 ${p.amount} ${p.token}`, html, diff --git a/server/index.ts b/server/index.ts index 4da1324..03e43b5 100644 --- a/server/index.ts +++ b/server/index.ts @@ -697,7 +697,7 @@ if (process.env.SMTP_PASS) { secure: Number(process.env.SMTP_PORT) === 465, tls: { rejectUnauthorized: false }, auth: { - user: "noreply@rspace.online", + user: process.env.SMTP_USER || "noreply@rmail.online", pass: process.env.SMTP_PASS, }, }); @@ -709,7 +709,7 @@ async function sendSplatEmail(job: Gen3DJob) { const title = job.title || "3D Model"; try { await splatMailTransport.sendMail({ - from: process.env.SMTP_FROM || "rSplat ", + from: process.env.SMTP_FROM || "rSplat ", to: SPLAT_NOTIFY_EMAIL, subject: `Your 3D splat "${title}" is ready — rSplat`, html: ` diff --git a/server/spaces.ts b/server/spaces.ts index 3a52907..f8b5a7d 100644 --- a/server/spaces.ts +++ b/server/spaces.ts @@ -2082,7 +2082,7 @@ if (process.env.SMTP_PASS) { port: Number(process.env.SMTP_PORT) || 587, secure: Number(process.env.SMTP_PORT) === 465, auth: { - user: process.env.SMTP_USER || "noreply@rspace.online", + user: process.env.SMTP_USER || "noreply@rmail.online", pass: process.env.SMTP_PASS, }, tls: { rejectUnauthorized: false }, @@ -2148,7 +2148,7 @@ spaces.post("/:slug/invite", async (c) => { try { await inviteTransport.sendMail({ - from: process.env.SMTP_FROM || "rSpace ", + from: process.env.SMTP_FROM || "rSpace ", to: body.email, subject: `You're invited to join "${slug}" on rSpace`, html: [ diff --git a/src/encryptid/server.ts b/src/encryptid/server.ts index 219d421..6bc0574 100644 --- a/src/encryptid/server.ts +++ b/src/encryptid/server.ts @@ -153,9 +153,9 @@ const CONFIG = { host: process.env.SMTP_HOST || 'mail.rmail.online', port: parseInt(process.env.SMTP_PORT || '587'), secure: false, // STARTTLS on 587 - user: process.env.SMTP_USER || 'noreply@rspace.online', + user: process.env.SMTP_USER || 'noreply@rmail.online', pass: process.env.SMTP_PASS || '', - from: process.env.SMTP_FROM || 'EncryptID ', + from: process.env.SMTP_FROM || 'EncryptID ', }, recoveryUrl: process.env.RECOVERY_URL || 'https://auth.rspace.online/recover', adminDIDs: (process.env.ADMIN_DIDS || '').split(',').filter(Boolean),