diff options
28 files changed, 78 insertions, 67 deletions
@@ -1,3 +1,7 @@ +1.1.1 2023-02-28 13:02:33+00:00 Europe/London + - documentation fixes + - simplified SubscriberOnly::Moderate + 1.1.0 2023-02-28 11:56:27+00:00 Europe/London - require perl 5.36 - new role NoSpoof for better DMARC compliance @@ -82,7 +82,7 @@ "web" : "https://www.thenautilus.net/cgit/Sietima" } }, - "version" : "1.1.0", + "version" : "1.1.1", "x_generated_by_perl" : "v5.36.0", "x_serialization_backend" : "Cpanel::JSON::XS version 4.35", "x_spdx_expression" : "Artistic-1.0-Perl OR GPL-1.0-or-later" @@ -49,7 +49,7 @@ requires: resources: homepage: https://www.thenautilus.net/SW/Sietima/ repository: https://www.thenautilus.net/cgit/Sietima -version: 1.1.0 +version: 1.1.1 x_generated_by_perl: v5.36.0 x_serialization_backend: 'YAML::Tiny version 1.73' x_spdx_expression: 'Artistic-1.0-Perl OR GPL-1.0-or-later' diff --git a/Makefile.PL b/Makefile.PL index 3c14d60..bb74d5f 100644 --- a/Makefile.PL +++ b/Makefile.PL @@ -49,7 +49,7 @@ my %WriteMakefileArgs = ( "URI" => "5.17", "lib" => "0.65" }, - "VERSION" => "1.1.0", + "VERSION" => "1.1.1", "test" => { "TESTS" => "t/*.t t/tests/*.t t/tests/sietima/*.t t/tests/sietima/multi-role/*.t t/tests/sietima/role/*.t t/tests/sietima/role/subscriberonly/*.t" } diff --git a/lib/Sietima.pm b/lib/Sietima.pm index 586c9a4..d30be2b 100644 --- a/lib/Sietima.pm +++ b/lib/Sietima.pm @@ -14,7 +14,7 @@ use Email::Address; use namespace::clean; with 'MooX::Traits'; -our $VERSION = '1.1.0'; # VERSION +our $VERSION = '1.1.1'; # VERSION # ABSTRACT: minimal mailing list manager @@ -145,7 +145,7 @@ Sietima - minimal mailing list manager =head1 VERSION -version 1.1.0 +version 1.1.1 =head1 SYNOPSIS @@ -195,6 +195,10 @@ specifies that to (un)subscribe, people should write to the list owner avoids sending messages to subscribers who don't want them +=item L<< C<NoSpoof>|Sietima::Role::NoSpoof >> + +replaces the C<From> address with the list's own address + =item L<< C<ReplyTo>|Sietima::Role::ReplyTo >> optionally sets the C<Reply-To> header to the mailing list address @@ -238,7 +242,7 @@ empty array. Each item can be coerced from a string or a L<< C<Email::Address> >> instance, or a hashref of the form - { address => $string, %other_attributes } + { primary => $string, %other_attributes } The base Sietima class only uses the address of subscribers, but some roles use the other attributes (L<< C<NoMail>|Sietima::Role::NoMail diff --git a/lib/Sietima/CmdLine.pm b/lib/Sietima/CmdLine.pm index 86b8004..ca88c71 100644 --- a/lib/Sietima/CmdLine.pm +++ b/lib/Sietima/CmdLine.pm @@ -8,7 +8,7 @@ use App::Spec; use Sietima::Runner; use namespace::clean; -our $VERSION = '1.1.0'; # VERSION +our $VERSION = '1.1.1'; # VERSION # ABSTRACT: run Sietima as a command-line application @@ -83,7 +83,7 @@ Sietima::CmdLine - run Sietima as a command-line application =head1 VERSION -version 1.1.0 +version 1.1.1 =head1 SYNOPSIS diff --git a/lib/Sietima/HeaderURI.pm b/lib/Sietima/HeaderURI.pm index 0f6bdd8..2b04eb5 100644 --- a/lib/Sietima/HeaderURI.pm +++ b/lib/Sietima/HeaderURI.pm @@ -8,7 +8,7 @@ use Types::URI qw(Uri is_Uri); use Email::Address; use namespace::clean; -our $VERSION = '1.1.0'; # VERSION +our $VERSION = '1.1.1'; # VERSION # ABSTRACT: annotated URI for list headers @@ -97,7 +97,7 @@ Sietima::HeaderURI - annotated URI for list headers =head1 VERSION -version 1.1.0 +version 1.1.1 =head1 SYNOPSIS diff --git a/lib/Sietima/MailStore.pm b/lib/Sietima/MailStore.pm index 8dda1ea..911c183 100644 --- a/lib/Sietima/MailStore.pm +++ b/lib/Sietima/MailStore.pm @@ -3,7 +3,7 @@ use Moo::Role; use Sietima::Policy; use namespace::clean; -our $VERSION = '1.1.0'; # VERSION +our $VERSION = '1.1.1'; # VERSION # ABSTRACT: interface for mail stores @@ -25,7 +25,7 @@ Sietima::MailStore - interface for mail stores =head1 VERSION -version 1.1.0 +version 1.1.1 =head1 DESCRIPTION @@ -89,7 +89,7 @@ return an arrayref of hashrefs. For example: my $id2 = $ms->store($msg2,'t2'); my $id3 = $ms->store($msg3,'t1','t2'); - $ms->retrieve_ids_by_tags('t1') ==> [ + $ms->retrieve_by_tags('t1') ==> [ { id => $id3, mail => $msg3 }, { id => $id1, mail => $msg1 }, ] diff --git a/lib/Sietima/MailStore/FS.pm b/lib/Sietima/MailStore/FS.pm index 05d6a10..5fc1814 100644 --- a/lib/Sietima/MailStore/FS.pm +++ b/lib/Sietima/MailStore/FS.pm @@ -8,7 +8,7 @@ use Sietima::Types qw(EmailMIME TagName); use Digest::SHA qw(sha1_hex); use namespace::clean; -our $VERSION = '1.1.0'; # VERSION +our $VERSION = '1.1.1'; # VERSION # ABSTRACT: filesystem-backed email store @@ -150,7 +150,7 @@ Sietima::MailStore::FS - filesystem-backed email store =head1 VERSION -version 1.1.0 +version 1.1.1 =head1 SYNOPSIS @@ -185,7 +185,7 @@ group-writable and group-sticky, and owned by that group: my $id = $store->store($email_mime_object,@tags); Stores the given email message inside the L<store root|/root>, and -associates with the given tags. +associates it with the given tags. Returns a unique identifier for the stored message. If you store twice the same message (or two messages that stringify identically), you'll @@ -221,7 +221,7 @@ returns an empty arrayref. This method is similar to L<< /C<retrieve_ids_by_tags> >>, but it returns an arrayref of hashrefs like: - $store->retrieve_ids_by_tags('t1') ==> [ + $store->retrieve_by_tags('t1') ==> [ { id => $id1, mail => $msg1 }, { id => $id2, mail => $msg2 }, ] diff --git a/lib/Sietima/Message.pm b/lib/Sietima/Message.pm index bc2202d..7073115 100644 --- a/lib/Sietima/Message.pm +++ b/lib/Sietima/Message.pm @@ -10,7 +10,7 @@ use Sietima::Subscriber; use Email::MIME; use namespace::clean; -our $VERSION = '1.1.0'; # VERSION +our $VERSION = '1.1.1'; # VERSION # ABSTRACT: an email message with an envelope @@ -64,7 +64,7 @@ Sietima::Message - an email message with an envelope =head1 VERSION -version 1.1.0 +version 1.1.1 =head1 SYNOPSIS diff --git a/lib/Sietima/Policy.pm b/lib/Sietima/Policy.pm index 6514b21..68e85a5 100644 --- a/lib/Sietima/Policy.pm +++ b/lib/Sietima/Policy.pm @@ -4,7 +4,7 @@ use strict; use warnings; use feature ':5.36'; -our $VERSION = '1.1.0'; # VERSION +our $VERSION = '1.1.1'; # VERSION # ABSTRACT: pragma for Sietima modules @@ -31,15 +31,14 @@ Sietima::Policy - pragma for Sietima modules =head1 VERSION -version 1.1.0 +version 1.1.1 =head1 SYNOPSIS - use 5.024; + use v5.36; use strict; use warnings; - use feature ':5.24'; - use experimental 'signatures'; + use feature ':5.36'; or just: diff --git a/lib/Sietima/Role/AvoidDups.pm b/lib/Sietima/Role/AvoidDups.pm index 4077296..7f7a5c6 100644 --- a/lib/Sietima/Role/AvoidDups.pm +++ b/lib/Sietima/Role/AvoidDups.pm @@ -4,7 +4,7 @@ use Sietima::Policy; use Email::Address; use namespace::clean; -our $VERSION = '1.1.0'; # VERSION +our $VERSION = '1.1.1'; # VERSION # ABSTRACT: prevent people from receiving the same message multiple times @@ -39,7 +39,7 @@ Sietima::Role::AvoidDups - prevent people from receiving the same message multip =head1 VERSION -version 1.1.0 +version 1.1.1 =head1 SYNOPSIS diff --git a/lib/Sietima/Role/Debounce.pm b/lib/Sietima/Role/Debounce.pm index 7702bb0..9e143b4 100644 --- a/lib/Sietima/Role/Debounce.pm +++ b/lib/Sietima/Role/Debounce.pm @@ -3,7 +3,7 @@ use Moo::Role; use Sietima::Policy; use namespace::clean; -our $VERSION = '1.1.0'; # VERSION +our $VERSION = '1.1.1'; # VERSION # ABSTRACT: avoid mail loops @@ -36,7 +36,7 @@ Sietima::Role::Debounce - avoid mail loops =head1 VERSION -version 1.1.0 +version 1.1.1 =head1 SYNOPSIS diff --git a/lib/Sietima/Role/Headers.pm b/lib/Sietima/Role/Headers.pm index f12f2aa..e4422c6 100644 --- a/lib/Sietima/Role/Headers.pm +++ b/lib/Sietima/Role/Headers.pm @@ -6,7 +6,7 @@ use Types::Standard qw(Str); use Sietima::Types qw(HeaderUriFromThings); use namespace::clean; -our $VERSION = '1.1.0'; # VERSION +our $VERSION = '1.1.1'; # VERSION # ABSTRACT: adds standard list-related headers to messages @@ -87,7 +87,7 @@ Sietima::Role::Headers - adds standard list-related headers to messages =head1 VERSION -version 1.1.0 +version 1.1.1 =head1 SYNOPSIS diff --git a/lib/Sietima/Role/ManualSubscription.pm b/lib/Sietima/Role/ManualSubscription.pm index 292e8c8..5c884ec 100644 --- a/lib/Sietima/Role/ManualSubscription.pm +++ b/lib/Sietima/Role/ManualSubscription.pm @@ -4,7 +4,7 @@ use Sietima::Policy; use Sietima::HeaderURI; use namespace::clean; -our $VERSION = '1.1.0'; # VERSION +our $VERSION = '1.1.1'; # VERSION # ABSTRACT: adds standard list-related headers to messages with 'Sietima::Role::WithOwner'; @@ -41,7 +41,7 @@ Sietima::Role::ManualSubscription - adds standard list-related headers to messag =head1 VERSION -version 1.1.0 +version 1.1.1 =head1 SYNOPSIS diff --git a/lib/Sietima/Role/NoMail.pm b/lib/Sietima/Role/NoMail.pm index 5688e31..0f333ea 100644 --- a/lib/Sietima/Role/NoMail.pm +++ b/lib/Sietima/Role/NoMail.pm @@ -3,7 +3,7 @@ use Moo::Role; use Sietima::Policy; use namespace::clean; -our $VERSION = '1.1.0'; # VERSION +our $VERSION = '1.1.1'; # VERSION # ABSTRACT: don't send mail to those who don't want it @@ -28,7 +28,7 @@ Sietima::Role::NoMail - don't send mail to those who don't want it =head1 VERSION -version 1.1.0 +version 1.1.1 =head1 SYNOPSIS diff --git a/lib/Sietima/Role/NoSpoof.pm b/lib/Sietima/Role/NoSpoof.pm index f04955b..88efdc7 100644 --- a/lib/Sietima/Role/NoSpoof.pm +++ b/lib/Sietima/Role/NoSpoof.pm @@ -4,7 +4,7 @@ use Sietima::Policy; use Email::Address; use namespace::clean; -our $VERSION = '1.1.0'; # VERSION +our $VERSION = '1.1.1'; # VERSION # ABSTRACT: never sends out messages from subscribers' addresses @@ -37,7 +37,7 @@ Sietima::Role::NoSpoof - never sends out messages from subscribers' addresses =head1 VERSION -version 1.1.0 +version 1.1.1 =head1 SYNOPSIS diff --git a/lib/Sietima/Role/ReplyTo.pm b/lib/Sietima/Role/ReplyTo.pm index fc2f5f5..416e387 100644 --- a/lib/Sietima/Role/ReplyTo.pm +++ b/lib/Sietima/Role/ReplyTo.pm @@ -5,7 +5,7 @@ use Types::Standard qw(Bool); use List::AllUtils qw(part); use namespace::clean; -our $VERSION = '1.1.0'; # VERSION +our $VERSION = '1.1.1'; # VERSION # ABSTRACT: munge the C<Reply-To> header @@ -76,7 +76,7 @@ Sietima::Role::ReplyTo - munge the C<Reply-To> header =head1 VERSION -version 1.1.0 +version 1.1.1 =head1 SYNOPSIS diff --git a/lib/Sietima/Role/SubjectTag.pm b/lib/Sietima/Role/SubjectTag.pm index 8b13a11..d215f5e 100644 --- a/lib/Sietima/Role/SubjectTag.pm +++ b/lib/Sietima/Role/SubjectTag.pm @@ -4,7 +4,7 @@ use Sietima::Policy; use Types::Standard qw(Str); use namespace::clean; -our $VERSION = '1.1.0'; # VERSION +our $VERSION = '1.1.1'; # VERSION # ABSTRACT: add a tag to messages' subjects @@ -40,7 +40,7 @@ Sietima::Role::SubjectTag - add a tag to messages' subjects =head1 VERSION -version 1.1.0 +version 1.1.1 =head1 SYNOPSIS diff --git a/lib/Sietima/Role/SubscriberOnly.pm b/lib/Sietima/Role/SubscriberOnly.pm index 0c08fd2..2ecb160 100644 --- a/lib/Sietima/Role/SubscriberOnly.pm +++ b/lib/Sietima/Role/SubscriberOnly.pm @@ -7,7 +7,7 @@ use Types::Standard qw(Object CodeRef); use Type::Params -sigs; use namespace::clean; -our $VERSION = '1.1.0'; # VERSION +our $VERSION = '1.1.1'; # VERSION # ABSTRACT: base role for "closed" lists @@ -51,7 +51,7 @@ Sietima::Role::SubscriberOnly - base role for "closed" lists =head1 VERSION -version 1.1.0 +version 1.1.1 =head1 SYNOPSIS @@ -81,9 +81,10 @@ C<Sietima::Role::SubscriberOnly::Moderate> >> for useable roles. This method will be invoked from L<< C<munge_mail>|Sietima/munge_mail >> whenever an email is processed that does not come from one of the list's subscribers. This method should return a (possibly empty) list -of L<< C<Sietima::Message> >> objects, just like C<munge_mail>. It can -also have side-effects, like forwarding the email to the owner of the -list. +of L<< C<Sietima::Message> >> objects, just like C<munge_mail>, for +example to forward the email to the owner of the list. It can also +have side-effects, like storing a copy of the message to approve +later. =head1 METHODS diff --git a/lib/Sietima/Role/SubscriberOnly/Drop.pm b/lib/Sietima/Role/SubscriberOnly/Drop.pm index aa771af..0eb63b0 100644 --- a/lib/Sietima/Role/SubscriberOnly/Drop.pm +++ b/lib/Sietima/Role/SubscriberOnly/Drop.pm @@ -3,7 +3,7 @@ use Moo::Role; use Sietima::Policy; use namespace::clean; -our $VERSION = '1.1.0'; # VERSION +our $VERSION = '1.1.1'; # VERSION # ABSTRACT: drop messages from non-subscribers @@ -26,7 +26,7 @@ Sietima::Role::SubscriberOnly::Drop - drop messages from non-subscribers =head1 VERSION -version 1.1.0 +version 1.1.1 =head1 SYNOPSIS diff --git a/lib/Sietima/Role/SubscriberOnly/Moderate.pm b/lib/Sietima/Role/SubscriberOnly/Moderate.pm index ba58c5b..1450597 100644 --- a/lib/Sietima/Role/SubscriberOnly/Moderate.pm +++ b/lib/Sietima/Role/SubscriberOnly/Moderate.pm @@ -4,7 +4,7 @@ use Sietima::Policy; use Email::Stuffer; use namespace::clean; -our $VERSION = '1.1.0'; # VERSION +our $VERSION = '1.1.1'; # VERSION # ABSTRACT: moderate messages from non-subscribers @@ -27,11 +27,12 @@ sub munge_mail_from_non_subscriber ($self,$mail) { # problems with encodings other than this encoding => '7bit', ); - $self->transport->send($notice->email,{ + + return Sietima::Message->new({ + mail => $notice->email, from => $self->return_path, to => [ $self->owner ], }); - return; } @@ -138,7 +139,7 @@ Sietima::Role::SubscriberOnly::Moderate - moderate messages from non-subscribers =head1 VERSION -version 1.1.0 +version 1.1.1 =head1 SYNOPSIS @@ -176,8 +177,9 @@ owner|Sietima::Role::WithOwner/owner>. $sietima->resume($mail_id); -Given an identifier returned when L<storing|Sietima::MailStore/store> -an email, this method retrieves the email and re-processes it via L<< +Given the identifier returned when +L<storing|Sietima::MailStore/store>-ing an email, this method +retrieves the email and re-processes it via L<< C<ignoring_subscriberonly>|Sietima::Role::SubscriberOnly/ignoring_subscriberonly >>. This will make sure that the email is not caught again by the subscriber-only filter. @@ -186,8 +188,9 @@ subscriber-only filter. $sietima->drop($mail_id); -Given an identifier returned when L<storing|Sietima::MailStore/store> -an email, this method deletes the email from the store. +Given the identifier returned when +L<storing|Sietima::MailStore/store>-ing an email, this method deletes +the email from the store. =head2 C<list_mails_in_moderation_queue> diff --git a/lib/Sietima/Role/WithMailStore.pm b/lib/Sietima/Role/WithMailStore.pm index ea25486..7fc1e37 100644 --- a/lib/Sietima/Role/WithMailStore.pm +++ b/lib/Sietima/Role/WithMailStore.pm @@ -4,7 +4,7 @@ use Sietima::Policy; use Sietima::Types qw(MailStore MailStoreFromHashRef); use namespace::clean; -our $VERSION = '1.1.0'; # VERSION +our $VERSION = '1.1.1'; # VERSION # ABSTRACT: role for lists with a store for messages @@ -29,7 +29,7 @@ Sietima::Role::WithMailStore - role for lists with a store for messages =head1 VERSION -version 1.1.0 +version 1.1.1 =head1 SYNOPSIS diff --git a/lib/Sietima/Role/WithOwner.pm b/lib/Sietima/Role/WithOwner.pm index 35dc4c4..6800ab0 100644 --- a/lib/Sietima/Role/WithOwner.pm +++ b/lib/Sietima/Role/WithOwner.pm @@ -4,7 +4,7 @@ use Sietima::Policy; use Sietima::Types qw(Address AddressFromStr); use namespace::clean; -our $VERSION = '1.1.0'; # VERSION +our $VERSION = '1.1.1'; # VERSION # ABSTRACT: role for lists with an owner @@ -37,7 +37,7 @@ Sietima::Role::WithOwner - role for lists with an owner =head1 VERSION -version 1.1.0 +version 1.1.1 =head1 SYNOPSIS diff --git a/lib/Sietima/Role/WithPostAddress.pm b/lib/Sietima/Role/WithPostAddress.pm index 4fe9e7d..f8ad443 100644 --- a/lib/Sietima/Role/WithPostAddress.pm +++ b/lib/Sietima/Role/WithPostAddress.pm @@ -4,7 +4,7 @@ use Sietima::Policy; use Sietima::Types qw(Address AddressFromStr); use namespace::clean; -our $VERSION = '1.1.0'; # VERSION +our $VERSION = '1.1.1'; # VERSION # ABSTRACT: role for lists with a posting address @@ -36,7 +36,7 @@ Sietima::Role::WithPostAddress - role for lists with a posting address =head1 VERSION -version 1.1.0 +version 1.1.1 =head1 SYNOPSIS diff --git a/lib/Sietima/Runner.pm b/lib/Sietima/Runner.pm index 25be790..b4100d8 100644 --- a/lib/Sietima/Runner.pm +++ b/lib/Sietima/Runner.pm @@ -3,7 +3,7 @@ use Moo; use Sietima::Policy; use namespace::clean; -our $VERSION = '1.1.0'; # VERSION +our $VERSION = '1.1.1'; # VERSION # ABSTRACT: C<App::Spec::Run> for Sietima @@ -32,7 +32,7 @@ Sietima::Runner - C<App::Spec::Run> for Sietima =head1 VERSION -version 1.1.0 +version 1.1.1 =head1 DESCRIPTION diff --git a/lib/Sietima/Subscriber.pm b/lib/Sietima/Subscriber.pm index c483892..a1c047a 100644 --- a/lib/Sietima/Subscriber.pm +++ b/lib/Sietima/Subscriber.pm @@ -8,7 +8,7 @@ use Email::Address; use List::AllUtils qw(any); use namespace::clean; -our $VERSION = '1.1.0'; # VERSION +our $VERSION = '1.1.1'; # VERSION # ABSTRACT: a subscriber to a mailing list @@ -65,7 +65,7 @@ Sietima::Subscriber - a subscriber to a mailing list =head1 VERSION -version 1.1.0 +version 1.1.1 =head1 DESCRIPTION diff --git a/lib/Sietima/Types.pm b/lib/Sietima/Types.pm index 30e69d1..2d9c6b4 100644 --- a/lib/Sietima/Types.pm +++ b/lib/Sietima/Types.pm @@ -13,7 +13,7 @@ use Type::Library Subscriber SubscriberFromAddress SubscriberFromStr SubscriberFromHashRef Transport MailStore MailStoreFromHashRef); -our $VERSION = '1.1.0'; # VERSION +our $VERSION = '1.1.1'; # VERSION # ABSTRACT: type library for Sietima @@ -85,7 +85,7 @@ Sietima::Types - type library for Sietima =head1 VERSION -version 1.1.0 +version 1.1.1 =head1 DESCRIPTION |