export interface SmtpServerConfig {
    port?: number;
    tlsPort?: number;
    host?: string;
    region?: string;
    domain: string;
    users: Record<string, {
        password: string;
        email: string;
    }>;
    tls?: {
        key: string;
        cert: string;
    };
    sentBucket?: string;
    sentPrefix?: string;
}
/**
 * SMTP Server that relays emails through AWS SES
 */
export declare class SmtpServer {
    private config;
    private ses;
    private s3?;
    private server?;
    private tlsServer?;
    private sessions;
    constructor(config: SmtpServerConfig);
    /**
     * Start the SMTP server
     */
    start(): Promise<void>;
    /**
     * Stop the SMTP server
     */
    stop(): Promise<void>;
    /**
     * Handle a new connection
     */
    private handleConnection;
    /**
     * Send a response to the client
     */
    private send;
    /**
     * Handle an SMTP command
     */
    private handleCommand;
    /**
     * Handle EHLO/HELO command
     */
    private handleEhlo;
    /**
     * Handle STARTTLS command
     */
    private handleStartTls;
    /**
     * Handle AUTH command
     */
    private handleAuth;
    /**
     * Handle AUTH PLAIN credentials
     */
    private handleAuthPlain;
    /**
     * Authenticate a user
     */
    private authenticateUser;
    /**
     * Handle MAIL FROM command
     */
    private handleMailFrom;
    /**
     * Handle RCPT TO command
     */
    private handleRcptTo;
    /**
     * Handle DATA command
     */
    private handleData;
    /**
     * Handle a line during DATA phase
     */
    private handleDataLine;
    /**
     * Send the email via SES
     */
    private sendEmail;
    /**
     * Reset session state for next message
     */
    private resetSession;
}
/**
 * Start an SMTP server with the given configuration
 */
export declare function startSmtpServer(config: SmtpServerConfig): Promise<SmtpServer>;
