import * as plugins from '../plugins.js';
import type { IUnifiedEmailServerOptions } from '@push.rocks/smartmta';
import type { IRoute } from '../../dist_ts_interfaces/data/route-management.js';
import type { IDcRouterRouteConfig } from '../../dist_ts_interfaces/data/remoteingress.js';
import type { DcRouter } from '../classes.dcrouter.js';
/**
 * Generates SmartProxy routes for the email ports and hydrates persisted
 * email routes into runtime routes: server-first SMTP ports get a raw
 * socket-handler proxy that injects PROXY protocol toward the backend.
 */
export declare class EmailRouteBuilder {
    private dcRouterRef;
    constructor(dcRouterRef: DcRouter);
    generateEmailRoutes(emailConfig: IUnifiedEmailServerOptions): IDcRouterRouteConfig[];
    getRuntimeEmailRoutes(emailRoutes: IDcRouterRouteConfig[]): plugins.smartproxy.IRouteConfig[];
    /**
     * Hydrate a persisted route into its runtime form: generated email routes
     * get the server-first socket-handler treatment, DoH routes get the DNS
     * socket handler. Returns undefined when the stored route runs as-is.
     */
    hydrateStoredRouteForRuntime(storedRoute: IRoute): plugins.smartproxy.IRouteConfig | undefined;
    private getCurrentGeneratedEmailRouteNames;
    private shouldHydrateGeneratedEmailRoute;
    private createServerFirstEmailRuntimeRoute;
    private getRemoteIngressEmailInboundProxyPolicy;
    private createEmailSocketProxyHandler;
    private createProxyProtocolV1Header;
}
