On 2/27/25 12:36, Kim Sunggun via Mailman-users wrote:
script:
#!/usr/bin/env python3
import smtplib
host = 'localhost'
port = 25
connection = smtplib.SMTP(host=host, port=port)
connection.ehlo()
connection.quit()
result:
Traceback (most recent call last):
File "/opt/mailman/./testone.py", line 7, in <module>
connection = smtplib.SMTP(host=host, port=port)
File "/usr/lib64/python3.9/smtplib.py", line 255, in __init__
(code, msg) = self.connect(host, port)
File "/usr/lib64/python3.9/smtplib.py", line 341, in connect
self.sock = self._get_socket(host, port, self.timeout)
File "/usr/lib64/python3.9/smtplib.py", line 312, in _get_socket
return socket.create_connection((host, port), timeout,
File "/usr/lib64/python3.9/socket.py", line 856, in create_connection
raise err
File "/usr/lib64/python3.9/socket.py", line 844, in create_connection
sock.connect(sa)
ConnectionRefusedError: [Errno 111] Connection refused
So you are doing the same thing Django allauth is doing with the same
result. Do you even have an MTA listening on localhost, port 25?
You need to figure out what settings you need to be able to connect to
your outgoing MTA and set
EMAIL_HOST
EMAIL_PORT
and maybe some of
EMAIL_HOST_USER
EMAIL_HOST_PASSWORD
EMAIL_USE_TLS
EMAIL_USE_SSL
EMAIL_SSL_CERTFILE
EMAIL_SSL_KEYFILE
appropriately so you can connect to the MTA. If outgoing mail from
Mailman works, look in the [mta] section in mailman.cfg for the
appropriate settings.
--
Mark Sapiro <m...@msapiro.net> The highway is for gamblers,
San Francisco Bay Area, California better use your sense - B. Dylan
_______________________________________________
Mailman-users mailing list -- mailman-users@mailman3.org
To unsubscribe send an email to mailman-users-le...@mailman3.org
https://lists.mailman3.org/mailman3/lists/mailman-users.mailman3.org/
Archived at:
https://lists.mailman3.org/archives/list/mailman-users@mailman3.org/message/FPYBPYQO3QQHOOVLVXUH66FI5V3WIUAK/
This message sent to arch...@mail-archive.com