Codebase list libmail-dkim-perl / 6bfd15d
Update upstream source from tag 'upstream/1.20200907' Update to upstream version '1.20200907' with Debian dir 317d334f63a99a2d9f0ad8683c5866aa0e194fd5 gregor herrmann 3 years ago
41 changed file(s) with 94 addition(s) and 83 deletion(s). Raw diff Collapse all Expand all
00 This file summarizes what's changed between releases of Mail-DKIM.
1
2 1.20200907 2020-09-07 UTC
3 * ARC::Signer: Preserve leading fold from AR (if any) when copying to AAR.
4 Thanks to @dev-aaront-org
15
26 1.20200824 2020-08-24 UTC
37 * ARC::Signer: Set cv=none if message contains no ARC headers and no ARC result
6666 "web" : "https://github.com/fastmail/mail-dkim/"
6767 }
6868 },
69 "version" : "1.20200824",
69 "version" : "1.20200907",
7070 "x_contributors" : [
7171 "Aaron Thompson <dev@aaront.org>",
7272 "Bron Gondwana <brong@fastmail.fm>",
3535 resources:
3636 bugtracker: https://github.com/fastmail/mail-dkim/issues
3737 repository: git://github.com/fastmail/mail-dkim.git
38 version: '1.20200824'
38 version: '1.20200907'
3939 x_contributors:
4040 - 'Aaron Thompson <dev@aaront.org>'
4141 - 'Bron Gondwana <brong@fastmail.fm>'
3838 "YAML::XS" => 0,
3939 "lib" => 0
4040 },
41 "VERSION" => "1.20200824",
41 "VERSION" => "1.20200907",
4242 "test" => {
4343 "TESTS" => "t/*.t"
4444 }
00 This archive contains the distribution Mail-DKIM,
1 version 1.20200824:
1 version 1.20200907:
22
33 Signs/verifies Internet mail with DKIM/DomainKey signatures
44
00 package Mail::DKIM::ARC::MessageSignature;
11 use strict;
22 use warnings;
3 our $VERSION = '1.20200824'; # VERSION
3 our $VERSION = '1.20200907'; # VERSION
44 # ABSTRACT: Subclass of Mail::DKIM::Signature which represents a ARC-Message-Signature header
55
66 # Copyright 2017 FastMail Pty Ltd. All Rights Reserved.
6868
6969 =head1 VERSION
7070
71 version 1.20200824
71 version 1.20200907
7272
7373 =head1 CONSTRUCTORS
7474
00 package Mail::DKIM::ARC::Seal;
11 use strict;
22 use warnings;
3 our $VERSION = '1.20200824'; # VERSION
3 our $VERSION = '1.20200907'; # VERSION
44 # ABSTRACT: represents a ARC-Seal header
55
66 # Copyright 2017 FastMail Pty Ltd. All Rights Reserved.
7575
7676 =head1 VERSION
7777
78 version 1.20200824
78 version 1.20200907
7979
8080 =head1 CONSTRUCTORS
8181
00 package Mail::DKIM::ARC::Signer;
11 use strict;
22 use warnings;
3 our $VERSION = '1.20200824'; # VERSION
3 our $VERSION = '1.20200907'; # VERSION
44 # ABSTRACT: generates a DKIM signature for a message
55
66 # Copyright 2017 FastMail Pty Ltd. All Rights Reserved.
109109 foreach my $header ( @{ $self->{headers} } ) {
110110 $header =~ s/[\r\n]+$//;
111111 if ( $header =~ m/^Authentication-Results:/ ) {
112 my ( $arval ) = $header =~ m/^Authentication-Results:[^;]*;\s*(.*)/is;
112 my ( $arval ) = $header =~ m/^Authentication-Results:[^;]*;[\t ]*(.*)/is;
113113 my $parsed;
114114 eval {
115115 $parsed= Mail::AuthenticationResults::Parser->new
126126 unless "\L$ardom" eq $self->{SrvId}; # make sure it's our domain
127127
128128 $arval =~ s/;?\s*$//; # ignore trailing semicolon and whitespace
129 # preserve leading fold if there is one, otherwise set one leading space
130 $arval =~ s/^\s*/ / unless ($arval =~ m/^\015\012/);
129131 if ($ar) {
130 $ar .= "; $arval";
132 $ar .= ";$arval";
131133 }
132134 else {
133 $ar = "$ardom; $arval";
135 $ar = "$ardom;$arval";
134136 }
135137
136138 # get chain value from A-R header
589591
590592 =head1 VERSION
591593
592 version 1.20200824
594 version 1.20200907
593595
594596 =head1 SYNOPSIS
595597
00 package Mail::DKIM::ARC::Verifier;
11 use strict;
22 use warnings;
3 our $VERSION = '1.20200824'; # VERSION
3 our $VERSION = '1.20200907'; # VERSION
44 # ABSTRACT: verifies an ARC-Sealed message
55
66 # Copyright 2017 FastMail Pty Ltd. All Rights Reserved.
620620
621621 =head1 VERSION
622622
623 version 1.20200824
623 version 1.20200907
624624
625625 =head1 SYNOPSIS
626626
00 package Mail::DKIM::Algorithm::Base;
11 use strict;
22 use warnings;
3 our $VERSION = '1.20200824'; # VERSION
3 our $VERSION = '1.20200907'; # VERSION
44 # ABSTRACT: base class for DKIM "algorithms"
55
66 # Copyright 2005-2007 Messiah College. All rights reserved.
186186
187187 =head1 VERSION
188188
189 version 1.20200824
189 version 1.20200907
190190
191191 =head1 SYNOPSIS
192192
00 package Mail::DKIM::Algorithm::dk_rsa_sha1;
11 use strict;
22 use warnings;
3 our $VERSION = '1.20200824'; # VERSION
3 our $VERSION = '1.20200907'; # VERSION
44 # ABSTRACT: Base algorithm class
55
66 # Copyright 2005-2006 Messiah College. All rights reserved.
133133
134134 =head1 VERSION
135135
136 version 1.20200824
136 version 1.20200907
137137
138138 =head1 AUTHORS
139139
00 package Mail::DKIM::Algorithm::rsa_sha1;
11 use strict;
22 use warnings;
3 our $VERSION = '1.20200824'; # VERSION
3 our $VERSION = '1.20200907'; # VERSION
44 # ABSTRACT: rsa sha1 algorithm class
55
66 # Copyright 2005-2006 Messiah College. All rights reserved.
6565
6666 =head1 VERSION
6767
68 version 1.20200824
68 version 1.20200907
6969
7070 =head1 AUTHORS
7171
00 package Mail::DKIM::Algorithm::rsa_sha256;
11 use strict;
22 use warnings;
3 our $VERSION = '1.20200824'; # VERSION
3 our $VERSION = '1.20200907'; # VERSION
44 # ABSTRACT: rsa sha256 algorithm class
55
66 # Copyright 2005-2006 Messiah College. All rights reserved.
6565
6666 =head1 VERSION
6767
68 version 1.20200824
68 version 1.20200907
6969
7070 =head1 AUTHORS
7171
00 package Mail::DKIM::AuthorDomainPolicy;
11 use strict;
22 use warnings;
3 our $VERSION = '1.20200824'; # VERSION
3 our $VERSION = '1.20200907'; # VERSION
44 # ABSTRACT: represents an Author Domain Signing Practices (ADSP) record
55
66 # Copyright 2005-2009 Messiah College.
194194
195195 =head1 VERSION
196196
197 version 1.20200824
197 version 1.20200907
198198
199199 =head1 DESCRIPTION
200200
00 package Mail::DKIM::Canonicalization::Base;
11 use strict;
22 use warnings;
3 our $VERSION = '1.20200824'; # VERSION
3 our $VERSION = '1.20200907'; # VERSION
44 # ABSTRACT: base class for canonicalization methods
55
66 # Copyright 2005-2007 Messiah College. All rights reserved.
8484
8585 =head1 VERSION
8686
87 version 1.20200824
87 version 1.20200907
8888
8989 =head1 SYNOPSIS
9090
00 package Mail::DKIM::Canonicalization::DkCommon;
11 use strict;
22 use warnings;
3 our $VERSION = '1.20200824'; # VERSION
3 our $VERSION = '1.20200907'; # VERSION
44 # ABSTRACT: dk common canonicalization
55
66 # Copyright 2005-2006 Messiah College. All rights reserved.
149149
150150 =head1 VERSION
151151
152 version 1.20200824
152 version 1.20200907
153153
154154 =head1 AUTHORS
155155
00 package Mail::DKIM::Canonicalization::DkimCommon;
11 use strict;
22 use warnings;
3 our $VERSION = '1.20200824'; # VERSION
3 our $VERSION = '1.20200907'; # VERSION
44 # ABSTRACT: common canonicalization
55
66 # Copyright 2005-2007 Messiah College. All rights reserved.
143143
144144 =head1 VERSION
145145
146 version 1.20200824
146 version 1.20200907
147147
148148 =head1 DESCRIPTION
149149
00 package Mail::DKIM::Canonicalization::dk_nofws;
11 use strict;
22 use warnings;
3 our $VERSION = '1.20200824'; # VERSION
3 our $VERSION = '1.20200907'; # VERSION
44 # ABSTRACT: nofws canonicalization
55
66 # Copyright 2005-2006 Messiah College. All rights reserved.
4444
4545 =head1 VERSION
4646
47 version 1.20200824
47 version 1.20200907
4848
4949 =head1 AUTHORS
5050
00 package Mail::DKIM::Canonicalization::dk_simple;
11 use strict;
22 use warnings;
3 our $VERSION = '1.20200824'; # VERSION
3 our $VERSION = '1.20200907'; # VERSION
44 # ABSTRACT: dk simple canonicalization
55
66 # Copyright 2005 Messiah College. All rights reserved.
7474
7575 =head1 VERSION
7676
77 version 1.20200824
77 version 1.20200907
7878
7979 =head1 AUTHORS
8080
00 package Mail::DKIM::Canonicalization::nowsp;
11 use strict;
22 use warnings;
3 our $VERSION = '1.20200824'; # VERSION
3 our $VERSION = '1.20200907'; # VERSION
44 # ABSTRACT: nowsp canonicalization
55
66 # Copyright 2005 Messiah College. All rights reserved.
5656
5757 =head1 VERSION
5858
59 version 1.20200824
59 version 1.20200907
6060
6161 =head1 AUTHORS
6262
00 package Mail::DKIM::Canonicalization::relaxed;
11 use strict;
22 use warnings;
3 our $VERSION = '1.20200824'; # VERSION
3 our $VERSION = '1.20200907'; # VERSION
44 # ABSTRACT: common canonicalization
55
66 # Copyright 2005 Messiah College. All rights reserved.
122122
123123 =head1 VERSION
124124
125 version 1.20200824
125 version 1.20200907
126126
127127 =head1 AUTHORS
128128
00 package Mail::DKIM::Canonicalization::seal;
11 use strict;
22 use warnings;
3 our $VERSION = '1.20200824'; # VERSION
3 our $VERSION = '1.20200907'; # VERSION
44 # ABSTRACT: arc seal canonicalization
55
66 # Copyright 2017 FastMail Pty Ltd. All Rights Reserved.
115115
116116 =head1 VERSION
117117
118 version 1.20200824
118 version 1.20200907
119119
120120 =head1 AUTHORS
121121
00 package Mail::DKIM::Canonicalization::simple;
11 use strict;
22 use warnings;
3 our $VERSION = '1.20200824'; # VERSION
3 our $VERSION = '1.20200907'; # VERSION
44 # ABSTRACT: simple canonicalization
55
66 # Copyright 2005 Messiah College. All rights reserved.
9595
9696 =head1 VERSION
9797
98 version 1.20200824
98 version 1.20200907
9999
100100 =head1 AUTHORS
101101
00 package Mail::DKIM::Common;
11 use strict;
22 use warnings;
3 our $VERSION = '1.20200824'; # VERSION
3 our $VERSION = '1.20200907'; # VERSION
44 # ABSTRACT: Common class for Mail::DKIM
55
66 # Copyright 2005-2007 Messiah College. All rights reserved.
180180
181181 =head1 VERSION
182182
183 version 1.20200824
183 version 1.20200907
184184
185185 =head1 AUTHORS
186186
00 package Mail::DKIM::DNS;
11 use strict;
22 use warnings;
3 our $VERSION = '1.20200824'; # VERSION
3 our $VERSION = '1.20200907'; # VERSION
44 # ABSTRACT: performs DNS queries for Mail::DKIM
55
66 # Copyright 2007, 2012 Messiah College. All rights reserved.
183183
184184 =head1 VERSION
185185
186 version 1.20200824
186 version 1.20200907
187187
188188 =head1 DESCRIPTION
189189
00 package Mail::DKIM::DkPolicy;
11 use strict;
22 use warnings;
3 our $VERSION = '1.20200824'; # VERSION
3 our $VERSION = '1.20200907'; # VERSION
44 # ABSTRACT: represents a DomainKeys Sender Signing Policy record
55
66 # Copyright 2005-2009 Messiah College.
171171
172172 =head1 VERSION
173173
174 version 1.20200824
174 version 1.20200907
175175
176176 =head1 DESCRIPTION
177177
00 package Mail::DKIM::DkSignature;
11 use strict;
22 use warnings;
3 our $VERSION = '1.20200824'; # VERSION
3 our $VERSION = '1.20200907'; # VERSION
44 # ABSTRACT: represents a DomainKeys-Signature header
55
66 # Copyright 2005-2006 Messiah College. All rights reserved.
251251
252252 =head1 VERSION
253253
254 version 1.20200824
254 version 1.20200907
255255
256256 =head1 CONSTRUCTORS
257257
00 package Mail::DKIM::DkimPolicy;
11 use strict;
22 use warnings;
3 our $VERSION = '1.20200824'; # VERSION
3 our $VERSION = '1.20200907'; # VERSION
44 # ABSTRACT: represents a DKIM Sender Signing Practices record
55
66 # Copyright 2005-2007 Messiah College.
192192
193193 =head1 VERSION
194194
195 version 1.20200824
195 version 1.20200907
196196
197197 =head1 DESCRIPTION
198198
11 use strict;
22 use warnings;
33 # ABSTRACT: Represents a DKIM Key
4 our $VERSION = '1.20200824'; # VERSION
4 our $VERSION = '1.20200907'; # VERSION
55
66 # Copyright 2006 Jason Long. All rights reserved.
77 #
100100
101101 =head1 VERSION
102102
103 version 1.20200824
103 version 1.20200907
104104
105105 =head1 AUTHORS
106106
00 package Mail::DKIM::KeyValueList;
11 use strict;
22 use warnings;
3 our $VERSION = '1.20200824'; # VERSION
3 our $VERSION = '1.20200907'; # VERSION
44 # ABSTRACT: Represents a Key/Value list
55
66 # Copyright 2005-2007 Messiah College. All rights reserved.
194194
195195 =head1 VERSION
196196
197 version 1.20200824
197 version 1.20200907
198198
199199 =head1 AUTHORS
200200
00 package Mail::DKIM::MessageParser;
11 use strict;
22 use warnings;
3 our $VERSION = '1.20200824'; # VERSION
3 our $VERSION = '1.20200907'; # VERSION
44 # ABSTRACT: Signs/verifies Internet mail with DKIM/DomainKey signatures
55
66 # Copyright 2005 Messiah College. All rights reserved.
141141
142142 =head1 VERSION
143143
144 version 1.20200824
144 version 1.20200907
145145
146146 =head1 AUTHORS
147147
00 package Mail::DKIM::Policy;
11 use strict;
22 use warnings;
3 our $VERSION = '1.20200824'; # VERSION
3 our $VERSION = '1.20200907'; # VERSION
44 # ABSTRACT: abstract base class for originator "signing" policies
55
66 # Copyright 2005-2007 Messiah College.
161161
162162 =head1 VERSION
163163
164 version 1.20200824
164 version 1.20200907
165165
166166 =head1 SYNOPSIS
167167
00 package Mail::DKIM::PrivateKey;
11 use strict;
22 use warnings;
3 our $VERSION = '1.20200824'; # VERSION
3 our $VERSION = '1.20200907'; # VERSION
44 # ABSTRACT: a private key loaded in memory for DKIM signing
55
66 # Copyright 2005-2007 Messiah College. All rights reserved.
131131
132132 =head1 VERSION
133133
134 version 1.20200824
134 version 1.20200907
135135
136136 =head1 SYNOPSIS
137137
00 package Mail::DKIM::PublicKey;
11 use strict;
22 use warnings;
3 our $VERSION = '1.20200824'; # VERSION
3 our $VERSION = '1.20200907'; # VERSION
44 # ABSTRACT: Represents a DKIM key
55
66 # Copyright 2005 Messiah College. All rights reserved.
463463
464464 =head1 VERSION
465465
466 version 1.20200824
466 version 1.20200907
467467
468468 =head1 CONSTRUCTOR
469469
00 package Mail::DKIM::Signature;
11 use strict;
22 use warnings;
3 our $VERSION = '1.20200824'; # VERSION
3 our $VERSION = '1.20200907'; # VERSION
44 # ABSTRACT: represents a DKIM-Signature header
55
66 # Copyright 2005-2007 Messiah College. All rights reserved.
601601
602602 =head1 VERSION
603603
604 version 1.20200824
604 version 1.20200907
605605
606606 =head1 CONSTRUCTORS
607607
00 package Mail::DKIM::Signer;
11 use strict;
22 use warnings;
3 our $VERSION = '1.20200824'; # VERSION
3 our $VERSION = '1.20200907'; # VERSION
44 # ABSTRACT: generates a DKIM signature for a message
55
66 # Copyright 2005-2007 Messiah College. All rights reserved.
421421
422422 =head1 VERSION
423423
424 version 1.20200824
424 version 1.20200907
425425
426426 =head1 SYNOPSIS
427427
00 package Mail::DKIM::SignerPolicy;
11 use strict;
22 use warnings;
3 our $VERSION = '1.20200824'; # VERSION
3 our $VERSION = '1.20200907'; # VERSION
44 # ABSTRACT: determines signing parameters for a message
55
66 # Copyright 2005-2006 Messiah College. All rights reserved.
2323
2424 =head1 VERSION
2525
26 version 1.20200824
26 version 1.20200907
2727
2828 =head1 DESCRIPTION
2929
00 package Mail::DKIM::TextWrap;
11 use strict;
22 use warnings;
3 our $VERSION = '1.20200824'; # VERSION
3 our $VERSION = '1.20200907'; # VERSION
44 # ABSTRACT: text wrapping module written for use with DKIM
55
66 use Carp;
175175
176176 =head1 VERSION
177177
178 version 1.20200824
178 version 1.20200907
179179
180180 =head1 DESCRIPTION
181181
00 package Mail::DKIM::Verifier;
11 use strict;
22 use warnings;
3 our $VERSION = '1.20200824'; # VERSION
3 our $VERSION = '1.20200907'; # VERSION
44 # ABSTRACT: verifies a DKIM-signed message
55
66 # Copyright 2005-2009 Messiah College. All rights reserved.
492492
493493 =head1 VERSION
494494
495 version 1.20200824
495 version 1.20200907
496496
497497 =head1 SYNOPSIS
498498
00 package Mail::DKIM;
11 use strict;
22 use warnings;
3 our $VERSION = '1.20200824'; # VERSION
3 our $VERSION = '1.20200907'; # VERSION
44 # ABSTRACT: Signs/verifies Internet mail with DKIM/DomainKey signatures
55
66 #require 5.010;
2222
2323 =head1 VERSION
2424
25 version 1.20200824
25 version 1.20200907
2626
2727 =head1 SYNOPSIS
2828
11
22 use strict;
33 use warnings;
4 use Test::Simple tests => 9;
4 use Test::Simple tests => 12;
55
66 use Mail::DKIM::ARC::Signer;
77
8181 $arc->CLOSE;
8282
8383 ok($arc->result() eq 'sealed', 'result() is sealed');
84 my ($as) = $arc->as_strings();
84 my ($as, $ams, $aar) = $arc->as_strings();
8585 ok($as =~ m/\bcv=none\b/, 'AS has cv=none');
86 ok($aar =~ m/\Q example.org; none\E/, 'AAR has AR contents');
8687
8788 ## Chain ar, AR header pass
8889
8990 $sample_email = <<END_OF_SAMPLE;
90 Authentication-Results: example.org; dkim=none (no signatures); arc=pass (something or other)
91 Authentication-Results: example.org; dkim=none (no signatures); arc=pass (something or other)
9192 From: jason <jason\@example.org>
9293 Subject: hi there
9394 Comment: what is a comment
108109 $arc->CLOSE;
109110
110111 ok($arc->result() eq 'sealed', 'result() is sealed');
111 ($as) = $arc->as_strings();
112 ($as, $ams, $aar) = $arc->as_strings();
112113 ok($as =~ m/\bcv=pass\b/, 'AS has cv=pass');
114 ok($aar =~ m/\Q example.org; dkim=none (no signatures); arc=pass (something or other)\E/,
115 'AAR has AR contents and expected formatting');
113116
114117 ## Chain ar, AR header fail
115118
116119 $sample_email = <<END_OF_SAMPLE;
117 Authentication-Results: example.org;
120 Authentication-Results: example.org;
118121 arc=fail (bad something);
119122 spf=pass smtp.mailfrom="jason\@example.net";
120123 From: jason <jason\@example.org>
137140 $arc->CLOSE;
138141
139142 ok($arc->result() eq 'sealed', 'result() is sealed');
140 ($as) = $arc->as_strings();
143 ($as, $ams, $aar) = $arc->as_strings();
141144 ok($as =~ m/\bcv=fail\b/, 'AS has cv=fail');
145 ok($aar =~ m/\Q example.org;\E\015\012\Q arc=fail (bad something);\E\015\012\Q spf=pass smtp.mailfrom=\E/,
146 'AAR has AR contents and expected formatting');