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

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