]> git.ipfire.org Git - thirdparty/rspamd.git/commitdiff
[Fix] Set task's subject from mime subject
authorVsevolod Stakhov <vsevolod@highsecure.ru>
Tue, 20 Dec 2016 17:11:15 +0000 (17:11 +0000)
committerVsevolod Stakhov <vsevolod@highsecure.ru>
Tue, 20 Dec 2016 17:14:17 +0000 (17:14 +0000)
src/libmime/message.c

index 3ba4d34c4489e2ae424faf28e9840aeb331bb969..a9dbdb245a38b60b756e3baa48bef32f86faef45 100644 (file)
@@ -698,6 +698,12 @@ rspamd_message_parse (struct rspamd_task *task)
                task->message_id = "undef";
        }
 
+       if (!task->subject) {
+               hdrs = rspamd_message_get_header_array (task, "Subject", FALSE);
+               rh = g_ptr_array_index (hdrs, 0);
+               task->subject = rh->decoded;
+       }
+
        debug_task ("found %ud parts in message", task->parts->len);
        if (task->queue_id == NULL) {
                task->queue_id = "undef";