@push.rocks/smartmta 8.2.1 → 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.
- package/changelog.md +23 -0
- package/dist_rust/mailer-bin_linux_amd64 +0 -0
- package/dist_rust/mailer-bin_linux_arm64 +0 -0
- package/dist_ts/00_commitinfo_data.js +1 -1
- package/dist_ts/index.d.ts +1 -0
- package/dist_ts/index.js +2 -1
- package/dist_ts/mail/delivery/classes.delivery.system.js +18 -2
- package/dist_ts/mail/routing/classes.email.action.executor.d.ts +4 -2
- package/dist_ts/mail/routing/classes.email.action.executor.js +6 -16
- package/dist_ts/mail/routing/classes.email.router.d.ts +14 -0
- package/dist_ts/mail/routing/classes.email.router.js +13 -1
- package/dist_ts/mail/routing/classes.unified.email.server.d.ts +17 -4
- package/dist_ts/mail/routing/classes.unified.email.server.js +80 -8
- package/dist_ts/mail/routing/interfaces.d.ts +15 -3
- package/package.json +3 -3
- package/readme.md +38 -10
- package/ts/00_commitinfo_data.ts +1 -1
- package/ts/index.ts +1 -0
- package/ts/mail/delivery/classes.delivery.system.ts +20 -1
- package/ts/mail/routing/classes.email.action.executor.ts +7 -28
- package/ts/mail/routing/classes.email.router.ts +21 -1
- package/ts/mail/routing/classes.unified.email.server.ts +96 -12
- package/ts/mail/routing/interfaces.ts +15 -3
|
@@ -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
|
|
90
|
-
* The consumer owns persistence and all recipient
|
|
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
|
-
/**
|
|
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
|
*/
|