aboutsummaryrefslogtreecommitdiff
path: root/lib/Sietima/Role/NoSpoof/DMARC.pm
diff options
context:
space:
mode:
Diffstat (limited to 'lib/Sietima/Role/NoSpoof/DMARC.pm')
-rw-r--r--lib/Sietima/Role/NoSpoof/DMARC.pm100
1 files changed, 63 insertions, 37 deletions
diff --git a/lib/Sietima/Role/NoSpoof/DMARC.pm b/lib/Sietima/Role/NoSpoof/DMARC.pm
index de021da..13624d3 100644
--- a/lib/Sietima/Role/NoSpoof/DMARC.pm
+++ b/lib/Sietima/Role/NoSpoof/DMARC.pm
@@ -5,45 +5,9 @@ use Email::Address;
use Mail::DMARC::PurePerl;
use namespace::clean;
-# VERSION
+our $VERSION = '1.1.2'; # VERSION
# ABSTRACT: send out messages from subscribers' addresses only if DMARC allows it
-=head1 SYNOPSIS
-
- my $sietima = Sietima->with_traits('NoSpoof::DMARC')->new(\%args);
-
-=head1 DESCRIPTION
-
-A L<< C<Sietima> >> list with this role applied will replace the
-C<From> address with its own L<<
-C<post_address>|Sietima::Role::WithPostAddress >> (this is a
-"sub-role" of L<< C<WithPostAddress>|Sietima::Role::WithPostAddress
->>) I<if> the originating address's DMARC policy requires it.
-
-This will make the list DMARC-compliant while minimising the changes
-to the messages.
-
-The original C<From> address will be preserved in the C<Original-From>
-header, as required by RFC 5703.
-
-=head2 Some more details
-
-DMARC requires L<"identifier
-alignment"|https://datatracker.ietf.org/doc/html/rfc7489#section-3.1>,
-essentially the C<MAIL FROM> (envelope) and the header C<From> must
-have the same domain (or at least belong to the same "organisational
-domain", i.e. be both under a common non-top-level domain, roughly).
-
-Therefore, a mailing list that forwards a message sent from a
-DMARC-enabled domain, I<must> rewrite the C<From> header, otherwise
-the message will be discarded by recipient servers. If the originating
-domain does not publish a DMARC policy (or publishes a C<none>
-policy), the mailing list can leave the C<From> as is, but should add
-a C<Sender> header with the list's own address.
-
-This role does exactly that.
-
-=cut
with 'Sietima::Role::WithPostAddress';
@@ -91,3 +55,65 @@ around munge_mail => sub ($orig,$self,$incoming_mail) {
};
1;
+
+__END__
+
+=pod
+
+=encoding UTF-8
+
+=head1 NAME
+
+Sietima::Role::NoSpoof::DMARC - send out messages from subscribers' addresses only if DMARC allows it
+
+=head1 VERSION
+
+version 1.1.2
+
+=head1 SYNOPSIS
+
+ my $sietima = Sietima->with_traits('NoSpoof::DMARC')->new(\%args);
+
+=head1 DESCRIPTION
+
+A L<< C<Sietima> >> list with this role applied will replace the
+C<From> address with its own L<<
+C<post_address>|Sietima::Role::WithPostAddress >> (this is a
+"sub-role" of L<< C<WithPostAddress>|Sietima::Role::WithPostAddress
+>>) I<if> the originating address's DMARC policy requires it.
+
+This will make the list DMARC-compliant while minimising the changes
+to the messages.
+
+The original C<From> address will be preserved in the C<Original-From>
+header, as required by RFC 5703.
+
+=head2 Some more details
+
+DMARC requires L<"identifier
+alignment"|https://datatracker.ietf.org/doc/html/rfc7489#section-3.1>,
+essentially the C<MAIL FROM> (envelope) and the header C<From> must
+have the same domain (or at least belong to the same "organisational
+domain", i.e. be both under a common non-top-level domain, roughly).
+
+Therefore, a mailing list that forwards a message sent from a
+DMARC-enabled domain, I<must> rewrite the C<From> header, otherwise
+the message will be discarded by recipient servers. If the originating
+domain does not publish a DMARC policy (or publishes a C<none>
+policy), the mailing list can leave the C<From> as is, but should add
+a C<Sender> header with the list's own address.
+
+This role does exactly that.
+
+=head1 AUTHOR
+
+Gianni Ceccarelli <dakkar@thenautilus.net>
+
+=head1 COPYRIGHT AND LICENSE
+
+This software is copyright (c) 2023 by Gianni Ceccarelli <dakkar@thenautilus.net>.
+
+This is free software; you can redistribute it and/or modify it under
+the same terms as the Perl 5 programming language system itself.
+
+=cut