@serve.zone/dcrouter 18.1.1 → 18.2.1

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.
@@ -3,7 +3,7 @@
3
3
  */
4
4
  export const commitinfo = {
5
5
  name: '@serve.zone/dcrouter',
6
- version: '18.1.1',
6
+ version: '18.2.1',
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,26 @@ 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 interface IDcRouterEmailConfig extends Omit<IUnifiedEmailServerOptions, 'tls'> {
40
+ tls?: IDcRouterEmailTlsConfig;
41
+ }
42
+ /** Convention-correct alias for dcrouter's email server options. */
43
+ export type TDcRouterEmailConfig = IDcRouterEmailConfig;
24
44
  export interface IDcRouterOptions {
25
45
  /** Base directory for all dcrouter data. Defaults to ~/.serve.zone/dcrouter */
26
46
  baseDir?: string;
@@ -35,7 +55,7 @@ export interface IDcRouterOptions {
35
55
  * Email server configuration
36
56
  * This enables all email handling with pattern-based routing
37
57
  */
38
- emailConfig?: IUnifiedEmailServerOptions;
58
+ emailConfig?: TDcRouterEmailConfig;
39
59
  /** SmartBucket configuration for durable SmartMTA queue and attachment blobs. */
40
60
  emailBlobStorage?: ISmartMtaBlobStorageConfig;
41
61
  /** Outbound SMTP connection mode. Defaults to direct unless DB settings override it. */
@@ -342,6 +362,47 @@ export declare class DcRouter {
342
362
  * This implements the consolidated emailConfig approach
343
363
  */
344
364
  private setupUnifiedEmailHandling;
365
+ /**
366
+ * Resolve the PEM material for the SMTP listener.
367
+ *
368
+ * SmartMTA consumes `tls.certPem`/`tls.keyPem`; a path-shaped `tls` block is
369
+ * ignored, which leaves the Rust listener with no TLS material at all — no
370
+ * STARTTLS on the plain submission ports. Resolution order matches the
371
+ * RemoteIngress tunnel precedent: explicit paths, then the ACME cert store.
372
+ *
373
+ * Explicitly configured paths that cannot be read FAIL STARTUP. Silently
374
+ * continuing without TLS is what produced a cleartext submission port in
375
+ * production, so a broken explicit configuration must be impossible to miss.
376
+ */
377
+ private resolveEmailTlsMaterial;
378
+ /**
379
+ * Push renewed TLS material to the running SMTP listener.
380
+ *
381
+ * Only reacts to the mail hostname, and only when explicit paths are NOT
382
+ * configured — an operator-managed file pair is not superseded by an ACME
383
+ * renewal for the same name. SmartMTA restarts just the Rust listener when
384
+ * the PEM material actually changes.
385
+ */
386
+ private reapplyEmailTlsMaterial;
387
+ /**
388
+ * Internal SMTP ports whose public leg is TLS-terminated by CoreTraffic.
389
+ *
390
+ * Those backend legs arrive as plaintext even though the client's channel was
391
+ * encrypted, so without declaring them the AUTH-requires-encryption gate would
392
+ * refuse authentication on the only encrypted submission port. Derived from
393
+ * the generated route set rather than hardcoding 465, so it stays true when
394
+ * emailPortConfig changes.
395
+ */
396
+ private resolveEdgeTerminatedEmailPorts;
397
+ /**
398
+ * State the transport posture of every SMTP listener port at startup.
399
+ *
400
+ * AUTH is only offered on an encrypted transport, so an operator has to be
401
+ * able to see at a glance which submission ports can actually authenticate —
402
+ * missing certificate material silently disabling AUTH on 587 would otherwise
403
+ * look like a client problem.
404
+ */
405
+ private logEmailAuthTransportPosture;
345
406
  /**
346
407
  * Readiness of the RemoteIngress outbound mail egress path (mail-tagged edges).
347
408
  */