Commit 30e86e66 authored by david.verdin's avatar david.verdin
Browse files

[bug][Reported by D. Lalot, univ. Aix Marseille] When a list is at 100 % erro,...

[bug][Reported by D. Lalot, univ. Aix Marseille] When a list is at 100 % erro, nobody receives the message, and nobody was warned that the message had been lost. Fixed by warning the message sender, the list owners and the listmaster when the bounce rate is at 100%.

git-svn-id: https://subversion.renater.fr/sympa/branches/sympa-6.2-branch@12192 05aa8bb8-cd2b-0410-b1d7-8918dfa770ce
parent 3ea770d2
......@@ -270,6 +270,17 @@ Subject: [% FILTER qencode %][%|loc(list.name)%]Listmaster: internal server erro
[%|loc%]See logs for more details.[%END%]
[% ELSIF type == 'hundred_percent_error' -%]
Subject: [% FILTER qencode %][%|loc(listname, listdomain)%]Listmaster: list %1@%2 at 100 percents error [%END%][%END%]
[%|loc(listname, listdomain)%]The list %1@%2 has 100 percents of its users in error. Something unusual must have happened.[%END%]
[%|loc(sender)%]The user %1, who tried to send a mail to this list, has been warned, as well as the list owners.[%END%]
[%|loc%]See logs for more details.[%END%]
[%|loc%]Check the bounces in this list:[% END %] [% conf.wwsympa_url %]/reviewbouncing/[% listname %]
[% ELSIF type == 'automatic_list_creation_failed' -%]
Subject: [% FILTER qencode %][%|loc%]Listmaster: internal server error [%END%][%END%]
......
......@@ -65,6 +65,14 @@ To confirm and get removed from all the lists of this family, please click the l
[% conf.wwsympa_url %]/ticket/[% one_time_ticket %]
[% ELSIF type == 'hundred_percent_error' -%]
Subject: [% FILTER qencode %][%|loc(list.name)%]No valid receipient in list %1[%END%][%END%]
[%|loc(list.name, conf.listmaster_email, list.domain) %]
You message to list %1 could not be delivered. All the subscribers to this list have their address in error.
Please contact the listmaster (%2@%3) to fix this probem before re-posting your message.
[% END %]
[% ELSE -%]
Subject: [% FILTER qencode %][%list.name%] / [%type%][%END%]
......
......@@ -1820,6 +1820,12 @@ sub distribute_msg {
my $rate = $self->get_total_bouncing() * 100 / $total;
if ($rate > $self->{'admin'}{'bounce'}{'warn_rate'}) {
$self->send_notify_to_owner('bounce_rate', {'rate' => $rate});
if ($rate == 100) {
$self->send_notify_to_user('hundred_percent_error',$message->{'sender'});
Sympa::send_notify_to_listmaster($self->{'domain'}, 'hundred_percent_error',
{'listname' => $self->{'name'},'listdomain' => $self->{'domain'}, 'sender' => $message->{'sender'}})
}
}
#save the message before modifying it
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment