iredmail-docker icon indicating copy to clipboard operation
iredmail-docker copied to clipboard

ConnectionResetError: [Errno 104] Connection reset by peer

Open RedheatWei opened this issue 5 years ago • 0 comments

Hi, I got an error, and I don't know why. I use django and errors: File "/home/docker/code/app/account/V1_views.py", line 67, in post send_mail("feb.ai\u6ce8\u518c\u90ae\u4ef6", confirm_path, "[email protected]", [username], fail_silently=False) File "/usr/local/lib/python3.6/dist-packages/django/core/mail/__init__.py", line 60, in send_mail return mail.send() File "/usr/local/lib/python3.6/dist-packages/django/core/mail/message.py", line 291, in send return self.get_connection(fail_silently).send_messages([self]) File "/usr/local/lib/python3.6/dist-packages/django/core/mail/backends/smtp.py", line 103, in send_messages new_conn_created = self.open() File "/usr/local/lib/python3.6/dist-packages/django/core/mail/backends/smtp.py", line 68, in open self.connection.starttls(keyfile=self.ssl_keyfile, certfile=self.ssl_certfile) File "/usr/lib/python3.6/smtplib.py", line 771, in starttls server_hostname=self._host) File "/usr/lib/python3.6/ssl.py", line 407, in wrap_socket _context=self, _session=session) File "/usr/lib/python3.6/ssl.py", line 817, in __init__ self.do_handshake() File "/usr/lib/python3.6/ssl.py", line 1077, in do_handshake self._sslobj.do_handshake() File "/usr/lib/python3.6/ssl.py", line 689, in do_handshake self._sslobj.do_handshake() ConnectionResetError: [Errno 104] Connection reset by peer

this is django settings: `EMAIL_BACKEND = 'django.core.mail.backends.smtp.EmailBackend' EMAIL_USE_TLS = True EMAIL_HOST = 'xxxxxxx' EMAIL_PORT = 587 EMAIL_HOST_USER = 'xxxxxx' EMAIL_HOST_PASSWORD = 'xxxxxxxx'

from django.core.mail import send_mail send_mail("xxxxx", "xxxxx", "xxxxxx", ["xxxxxx"], fail_silently=False)`

and here is /var/log/maillog

Feb 6 18:37:33 mail postfix/submission/smtpd[1794]: connect from unknown[xxx.xxx.xxx.xxx] Feb 6 18:37:34 mail postfix/submission/smtpd[1794]: SSL_accept error from unknown[xxx.xxx.xxx.xxx]: Connection reset by peer Feb 6 18:37:34 mail postfix/submission/smtpd[1794]: lost connection after STARTTLS from unknown[xxx.xxx.xxx.xxx] Feb 6 18:37:34 mail postfix/submission/smtpd[1794]: disconnect from unknown[xxx.xxx.xxx.xxx] docker image is lejmr/iredmail:mysql-latest

RedheatWei avatar Feb 06 '20 10:02 RedheatWei