Phase 3 of the Rust migration: the Rust security bridge is now mandatory and all TypeScript security fallback implementations have been removed. - UnifiedEmailServer.start() throws if Rust bridge fails to start - SpfVerifier gutted to thin wrapper (parseSpfRecord stays in TS) - DKIMVerifier gutted to thin wrapper delegating to bridge.verifyDkim() - IPReputationChecker delegates to bridge.checkIpReputation(), keeps LRU cache - DmarcVerifier keeps alignment logic (works with pre-computed results) - DKIM signing via bridge.signDkim() in all 4 locations - Removed mailauth and ip packages from plugins.ts (~1,200 lines deleted)
30 lines
776 B
TypeScript
30 lines
776 B
TypeScript
/**
|
|
* Result of a DKIM verification
|
|
*/
|
|
export interface IDkimVerificationResult {
|
|
isValid: boolean;
|
|
domain?: string;
|
|
selector?: string;
|
|
status?: string;
|
|
details?: any;
|
|
errorMessage?: string;
|
|
signatureFields?: Record<string, string>;
|
|
}
|
|
/**
|
|
* DKIM verifier — delegates to the Rust security bridge.
|
|
*/
|
|
export declare class DKIMVerifier {
|
|
constructor();
|
|
/**
|
|
* Verify DKIM signature for an email via Rust bridge
|
|
*/
|
|
verify(emailData: string, options?: {
|
|
useCache?: boolean;
|
|
returnDetails?: boolean;
|
|
}): Promise<IDkimVerificationResult>;
|
|
/** No-op — Rust bridge handles its own caching */
|
|
clearCache(): void;
|
|
/** Always 0 — cache is managed by the Rust side */
|
|
getCacheSize(): number;
|
|
}
|