@karmaniverous/jeeves-scripts-core
    Preparing search index...

    Function checkDkim

    • Check a message's DKIM authentication against its sender's domain.

      Only the topmost Authentication-Results header is trusted — the one Google's receiving MX added last (Gmail's metadata header list preserves arrival order, so it is authResultsValues[0]). Any lower header with the same authserv-id can be forged by the sender (it was on the message before Google ever saw it), so it is never consulted, even to look for a mx.google.com match further down.

      Parameters

      • authResultsValues: readonly string[]

        Every Authentication-Results header value on the message, topmost first.

      • senderDomain: string

        The domain of the From address.

      Returns DkimCheckResult

      ok when the topmost header's authserv-id is mx.google.com and it has a dkim=pass clause whose signing domain matches the sender's domain (isDkimDomainMatch: its gappssmtp alias counts only for a two-label domain); otherwise not ok, with a reason.