@serve.zone/dcrouter 18.1.1 → 18.2.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/deno.json +1 -1
- package/dist_serve/bundle.js +2065 -1617
- package/dist_ts/00_commitinfo_data.js +1 -1
- package/dist_ts/classes.dcrouter.d.ts +60 -1
- package/dist_ts/classes.dcrouter.js +158 -1
- package/dist_ts/email/classes.accepted-email-spool.d.ts +66 -0
- package/dist_ts/email/classes.accepted-email-spool.js +238 -18
- package/dist_ts/email/classes.workapp-mail-manager.js +5 -2
- package/dist_ts_web/00_commitinfo_data.js +1 -1
- package/package.json +3 -3
- package/readme.md +16 -0
- package/ts/00_commitinfo_data.ts +1 -1
- package/ts/classes.dcrouter.ts +199 -1
- package/ts/email/classes.accepted-email-spool.ts +312 -22
- package/ts/email/classes.workapp-mail-manager.ts +4 -1
- package/ts_web/00_commitinfo_data.ts +1 -1
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
*/
|
|
4
4
|
export const commitinfo = {
|
|
5
5
|
name: '@serve.zone/dcrouter',
|
|
6
|
-
version: '18.
|
|
6
|
+
version: '18.2.0',
|
|
7
7
|
description: 'A multifaceted routing service handling mail and SMS delivery functions.'
|
|
8
8
|
};
|
|
9
9
|
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiMDBfY29tbWl0aW5mb19kYXRhLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vdHMvMDBfY29tbWl0aW5mb19kYXRhLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBOztHQUVHO0FBQ0gsTUFBTSxDQUFDLE1BQU0sVUFBVSxHQUFHO0lBQ3hCLElBQUksRUFBRSxzQkFBc0I7SUFDNUIsT0FBTyxFQUFFLFFBQVE7SUFDakIsV0FBVyxFQUFFLDBFQUEwRTtDQUN4RixDQUFBIn0=
|
|
@@ -21,6 +21,24 @@ import { AcceptedEmailSpool, EmailDomainManager, EmailRouteBuilder, EmailSetting
|
|
|
21
21
|
import { WebPushManager } from './webpush/index.js';
|
|
22
22
|
import type { IEmailOutboundEgressStatus, IEmailPortConfig, IEmailServerSettings, TEmailOutboundMode, TEmailServerSettingsUpdate } from '../dist_ts_interfaces/data/email-settings.js';
|
|
23
23
|
import type { IDcRouterRouteConfig, IRemoteIngressHubSettings, TRemoteIngressHubSettingsUpdate } from '../dist_ts_interfaces/data/remoteingress.js';
|
|
24
|
+
/**
|
|
25
|
+
* dcrouter's superset of SmartMTA's SMTP TLS options.
|
|
26
|
+
*
|
|
27
|
+
* SmartMTA consumes PEM content (`certPem`/`keyPem`). Deployments configure
|
|
28
|
+
* certificate FILES, so dcrouter accepts the path form too and loads it eagerly
|
|
29
|
+
* at startup — a path that cannot be read fails startup rather than silently
|
|
30
|
+
* leaving the listener without TLS.
|
|
31
|
+
*/
|
|
32
|
+
export interface IDcRouterEmailTlsConfig extends NonNullable<IUnifiedEmailServerOptions['tls']> {
|
|
33
|
+
/** Path to the certificate chain PEM file. Requires keyPath. */
|
|
34
|
+
certPath?: string;
|
|
35
|
+
/** Path to the private key PEM file. Requires certPath. */
|
|
36
|
+
keyPath?: string;
|
|
37
|
+
}
|
|
38
|
+
/** dcrouter's email server options: SmartMTA's, with the path-shaped tls block. */
|
|
39
|
+
export type IDcRouterEmailConfig = Omit<IUnifiedEmailServerOptions, 'tls'> & {
|
|
40
|
+
tls?: IDcRouterEmailTlsConfig;
|
|
41
|
+
};
|
|
24
42
|
export interface IDcRouterOptions {
|
|
25
43
|
/** Base directory for all dcrouter data. Defaults to ~/.serve.zone/dcrouter */
|
|
26
44
|
baseDir?: string;
|
|
@@ -35,7 +53,7 @@ export interface IDcRouterOptions {
|
|
|
35
53
|
* Email server configuration
|
|
36
54
|
* This enables all email handling with pattern-based routing
|
|
37
55
|
*/
|
|
38
|
-
emailConfig?:
|
|
56
|
+
emailConfig?: IDcRouterEmailConfig;
|
|
39
57
|
/** SmartBucket configuration for durable SmartMTA queue and attachment blobs. */
|
|
40
58
|
emailBlobStorage?: ISmartMtaBlobStorageConfig;
|
|
41
59
|
/** Outbound SMTP connection mode. Defaults to direct unless DB settings override it. */
|
|
@@ -342,6 +360,47 @@ export declare class DcRouter {
|
|
|
342
360
|
* This implements the consolidated emailConfig approach
|
|
343
361
|
*/
|
|
344
362
|
private setupUnifiedEmailHandling;
|
|
363
|
+
/**
|
|
364
|
+
* Resolve the PEM material for the SMTP listener.
|
|
365
|
+
*
|
|
366
|
+
* SmartMTA consumes `tls.certPem`/`tls.keyPem`; a path-shaped `tls` block is
|
|
367
|
+
* ignored, which leaves the Rust listener with no TLS material at all — no
|
|
368
|
+
* STARTTLS on the plain submission ports. Resolution order matches the
|
|
369
|
+
* RemoteIngress tunnel precedent: explicit paths, then the ACME cert store.
|
|
370
|
+
*
|
|
371
|
+
* Explicitly configured paths that cannot be read FAIL STARTUP. Silently
|
|
372
|
+
* continuing without TLS is what produced a cleartext submission port in
|
|
373
|
+
* production, so a broken explicit configuration must be impossible to miss.
|
|
374
|
+
*/
|
|
375
|
+
private resolveEmailTlsMaterial;
|
|
376
|
+
/**
|
|
377
|
+
* Push renewed TLS material to the running SMTP listener.
|
|
378
|
+
*
|
|
379
|
+
* Only reacts to the mail hostname, and only when explicit paths are NOT
|
|
380
|
+
* configured — an operator-managed file pair is not superseded by an ACME
|
|
381
|
+
* renewal for the same name. SmartMTA restarts just the Rust listener when
|
|
382
|
+
* the PEM material actually changes.
|
|
383
|
+
*/
|
|
384
|
+
private reapplyEmailTlsMaterial;
|
|
385
|
+
/**
|
|
386
|
+
* Internal SMTP ports whose public leg is TLS-terminated by CoreTraffic.
|
|
387
|
+
*
|
|
388
|
+
* Those backend legs arrive as plaintext even though the client's channel was
|
|
389
|
+
* encrypted, so without declaring them the AUTH-requires-encryption gate would
|
|
390
|
+
* refuse authentication on the only encrypted submission port. Derived from
|
|
391
|
+
* the generated route set rather than hardcoding 465, so it stays true when
|
|
392
|
+
* emailPortConfig changes.
|
|
393
|
+
*/
|
|
394
|
+
private resolveEdgeTerminatedEmailPorts;
|
|
395
|
+
/**
|
|
396
|
+
* State the transport posture of every SMTP listener port at startup.
|
|
397
|
+
*
|
|
398
|
+
* AUTH is only offered on an encrypted transport, so an operator has to be
|
|
399
|
+
* able to see at a glance which submission ports can actually authenticate —
|
|
400
|
+
* missing certificate material silently disabling AUTH on 587 would otherwise
|
|
401
|
+
* look like a client problem.
|
|
402
|
+
*/
|
|
403
|
+
private logEmailAuthTransportPosture;
|
|
345
404
|
/**
|
|
346
405
|
* Readiness of the RemoteIngress outbound mail egress path (mail-tagged edges).
|
|
347
406
|
*/
|