From: Alexander Moisseev Date: Fri, 2 Jun 2017 13:37:43 +0000 (+0300) Subject: [Minor] Add score to default email alert template X-Git-Tag: 1.6.0~77^2 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=92454ac95ee081425d923c5c87e084ea4281acd0;p=rspamd.git [Minor] Add score to default email alert template --- diff --git a/src/plugins/lua/metadata_exporter.lua b/src/plugins/lua/metadata_exporter.lua index a6bf0fa55..c4fb5fd03 100644 --- a/src/plugins/lua/metadata_exporter.lua +++ b/src/plugins/lua/metadata_exporter.lua @@ -59,6 +59,7 @@ MIME Date: $header_date Subject: $header_subject Message-ID: $message_id Action: $action +Score: $score Symbols: $symbols]], } @@ -68,7 +69,7 @@ local function get_general_metadata(task, flatten, no_content) r.user = task:get_user() or 'unknown' r.qid = task:get_queue_id() or 'unknown' r.action = task:get_metric_action('default') - r.score = task:get_metric_score('default')[1] + r.score = string.format('%.2f', task:get_metric_score('default')[1]) local rcpt = task:get_recipients('smtp') if rcpt then local l = {}