Complete email router implementation and documentation
- Cleaned up interface definitions to only include implemented features - Updated readme.md with comprehensive route-based configuration examples - Added common email routing patterns and troubleshooting guide - Removed legacy DomainRouter and IDomainRule interfaces - Updated all imports and exports to use new EmailRouter system - Verified build and core functionality tests pass The match/action pattern implementation is now complete and production-ready.
This commit is contained in:
@ -10,7 +10,6 @@ import {
|
||||
} from '../../security/index.js';
|
||||
import { UnifiedDeliveryQueue, type IQueueItem } from './classes.delivery.queue.js';
|
||||
import type { Email } from '../core/classes.email.js';
|
||||
import type { IDomainRule } from '../routing/classes.email.config.js';
|
||||
import type { UnifiedEmailServer } from '../routing/classes.unified.email.server.js';
|
||||
import type { SmtpClient } from './smtpclient/smtp-client.js';
|
||||
|
||||
@ -50,7 +49,7 @@ export interface IMultiModeDeliveryOptions {
|
||||
|
||||
// Mode-specific handlers
|
||||
forwardHandler?: IDeliveryHandler;
|
||||
mtaHandler?: IDeliveryHandler;
|
||||
deliveryHandler?: IDeliveryHandler;
|
||||
processHandler?: IDeliveryHandler;
|
||||
|
||||
// Rate limiting
|
||||
@ -136,7 +135,7 @@ export class MultiModeDeliverySystem extends EventEmitter {
|
||||
forwardHandler: options.forwardHandler || {
|
||||
deliver: this.handleForwardDelivery.bind(this)
|
||||
},
|
||||
mtaHandler: options.mtaHandler || {
|
||||
deliveryHandler: options.deliveryHandler || {
|
||||
deliver: this.handleMtaDelivery.bind(this)
|
||||
},
|
||||
processHandler: options.processHandler || {
|
||||
@ -313,7 +312,7 @@ export class MultiModeDeliverySystem extends EventEmitter {
|
||||
break;
|
||||
|
||||
case 'mta':
|
||||
result = await this.options.mtaHandler.deliver(item);
|
||||
result = await this.options.deliveryHandler.deliver(item);
|
||||
break;
|
||||
|
||||
case 'process':
|
||||
|
Reference in New Issue
Block a user