| 1 | package Mail::DMARC::Report::Send; | ||||||||||||
| 2 | 4 | ▶ | use strict; | ||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||
| 3 | 4 | ▶ | use warnings; | ||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||
| 4 | 4 | ▶ | use feature 'signatures'; | ||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||
| 5 | |||||||||||||
| 6 | 4 | our $VERSION = '2.20260827'; | |||||||||||
| 7 | |||||||||||||
| 8 | 4 | ▶ | use parent 'Mail::DMARC::Base'; | ||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||
| 9 | |||||||||||||
| 10 | 1 | ▶ | sub http($self) { | ||||||||||
|
Subroutine
http: called CC=2 SCAR=7.1
Pod
undocumented
| |||||||||||||
| 11 | 1 | ▶ | return $self->{http} if ref $self->{http}; | ||||||||||
|
Branch: 1 branch
| |||||||||||||
| 12 | 1 | require Mail::DMARC::Report::Send::HTTP; | |||||||||||
| 13 | 1 | return $self->{http} = Mail::DMARC::Report::Send::HTTP->new(); | |||||||||||
| 14 | } | ||||||||||||
| 15 | |||||||||||||
| 16 | 43 | ▶ | sub smtp($self) { | ||||||||||
|
Subroutine
smtp: called CC=2 SCAR=6.9
Pod
undocumented
| |||||||||||||
| 17 | 43 | ▶ | return $self->{smtp} if ref $self->{smtp}; | ||||||||||
|
Branch: 1 branch
| |||||||||||||
| 18 | 41 | require Mail::DMARC::Report::Send::SMTP; | |||||||||||
| 19 | 41 | return $self->{smtp} = Mail::DMARC::Report::Send::SMTP->new(); | |||||||||||
| 20 | } | ||||||||||||
| 21 | |||||||||||||
| 22 | 1 | ▶ | sub too_big_report( $self, $arg_ref ) { | ||||||||||
|
Subroutine
too_big_report: called CC=2 SCAR=6.9
Pod
undocumented
| |||||||||||||
| 23 | |||||||||||||
| 24 | 1 | my $OrgName = $self->config->{organization}{org_name}; | |||||||||||
| 25 | 1 | my $Domain = $self->config->{organization}{domain}; | |||||||||||
| 26 | 1 | ▶ | my $ver = $Mail::DMARC::Base::VERSION || ''; # undef in author environ | ||||||||||
|
Condition50%1/2
$Mail::DMARC::Base::VERSION || ''
MC/DC0%0/1
$Mail::DMARC::Base::VERSION || ''
$Mail::DMARC::Base::VERSION
Truth table50%1/2
A
A= $Mail::DMARC::Base::VERSION
| |||||||||||||
| 27 | 1 | my $uri = $arg_ref->{uri}; | |||||||||||
| 28 | 1 | my $bytes = $arg_ref->{report_bytes}; | |||||||||||
| 29 | 1 | my $report_id = $arg_ref->{report_id}; | |||||||||||
| 30 | 1 | my $rep_domain = $arg_ref->{report_domain}; | |||||||||||
| 31 | 1 | my $date = $self->smtp->get_timestamp_rfc2822; | |||||||||||
| 32 | |||||||||||||
| 33 | return <<"EO_TOO_BIG" | ||||||||||||
| 34 | |||||||||||||
| 35 | This is a 'too big' DMARC notice. The aggregate report was NOT delivered. | ||||||||||||
| 36 | |||||||||||||
| 37 | Report-Date: $date | ||||||||||||
| 38 | Report-Domain: $rep_domain | ||||||||||||
| 39 | Report-ID: $report_id | ||||||||||||
| 40 | Report-Size: $bytes | ||||||||||||
| 41 | Submitter: $Domain | ||||||||||||
| 42 | Submitting-URI: $uri | ||||||||||||
| 43 | |||||||||||||
| 44 | Submitted by $OrgName | ||||||||||||
| 45 | Generated with Mail::DMARC $ver | ||||||||||||
| 46 | |||||||||||||
| 47 | EO_TOO_BIG | ||||||||||||
| 48 | 1 | ; | |||||||||||
| 49 | } | ||||||||||||
| 50 | |||||||||||||
| 51 | 4 | 1; | |||||||||||
| 52 | |||||||||||||
| 53 | __END__ | ||||||||||||
| 54 | |||||||||||||
| 55 | =pod | ||||||||||||
| 56 | |||||||||||||
| 57 | =head1 NAME | ||||||||||||
| 58 | |||||||||||||
| 59 | Mail::DMARC::Report::Send - report sending dispatch class | ||||||||||||
| 60 | |||||||||||||
| 61 | =head1 VERSION | ||||||||||||
| 62 | |||||||||||||
| 63 | version 2.20260827 | ||||||||||||
| 64 | |||||||||||||
| 65 | =head1 DESCRIPTION | ||||||||||||
| 66 | |||||||||||||
| 67 | Send DMARC reports, via SMTP or HTTP. | ||||||||||||
| 68 | |||||||||||||
| 69 | =head2 Report Sender | ||||||||||||
| 70 | |||||||||||||
| 71 | A report sender needs to: | ||||||||||||
| 72 | |||||||||||||
| 73 | 1. store reports | ||||||||||||
| 74 | 2. bundle aggregated reports | ||||||||||||
| 75 | 3. format report in XML | ||||||||||||
| 76 | 4. gzip the XML | ||||||||||||
| 77 | 5. deliver report to Author Domain | ||||||||||||
| 78 | |||||||||||||
| 79 | This class and subclasses provide methods used by L<dmarc_send_reports>. | ||||||||||||
| 80 | |||||||||||||
| 81 | =head1 12.2.1 Email | ||||||||||||
| 82 | |||||||||||||
| 83 | L<Mail::DMARC::Report::Send::SMTP> | ||||||||||||
| 84 | |||||||||||||
| 85 | =head1 12.2.2. HTTP | ||||||||||||
| 86 | |||||||||||||
| 87 | L<Mail::DMARC::Report::Send::HTTP> | ||||||||||||
| 88 | |||||||||||||
| 89 | =head1 12.2.3. Other Methods | ||||||||||||
| 90 | |||||||||||||
| 91 | Other registered URI schemes may be explicitly supported in later versions. | ||||||||||||
| 92 | |||||||||||||
| 93 | =head1 AUTHORS | ||||||||||||
| 94 | |||||||||||||
| 95 | =over 4 | ||||||||||||
| 96 | |||||||||||||
| 97 | =item * | ||||||||||||
| 98 | |||||||||||||
| 99 | Matt Simerson <msimerson@cpan.org> | ||||||||||||
| 100 | |||||||||||||
| 101 | =item * | ||||||||||||
| 102 | |||||||||||||
| 103 | Davide Migliavacca <shari@cpan.org> | ||||||||||||
| 104 | |||||||||||||
| 105 | =item * | ||||||||||||
| 106 | |||||||||||||
| 107 | Marc Bradshaw <marc@marcbradshaw.net> | ||||||||||||
| 108 | |||||||||||||
| 109 | =back | ||||||||||||
| 110 | |||||||||||||
| 111 | =head1 COPYRIGHT AND LICENSE | ||||||||||||
| 112 | |||||||||||||
| 113 | This software is copyright (c) 2026 by Matt Simerson. | ||||||||||||
| 114 | |||||||||||||
| 115 | This is free software; you can redistribute it and/or modify it under | ||||||||||||
| 116 | the same terms as the Perl 5 programming language system itself. | ||||||||||||
| 117 | |||||||||||||
| 118 | =cut | ||||||||||||