]> source.dussan.org Git - rspamd.git/commitdiff
[Fix] metadata_exporter default formatter 3288/head
authorCarsten Rosenberg <c.rosenberg@heinlein-support.de>
Wed, 4 Mar 2020 20:04:10 +0000 (21:04 +0100)
committerCarsten Rosenberg <c.rosenberg@heinlein-support.de>
Wed, 4 Mar 2020 20:04:10 +0000 (21:04 +0100)
src/plugins/lua/metadata_exporter.lua

index 172b558113d4837b28831fe161bfee2d63486c95..27b0b10f64e5aa206827ddcbf8b493282e0fefaa 100644 (file)
@@ -144,7 +144,7 @@ end
 
 local formatters = {
   default = function(task)
-    return task:get_content()
+    return task:get_content(), {}
   end,
   email_alert = function(task, rule, extra)
     local meta = get_general_metadata(task, true)
@@ -306,7 +306,7 @@ local pushers = {
       host = rule.smtp,
       port = rule.smtp_port or settings.smtp_port or 25,
       from = rule.mail_from or settings.mail_from,
-      recipients = extra.mail_targets,
+      recipients = extra.mail_targets or rule.mail_to or settings.mail_to,
       helo = rule.helo or settings.helo,
       timeout = rule.timeout or settings.timeout,
     }, formatted, sendmail_cb)