/** * Client fingerprinting. * * Knowing which client composed a message is evidence, not truth. It is used to prioritise * structural detectors and to stratify sampling, never to decide a label on its own. A message * whose client cannot be identified must still extract correctly, which is why "unknown" is a * first class outcome rather than a failure. * * Signals, in decreasing reliability: Message-ID domain (hard to spoof accidentally, set by the * submitting server), X-Mailer and User-Agent, MIME boundary shape, then HTML structure hints. */ import { type MessageHeaders } from '../mime/model'; export type ClientId = 'gmail' | 'gmail-mobile' | 'outlook-web' | 'outlook-desktop' | 'outlook-mobile' | 'apple-mail' | 'apple-mail-mobile' | 'thunderbird' | 'proton' | 'yahoo' | 'zimbra' | 'roundcube' | 'superhuman' | 'hey' | 'front' | 'zendesk' | 'hubspot' | 'github' | 'atlassian' | 'mailchimp' | 'sendgrid' | 'amazon-ses' | 'nodemailer' | 'phpmailer' | 'mutt' | 'webmail-generic' | 'library-generic' | 'unknown'; export interface ClientFingerprint { client: ClientId; /** Which signal decided it. */ source: 'message-id' | 'x-mailer' | 'user-agent' | 'boundary' | 'html' | 'header' | 'none'; confidence: number; } /** * Identify the composing client. * * @param headers decoded message headers * @param html first text/html part, or null. Only the head of the document is inspected. * @param boundary Content-Type boundary parameter of the root part, if any */ export declare function fingerprintClient(headers: MessageHeaders, html: string | null, boundary: string | null): ClientFingerprint; //# sourceMappingURL=client.d.ts.map