Changes for version 0.34 - 2026-11-15

  • dkim2-milter: the inbound milter takes a snapshot (and stamps an instance, and wraps) only when the chain verified or there was none, and that snapshot is the outbound milter's proof of it. A message whose X-DKIM2-Snapshot token names a snapshot of it is signed without its upstream signatures being verified again: only the Message-Instance fields are checked, with no key lookups. The snapshot has to be of that message (the same DKIM2-Signature fields and the instances they cover), or the message is not signed. With no snapshot, everything is verified before signing, as before.
  • dkim2-milter: the inbound milter adds X-DKIM2-Arrival with its verdict as one word. The outbound milter does not sign a message that arrived fail, permerror or temperror (550 5.7.1 if it has a DKIM2-Signature on it, as for any refusal). The field is removed on sight by every mode, so it neither comes from outside nor leaves the host; an inbound milter with --no-envelope-check keeps a failing verdict the milter before it gave, and behind a pass or none takes a Message-Instance nobody has signed for this host's own (the m=1 the first milter stamped on an unsigned post) instead of reporting permerror.
  • Mail::DKIM2::Hop->snapshot_vouches($message, $snapshot): whether a snapshot is of this very message.
  • A message handed over as a string Perl holds as characters is hashed as the octets those characters stand for. With the OpenSSL digests (the default wherever Net::SSLeay is installed) it was hashed as the string's UTF-8, so a Message-Instance computed for such a message, if it had an octet above 0x7F in it, did not match the octets sent. Email::MIME gives a character string once any one header field of it has been upgraded. A string with a character above 0xFF croaks ("Wide character"), as it did with the CryptX digests.

Documentation

Standalone DKIM2 milter for Postfix

Modules

DKIM2 signing and verification for email
Envelope paths, domains and the From header field for DKIM2
the body hash of a message, streamed
every Message-Instance's body hash in one pass
Header canonicalization and the signing input for DKIM2
The Message-Instance and DKIM2-Signature fields of a message, numbered
Constants, chain numbering and the any/all groups shared by the DKIM2 modules
DKIM2-signed Delivery Status Notifications
SHA-2 over message content, by OpenSSL where it can
Fold a DKIM2 header field where its grammar allows
decide whether a front end may sign a message
Streaming message parser base for Signer and Verifier
every Message-Instance's header hash without undo
What a hop adds to a message's Message-Instance fields before it signs
Keys, key records, Domain Policy Records and signing algorithms for DKIM2
Compute, verify and undo Message-Instance headers
Keep message snapshots keyed by Message-Instance
The base64 JSON of a Message-Instance r= tag
verify-and-reflect DKIM2 demonstration logic for dkim2.com
One DKIM2-Signature header, parsed or under construction
Sign a message with a DKIM2-Signature header
Bcc-safe recipient grouping before DKIM2 signing
The tag=value list a DKIM2 header is made of
Small helpers shared by the Mail::DKIM2 modules
structured per-level DKIM2 and Message-Instance report
Verify the DKIM2-Signature chain on a message
wrap a single-part message in a one-part multipart/mixed
Handler class for DKIM2 signing
Handler class for DKIM2 signature verification

Provides

in lib/Mail/DKIM2/Chain.pm