diff options
author | Vsevolod Stakhov <vsevolod@highsecure.ru> | 2016-08-02 16:28:49 +0100 |
---|---|---|
committer | Vsevolod Stakhov <vsevolod@highsecure.ru> | 2016-08-02 16:28:49 +0100 |
commit | 62171ed81d3b3d7a6d97d8f1d5564f850d35bb2a (patch) | |
tree | ae7f0c3c5effb37c1aea3baeb653a9a6d6bd9a6b /src/client/rspamc.c | |
parent | d24212c0110df08fd3c85e4e63ce9684306657f6 (diff) | |
download | rspamd-62171ed81d3b3d7a6d97d8f1d5564f850d35bb2a.tar.gz rspamd-62171ed81d3b3d7a6d97d8f1d5564f850d35bb2a.zip |
[Feature] Rspamc can now add dkim signature in mime mode
Diffstat (limited to 'src/client/rspamc.c')
-rw-r--r-- | src/client/rspamc.c | 10 |
1 files changed, 10 insertions, 0 deletions
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) { |