Python always fails to send mail

the GSIL github sensitive information scanning tool has recently been deployed, and messages cannot be sent after scanning.
GSIL project address: https://github.com/FeeiCN/GSIL
prompts the following error message:

clipboard.png

Traceback (most recent call last):
  File "/usr/lib/python3.6/smtplib.py", line 387, in getreply
    line = self.file.readline(_MAXLINE + 1)
  File "/usr/lib/python3.6/socket.py", line 586, in readinto
    return self._sock.recv_into(b)
ConnectionResetError: [Errno 104] Connection reset by peer

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/root/GSIL/gsil/notification.py", line 67, in notification
    s.ehlo()
  File "/usr/lib/python3.6/smtplib.py", line 441, in ehlo
    (code, msg) = self.getreply()
  File "/usr/lib/python3.6/smtplib.py", line 391, in getreply
    + str(e))
smtplib.SMTPServerDisconnected: Connection unexpectedly closed: [Errno 104] Connection reset by peer

have you guys ever encountered this kind of problem? Google also did not find a relevant solution, please give your advice. Thank you.

Jun.06,2021

try another mail server?


only encountered the problem that the mailbox used cannot be connected, usually because the port and mailbox protocols are misconfigured, or there is a firewall in the network that does not allow access, or what necessary packages are missing in the system environment

Menu