[Rspamd-Users] metadata_exporter.conf with plain text output

patpro at patpro.net patpro at patpro.net
Tue Sep 26 09:27:17 UTC 2023


Hello,

I’m currently using this local.d/metadata_exporter.conf :

# Define custom backend(s)
custom_push {
  mine = <<EOD
return function (task, data, rule)
-- Log payload
local rspamd_logger = require "rspamd_logger"
rspamd_logger.infox(task, 'METATEST %s', data)
end
EOD;
}

rules {
   CUSTOM_EXPORT {
	 selector = "default";
	 formatter = "json";
	 backend = "mine";
   }
}


it pushes JSON-formated info into the main log file rspamd.log.

Is there a way to push the same JSON message in a different text file (probably by using something different from rspamd_logger)? 
I need pure JSON in the destination file (no timestamp/pid/etc. prefix like "2023-09-24 15:18:18 #53980(rspamd_proxy) <0b9aa0>…").

Thanks,
Patrick


More information about the Users mailing list