Mail::DKIM(3)
π Mail::DKIM π
okay so hi bestie!! you're looking at the manual page for Mail::DKIM β yes, that's the Perl module on the perl manual, and yes, it's the one that signs and verifies Internet mail with DKIM/DomainKey signatures. buckle up, this one's actually iconic.
β¨ VERSION β¨
version 1.20240923 β that's the one you've got, no cap.
π SYNOPSIS π
here's the vibe, copy it exactly:
# verify a message
use Mail::DKIM::Verifier;
# create a verifier object
my $dkim = Mail::DKIM::Verifier->new();
# read an email from stdin, pass it into the verifier
while (<STDIN>)
{
# remove local line terminators
chomp;
s/\015$//;
# use SMTP line terminators
$dkim->PRINT("$_\015\012");
}
$dkim->CLOSE;
# what is the result of the verify?
my $result = $dkim->result;
like, that's the whole thing. you read a message in, you ask what happened, you get $dkim->result. slay.
πΈ DESCRIPTION πΈ
so this module is literally the whole toolkit for the DKIM and DomainKeys message-signing and verifying standards for Internet mail. it currently tries to implement these specs:
the module uses an object-oriented interface. you pick one of two different classes depending on whether you're signing or verifying a message. to sign, use the Mail::DKIM::Signer class. to verify, use the Mail::DKIM::Verifier class. simple, eh? π
likewise for ARC β use the ARC modules Mail::DKIM::ARC::Signer and Mail::DKIM::ARC::Verifier.
and okay, niche but important: if you're sending to test libraries which expect the tags in headers to be sorted, you can set $Mail::DKIM::SORTTAGS to a true value, and all created headers will get sorted keys. iykyk π«Ά
π¦ SEE ALSO π¦
go check these besties out:
Mail::DKIM::Signer,Mail::DKIM::VerifierMail::DKIM::ARC::Signer,Mail::DKIM::ARC::Verifierhttp://dkimproxy.sourceforge.net/https://github.com/fastmail/authentication_milter
π KNOWN BUGS π
ngl, if you're hitting problems passing make test, it usually points at a faulty DNS configuration on your machine, or something weird about your OpenSSL libraries. so likeβ¦ check your own house first bestie π
the "author signing policy" component is still under construction. the author signing policy is supposed to identify the practice of the message author, so you could for example reject a message from an author who claims they always sign their messages. see Mail::DKIM::Policy.
please report bugs to the CPAN RT, or github issue tracker:
https://rt.cpan.org/Public/Dist/Display.html?Name=Mail-DKIMhttps://github.com/fastmail/mail-dkim/issues
fr fr report them, don't just suffer in silence π
π AUTHORS π
- Jason Long
<jason@long.name> - Marc Bradshaw
<marc@marcbradshaw.net> - Bron Gondwana
<brong@fastmailteam.com>(ARC)
π CONTRIBUTORS π
look at this whole squad, literal main character energy:
- Aaron Thompson
<dev@aaront.org> - Bron Gondwana
<brong@fastmail.fm> - Christian Jaeger
<ch@christianjaeger.ch> - Damien MASCRΓ
<damienmascre@free.fr> - Giovanni
<g.bechis@snb.it> - jasonlong
<jasonlong@f38efd27-133c-0410-a3cc-a5f95e9cf04f> - JosΓ© Borges Ferreira
<jose.ferreira@bitsighttech.com> - Marc Bradshaw
<marc@fastmailteam.com> - Martijn van de Streek
<martijn@vandestreek.net> - Martin H. Sluka
<martin@sluka.de> - MatthΓ€us Wander
<mail@wander.science> - Mohammad S Anwar
<mohammad.anwar@yahoo.com>
π§ THANKS π§
work on ensuring that this module passes the ARC test suite was generously sponsored by Valimail (https://www.valimail.com/) β iconic behaviour, honestly π
β COPYRIGHT AND LICENSE β
- Copyright (C) 2013 by Messiah College
- Copyright (C) 2010 by Jason Long
- Copyright (C) 2017 by Standcore LLC
- Copyright (C) 2020 by FastMail Pty Ltd
this library is free software; you can redistribute it and/or modify it under the same terms as Perl itself, either Perl version 5.8.6 or, at your option, any later version of Perl 5 you may have available.
and that's the page bestie!! π this gem was generated by perl v5.42.0 and stamped 2024-09-23, so if you're quoting it anywhere, that's the era you're quoting. now go sign some mail β¨π¦
π¦ where this page comes from
- alpine 3.23: perl-mail-dkim-doc 1.20240923-r0 Β· GPL-1.0-or-later OR Artistic-1.0-Perl
- opensuse-leap 16.0: perl-Mail-DKIM 1.20240923-bp160.1.2 Β· Artistic-1.0 OR GPL-1.0-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms