]> source.dussan.org Git - rspamd.git/commitdiff
[Minor] Add score to default email alert template 1660/head
authorAlexander Moisseev <moiseev@mezonplus.ru>
Fri, 2 Jun 2017 13:37:43 +0000 (16:37 +0300)
committerAlexander Moisseev <moiseev@mezonplus.ru>
Fri, 2 Jun 2017 13:37:43 +0000 (16:37 +0300)
src/plugins/lua/metadata_exporter.lua

index a6bf0fa5566a479b62a77b77aa266a366c115f4c..c4fb5fd03c131b65fcd6e34d9c6482300a06ff3d 100644 (file)
@@ -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 = {}