aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorVsevolod Stakhov <vsevolod@highsecure.ru>2016-12-20 17:11:15 +0000
committerVsevolod Stakhov <vsevolod@highsecure.ru>2016-12-20 17:14:17 +0000
commit4a13cf8c0ac843fb8868c29e40b58ba5fb99409e (patch)
treee28560e190632cd54fce4cfdbf7ad081baf131f0
parentbb03b3c8f9486f9549cd4adc3805afde4903265a (diff)
downloadrspamd-4a13cf8c0ac843fb8868c29e40b58ba5fb99409e.tar.gz
rspamd-4a13cf8c0ac843fb8868c29e40b58ba5fb99409e.zip
[Fix] Set task's subject from mime subject
-rw-r--r--src/libmime/message.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/libmime/message.c b/src/libmime/message.c
index 3ba4d34c4..a9dbdb245 100644
--- a/src/libmime/message.c
+++ b/src/libmime/message.c
@@ -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";