From: Vsevolod Stakhov Date: Wed, 28 Jun 2017 09:07:14 +0000 (+0100) Subject: [Fix] Fix DKIM base64 folding for milter flagged messages X-Git-Tag: 1.6.2~62 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=63791d2b7831783a10d945aee2eeb6e4f08f0f98;p=rspamd.git [Fix] Fix DKIM base64 folding for milter flagged messages --- diff --git a/src/libserver/dkim.c b/src/libserver/dkim.c index 311b293f1..06adab305 100644 --- a/src/libserver/dkim.c +++ b/src/libserver/dkim.c @@ -2691,8 +2691,15 @@ rspamd_dkim_sign (struct rspamd_task *task, const gchar *selector, return NULL; } - b64_data = rspamd_encode_base64_fold (rsa_buf, rsa_len, 70, NULL, - task->nlines_type); + if (task->flags & RSPAMD_TASK_FLAG_MILTER) { + b64_data = rspamd_encode_base64_fold (rsa_buf, rsa_len, 70, NULL, + RSPAMD_TASK_NEWLINES_LF); + } + else { + b64_data = rspamd_encode_base64_fold (rsa_buf, rsa_len, 70, NULL, + task->nlines_type); + } + rspamd_printf_gstring (hdr, "%s", b64_data); g_free (b64_data);