From: Vsevolod Stakhov Date: Wed, 6 Jul 2016 14:42:47 +0000 (+0100) Subject: [Feature] Send DKIM signature to protocol reply X-Git-Tag: 1.3.0~157 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=acd1247854f9071ad3316ce04651ec83d22720f4;p=thirdparty%2Frspamd.git [Feature] Send DKIM signature to protocol reply --- diff --git a/src/libserver/protocol.c b/src/libserver/protocol.c index 6c09acf97e..d54f20d392 100644 --- a/src/libserver/protocol.c +++ b/src/libserver/protocol.c @@ -975,6 +975,7 @@ rspamd_protocol_write_ucl (struct rspamd_task *task) struct metric_result *metric_res; ucl_object_t *top = NULL, *obj; GHashTableIter hiter; + GString *dkim_sig; gpointer h, v; g_hash_table_iter_init (&hiter, task->results); @@ -1005,6 +1006,13 @@ rspamd_protocol_write_ucl (struct rspamd_task *task) ucl_object_insert_key (top, ucl_object_fromstring (task->message_id), "message-id", 0, false); + dkim_sig = rspamd_mempool_get_variable (task->task_pool, "dkim-signature"); + + if (dkim_sig) { + ucl_object_insert_key (top, ucl_object_fromstring (dkim_sig->str), + "dkim-signature", 0, false); + } + return top; }