From 6e9b21d0e617df40bcc2602f20526c683b0b135c Mon Sep 17 00:00:00 2001 From: Jason Ish Date: Wed, 10 Nov 2021 16:38:35 -0600 Subject: [PATCH] smtp: log transaction even if no email present The SMTP transaction logger was not writing the log if the email portion of the logger failed, such as in the case of STARTTLS where this is no email decoded. Ticket #4817 (cherry picked from commit 52b9c12f41d890cda340fe3b1c7e7e3e9d673d73) --- src/output-json-smtp.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/output-json-smtp.c b/src/output-json-smtp.c index 606394d64f..e331b01023 100644 --- a/src/output-json-smtp.c +++ b/src/output-json-smtp.c @@ -88,9 +88,8 @@ static int JsonSmtpLogger(ThreadVars *tv, void *thread_data, const Packet *p, Fl EveSmtpDataLogger(f, state, tx, tx_id, jb); jb_close(jb); - if (EveEmailLogJson(jhl, jb, p, f, state, tx, tx_id) == TM_ECODE_OK) { - OutputJsonBuilderBuffer(jb, jhl->file_ctx, &jhl->buffer); - } + EveEmailLogJson(jhl, jb, p, f, state, tx, tx_id); + OutputJsonBuilderBuffer(jb, jhl->file_ctx, &jhl->buffer); jb_free(jb); -- 2.47.2