fix(dcrouter): remove legacy handling of emailConfig.routes that added domain-based routes

This commit is contained in:
2026-02-12 16:27:28 +00:00
parent 77842647fd
commit 8dd9770339
4 changed files with 10 additions and 25 deletions

View File

@@ -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

View File

@@ -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.'
}

View File

@@ -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;
}

View File

@@ -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.'
}