Changeset View
Changeset View
Standalone View
Standalone View
contrib/sendmail/src/srvrsmtp.c
Context not available. | |||||
# include <openssl/err.h> | # include <openssl/err.h> | ||||
# include <sysexits.h> | # include <sysexits.h> | ||||
#ifdef USE_BLACKLIST | |||||
#include "blacklist_client.h" | |||||
#endif | |||||
static SSL_CTX *srv_ctx = NULL; /* TLS server context */ | static SSL_CTX *srv_ctx = NULL; /* TLS server context */ | ||||
static SSL *srv_ssl = NULL; /* per connection context */ | static SSL *srv_ssl = NULL; /* per connection context */ | ||||
Context not available. | |||||
#if _FFR_BADRCPT_SHUTDOWN | #if _FFR_BADRCPT_SHUTDOWN | ||||
int n_badrcpts_adj; | int n_badrcpts_adj; | ||||
#endif /* _FFR_BADRCPT_SHUTDOWN */ | #endif /* _FFR_BADRCPT_SHUTDOWN */ | ||||
#ifdef USE_BLACKLIST | |||||
int fd; | |||||
#endif | |||||
SevenBitInput_Saved = SevenBitInput; | SevenBitInput_Saved = SevenBitInput; | ||||
smtp.sm_nrcpts = 0; | smtp.sm_nrcpts = 0; | ||||
#if MILTER | #if MILTER | ||||
Context not available. | |||||
(int) tp.tv_sec + | (int) tp.tv_sec + | ||||
(tp.tv_usec >= 500000 ? 1 : 0) | (tp.tv_usec >= 500000 ? 1 : 0) | ||||
); | ); | ||||
#ifdef USE_BLACKLIST | |||||
blacklist_notify(1, fd, "pre-greeting traffic"); | |||||
#endif | |||||
} | } | ||||
} | } | ||||
} | } | ||||
Context not available. | |||||
{ | { | ||||
/* not SASL_OK or SASL_CONT */ | /* not SASL_OK or SASL_CONT */ | ||||
message("535 5.7.0 authentication failed"); | message("535 5.7.0 authentication failed"); | ||||
#ifdef USE_BLACKLIST | |||||
int fd = sm_io_getinfo(InChannel, SM_IO_WHAT_FD, NULL); | |||||
blacklist_notify(1, fd, "AUTH FAIL"); | |||||
#endif | |||||
if (LogLevel > 9) | if (LogLevel > 9) | ||||
sm_syslog(LOG_WARNING, e->e_id, | sm_syslog(LOG_WARNING, e->e_id, | ||||
"AUTH failure (%s): %s (%d) %s, relay=%.100s", | "AUTH failure (%s): %s (%d) %s, relay=%.100s", | ||||
Context not available. | |||||
if (++n_badcmds > MAXBADCOMMANDS) | if (++n_badcmds > MAXBADCOMMANDS) | ||||
{ | { | ||||
stopattack: | stopattack: | ||||
#ifdef USE_BLACKLIST | |||||
fd = sm_io_getinfo(InChannel, SM_IO_WHAT_FD, NULL); | |||||
blacklist_notify(1, fd, "too many bad commands"); | |||||
#endif | |||||
message("421 4.7.0 %s Too many bad commands; closing connection", | message("421 4.7.0 %s Too many bad commands; closing connection", | ||||
MyHostName); | MyHostName); | ||||
Context not available. |