diff options
Diffstat (limited to 'mail/sendmail/files/patch-srvrsmtp.c')
-rw-r--r-- | mail/sendmail/files/patch-srvrsmtp.c | 37 |
1 files changed, 13 insertions, 24 deletions
diff --git a/mail/sendmail/files/patch-srvrsmtp.c b/mail/sendmail/files/patch-srvrsmtp.c index 89dcdbd56d14..93308578ed07 100644 --- a/mail/sendmail/files/patch-srvrsmtp.c +++ b/mail/sendmail/files/patch-srvrsmtp.c @@ -1,44 +1,33 @@ ---- sendmail/srvrsmtp.c.orig 2015-03-18 07:47:12.000000000 -0400 -+++ sendmail/srvrsmtp.c 2016-06-12 18:36:01.372172000 -0400 -@@ -832,6 +832,9 @@ - int n_badrcpts_adj; - #endif /* _FFR_BADRCPT_SHUTDOWN */ - -+#ifdef USE_BLACKLIST -+ int fd; -+#endif - SevenBitInput_Saved = SevenBitInput; - smtp.sm_nrcpts = 0; - #if MILTER -@@ -1328,6 +1331,9 @@ +--- sendmail/srvrsmtp.c.orig 2015-03-18 11:47:12 UTC ++++ sendmail/srvrsmtp.c +@@ -1328,6 +1328,7 @@ smtp(nullserver, d_flags, e) (int) tp.tv_sec + (tp.tv_usec >= 500000 ? 1 : 0) ); -+#ifdef USE_BLACKLIST -+ blacklist_notify(1, fd, "pre-greeting traffic"); -+#endif ++ BLACKLIST_NOTIFY(BLACKLIST_AUTH_FAIL, fd, "pre-greeting traffic"); } } } -@@ -1723,6 +1729,10 @@ +@@ -1721,8 +1722,11 @@ smtp(nullserver, d_flags, e) + } + else { ++ int fd; /* not SASL_OK or SASL_CONT */ message("535 5.7.0 authentication failed"); -+#ifdef USE_BLACKLIST + fd = sm_io_getinfo(InChannel, SM_IO_WHAT_FD, NULL); -+ blacklist_notify(1, fd, "AUTH FAIL"); -+#endif ++ BLACKLIST_NOTIFY(BLACKLIST_AUTH_FAIL, fd, "AUTH FAIL"); if (LogLevel > 9) sm_syslog(LOG_WARNING, e->e_id, "AUTH failure (%s): %s (%d) %s, relay=%.100s", -@@ -3524,6 +3534,10 @@ +@@ -3523,7 +3527,10 @@ doquit: + #if MAXBADCOMMANDS > 0 if (++n_badcmds > MAXBADCOMMANDS) { ++ int fd; stopattack: -+#ifdef USE_BLACKLIST + fd = sm_io_getinfo(InChannel, SM_IO_WHAT_FD, NULL); -+ blacklist_notify(1, fd, "too many bad commands"); -+#endif ++ BLACKLIST_NOTIFY(BLACKLIST_ABUSIVE_BEHAVIOR, fd, "too many bad commands"); message("421 4.7.0 %s Too many bad commands; closing connection", MyHostName); |