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
pull/6629/head
Jason Ish 4 years ago committed by Victor Julien
parent fcf399b02c
commit 52b9c12f41

@ -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);

Loading…
Cancel
Save