# # spec file for package perl-Mail-DMARC # # Copyright (c) 2023 SUSE LLC # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed # upon. The license for this file, and modifications and additions to the # file, is the same license as for the pristine package itself (unless the # license for the pristine package is not an Open Source License, in which # case the license is the MIT License). An "Open Source License" is a # license that conforms to the Open Source Definition (Version 1.9) # published by the Open Source Initiative. # Please submit bugfixes or comments via https://bugs.opensuse.org/ # %define cpan_name Mail-DMARC Name: perl-Mail-DMARC Version: 1.20230215 Release: 1.7 License: Artistic-1.0 OR GPL-1.0-or-later Summary: Perl implementation of DMARC URL: https://metacpan.org/release/%{cpan_name} Source0: https://cpan.metacpan.org/authors/id/M/MB/MBRADSHAW/%{cpan_name}-%{version}.tar.gz Source1: cpanspec.yml # PATCH-FIX-OPENSUSE prevent network access in tests Patch0: no-network-tests.patch BuildArch: noarch BuildRequires: perl BuildRequires: perl-macros BuildRequires: perl(Config::Tiny) BuildRequires: perl(DBD::SQLite) >= 1.31 BuildRequires: perl(DBIx::Simple) >= 1.35 BuildRequires: perl(Email::MIME) BuildRequires: perl(Email::Sender) BuildRequires: perl(Email::Sender::Simple) >= 1.300032 BuildRequires: perl(Email::Simple) BuildRequires: perl(File::ShareDir) >= 1.00 BuildRequires: perl(File::ShareDir::Install) >= 0.06 BuildRequires: perl(HTTP::Tiny) BuildRequires: perl(IO::Compress::Gzip) BuildRequires: perl(IO::Compress::Zip) BuildRequires: perl(IO::Socket::SSL) BuildRequires: perl(IO::Uncompress::Gunzip) BuildRequires: perl(IO::Uncompress::Unzip) BuildRequires: perl(Module::Build) >= 0.360100 BuildRequires: perl(Net::DNS::Resolver) BuildRequires: perl(Net::IDN::Encode) BuildRequires: perl(Net::IP) BuildRequires: perl(Net::SSLeay) BuildRequires: perl(Regexp::Common) >= 2013031301 BuildRequires: perl(Socket6) >= 0.23 BuildRequires: perl(Test::Exception) BuildRequires: perl(Test::File::ShareDir) BuildRequires: perl(Test::Output) BuildRequires: perl(URI) BuildRequires: perl(XML::LibXML) Requires: perl(Config::Tiny) Requires: perl(DBD::SQLite) >= 1.31 Requires: perl(DBIx::Simple) >= 1.35 Requires: perl(Email::MIME) Requires: perl(Email::Sender) Requires: perl(Email::Sender::Simple) >= 1.300032 Requires: perl(Email::Simple) Requires: perl(File::ShareDir) >= 1.00 Requires: perl(HTTP::Tiny) Requires: perl(IO::Compress::Gzip) Requires: perl(IO::Compress::Zip) Requires: perl(IO::Socket::SSL) Requires: perl(IO::Uncompress::Gunzip) Requires: perl(IO::Uncompress::Unzip) Requires: perl(Net::DNS::Resolver) Requires: perl(Net::IDN::Encode) Requires: perl(Net::IP) Requires: perl(Net::SSLeay) Requires: perl(Regexp::Common) >= 2013031301 Requires: perl(Socket6) >= 0.23 Requires: perl(Test::File::ShareDir) Requires: perl(URI) Requires: perl(XML::LibXML) Recommends: perl(Mail::DKIM) Recommends: perl(Net::IMAP::Simple) Recommends: perl(Net::SMTPS) %{perl_requires} # MANUAL BEGIN BuildRequires: perl(CGI) BuildRequires: perl(JSON) BuildRequires: perl(Net::DNS::Resolver::Mock) BuildRequires: perl(Net::HTTP) BuildRequires: perl(Net::Server::HTTP) BuildRequires: perl(XML::Validator::Schema) # MANUAL END %description This module is a suite of tools for implementing DMARC. It adheres to the 2013 DMARC draft, intending to implement every MUST and every SHOULD. This module can be used by... * MTAs and filtering tools like SpamAssassin to validate that incoming messages are aligned with the purported sender's policy. * email senders, to receive DMARC reports from other mail servers and display them via CLI and web interfaces. * MTA operators to send DMARC reports to DMARC author domains. When a message arrives via SMTP, the MTA or filtering application can pass in a small amount of metadata about the connection (envelope details, SPF and DKIM results) to Mail::DMARC. When the *validate* method is called, Mail::DMARC will determine if: a. the header_from domain exists b. the header_from domain publishes a DMARC policy c. if a policy is published... d. does the message conform to the published policy? e. did the policy request reporting? If so, save details. The validation results are returned as a Mail::DMARC::Result object. If the author domain requested a report, it was saved to the Report Store. The Store class includes a SQL implementation that is tested with SQLite, MySQL and PostgreSQL. There is more information available in the $result object. See Mail::DMARC::Result for complete details. Reports are viewed with the dmarc_view_reports program or with a web browser and the dmarc_httpd program. Aggregate reports are sent to their requestors with the dmarc_send_reports program. For aggregate reports that you have been sent, the dmarc_receive program will parse the email messages (from IMAP, Mbox, or files) and save the report results into the Report Store. The report store can use the same database to store reports you have received as well as reports you will send. There are several ways to identify the difference, including: * received reports will have a null value for report_policy_published.rua * outgoing reports will have null values for report.uuid and report_record.count %prep %autosetup -n %{cpan_name}-%{version} -p1 find . -type f ! -path "*/t/*" ! -name "*.pl" ! -path "*/bin/*" ! -path "*/script/*" ! -path "*/scripts/*" ! -name "configure" -print0 | xargs -0 chmod 644 %build perl Build.PL --installdirs=vendor ./Build build --flags=%{?_smp_mflags} %check ./Build test %install ./Build install --destdir=%{buildroot} --create_packlist=0 %perl_gen_filelist %files -f %{name}.files %doc Changes.md DEVELOP.md example FAQ.md README.md TODO.md %license LICENSE %changelog * Tue Jul 11 2023 Dirk Stoecker - add no-network-tests.patch * Thu Jun 29 2023 Dirk Stoecker - initial package 1.20230215 * created by cpanspec 1.83.00