NAME
Sietima::Role::SubscriberOnly::Moderate - moderate messages from non-subscribers
VERSION
version 1.0.4
SYNOPSIS
my $sietima = Sietima->with_traits('SubscribersOnly::Moderate')->new({
%args,
owner => 'listmaster@example.com',
mail_store => {
class => 'Sietima::MailStore::FS',
root => '/tmp',
},
});
DESCRIPTION
A Sietima
list with this role applied will accept incoming emails coming from non-subscribers, and store it for moderation. Each such email will be forwarded (as an attachment) to the list's owner.
The owner will the be able to delete the message, or allow it.
This is a "sub-role" of SubscribersOnly
, WithMailStore
, and WithOwner
.
METHODS
munge_mail_from_non_subscriber
Stores the email with the moderation
tag, and forwards it to the list owner.
resume
$sietima->resume($mail_id);
Given an identifier returned when storing an email, this method retrieves the email and re-processes it via ignoring_subscriberonly
. This will make sure that the email is not caught again by the subscriber-only filter.
drop
$sietima->drop($mail_id);
Given an identifier returned when storing an email, this method deletes the email from the store.
list_mails_in_moderation_queue
$sietima->list_mails_in_moderation_queue($sietima_runner);
This method retrieves all the identifiers of messages tagged moderation
, and prints them out via the Sietima::Runner
object.
This method is usually invoked from the command line, see "command_line_spec
".
show_mail_from_moderation_queue
$sietima->show_mail_from_moderation_queue($sietima_runner);
This method retrieves the email of the message requested from the command line, and prints it out via the Sietima::Runner
object.
This method is usually invoked from the command line, see "command_line_spec
".
MODIFIED METHODS
command_line_spec
This method adds the following sub-commands for the command line:
list-held
-
$ sietima list-held
Invokes the "
list_mails_in_moderation_queue
" method, printing the identifiers of all messages held for moderation. show-held
-
$ sietima show-held 32946p6eu7867
Invokes the "
show_mail_from_moderation_queue
" method, printing one message held for moderation; the identifier is expected as a positional parameter. resume-held
-
$ sietima resume-held 32946p6eu7867
Invokes the "
resume
" method, causing the held message to be processed normally; the identifier is expected as a positional parameter. drop-held
-
$ sietima drop-held 32946p6eu7867
Invokes the "
drop
" method, removing the held message; the identifier is expected as a positional parameter.
AUTHOR
Gianni Ceccarelli <dakkar@thenautilus.net>
COPYRIGHT AND LICENSE
This software is copyright (c) 2017 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.