Am 2026-08-10 01:41, schrieb Mark Sapiro:
On 8/9/26 09:08, Torsten wrote:
In fact, my settings.py does contain these import lines:
import os
This should not be needed unless something further down references os.
I have removed this line (s. other mail where Odhiambo suggested to take the config from the documentation and adjust it)
from mailman_web.settings.base import * from mailman_web.settings.mailman import *
BASE_DIR = ('/var/lib/mailman3/web')
SECRET_KEY = '<MYSECRETKEY>' DEBUG = False
#: Default list of admins who receive the emails from error logging. ADMINS = ( ('Mailman Suite Admin', 'torsten@bbadmin.de'),)
ALLOWED_HOSTS = ['localhost', '127.0.0.1',]
You may also want your public facing web domain here.
They are there, I have just omitted them here.
INSTALLED_APPS = [ 'django_mailman3', 'postorius', 'hyperkitty', # Uncomment the next line to enable the admin: 'django.contrib.admin',
I'm hoping there's more to this file, but in any case unless you're adding or deleting something from the definition in mailman-web/settings/base.py, this is redundant and if you are adding, it's better to do
INSTALLED_APPS.append('app.to.add')or to remove something, for example
del INSTALLED_APPS[INSTALLED_APPS.index(django.contrib.admin')]
Yes, there's more in this config and also more in INSTALLED_APPS.
And I have the mailman_web/urls.py in the venv where mailman was installed.
If you are using gunicorn as your wsgi server, I think there is an issue in the documentation. <https://docs.mailman3.org/en/latest/install/virtualenv.html#setting-up-gunic...> says etc/mailman3/gunicorn.conf should contain
chdir = "/opt/mailman/mm". I think this is wrong. It should bechdir = "/etc/mailman3".
I am using uwsgi.
Here's the complete settings.py, I have in /etc/mailman3 now:
# Mailman Web configuration file. # /etc/mailman3/settings.py
# Get the default settings. from mailman_web.settings.base import * from mailman_web.settings.mailman import *
# Settings below supplement or override the defaults.
#: Default list of admins who receive the emails from error logging. ADMINS = ( ('Mailman Suite Admin', 'torsten@bbadmin.de'), )
DATABASES = { 'default': { 'ENGINE': 'django.db.backends.sqlite3', 'NAME': '/var/lib/mailman3/web/mailman3web.db', 'USER': '', 'PASSWORD': '', 'HOST': '', 'PORT': '', } }
# 'collectstatic' command will copy all the static files here.
# Alias this location from your webserver to /static
STATIC_ROOT = '/var/lib/mailman3/web/static'
# enable the 'compress' command. COMPRESS_ENABLED = True
# Make sure that this directory is created or Django will fail on start. LOGGING['handlers']['file']['filename'] = '/var/log/mailman3/web/mailmanweb.log'
#: See https://docs.djangoproject.com/en/dev/ref/settings/#allowed-hosts ALLOWED_HOSTS = [ "localhost", # Archiving API from Mailman, keep it. "127.0.0.1", "mail.<MYDOMAIN1>", "<MYDOMAIN1>", "<MYDOMAIN2>", # "lists.your-domain.org", # Add here all production domains you have. ]
#: See https://docs.djangoproject.com/en/dev/ref/settings/#csrf-trusted-origins #: For Django <4.0 these are of the form 'lists.example.com' or #: '.example.com' to include subdomains and for Django >=4.0 they include #: the scheme as in 'https://lists.example.com' or 'https://*.example.com'. CSRF_TRUSTED_ORIGINS = [ # "lists.your-domain.org", "https://*.<MYDOMAIN1>", "https://*.<MYDOMAIN2>", # Add here all production domains you have. ]
#: Current Django Site being served. This is used to customize the web host #: being used to serve the current website. For more details about Django #: site, see: https://docs.djangoproject.com/en/dev/ref/contrib/sites/ SITE_ID = 1
# Set this to a new secret value. SECRET_KEY = '<MYSECRETKEY>'
# Set this to match the api_key setting in # /opt/mailman/mm/mailman-hyperkitty.cfg (quoted here, not there). MAILMAN_ARCHIVER_KEY = '<ANOTHERSECRETKEY>'
# The sender of emails from Django such as address confirmation requests. # Set this to a valid email address. EMAILNAME = '<MYDOMAIN1>' DEFAULT_FROM_EMAIL = 'postorius@{}'.format(EMAILNAME)
# The sender of error messages from Django. Set this to a valid email # address. SERVER_EMAIL = 'root@{}'.format(EMAILNAME)