From: Jason Ish Date: Wed, 10 Nov 2021 22:38:35 +0000 (-0600) Subject: smtp: log transaction even if no email present X-Git-Tag: suricata-7.0.0-beta1~1184 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=52b9c12f41d890cda340fe3b1c7e7e3e9d673d73;p=thirdparty%2Fsuricata.git 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 --- diff --git a/src/output-json-smtp.c b/src/output-json-smtp.c index 59043518bd..5fe126f418 100644 --- a/src/output-json-smtp.c +++ b/src/output-json-smtp.c @@ -85,9 +85,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->ctx); - } + EveEmailLogJson(jhl, jb, p, f, state, tx, tx_id); + OutputJsonBuilderBuffer(jb, jhl->ctx); jb_free(jb);