import type { IOutboundConnectionProxy, IOutboundConnectionProxyContext } from '@push.rocks/smartmta'; import type { IEmailOutboundEgressStatus, TEmailOutboundMode } from '../../dist_ts_interfaces/data/email-settings.js'; import type { DcRouter } from '../classes.dcrouter.js'; import type { MailEdgeEligibility } from './classes.mail-edge-eligibility.js'; /** * Routes outbound SMTP deliveries over RemoteIngress edges: resolves the * outbound mode per attempt (no silent direct fallback), maps sender-domain * pins to an edgeFilter, opens the per-delivery QUIC egress proxy, and * presents the selected edge's FCrDNS hostname as the EHLO identity. */ export declare class MailEgressCoordinator { private dcRouterRef; private edgeEligibility; private dnsClient?; constructor(dcRouterRef: DcRouter, edgeEligibility: MailEdgeEligibility); /** * smartmta connectionProxyProvider. Wired unconditionally so the outbound * mode is resolved per delivery attempt: a failed/late settings manager * defers mail loudly instead of silently degrading to direct-from-hub * egress, and mode changes take effect without an email server restart. */ provideConnectionProxy(context: IOutboundConnectionProxyContext): Promise; /** * Resolve the effective email outbound mode for a delivery attempt. * Throws when the settings manager is unavailable — deferring the delivery — * because guessing here is what silently degraded outbound to direct egress. */ resolveOutboundModeStrict(): TEmailOutboundMode; /** * Readiness of the RemoteIngress outbound mail egress path (mail-tagged edges). */ getOutboundEgressStatus(): IEmailOutboundEgressStatus; /** * Post-start preflight: with remoteIngress outbound (the default), mail * defers until a QUIC mail egress edge connects. Surface that loudly * instead of silently queueing. */ logEgressPreflight(): void; private createRemoteIngressConnectionProxy; /** * Refuse egress when the target resolves to one of our own mail edges: * the edge would dial its own listener and the delivery would hairpin * straight back into our inbound pipeline — a mail loop. Complements * smartmta's hostname-level self-MX guard for targets that only reveal * themselves at the IP level (e.g. an A-record fallback pointing at an * edge). DNS failures do not block the delivery; the loop guard is not * allowed to become an availability hazard. */ private assertTargetIsNotOwnMailEdge; }