diff --git a/src/output-json-email-common.c b/src/output-json-email-common.c index ecbd273a2f..84294c45b0 100644 --- a/src/output-json-email-common.c +++ b/src/output-json-email-common.c @@ -68,6 +68,7 @@ struct { { "reply_to", "reply-to", LOG_EMAIL_DEFAULT }, { "bcc", "bcc", LOG_EMAIL_COMMA }, { "message_id", "message-id", LOG_EMAIL_EXTENDED }, + { "subject", "subject", LOG_EMAIL_EXTENDED }, { "x_mailer", "x-mailer", LOG_EMAIL_EXTENDED }, { "user_agent", "user-agent", LOG_EMAIL_EXTENDED }, { "received", "received", LOG_EMAIL_ARRAY }, @@ -264,17 +265,6 @@ json_t *JsonEmailLogJsonData(const Flow *f, void *state, void *vtx, uint64_t tx_ } } - /* Subject: */ - field = MimeDecFindField(entity, "subject"); - if (field != NULL) { - char *s = BytesToString((uint8_t *)field->value, (size_t) field->value_len); - if (likely(s != NULL)) { - //printf("Subject: \"%s\"\n", s); - json_object_set_new(sjs, "subject", json_string(s)); - SCFree(s); - } - } - entity->header_flags |= HDR_IS_LOGGED; if (mime_state->stack == NULL || mime_state->stack->top == NULL || mime_state->stack->top->data == NULL)