Commit dbfe8241 authored by sikeda's avatar sikeda
Browse files

[-feature] DSN will be returned if message bound for sympa robot does never contain commands.


git-svn-id: https://subversion.renater.fr/sympa/branches/sympa-6.2-branch@12663 05aa8bb8-cd2b-0410-b1d7-8918dfa770ce
parent c1d24c2e
......@@ -185,28 +185,6 @@ Warning: this message may already have been sent by one of the list's editor.[%E
[%- FOREACH i_err = intern_errors -%]
> [% i_err.cmd %]
[% END -%]
[% END -%]
[%############################-%]
[%########## GLOBALS #########-%]
[%############################-%]
[% IF nb_global %]
[%- FOREACH glob = globals -%]
==========================================
[% IF glob.entry == 'error_content_type' -%]
[%|loc%]Ignoring message body not in text/plain, please use text/plain only (or put your command in the subject).[%END-%]
[% ELSIF glob.entry == 'no_cmd_found' -%]
[%|loc%]No command found in message.[%END%]
[% ELSIF glob.entry == 'intern_error' -%]
[%|loc%]Ignoring message because of an internal server error.[%END%]
[% ELSIF glob.entry == 'no_existing_list' -%]
[%|loc(glob.listname)%]List '%1' does not exist.[%END%]
[% END -%]
[% END -%]
[% END -%]
......
......@@ -16,6 +16,8 @@ Subject: [% FILTER qencode %][%|loc%]Message distribution: Internal server error
Subject: [% FILTER qencode %][%|loc%]Message distribution: User error[%END%][%END%]
[% ELSIF status == '5.6.0' -%]
Subject: [% FILTER qencode %][%|loc%]Message distribution: User error[%END%][%END%]
[% ELSIF status == '5.6.1' -%]
Subject: [% FILTER qencode %][%|loc%]Results of your commands[%END%][%END%]
[% ELSIF status == '5.6.5' -%]
Subject: [% FILTER qencode %][%|loc%]Cannot personalize message[%END%][%END%]
[% ELSIF status == '5.7.0' -%]
......@@ -77,6 +79,9 @@ so that they can take care of your message.
Thank you for your attention.[%END%]
[% ELSIF status == '5.6.1' -%]
[%|loc%]No command found in message.[%END%]
[% ELSIF status == '5.6.5' -%]
[%|loc%]Your message cannot be personalized. Please check template syntax.[%END%]
......
......@@ -620,6 +620,8 @@ my %diag_messages = (
'5.4.6' => 'Routing loop detected',
# message contains commands
'5.6.0' => 'Other or undefined media error',
# no command found in message
'5.6.1' => 'Media not supported',
# failed to personalize (merge_feature)
'5.6.5' => 'Conversion Failed',
# virus found
......
......@@ -105,18 +105,8 @@ sub _twist {
);
unless ($spindle and $spindle->spin) {
# No command found.
$log->syslog('info', "No command found in message");
Sympa::send_file(
$robot,
'command_report',
$sender,
{ to => $sender,
nb_global => 1,
globals => [{entry => 'no_cmd_found'}],
},
# Ensure 1 second elapsed since last message.
date => time + 1
);
$log->syslog('info', 'No command found in message %s', $message);
Sympa::send_dsn($robot, $message, {}, '5.6.1');
$log->db_log(
'robot' => $robot,
#'list' => 'sympa',
......
Markdown is supported
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