summaryrefslogtreecommitdiffstats
path: root/src/plugins/lua/metadata_exporter.lua
diff options
context:
space:
mode:
authorAlexander Moisseev <moiseev@mezonplus.ru>2017-06-02 16:37:43 +0300
committerAlexander Moisseev <moiseev@mezonplus.ru>2017-06-02 16:37:43 +0300
commit92454ac95ee081425d923c5c87e084ea4281acd0 (patch)
tree59a2f7893549e62e13386d9b94b09f20229dbf89 /src/plugins/lua/metadata_exporter.lua
parent906d53b4325a57699d2dc5c21c88a89d1bdf1520 (diff)
downloadrspamd-92454ac95ee081425d923c5c87e084ea4281acd0.tar.gz
rspamd-92454ac95ee081425d923c5c87e084ea4281acd0.zip
[Minor] Add score to default email alert template
Diffstat (limited to 'src/plugins/lua/metadata_exporter.lua')
-rw-r--r--src/plugins/lua/metadata_exporter.lua3
1 files changed, 2 insertions, 1 deletions
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 = {}