]> source.dussan.org Git - rspamd.git/commitdiff
[Fix] Fix DKIM base64 folding for milter flagged messages
authorVsevolod Stakhov <vsevolod@highsecure.ru>
Wed, 28 Jun 2017 09:07:14 +0000 (10:07 +0100)
committerVsevolod Stakhov <vsevolod@highsecure.ru>
Wed, 28 Jun 2017 09:07:57 +0000 (10:07 +0100)
src/libserver/dkim.c

index 311b293f18fe8cc47bb70750acf391507f71a96a..06adab305bc060fd04a06bdac5a342873357d3cc 100644 (file)
@@ -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);