feat: implement comprehensive route-based email routing system

Replace legacy domain-rule based routing with flexible route-based system that supports:
- Multi-criteria matching (recipients, senders, IPs, authentication)
- Four action types (forward, process, deliver, reject)
- Moved DKIM signing to delivery phase for signature validity
- Connection pooling for efficient email forwarding
- Pattern caching for improved performance

This provides more granular control over email routing with priority-based matching and comprehensive test coverage.
This commit is contained in:
2025-05-28 13:23:45 +00:00
parent 88099e120a
commit 2e75961d1c
11 changed files with 717 additions and 168 deletions

View File

@ -50,6 +50,14 @@ export class EmailRouter extends EventEmitter {
this.emit('routesUpdated', this.routes);
}
/**
* Set routes (alias for updateRoutes)
* @param routes New routes
*/
public setRoutes(routes: IEmailRoute[]): void {
this.updateRoutes(routes);
}
/**
* Clear the pattern cache
*/