From 8dd97703392b3ccb9249b13fe6f6e0c65ac6ccca Mon Sep 17 00:00:00 2001 From: Juergen Kunz Date: Thu, 12 Feb 2026 16:27:28 +0000 Subject: [PATCH] fix(dcrouter): remove legacy handling of emailConfig.routes that added domain-based routes --- changelog.md | 8 ++++++++ ts/00_commitinfo_data.ts | 2 +- ts/classes.dcrouter.ts | 23 ----------------------- ts_web/00_commitinfo_data.ts | 2 +- 4 files changed, 10 insertions(+), 25 deletions(-) diff --git a/changelog.md b/changelog.md index 99b76cd..d0fa9ac 100644 --- a/changelog.md +++ b/changelog.md @@ -1,5 +1,13 @@ # Changelog +## 2026-02-12 - 5.0.5 - fix(dcrouter) +remove legacy handling of emailConfig.routes that added domain-based routes + +- Removed loop that added domain-based email routes from emailConfig.routes into emailRoutes +- Previously created match.domains by extracting the recipient domain (split on '@') and defaulted forward target port to 25 +- Removed creation of TLS passthrough configuration for those forwarded routes +- This prevents duplicate or incorrect domain-based routes being appended during email route construction + ## 2026-02-12 - 5.0.4 - fix(cache) use user-writable ~/.serve.zone/dcrouter for TsmDB and centralize data path logic diff --git a/ts/00_commitinfo_data.ts b/ts/00_commitinfo_data.ts index 75b9b86..38a5dc6 100644 --- a/ts/00_commitinfo_data.ts +++ b/ts/00_commitinfo_data.ts @@ -3,6 +3,6 @@ */ export const commitinfo = { name: '@serve.zone/dcrouter', - version: '5.0.4', + version: '5.0.5', description: 'A multifaceted routing service handling mail and SMS delivery functions.' } diff --git a/ts/classes.dcrouter.ts b/ts/classes.dcrouter.ts index bb5061e..8768651 100644 --- a/ts/classes.dcrouter.ts +++ b/ts/classes.dcrouter.ts @@ -568,29 +568,6 @@ export class DcRouter { emailRoutes.push(routeConfig); } - // Add email domain-based routes if configured - if (emailConfig.routes) { - for (const route of emailConfig.routes) { - emailRoutes.push({ - name: route.name, - match: { - ports: emailConfig.ports, - domains: route.match.recipients ? [route.match.recipients.toString().split('@')[1]] : [] - }, - action: { - type: 'forward', - targets: route.action.type === 'forward' && route.action.forward ? [{ - host: route.action.forward.host, - port: route.action.forward.port || 25 - }] : undefined, - tls: { - mode: 'passthrough' - } - } - }); - } - } - return emailRoutes; } diff --git a/ts_web/00_commitinfo_data.ts b/ts_web/00_commitinfo_data.ts index 75b9b86..38a5dc6 100644 --- a/ts_web/00_commitinfo_data.ts +++ b/ts_web/00_commitinfo_data.ts @@ -3,6 +3,6 @@ */ export const commitinfo = { name: '@serve.zone/dcrouter', - version: '5.0.4', + version: '5.0.5', description: 'A multifaceted routing service handling mail and SMS delivery functions.' }