NAME
Mail::DKIM2::Reflector - verify-and-reflect DKIM2 demonstration logic for dkim2.com
DESCRIPTION
The logic behind the dkim2.com reflector addresses: verify an incoming message's DKIM2 chain, apply a per-mode transformation, and return the message to send back to the sender. A reflector DKIM2-Signature is added only when the incoming chain verified. This is demonstration glue, not part of the library API, and its functions take lowercase named arguments. See docs/superpowers/specs/2026-06-18-dkim2-reflector-design.md.
FUNCTIONS
reflect(%args)
Verifies and transforms message per mode, signing as domain / selector with key or keyfile. Returns a hashref with message, auth, dkim1, basis, signed and mode.
generate(%args)
A fresh signed message to sender.
generate_dsn(%args)
A signed DSN returning message to sender, via Mail::DKIM2::DSN.
generate_brand(%args)
A two-signature brand demonstration message, or an explanatory one when the sender's domain has not delegated a key.
sign_dkim1($text, @specs)
Adds classic DKIM signatures, one per { domain, selector, key }.
AUTHOR
Bron Gondwana <brong@fastmailteam.com>
COPYRIGHT AND LICENSE
Copyright (c) 2025-2026 Fastmail Pty Ltd. This is free software; you can redistribute it and/or modify it under the same terms as Perl itself.