mirror of https://github.com/fail2ban/fail2ban
BF: Incorrect number of arguments in smtp.py action connect log
parent
776b65f73e
commit
98bf511443
|
@ -87,7 +87,7 @@ class SMTPAction(ActionBase):
|
||||||
smtp = smtplib.SMTP()
|
smtp = smtplib.SMTP()
|
||||||
try:
|
try:
|
||||||
self.logSys.debug("Connected to SMTP '%s', response: %i: %s",
|
self.logSys.debug("Connected to SMTP '%s', response: %i: %s",
|
||||||
*smtp.connect(self.host))
|
self.host, *smtp.connect(self.host))
|
||||||
if self.user and self.password:
|
if self.user and self.password:
|
||||||
smtp.login(self.user, self.password)
|
smtp.login(self.user, self.password)
|
||||||
failed_recipients = smtp.sendmail(
|
failed_recipients = smtp.sendmail(
|
||||||
|
@ -113,7 +113,8 @@ class SMTPAction(ActionBase):
|
||||||
self.logSys.debug("Email '%s' successfully sent", subject)
|
self.logSys.debug("Email '%s' successfully sent", subject)
|
||||||
finally:
|
finally:
|
||||||
try:
|
try:
|
||||||
smtp.quit()
|
self.logSys.debug("Disconnected from '%s', response %i: %s",
|
||||||
|
self.host, *smtp.quit())
|
||||||
except smtplib.SMTPServerDisconnected:
|
except smtplib.SMTPServerDisconnected:
|
||||||
pass # Not connected
|
pass # Not connected
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue