On 2/27/25 05:44, Kim Sunggun via Mailman-users wrote:
Hello,

/opt/mailman/venv/lib/python3.9/site-packages/django/conf/global_settings.py:EMAIL_BACKEND
 = "django.core.mail.backends.smtp.EmailBackend"
/opt/mailman/venv/lib/python3.9/site-packages/mailman_web/settings/base.py:EMAIL_BACKEND
 = 'django.core.mail.backends.smtp.EmailBackend'


OK.

I installed mailman3 in rhel 9 based on 
https://docs.mailman3.org/en/latest/install/virtualenv.html#virtualenv-install
I set up Postfix as the MTA. I added the code as mentioned in the document.

unknown_local_recipient_reject_code = 550
owner_request_special = no

transport_maps =
     hash:/opt/mailman/mm/var/data/postfix_lmtp
local_recipient_maps =
     hash:/opt/mailman/mm/var/data/postfix_lmtp
relay_domains =
     hash:/opt/mailman/mm/var/data/postfix_domains

These are good but not relevant to your issue. They affect delivery of incoming mail to Mailman. Your issue is with outgoing mail from Django.

There are various settings that affect this SMTP connection as described at https://docs.djangoproject.com/en/5.1/topics/email/#smtp-backend

The defaults are

EMAIL_HOST = "localhost"
EMAIL_PORT = 25

and for the optional settings

EMAIL_HOST_USER = ""
EMAIL_HOST_PASSWORD = ""
EMAIL_USE_TLS = False
EMAIL_USE_SSL = False
EMAIL_SSL_CERTFILE = None
EMAIL_SSL_KEYFILE = None

Have you set any of those to other than default in your Django settings?
If not, what do you get if you run this python snippet as the Mailman user
```
import smtplib
connection = smtplib.SMTP(host='localhost', port=25)
```
If you have, you can specify them as args to smtplib.SMTP, e.g.
```
connection = smtplib.SMTP(host='localhost', port=25, username='...', password='...')
```
or if EMAIL_USE_SSL is True,
```
connection = smtplib.SMTP_SSL(host='localhost', port=25, username='...', password='...', ssl_keyfile='...', ssl_certfile='...')
```
See https://github.com/django/django/blob/ea1e3703bee28bfbe4f32ceb39ad31763353b143/django/core/mail/backends/smtp.py#L19

--
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/HGXE423IC7YIAREAUPIOTYJBAINQV2DW/

This message sent to arch...@mail-archive.com

Reply via email to