/** * MailDev CLI Configuration Types * * Complete configuration interface for MailDev v3 CLI * maintaining full backward compatibility with v2's options */ import type { HideableExtension } from '@maildev/smtp'; /** * SMTP server authentication configuration */ export interface SMTPAuthConfig { user: string; pass: string; } /** * TLS/SSL configuration for SMTP or HTTPS */ export interface TLSConfig { cert: string; key: string; } /** * Outgoing relay server configuration */ export interface RelayConfig { host: string; port: number; user?: string; pass?: string; secure?: boolean; } /** * Auto-relay configuration */ export interface AutoRelayConfig { enabled: boolean; recipient?: string; rules?: string; } /** * Web/API server authentication configuration */ export interface WebAuthConfig { user: string; pass: string; } /** * Logging configuration */ export interface LogConfig { verbose: boolean; silent: boolean; logMailContents: boolean; } /** * Complete MailDev configuration interface * * All 30+ options from v2 plus new v3 options */ export interface MailDevConfig { /** * SMTP server port * CLI: -s, --smtp * Env: MAILDEV_SMTP_PORT * @default 1025 */ smtp: number; /** * IP address to bind SMTP server * CLI: --ip
* Env: MAILDEV_IP * @default '::' */ ip: string; /** * SMTP authentication username * CLI: --incoming-user */ incomingUser?: string; /** * SMTP authentication password * CLI: --incoming-pass */ incomingPass?: string; /** * Enable TLS/SSL for SMTP * CLI: --incoming-secure */ incomingSecure?: boolean; /** * Path to TLS certificate for SMTP * CLI: --incoming-cert */ incomingCert?: string; /** * Path to TLS key for SMTP * CLI: --incoming-key */ incomingKey?: string; /** * SMTP extensions to hide * CLI: --hide-extensions * Comma-separated: STARTTLS,PIPELINING,8BITMIME,SMTPUTF8 */ hideExtensions?: HideableExtension[]; /** * Maximum accepted message size in bytes. Larger messages are rejected * before being parsed or stored. The SIZE extension is advertised so * well-behaved clients skip oversized messages. Set to 0 to disable the * limit. * CLI: --max-message-size * Env: MAILDEV_MAX_MESSAGE_SIZE * @default 52428800 (50 MB) */ maxMessageSize: number; /** * Web/API server port * CLI: -w, --web * Env: MAILDEV_WEB_PORT * @default 1080 */ web: number; /** * IP address to bind web server * CLI: --web-ip
* Env: MAILDEV_WEB_IP * @default '0.0.0.0' */ webIp: string; /** * Web interface HTTP auth username * CLI: --web-user */ webUser?: string; /** * Web interface HTTP auth password * CLI: --web-pass */ webPass?: string; /** * Base URL pathname for web interface * CLI: --base-pathname * @default '/' */ basePathname: string; /** * Disable web interface entirely * CLI: --disable-web */ disableWeb?: boolean; /** * Enable HTTPS for web server * CLI: --https */ https?: boolean; /** * Path to HTTPS key file * CLI: --https-key */ httpsKey?: string; /** * Path to HTTPS certificate file * CLI: --https-cert */ httpsCert?: string; /** * Outgoing relay SMTP host * CLI: --outgoing-host */ outgoingHost?: string; /** * Outgoing relay SMTP port * CLI: --outgoing-port */ outgoingPort?: number; /** * Outgoing relay authentication username * CLI: --outgoing-user */ outgoingUser?: string; /** * Outgoing relay authentication password * CLI: --outgoing-pass */ outgoingPass?: string; /** * Use TLS/SSL for outgoing relay * CLI: --outgoing-secure */ outgoingSecure?: boolean; /** * Enable auto-relay mode * CLI: --auto-relay [email] * If email provided, all emails relay to that address */ autoRelay?: boolean | string; /** * Path to auto-relay rules file * CLI: --auto-relay-rules */ autoRelayRules?: string; /** * Directory for persisting emails * CLI: --mail-directory * If not set, uses in-memory storage */ mailDirectory?: string; /** * Maximum number of emails to keep (0 = unlimited, the default) * * Defaults to 0, preserving MailDev's historical unbounded behaviour. Set a * positive number to cap the store: once the limit is reached the oldest * email is dropped, and its .eml file and attachments are deleted along with * it, so both memory use and the mail directory stay bounded. * * CLI: --max-emails * Env: MAILDEV_MAX_EMAILS * @default 0 */ maxEmails: number; /** * Enable verbose logging * CLI: -v, --verbose */ verbose?: boolean; /** * Suppress all output * CLI: --silent */ silent?: boolean; /** * Log JSON representation of emails * CLI: --log-mail-contents */ logMailContents?: boolean; /** * Enable MCP server at /mcp endpoint * CLI: --mcp * @default false */ mcp?: boolean; /** * Explicit config file path * CLI: --config */ config?: string; } /** * Partial configuration (for merging) */ export type PartialMailDevConfig = Partial; /** * CLI options as parsed by Commander.js * (may have different names/casing than config) */ export interface CLIOptions { smtp?: string; ip?: string; incomingUser?: string; incomingPass?: string; incomingSecure?: boolean; incomingCert?: string; incomingKey?: string; hideExtensions?: string; maxMessageSize?: string; web?: string; webIp?: string; webUser?: string; webPass?: string; basePathname?: string; disableWeb?: boolean; https?: boolean; httpsKey?: string; httpsCert?: string; outgoingHost?: string; outgoingPort?: string; outgoingUser?: string; outgoingPass?: string; outgoingSecure?: boolean; autoRelay?: boolean | string; autoRelayRules?: string; mailDirectory?: string; maxEmails?: string; verbose?: boolean; silent?: boolean; logMailContents?: boolean; mcp?: boolean; config?: string; } //# sourceMappingURL=types.d.ts.map