]> source.dussan.org Git - rspamd.git/commitdiff
[Minor] Save extra fields in history
authorVsevolod Stakhov <vsevolod@highsecure.ru>
Wed, 15 Mar 2017 15:35:50 +0000 (15:35 +0000)
committerVsevolod Stakhov <vsevolod@highsecure.ru>
Wed, 15 Mar 2017 15:35:50 +0000 (15:35 +0000)
src/plugins/lua/history_redis.lua

index c656215d08c5efe3c66686130a5e881120559e3d..eaa087490ef47462d9c5882f912b3444a71364ef 100644 (file)
@@ -67,6 +67,9 @@ local function normalise_results(tbl, task)
   tbl.unix_time = seconds
 
   tbl.subject = task:get_header('subject') or 'unknown'
+  tbl.size = task:get_size()
+  tbl.ip = tostring(task:get_from_ip() or 'unknown')
+  tbl.user = task:get_user() or 'unknown'
 end
 
 local function history_save(task)