]> source.dussan.org Git - rspamd.git/commitdiff
[Minor] Add size to the metadata exporter
authorVsevolod Stakhov <vsevolod@rspamd.com>
Thu, 3 Nov 2022 22:08:42 +0000 (22:08 +0000)
committerVsevolod Stakhov <vsevolod@rspamd.com>
Thu, 3 Nov 2022 22:08:42 +0000 (22:08 +0000)
Issue: #4321

src/plugins/lua/metadata_exporter.lua

index cd225e841a5c2aaa8f0a69131af457a8ba0fccee..dceb81cd4760fea5867a4231aa2434b83a654a52 100644 (file)
@@ -164,6 +164,8 @@ local function get_general_metadata(task, flatten, no_content)
   end
 
   r.scan_time = scan_real
+  local content = task:get_content()
+  r.size = content and content:len() or 0
 
   if not no_content then
     r.header_from = process_header('from')