From 62171ed81d3b3d7a6d97d8f1d5564f850d35bb2a Mon Sep 17 00:00:00 2001 From: Vsevolod Stakhov Date: Tue, 2 Aug 2016 16:28:49 +0100 Subject: [Feature] Rspamc can now add dkim signature in mime mode --- src/client/rspamc.c | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'src/client/rspamc.c') diff --git a/src/client/rspamc.c b/src/client/rspamc.c index b8cec9e67..b9fe5ff54 100644 --- a/src/client/rspamc.c +++ b/src/client/rspamc.c @@ -1124,9 +1124,19 @@ rspamc_mime_output (FILE *out, ucl_object_t *result, GString *input, 0); rspamd_printf_gstring (added_headers, "X-Spam-Symbols: %v\r\n", folded_symbuf); + g_string_free (folded_symbuf, TRUE); g_string_free (symbuf, TRUE); + if (ucl_object_lookup (result, "dkim-signature")) { + folded_symbuf = rspamd_header_value_fold ("DKIM-Signature", + ucl_object_tostring (ucl_object_lookup (result, "dkim-signature")), + 0); + rspamd_printf_gstring (added_headers, "DKIM-Signature: %v\r\n", + folded_symbuf); + g_string_free (folded_symbuf, TRUE); + } + if (json || raw || compact) { /* We also append json data as a specific header */ if (json) { -- cgit v1.2.3