|
|
|
|
@ -461,8 +461,9 @@ int SMTPProcessDataChunk(const uint8_t *chunk, uint32_t len,
|
|
|
|
|
flags |= FILE_STORE;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if (FileOpenFile(files, &smtp_config.sbcfg, (uint8_t *) entity->filename, entity->filename_len,
|
|
|
|
|
(uint8_t *) chunk, len, flags) == NULL) {
|
|
|
|
|
if (FileOpenFileWithId(files, &smtp_config.sbcfg, smtp_state->file_track_id++,
|
|
|
|
|
(uint8_t *) entity->filename, entity->filename_len,
|
|
|
|
|
(uint8_t *) chunk, len, flags) != 0) {
|
|
|
|
|
ret = MIME_DEC_ERR_DATA;
|
|
|
|
|
SCLogDebug("FileOpenFile() failed");
|
|
|
|
|
}
|
|
|
|
|
@ -1207,10 +1208,12 @@ static int SMTPProcessRequest(SMTPState *state, Flow *f,
|
|
|
|
|
TAILQ_INSERT_TAIL(&state->tx_list, tx, next);
|
|
|
|
|
tx->tx_id = state->tx_cnt++;
|
|
|
|
|
}
|
|
|
|
|
FileOpenFile(state->files_ts, &smtp_config.sbcfg,
|
|
|
|
|
if (FileOpenFileWithId(state->files_ts, &smtp_config.sbcfg,
|
|
|
|
|
state->file_track_id++,
|
|
|
|
|
(uint8_t*) msgname, strlen(msgname), NULL, 0,
|
|
|
|
|
FILE_NOMD5|FILE_NOMAGIC);
|
|
|
|
|
FlagDetectStateNewFile(state->curr_tx);
|
|
|
|
|
FILE_NOMD5|FILE_NOMAGIC) == 0) {
|
|
|
|
|
FlagDetectStateNewFile(state->curr_tx);
|
|
|
|
|
}
|
|
|
|
|
} else if (smtp_config.decode_mime) {
|
|
|
|
|
if (tx->mime_state) {
|
|
|
|
|
/* We have 2 chained mails and did not detect the end
|
|
|
|
|
|