diff --git a/src/bin/upgrade_bulk_spool.pl.in b/src/bin/upgrade_bulk_spool.pl.in index a8b9ceeda..976e1cded 100644 --- a/src/bin/upgrade_bulk_spool.pl.in +++ b/src/bin/upgrade_bulk_spool.pl.in @@ -9,8 +9,8 @@ # Copyright (c) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, # 2006, 2007, 2008, 2009, 2010, 2011 Comite Reseau des Universites # Copyright (c) 2011, 2012, 2013, 2014, 2015, 2016, 2017 GIP RENATER -# Copyright 2017 The Sympa Community. See the AUTHORS.md file at the top-level -# directory of this distribution and at +# Copyright 2017, 2019 The Sympa Community. See the AUTHORS.md file at +# the top-level directory of this distribution and at # . # # This program is free software; you can redistribute it and/or modify @@ -35,7 +35,6 @@ use MIME::Base64 qw(); use Pod::Usage; use POSIX qw(); -use Sympa::Bulk; use Conf; use Sympa::Constants; use Sympa::DatabaseManager; @@ -43,6 +42,7 @@ use Sympa::List; use Sympa::Log; use Sympa::Message; use Sympa::Spool; +use Sympa::Spool::Outgoing; my %options; unless (GetOptions(\%options, 'help|h', 'dry_run', 'version|v')) { @@ -85,7 +85,7 @@ process(); exit 0; sub process { - my $bulk = Sympa::Bulk->new; + my $bulk = Sympa::Spool::Outgoing->new; my $sdm = Sympa::DatabaseManager->instance or die 'Can\'t connect to database'; @@ -305,7 +305,9 @@ robot configuration parameters in C are referred. =head1 SEE ALSO -L, L, L. +L, +L, +L. =head1 HISTORY diff --git a/src/bin/upgrade_send_spool.pl.in b/src/bin/upgrade_send_spool.pl.in index bef52a94d..9bf422b7d 100644 --- a/src/bin/upgrade_send_spool.pl.in +++ b/src/bin/upgrade_send_spool.pl.in @@ -9,8 +9,8 @@ # Copyright (c) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, # 2006, 2007, 2008, 2009, 2010, 2011 Comite Reseau des Universites # Copyright (c) 2011, 2012, 2013, 2014, 2015, 2016, 2017 GIP RENATER -# Copyright 2017 The Sympa Community. See the AUTHORS.md file at the top-level -# directory of this distribution and at +# Copyright 2017, 2019 The Sympa Community. See the AUTHORS.md file at +# the top-level directory of this distribution and at # . # # This program is free software; you can redistribute it and/or modify @@ -34,12 +34,12 @@ use English qw(-no_match_vars); use Getopt::Long; use Pod::Usage; -use Sympa::Bulk; use Sympa::Constants; use Conf; use Sympa::Log; use Sympa::Spool; use Sympa::Spool::Incoming; +use Sympa::Spool::Outgoing; my %options; unless (GetOptions(\%options, 'help|h', 'dry_run', 'version|v')) { @@ -73,7 +73,7 @@ unless (($GID == (getgrnam(Sympa::Constants::GROUP))[2]) # Sets the UMASK umask oct $Conf::Conf{'umask'}; -my $bulk = Sympa::Bulk->new; +my $bulk = Sympa::Spool::Outgoing->new; my $spool = Sympa::Spool::Incoming->new; my $spool_dir = $spool->{directory}; diff --git a/src/cgi/sympa_soap_server.fcgi.in b/src/cgi/sympa_soap_server.fcgi.in index 88b32a718..e40ad06a5 100644 --- a/src/cgi/sympa_soap_server.fcgi.in +++ b/src/cgi/sympa_soap_server.fcgi.in @@ -9,8 +9,8 @@ # Copyright (c) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, # 2006, 2007, 2008, 2009, 2010, 2011 Comite Reseau des Universites # Copyright (c) 2011, 2012, 2013, 2014, 2015, 2016, 2017 GIP RENATER -# Copyright 2017, 2018 The Sympa Community. See the AUTHORS.md file at the -# top-level directory of this distribution and at +# Copyright 2017, 2018, 2019 The Sympa Community. See the AUTHORS.md file at +# the top-level directory of this distribution and at # . # # This program is free software; you can redistribute it and/or modify @@ -34,10 +34,10 @@ use SOAP::Lite; ## Sympa API use Conf; -use Sympa::Alarm; use Sympa::DatabaseManager; use Sympa::List; use Sympa::Log; +use Sympa::Spool::Listmaster; use Sympa::WWW::SOAP; use Sympa::WWW::SOAP::Transport; @@ -71,7 +71,7 @@ unless (Sympa::DatabaseManager->instance) { ## The process should not fork for sending mail ## Messages will be spooled instead -Sympa::Alarm->instance->{use_bulk} = 1; +Sympa::Spool::Listmaster->instance->{use_bulk} = 1; ## Loading all Lists at startup, in order to increase execution speed diff --git a/src/cgi/wwsympa.fcgi.in b/src/cgi/wwsympa.fcgi.in index 04436b5a9..5bd747e57 100644 --- a/src/cgi/wwsympa.fcgi.in +++ b/src/cgi/wwsympa.fcgi.in @@ -54,9 +54,7 @@ use Data::Dumper; # tentative BEGIN { eval 'use Crypt::OpenSSL::X509'; } use Sympa; -use Sympa::Alarm; use Sympa::Archive; -use Sympa::Bulk; use Conf; use Sympa::ConfDef; use Sympa::Constants; @@ -80,7 +78,10 @@ use Sympa::Spool::Archive; use Sympa::Spool::Auth; use Sympa::Spool::Held; use Sympa::Spool::Incoming; +use Sympa::Spool::Listmaster; use Sympa::Spool::Moderation; +use Sympa::Spool::Outgoing; +use Sympa::Spool::Topic; use Sympa::Task; use Sympa::Template; use Sympa::Ticket; @@ -88,7 +89,6 @@ use Sympa::Tools::Data; use Sympa::Tools::File; use Sympa::Tools::Password; use Sympa::Tools::Text; -use Sympa::Topic; use Sympa::Tracking; use Sympa::User; use Sympa::WWW::Auth; @@ -131,7 +131,7 @@ $log->{level} = $Conf::Conf{'log_level'}; $log->openlog($Conf::Conf{'log_facility'} || $Conf::Conf{'syslog'}, $Conf::Conf{'log_socket_type'}); -Sympa::Alarm->instance->{use_bulk} = 1; +Sympa::Spool::Listmaster->instance->{use_bulk} = 1; # hash of all the description files already loaded # format : @@ -1035,7 +1035,7 @@ my $query; my $birthday = [stat $PROGRAM_NAME]->[9]; -my $bulk = Sympa::Bulk->new; +my $bulk = Sympa::Spool::Outgoing->new; $log->syslog('info', 'WWSympa started, process %d', $PID); @@ -1066,7 +1066,7 @@ while ($query = CGI::Fast->new) { $language->set_lang(Sympa::best_language('*')); # Process grouped notifications. - Sympa::Alarm->instance->flush; + Sympa::Spool::Listmaster->instance->flush; ## Check effective ID unless ($EUID eq (getpwnam(Sympa::Constants::USER))[2]) { @@ -1828,7 +1828,7 @@ while ($query = CGI::Fast->new) { } # Purge grouped notifications -Sympa::Alarm->instance->flush(purge => 1); +Sympa::Spool::Listmaster->instance->flush(purge => 1); ############################################################## #-#\#|#/#-#\#|#/#-#\#|#/#-#\#|#/#-#\#|#/#-#\#|#/#-#\#|#/#-#\#|#/ @@ -7897,7 +7897,7 @@ sub do_distribute { # TAG if (@topics) { - Sympa::Topic->new( + Sympa::Spool::Topic->new( topic => join(',', @topics), method => 'editor' )->store($message); @@ -14929,8 +14929,10 @@ sub do_send_mail { if (@to_list and $in{'sub_action'} eq 'sendmailtolist') { # TAG if ($list_topics) { - Sympa::Topic->new(topic => $list_topics, method => 'sender') - ->store($message); + Sympa::Spool::Topic->new( + topic => $list_topics, + method => 'sender' + )->store($message); } my $l_message = $message->dup; @@ -15099,7 +15101,7 @@ sub do_tag_topic_by_sender { } # TAG - Sympa::Topic->new(topic => $list_topics, method => 'sender') + Sympa::Spool::Topic->new(topic => $list_topics, method => 'sender') ->store($message); ## CONFIRM diff --git a/src/lib/Makefile.am b/src/lib/Makefile.am index 6c5a8ad48..d4a070347 100644 --- a/src/lib/Makefile.am +++ b/src/lib/Makefile.am @@ -30,13 +30,11 @@ nobase_dist_modules_DATA = \ Sympa/Internals/Workflow.pod nobase_modules_DATA = \ Sympa.pm \ - Sympa/Alarm.pm \ Sympa/Aliases.pm \ Sympa/Aliases/CheckSMTP.pm \ Sympa/Aliases/External.pm \ Sympa/Aliases/Template.pm \ Sympa/Archive.pm \ - Sympa/Bulk.pm \ Sympa/CommandDef.pm \ Conf.pm \ Sympa/ConfDef.pm \ @@ -147,7 +145,6 @@ nobase_modules_DATA = \ Sympa/Spindle/ProcessTask.pm \ Sympa/Spindle/ProcessTemplate.pm \ Sympa/Spindle/ResendArchive.pm \ - Sympa/Spindle/ToAlarm.pm \ Sympa/Spindle/ToArchive.pm \ Sympa/Spindle/ToAuth.pm \ Sympa/Spindle/ToAuthOwner.pm \ @@ -155,6 +152,7 @@ nobase_modules_DATA = \ Sympa/Spindle/ToEditor.pm \ Sympa/Spindle/ToHeld.pm \ Sympa/Spindle/ToList.pm \ + Sympa/Spindle/ToListmaster.pm \ Sympa/Spindle/ToMailer.pm \ Sympa/Spindle/ToModeration.pm \ Sympa/Spindle/ToOutgoing.pm \ @@ -170,8 +168,11 @@ nobase_modules_DATA = \ Sympa/Spool/Digest/Collection.pm \ Sympa/Spool/Held.pm \ Sympa/Spool/Incoming.pm \ + Sympa/Spool/Listmaster.pm \ Sympa/Spool/Moderation.pm \ + Sympa/Spool/Outgoing.pm \ Sympa/Spool/Task.pm \ + Sympa/Spool/Topic.pm \ Sympa/Task.pm \ Sympa/Template.pm \ Sympa/Ticket.pm \ @@ -183,7 +184,6 @@ nobase_modules_DATA = \ Sympa/Tools/SMIME.pm \ Sympa/Tools/Text.pm \ Sympa/Tools/Time.pm \ - Sympa/Topic.pm \ Sympa/Tracking.pm \ Sympa/Upgrade.pm \ Sympa/User.pm \ diff --git a/src/lib/Sympa.pm b/src/lib/Sympa.pm index 67fd42bdd..ab47ffdbc 100644 --- a/src/lib/Sympa.pm +++ b/src/lib/Sympa.pm @@ -8,8 +8,8 @@ # Copyright (c) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, # 2006, 2007, 2008, 2009, 2010, 2011 Comite Reseau des Universites # Copyright (c) 2011, 2012, 2013, 2014, 2015, 2016, 2017 GIP RENATER -# Copyright 2017, 2018 The Sympa Community. See the AUTHORS.md file at the -# top-level directory of this distribution and at +# Copyright 2017, 2018, 2019 The Sympa Community. See the AUTHORS.md file at +# the top-level directory of this distribution and at # . # # This program is free software; you can redistribute it and/or modify @@ -478,7 +478,7 @@ sub send_notify_to_listmaster { rcpt => $email, data => $ts->{'data'}, - splicing_to => ['Sympa::Spindle::ToAlarm'], + splicing_to => ['Sympa::Spindle::ToListmaster'], ); unless ($spindle and $spindle->spin diff --git a/src/lib/Sympa/Crash.pm b/src/lib/Sympa/Crash.pm index 1c557e3c0..54ed61e68 100644 --- a/src/lib/Sympa/Crash.pm +++ b/src/lib/Sympa/Crash.pm @@ -8,6 +8,9 @@ # Copyright (c) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, # 2006, 2007, 2008, 2009, 2010, 2011 Comite Reseau des Universites # Copyright (c) 2011, 2012, 2013, 2014, 2015, 2016, 2017 GIP RENATER +# Copyright 2019 The Sympa Community. See the AUTHORS.md file at +# the top-level directory of this distribution and at +# . # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by @@ -98,7 +101,7 @@ sub _crash_handler { # Cleanup. # If any of corresponding modules have not been loaded, they are ignored. eval { Sympa::Log->instance->syslog('err', 'DIED: %s', $mess); }; - eval { Sympa::Alarm->instance->flush(purge => 1); }; + eval { Sympa::Spool::Listmaster->instance->flush(purge => 1); }; eval { Sympa::DatabaseManager->disconnect(); }; # unlock database eval { Sys::Syslog::closelog(); }; # flush log eval { Sympa::Log->instance->{level} = -1; }; # disable log diff --git a/src/lib/Sympa/Internals/Workflow.pod b/src/lib/Sympa/Internals/Workflow.pod index 900489b60..5f3de684b 100644 --- a/src/lib/Sympa/Internals/Workflow.pod +++ b/src/lib/Sympa/Internals/Workflow.pod @@ -46,8 +46,8 @@ workflow of Sympa. For more details see documentation on each class. +-> [DoMessage] / \ /---> [ToHeld] => Held *3 (CONFIRM) +-> [AuthorizeMessage] - : / \---> [ToModeration] => Mod. - v / \ + : / : \---> [ToModeration] => Mod. + v / Topic \ Held => [ProcessHeld] ------+ \ +-> [DistributeMessage] *3 (DISTRIBUTE) / \ @@ -61,22 +61,24 @@ workflow of Sympa. For more details see documentation on each class. +-------------------------------------------+ \ [TransformIncoming] - <> \ + \ : + \ Topic + <> \ [ToArchive] => Archive - (list archive) \ + (list archive) \ => [ResendArchive] -- [TransformOutgoing] -+ - \ \ + \ \ [ToDigest] => Digest \ - \ \ - +---------------+-> [ToList] => Outgoing - - +-> [TransformDigestFinal] - / \ - <