Skip to content
Snippets Groups Projects
Commit 3461698f authored by rswindell's avatar rswindell
Browse files

Ignore received SMTP messages when the sender disconnects before the

acknowledgement ("250 OK") can be sent. In this case, the sender is either a
spammer or it is a legitimate delivery attempt that has been aborted for some
reason (e.g. timeout due to throttling).
parent 1050bc96
No related branches found
No related tags found
No related merge requests found
......@@ -2461,6 +2461,11 @@ static void smtp_thread(void* arg)
lprintf(LOG_INFO,"%04d SMTP End of message (body: %lu lines, %lu bytes, header: %lu lines, %lu bytes)"
, socket, lines, ftell(msgtxt)-hdr_len, hdr_lines, hdr_len);
if(!socket_check(socket, NULL, NULL, 0)) {
lprintf(LOG_ERR,"%04d !SMTP sender disconnected (premature evacuation)", socket);
continue;
}
stats.msgs_received++;
/* Twit-listing (sender's name and e-mail addresses) here */
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment