/** * "Send AS who" scope. `addresses` are literal or local-part-wildcard address * patterns (e.g. 'billing@example.com', '*@example.com' is expressed via * `domains` instead); `domains` authorize every address of a domain. * Both lists empty = unrestricted sender scope. */ export interface ISmtpAccountSenderScope { addresses: string[]; domains: string[]; } /** 'any' = unrestricted recipients; 'restricted' = only listed addresses/domains. */ export type TSmtpRecipientScopeMode = 'any' | 'restricted'; /** "Send TO who" scope. Lists are only enforced when mode is 'restricted'. */ export interface ISmtpAccountRecipientScope { mode: TSmtpRecipientScopeMode; addresses: string[]; domains: string[]; } /** Per-account outbound mail policy applied to generated relay routes. */ export interface ISmtpAccountMailPolicy { /** Sign outbound mail with the sender domain's active managed DKIM key. */ dkimSign: boolean; /** SmartMTA delivery queue (default 'normal'). */ queue?: 'normal' | 'priority' | 'bulk'; } /** Per-sender-domain outbound readiness as reported by EmailDomainManager. */ export interface ISmtpAccountDomainReadiness { domain: string; ready: boolean; reason?: string; } /** * Public representation of an SMTP submission account. Never includes the * password or the stored SCRAM verifier. */ export interface ISmtpAccountInfo { id: string; username: string; description: string; enabled: boolean; senderScope: ISmtpAccountSenderScope; recipientScope: ISmtpAccountRecipientScope; mailPolicy: ISmtpAccountMailPolicy; createdAt: number; updatedAt: number; createdBy: string; lastRotatedAt?: number; /** Outbound readiness of each sender-scope domain (managed domains only). */ domainReadiness?: ISmtpAccountDomainReadiness[]; }