14 static int initialized = 0;
18 if (initialized == 0) {
20 setenv(
"SC_LOG_OP_IFACE",
"file", 0);
21 setenv(
"SC_LOG_FILE",
"/dev/null", 0);
31 MimeStateSMTP *state = SCMimeSmtpStateInit(files, &sbcfg);
32 const uint8_t * buffer = data;
34 uint8_t *
next = memchr(buffer,
'\n', size);
36 if (SCMimeSmtpGetState(state) >= MimeSmtpBody)
37 (void)SCSmtpMimeParseLine(buffer, size, 0, &events, state);
40 (void)SCSmtpMimeParseLine(buffer,
next - buffer, 1, &events, state);
41 if (buffer + size <
next + 1) {
44 size -=
next - buffer + 1;
49 (void)SCSmtpMimeComplete(state);
51 SCMimeSmtpStateFree(state);