diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index a4805b4b..86cad687 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -24,7 +24,7 @@ jobs: with: fetch-depth: 1 - - name: install-with-cpanm + - name: Install Perl Modules with cpanm uses: perl-actions/install-with-cpanm@v1 continue-on-error: true with: diff --git a/Changes.md b/Changes.md index 87c7498e..5b628f94 100644 --- a/Changes.md +++ b/Changes.md @@ -1,3 +1,13 @@ + +### 1.20240214 + +- feat: add imap option to specify port #195 +- feat: add configurable DNS retrans option #214 +- ignore empty/wrong lines on whitelist_dmarc file #219 +- test: mock DNS during testing #213 +- ci: restore CI tests to working order +- Force lower case for SPF domain input #212 + ### 1.20230215 - Fix error when logging a report which was skipped for size diff --git a/MANIFEST b/MANIFEST index 3198f040..befa8963 100644 --- a/MANIFEST +++ b/MANIFEST @@ -135,9 +135,6 @@ t/23.Report.Send.HTTP.t t/25.Report.Receive.t t/26.Report.Sender.t t/mail-dmarc.ini -t/travis/backends/mail-dmarc.sql.mysql.ini -t/travis/backends/mail-dmarc.sql.Pg.ini -t/travis/backends/mail-dmarc.sql.SQLite.ini t/whitelist TODO.md xt/author-critic.t diff --git a/MANIFEST.SKIP b/MANIFEST.SKIP index a32d76d6..89a4e269 100644 --- a/MANIFEST.SKIP +++ b/MANIFEST.SKIP @@ -1,5 +1,7 @@ .DS_Store +.coveralls.yml .git +.test .release .tar.gz .travis.yml @@ -11,3 +13,4 @@ ^MYMETA. dmarc_reports.sqlite t/reports-test.sqlite +t/travis diff --git a/README.md b/README.md index 150cc20b..18b8fbd4 100644 --- a/README.md +++ b/README.md @@ -10,7 +10,7 @@ Mail::DMARC - Perl implementation of DMARC # VERSION -version 1.20230215 +version 1.20240214 # SYNOPSIS diff --git a/lib/Mail/DMARC.pm b/lib/Mail/DMARC.pm index 59eed5ea..eacb3b35 100644 --- a/lib/Mail/DMARC.pm +++ b/lib/Mail/DMARC.pm @@ -2,7 +2,7 @@ package Mail::DMARC; use strict; use warnings; -our $VERSION = '1.20230215'; +our $VERSION = '1.20240214'; use Carp; our $psl_loads = 0; @@ -309,7 +309,7 @@ Mail::DMARC - Perl implementation of DMARC =head1 VERSION -version 1.20230215 +version 1.20240214 =head1 SYNOPSIS diff --git a/lib/Mail/DMARC/Base.pm b/lib/Mail/DMARC/Base.pm index d0549514..8c57e4ec 100644 --- a/lib/Mail/DMARC/Base.pm +++ b/lib/Mail/DMARC/Base.pm @@ -1,5 +1,5 @@ package Mail::DMARC::Base; -our $VERSION = '1.20230215'; +our $VERSION = '1.20240214'; use strict; use warnings; use 5.10.0; @@ -329,7 +329,7 @@ Mail::DMARC::Base - DMARC utility functions =head1 VERSION -version 1.20230215 +version 1.20240214 =head1 METHODS diff --git a/lib/Mail/DMARC/HTTP.pm b/lib/Mail/DMARC/HTTP.pm index 65361442..b43f0cdc 100644 --- a/lib/Mail/DMARC/HTTP.pm +++ b/lib/Mail/DMARC/HTTP.pm @@ -1,5 +1,5 @@ package Mail::DMARC::HTTP; -our $VERSION = '1.20230215'; +our $VERSION = '1.20240214'; use strict; use warnings; @@ -213,7 +213,7 @@ Mail::DMARC::HTTP - view stored reports via HTTP =head1 VERSION -version 1.20230215 +version 1.20240214 =head1 SYNOPSIS diff --git a/lib/Mail/DMARC/Policy.pm b/lib/Mail/DMARC/Policy.pm index 34b7255a..74d8873d 100644 --- a/lib/Mail/DMARC/Policy.pm +++ b/lib/Mail/DMARC/Policy.pm @@ -2,7 +2,7 @@ package Mail::DMARC::Policy; use strict; use warnings; -our $VERSION = '1.20230215'; +our $VERSION = '1.20240214'; use Carp; @@ -195,7 +195,7 @@ Mail::DMARC::Policy - a DMARC policy in object format =head1 VERSION -version 1.20230215 +version 1.20240214 =head1 SYNOPSIS diff --git a/lib/Mail/DMARC/PurePerl.pm b/lib/Mail/DMARC/PurePerl.pm index 461c225b..2dfd4c08 100644 --- a/lib/Mail/DMARC/PurePerl.pm +++ b/lib/Mail/DMARC/PurePerl.pm @@ -1,5 +1,5 @@ package Mail::DMARC::PurePerl; -our $VERSION = '1.20230215'; +our $VERSION = '1.20240214'; use strict; use warnings; @@ -589,7 +589,7 @@ Mail::DMARC::PurePerl - Pure Perl implementation of DMARC =head1 VERSION -version 1.20230215 +version 1.20240214 =head1 METHODS diff --git a/lib/Mail/DMARC/Report.pm b/lib/Mail/DMARC/Report.pm index 396e1452..21fd87a8 100644 --- a/lib/Mail/DMARC/Report.pm +++ b/lib/Mail/DMARC/Report.pm @@ -2,7 +2,7 @@ package Mail::DMARC::Report; use strict; use warnings; -our $VERSION = '1.20230215'; +our $VERSION = '1.20240214'; use Carp; use IO::Compress::Gzip; @@ -90,7 +90,7 @@ Mail::DMARC::Report - A DMARC report interface =head1 VERSION -version 1.20230215 +version 1.20240214 =head1 DESCRIPTION diff --git a/lib/Mail/DMARC/Report/Aggregate.pm b/lib/Mail/DMARC/Report/Aggregate.pm index 9cd12a0d..17c7261e 100644 --- a/lib/Mail/DMARC/Report/Aggregate.pm +++ b/lib/Mail/DMARC/Report/Aggregate.pm @@ -2,7 +2,7 @@ package Mail::DMARC::Report::Aggregate; use strict; use warnings; -our $VERSION = '1.20230215'; +our $VERSION = '1.20240214'; use Carp; use Data::Dumper; @@ -199,7 +199,7 @@ Mail::DMARC::Report::Aggregate - aggregate report object =head1 VERSION -version 1.20230215 +version 1.20240214 =head1 DESCRIPTION diff --git a/lib/Mail/DMARC/Report/Aggregate/Metadata.pm b/lib/Mail/DMARC/Report/Aggregate/Metadata.pm index 1f5f5e02..249862b2 100644 --- a/lib/Mail/DMARC/Report/Aggregate/Metadata.pm +++ b/lib/Mail/DMARC/Report/Aggregate/Metadata.pm @@ -2,7 +2,7 @@ package Mail::DMARC::Report::Aggregate::Metadata; use strict; use warnings; -our $VERSION = '1.20230215'; +our $VERSION = '1.20240214'; use XML::LibXML; @@ -92,7 +92,7 @@ Mail::DMARC::Report::Aggregate::Metadata - metadata section of aggregate report =head1 VERSION -version 1.20230215 +version 1.20240214 =head1 AUTHORS diff --git a/lib/Mail/DMARC/Report/Aggregate/Record.pm b/lib/Mail/DMARC/Report/Aggregate/Record.pm index e7d00a01..8344e34b 100644 --- a/lib/Mail/DMARC/Report/Aggregate/Record.pm +++ b/lib/Mail/DMARC/Report/Aggregate/Record.pm @@ -1,5 +1,5 @@ package Mail::DMARC::Report::Aggregate::Record; -our $VERSION = '1.20230215'; +our $VERSION = '1.20240214'; use strict; use warnings; @@ -82,7 +82,7 @@ Mail::DMARC::Report::Aggregate::Record - record section of aggregate report =head1 VERSION -version 1.20230215 +version 1.20240214 =head1 DESCRIPTION diff --git a/lib/Mail/DMARC/Report/Aggregate/Record/Auth_Results.pm b/lib/Mail/DMARC/Report/Aggregate/Record/Auth_Results.pm index 94e4970f..93c9396a 100644 --- a/lib/Mail/DMARC/Report/Aggregate/Record/Auth_Results.pm +++ b/lib/Mail/DMARC/Report/Aggregate/Record/Auth_Results.pm @@ -1,5 +1,5 @@ package Mail::DMARC::Report::Aggregate::Record::Auth_Results; -our $VERSION = '1.20230215'; +our $VERSION = '1.20240214'; use strict; use warnings; @@ -79,7 +79,7 @@ Mail::DMARC::Report::Aggregate::Record::Auth_Results - auth_results section of a =head1 VERSION -version 1.20230215 +version 1.20240214 =head1 AUTHORS diff --git a/lib/Mail/DMARC/Report/Aggregate/Record/Auth_Results/DKIM.pm b/lib/Mail/DMARC/Report/Aggregate/Record/Auth_Results/DKIM.pm index 4c5726e6..3a983ab9 100644 --- a/lib/Mail/DMARC/Report/Aggregate/Record/Auth_Results/DKIM.pm +++ b/lib/Mail/DMARC/Report/Aggregate/Record/Auth_Results/DKIM.pm @@ -1,5 +1,5 @@ package Mail::DMARC::Report::Aggregate::Record::Auth_Results::DKIM; -our $VERSION = '1.20230215'; +our $VERSION = '1.20240214'; use strict; use Carp; @@ -84,7 +84,7 @@ Mail::DMARC::Report::Aggregate::Record::Auth_Results::DKIM - auth_results/dkim s =head1 VERSION -version 1.20230215 +version 1.20240214 =head1 AUTHORS diff --git a/lib/Mail/DMARC/Report/Aggregate/Record/Auth_Results/SPF.pm b/lib/Mail/DMARC/Report/Aggregate/Record/Auth_Results/SPF.pm index 64359f80..d3e83d22 100644 --- a/lib/Mail/DMARC/Report/Aggregate/Record/Auth_Results/SPF.pm +++ b/lib/Mail/DMARC/Report/Aggregate/Record/Auth_Results/SPF.pm @@ -1,5 +1,5 @@ package Mail::DMARC::Report::Aggregate::Record::Auth_Results::SPF; -our $VERSION = '1.20230215'; +our $VERSION = '1.20240214'; use strict; use Carp; @@ -91,7 +91,7 @@ Mail::DMARC::Report::Aggregate::Record::Auth_Results::SPF - auth_results/spf sec =head1 VERSION -version 1.20230215 +version 1.20240214 =head1 AUTHORS diff --git a/lib/Mail/DMARC/Report/Aggregate/Record/Identifiers.pm b/lib/Mail/DMARC/Report/Aggregate/Record/Identifiers.pm index ecbbc27c..d37a13cb 100644 --- a/lib/Mail/DMARC/Report/Aggregate/Record/Identifiers.pm +++ b/lib/Mail/DMARC/Report/Aggregate/Record/Identifiers.pm @@ -1,5 +1,5 @@ package Mail::DMARC::Report::Aggregate::Record::Identifiers; -our $VERSION = '1.20230215'; +our $VERSION = '1.20240214'; use strict; use warnings; @@ -43,7 +43,7 @@ Mail::DMARC::Report::Aggregate::Record::Identifiers - identifiers section of a D =head1 VERSION -version 1.20230215 +version 1.20240214 =head1 AUTHORS diff --git a/lib/Mail/DMARC/Report/Aggregate/Record/Row.pm b/lib/Mail/DMARC/Report/Aggregate/Record/Row.pm index 99d8a06f..4b1460af 100644 --- a/lib/Mail/DMARC/Report/Aggregate/Record/Row.pm +++ b/lib/Mail/DMARC/Report/Aggregate/Record/Row.pm @@ -1,5 +1,5 @@ package Mail::DMARC::Report::Aggregate::Record::Row; -our $VERSION = '1.20230215'; +our $VERSION = '1.20240214'; use strict; use warnings; @@ -56,7 +56,7 @@ Mail::DMARC::Report::Aggregate::Record::Row - row section of a DMARC aggregate r =head1 VERSION -version 1.20230215 +version 1.20240214 =head1 AUTHORS diff --git a/lib/Mail/DMARC/Report/Aggregate/Record/Row/Policy_Evaluated.pm b/lib/Mail/DMARC/Report/Aggregate/Record/Row/Policy_Evaluated.pm index 0894e774..38acda4a 100644 --- a/lib/Mail/DMARC/Report/Aggregate/Record/Row/Policy_Evaluated.pm +++ b/lib/Mail/DMARC/Report/Aggregate/Record/Row/Policy_Evaluated.pm @@ -1,5 +1,5 @@ package Mail::DMARC::Report::Aggregate::Record::Row::Policy_Evaluated; -our $VERSION = '1.20230215'; +our $VERSION = '1.20240214'; use strict; use warnings; @@ -56,7 +56,7 @@ Mail::DMARC::Report::Aggregate::Record::Row::Policy_Evaluated - row/policy_evalu =head1 VERSION -version 1.20230215 +version 1.20240214 =head1 AUTHORS diff --git a/lib/Mail/DMARC/Report/Receive.pm b/lib/Mail/DMARC/Report/Receive.pm index 050e4348..dc013c74 100644 --- a/lib/Mail/DMARC/Report/Receive.pm +++ b/lib/Mail/DMARC/Report/Receive.pm @@ -2,7 +2,7 @@ package Mail::DMARC::Report::Receive; use strict; use warnings; -our $VERSION = '1.20230215'; +our $VERSION = '1.20240214'; use Carp; use Data::Dumper; @@ -29,10 +29,9 @@ sub from_imap { my $f_done = $self->config->{imap}{f_done}; my $port = $self->config->{imap}{port} // $self->get_imap_port(); - my $use_ssl = $self->config->{imap}{use_ssl} // ($port==993); no warnings qw(once); ## no critic (Warn) my $imap = Net::IMAP::Simple->new( $server, port => $port, - ($use_ssl) ? (use_ssl=>$use_ssl) : () + ($port != 143) ? (use_ssl => 1) : () ) or do { ## no critic (PackageVar) @@ -422,7 +421,7 @@ Mail::DMARC::Report::Receive - process incoming DMARC reports =head1 VERSION -version 1.20230215 +version 1.20240214 =head1 DESCRIPTION diff --git a/lib/Mail/DMARC/Report/Send.pm b/lib/Mail/DMARC/Report/Send.pm index 7fecaaae..2ae21dd2 100644 --- a/lib/Mail/DMARC/Report/Send.pm +++ b/lib/Mail/DMARC/Report/Send.pm @@ -2,7 +2,7 @@ package Mail::DMARC::Report::Send; use strict; use warnings; -our $VERSION = '1.20230215'; +our $VERSION = '1.20240214'; use parent 'Mail::DMARC::Base'; use Mail::DMARC::Report::Send::SMTP; @@ -62,7 +62,7 @@ Mail::DMARC::Report::Send - report sending dispatch class =head1 VERSION -version 1.20230215 +version 1.20240214 =head1 DESCRIPTION diff --git a/lib/Mail/DMARC/Report/Send/HTTP.pm b/lib/Mail/DMARC/Report/Send/HTTP.pm index 6655db13..e28fc666 100644 --- a/lib/Mail/DMARC/Report/Send/HTTP.pm +++ b/lib/Mail/DMARC/Report/Send/HTTP.pm @@ -2,7 +2,7 @@ package Mail::DMARC::Report::Send::HTTP; use strict; use warnings; -our $VERSION = '1.20230215'; +our $VERSION = '1.20240214'; use Carp; @@ -53,7 +53,7 @@ Mail::DMARC::Report::Send::HTTP - utility methods to send reports by HTTP =head1 VERSION -version 1.20230215 +version 1.20240214 =head1 12.2.2. HTTP diff --git a/lib/Mail/DMARC/Report/Send/SMTP.pm b/lib/Mail/DMARC/Report/Send/SMTP.pm index 07e8e932..e59a7717 100644 --- a/lib/Mail/DMARC/Report/Send/SMTP.pm +++ b/lib/Mail/DMARC/Report/Send/SMTP.pm @@ -2,7 +2,7 @@ package Mail::DMARC::Report::Send::SMTP; use strict; use warnings; -our $VERSION = '1.20230215'; +our $VERSION = '1.20240214'; use Carp; use English '-no_match_vars'; @@ -208,7 +208,7 @@ Mail::DMARC::Report::Send::SMTP - utility methods for sending reports via SMTP =head1 VERSION -version 1.20230215 +version 1.20240214 =head2 SUBJECT FIELD diff --git a/lib/Mail/DMARC/Report/Store.pm b/lib/Mail/DMARC/Report/Store.pm index 0aecae2d..d081661d 100644 --- a/lib/Mail/DMARC/Report/Store.pm +++ b/lib/Mail/DMARC/Report/Store.pm @@ -1,5 +1,5 @@ package Mail::DMARC::Report::Store; -our $VERSION = '1.20230215'; +our $VERSION = '1.20240214'; use strict; use warnings; @@ -60,7 +60,7 @@ Mail::DMARC::Report::Store - persistent storage broker for reports =head1 VERSION -version 1.20230215 +version 1.20240214 =head1 SYNOPSIS diff --git a/lib/Mail/DMARC/Report/Store/SQL.pm b/lib/Mail/DMARC/Report/Store/SQL.pm index 8c1c969d..d215165a 100644 --- a/lib/Mail/DMARC/Report/Store/SQL.pm +++ b/lib/Mail/DMARC/Report/Store/SQL.pm @@ -1,5 +1,5 @@ package Mail::DMARC::Report::Store::SQL; -our $VERSION = '1.20230215'; +our $VERSION = '1.20240214'; use strict; use warnings; @@ -682,7 +682,7 @@ Mail::DMARC::Report::Store::SQL - store and retrieve reports from a SQL RDBMS =head1 VERSION -version 1.20230215 +version 1.20240214 =head1 DESCRIPTION diff --git a/lib/Mail/DMARC/Report/Store/SQL/Grammars/MySQL.pm b/lib/Mail/DMARC/Report/Store/SQL/Grammars/MySQL.pm index 865b5d27..b3d4d0e8 100644 --- a/lib/Mail/DMARC/Report/Store/SQL/Grammars/MySQL.pm +++ b/lib/Mail/DMARC/Report/Store/SQL/Grammars/MySQL.pm @@ -1,5 +1,5 @@ package Mail::DMARC::Report::Store::SQL::Grammars::MySQL; -our $VERSION = '1.20230215'; +our $VERSION = '1.20240214'; use strict; use warnings; @@ -290,7 +290,7 @@ Mail::DMARC::Report::Store::SQL::Grammars::MySQL - Grammar for working with mysq =head1 VERSION -version 1.20230215 +version 1.20240214 =head1 SYPNOSIS diff --git a/lib/Mail/DMARC/Report/Store/SQL/Grammars/PostgreSQL.pm b/lib/Mail/DMARC/Report/Store/SQL/Grammars/PostgreSQL.pm index 70679f44..d0fbc30c 100644 --- a/lib/Mail/DMARC/Report/Store/SQL/Grammars/PostgreSQL.pm +++ b/lib/Mail/DMARC/Report/Store/SQL/Grammars/PostgreSQL.pm @@ -1,5 +1,5 @@ package Mail::DMARC::Report::Store::SQL::Grammars::PostgreSQL; -our $VERSION = '1.20230215'; +our $VERSION = '1.20240214'; use strict; use warnings; @@ -309,7 +309,7 @@ Mail::DMARC::Report::Store::SQL::Grammars::PostgreSQL - Grammar for working with =head1 VERSION -version 1.20230215 +version 1.20240214 =head1 SYPNOSIS diff --git a/lib/Mail/DMARC/Report/Store/SQL/Grammars/SQLite.pm b/lib/Mail/DMARC/Report/Store/SQL/Grammars/SQLite.pm index db41fcee..abff8de2 100644 --- a/lib/Mail/DMARC/Report/Store/SQL/Grammars/SQLite.pm +++ b/lib/Mail/DMARC/Report/Store/SQL/Grammars/SQLite.pm @@ -1,5 +1,5 @@ package Mail::DMARC::Report::Store::SQL::Grammars::SQLite; -our $VERSION = '1.20230215'; +our $VERSION = '1.20240214'; use strict; use warnings; @@ -290,7 +290,7 @@ Mail::DMARC::Report::Store::SQL::Grammars::SQLite - Grammar for working with sql =head1 VERSION -version 1.20230215 +version 1.20240214 =head1 SYPNOSIS diff --git a/lib/Mail/DMARC/Report/URI.pm b/lib/Mail/DMARC/Report/URI.pm index 73cc8203..f03be1c9 100644 --- a/lib/Mail/DMARC/Report/URI.pm +++ b/lib/Mail/DMARC/Report/URI.pm @@ -2,7 +2,7 @@ package Mail::DMARC::Report::URI; use strict; use warnings; -our $VERSION = '1.20230215'; +our $VERSION = '1.20240214'; use Carp; use URI; @@ -69,7 +69,7 @@ Mail::DMARC::Report::URI - a DMARC report URI =head1 VERSION -version 1.20230215 +version 1.20240214 =head1 SYNOPSIS diff --git a/lib/Mail/DMARC/Result.pm b/lib/Mail/DMARC/Result.pm index 010c2351..3e8651ea 100644 --- a/lib/Mail/DMARC/Result.pm +++ b/lib/Mail/DMARC/Result.pm @@ -1,5 +1,5 @@ package Mail::DMARC::Result; -our $VERSION = '1.20230215'; +our $VERSION = '1.20240214'; use strict; use warnings; @@ -95,7 +95,7 @@ Mail::DMARC::Result - an aggregate report result object =head1 VERSION -version 1.20230215 +version 1.20240214 =head1 OVERVIEW diff --git a/lib/Mail/DMARC/Result/Reason.pm b/lib/Mail/DMARC/Result/Reason.pm index 370c3a9c..2cd204b9 100644 --- a/lib/Mail/DMARC/Result/Reason.pm +++ b/lib/Mail/DMARC/Result/Reason.pm @@ -1,5 +1,5 @@ package Mail::DMARC::Result::Reason; -our $VERSION = '1.20230215'; +our $VERSION = '1.20240214'; use strict; use warnings; @@ -44,7 +44,7 @@ Mail::DMARC::Result::Reason - policy override reason =head1 VERSION -version 1.20230215 +version 1.20240214 =head1 METHODS diff --git a/share/mail-dmarc.ini b/share/mail-dmarc.ini index 04c38d48..43e0bf95 100644 --- a/share/mail-dmarc.ini +++ b/share/mail-dmarc.ini @@ -63,6 +63,7 @@ smartpass = [imap] server = mail.example.com +port = 993 user = pass = ; the imap folder where new dmarc messages will be found