@push.rocks/smartmta 8.2.0 → 9.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -86,8 +86,9 @@ export declare class AcceptEnvelopeRejectionError extends Error {
86
86
  constructor(smtpCode: number, smtpMessage: string);
87
87
  }
88
88
  /**
89
- * Terminal durable acceptance context for an envelope containing at least one `store` route.
90
- * The consumer owns persistence and all recipient fan-out before this hook resolves.
89
+ * Terminal durable acceptance context for an envelope containing at least one
90
+ * `store` or `deliver` route. The consumer owns persistence and all recipient
91
+ * fan-out before this hook resolves.
91
92
  */
92
93
  export interface IAcceptEnvelopeContext {
93
94
  email: Email;
@@ -240,9 +241,14 @@ export interface IUnifiedEmailServerOptions {
240
241
  hooks?: {
241
242
  /** Async recipient policy hook that may further restrict an accepted built-in decision. */
242
243
  onRcptTo?: (context: IRcptToPolicyContext) => Promise<ISmtpDecision>;
243
- /** Async message acceptance hook for envelopes with no resolved `store` action. */
244
+ /** Async message acceptance hook for envelopes with no resolved `store` or `deliver` action. */
244
245
  onMessageData?: (context: IMessageAcceptanceContext) => Promise<IMessageAcceptanceDecision>;
245
- /** Required terminal durable owner for any envelope containing a resolved `store` action. */
246
+ /**
247
+ * Required terminal durable owner for any envelope containing a resolved
248
+ * `store` or `deliver` action. The hook must durably persist the exact
249
+ * raw message before resolving; its resolution is what authorizes the
250
+ * SMTP 250 for those envelopes.
251
+ */
246
252
  onAcceptEnvelope?: (context: IAcceptEnvelopeContext) => Promise<void>;
247
253
  /** Observer-safe callback for SMTP recipient rejections. */
248
254
  onRecipientRejected?: (event: IRecipientRejectedEvent) => Promise<void> | void;
@@ -459,6 +465,13 @@ export declare class UnifiedEmailServer extends EventEmitter {
459
465
  * Generate SmartProxy routes for email ports
460
466
  */
461
467
  generateProxyRoutes(portMapping?: Record<number, number>): any[];
468
+ /**
469
+ * Server-level action policy for a single route. A `deliver` action is a
470
+ * terminal local delivery owned by the durable `hooks.onAcceptEnvelope`
471
+ * acceptance path; without that hook the route could only accept-then-fail,
472
+ * so it is rejected at configuration time instead.
473
+ */
474
+ private assertRouteActionServable;
462
475
  /**
463
476
  * Update server configuration
464
477
  */