}
void
-rspamd_ucl_torspamc_output (struct rspamd_task *task,
- ucl_object_t *top,
+rspamd_ucl_torspamc_output (const ucl_object_t *top,
rspamd_fstring_t **out)
{
const ucl_object_t *metric, *score,
}
}
- rspamd_printf_fstring (out, "Message-ID: %s\r\n", task->message_id);
+ elt = ucl_object_lookup (top, "message-id");
+ if (elt != NULL) {
+ rspamd_printf_fstring (out, "Message-ID: %s\r\n",
+ ucl_object_tostring (elt));
+ }
}
static void
-rspamd_ucl_tospamc_output (struct rspamd_task *task,
- ucl_object_t *top,
+rspamd_ucl_tospamc_output (const ucl_object_t *top,
rspamd_fstring_t **out)
{
const ucl_object_t *metric, *score,
}
else {
if (RSPAMD_TASK_IS_SPAMC (task)) {
- rspamd_ucl_tospamc_output (task, top, &msg->body);
+ rspamd_ucl_tospamc_output (top, &msg->body);
}
else {
- rspamd_ucl_torspamc_output (task, top, &msg->body);
+ rspamd_ucl_torspamc_output (top, &msg->body);
}
}