urls.py location on venv install
Hey all together,
I have just nearly finished the migration of Mailman 3 from Debian packages to venv and mailman (master and runner) is up and running and uwsgi is also up and running. Just when I go to the web page https://<mydomain.tld>/mailman3 I get a server error and looking at the mailman web log I see that the ROOT_URLCONF seems to be missing.
Following this thread: https://lists.mailman3.org/archives/list/mailman-users@mailman3.org/thread/V... I added urls.py to /etc/mailman3 together with the other configuration files (settings.py, mailman.cfg and uwsgi.ini) and have added ROOT_URLCONF = 'urls' to /etc/settings.py but after restarting mailman (core) and mailman (web) the error is still there.
What am I missing?
TIA Torsten
On 8/8/26 12:58, Torsten wrote:
I have just nearly finished the migration of Mailman 3 from Debian packages to venv and mailman (master and runner) is up and running and uwsgi is also up and running. Just when I go to the web page https://<mydomain.tld>/mailman3 I get a server error and looking at the mailman web log I see that the ROOT_URLCONF seems to be missing.
What is the full log message including traceback if any.
Note that if you followed <https://docs.mailman3.org/en/latest/install/virtualenv.html#initial-configur...> The value for ROOT_URLCONF is imported from mailman_web.settings.base and is 'mailman_web.urls' which should be correct.
Following this thread: https://lists.mailman3.org/archives/list/mailman-users@mailman3.org/thread/V... I added urls.py to /etc/mailman3 together with the other configuration files (settings.py, mailman.cfg and uwsgi.ini) and have added ROOT_URLCONF = 'urls' to /etc/settings.py but after restarting mailman (core) and mailman (web) the error is still there.
You shouldn't need to do that. That thread is for an unusual case.
-- Mark Sapiro <mark@msapiro.net> The highway is for gamblers, San Francisco Bay Area, California better use your sense - B. Dylan
Hi Mark,
Am 2026-08-08 23:42, schrieb Mark Sapiro:
On 8/8/26 12:58, Torsten wrote:
I have just nearly finished the migration of Mailman 3 from Debian packages to venv and mailman (master and runner) is up and running and uwsgi is also up and running. Just when I go to the web page https://<mydomain.tld>/mailman3 I get a server error and looking at the mailman web log I see that the ROOT_URLCONF seems to be missing.
What is the full log message including traceback if any.
Note that if you followed <https://docs.mailman3.org/en/latest/install/virtualenv.html#initial-configur...> The value for ROOT_URLCONF is imported from mailman_web.settings.base and is 'mailman_web.urls' which should be correct.
the traceback is this:
Traceback (most recent call last): File "/opt/mailman/web/venv/lib/python3.13/site-packages/django/core/handlers/wsgi.py", line 124, in __call__ response = self.get_response(request) File "/opt/mailman/web/venv/lib/python3.13/site-packages/django/core/handlers/base.py", line 139, in get_response set_urlconf(settings.ROOT_URLCONF) ^^^^^^^^^^^^^^^^^^^^^ File "/opt/mailman/web/venv/lib/python3.13/site-packages/django/conf/__init__.py", line 104, in __getattr__ val = getattr(_wrapped, name) AttributeError: 'Settings' object has no attribute 'ROOT_URLCONF' [pid: 25054|app: 0|req: 2/2] 80.152.151.47 () {76 vars in 1372 bytes} [Sun Aug 9 02:27:03 2026] GET /mailman3/ => generated 0 bytes in 5 msecs (HTTP/1.1 500) 0 headers in 0 bytes (1 switches on core 1)
Where should mailman_web.urls be located, also in /etc/mailman3 or rather in the venv of mailman_web in /opt/mailman...?
Following this thread: https://lists.mailman3.org/archives/list/mailman-users@mailman3.org/thread/V... I added urls.py to /etc/mailman3 together with the other configuration files (settings.py, mailman.cfg and uwsgi.ini) and have added ROOT_URLCONF = 'urls' to /etc/settings.py but after restarting mailman (core) and mailman (web) the error is still there.
You shouldn't need to do that. That thread is for an unusual case.
On 8/9/26 00:30, Torsten wrote:
the traceback is this:
Traceback (most recent call last): File "/opt/mailman/web/venv/lib/python3.13/site-packages/django/core/handlers/wsgi.py", line 124, in __call__ response = self.get_response(request) File "/opt/mailman/web/venv/lib/python3.13/site-packages/django/core/handlers/base.py", line 139, in get_response set_urlconf(settings.ROOT_URLCONF) ^^^^^^^^^^^^^^^^^^^^^ File "/opt/mailman/web/venv/lib/python3.13/site-packages/django/conf/__init__.py", line 104, in __getattr__ val = getattr(_wrapped, name) > Where should mailman_web.urls be located, also in /etc/mailman3 or rather in the venv of mailman_web in /opt/mailman...?
How did you install Mailman? If you followed <https://docs.mailman3.org/en/latest/install/virtualenv.html>, you should have /etc/mailmasn3/settings.py which is similar to <https://docs.mailman3.org/en/latest/install/virtualenv.html#initial-configur...>. In particular, it should have near the beginning
from mailman_web.settings.base import *
from mailman_web.settings.mailman import *
The import from mailman_web.settings.base defines
ROOT_URLCONF = 'mailman_web.urls'
which points to mailman_web/urls.py in the venv's site-packages directory.
-- Mark Sapiro <mark@msapiro.net> The highway is for gamblers, San Francisco Bay Area, California better use your sense - B. Dylan
Am 2026-08-09 17:48, schrieb Mark Sapiro:
On 8/9/26 00:30, Torsten wrote:
the traceback is this:
Traceback (most recent call last): File "/opt/mailman/web/venv/lib/python3.13/site-packages/django/core/handlers/wsgi.py", line 124, in __call__ response = self.get_response(request) File "/opt/mailman/web/venv/lib/python3.13/site-packages/django/core/handlers/base.py", line 139, in get_response set_urlconf(settings.ROOT_URLCONF) ^^^^^^^^^^^^^^^^^^^^^ File "/opt/mailman/web/venv/lib/python3.13/site-packages/django/conf/__init__.py", line 104, in __getattr__ val = getattr(_wrapped, name) > Where should mailman_web.urls be located, also in /etc/mailman3 or rather in the venv of mailman_web in /opt/mailman...?
How did you install Mailman? If you followed <https://docs.mailman3.org/en/latest/install/virtualenv.html>, you should have /etc/mailmasn3/settings.py which is similar to <https://docs.mailman3.org/en/latest/install/virtualenv.html#initial-configur...>. In particular, it should have near the beginning
from mailman_web.settings.base import * from mailman_web.settings.mailman import *The import from mailman_web.settings.base defines
ROOT_URLCONF = 'mailman_web.urls'which points to mailman_web/urls.py in the venv's site-packages directory.
In fact, my settings.py does contain these import lines:
import os 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',] INSTALLED_APPS = [ 'django_mailman3', 'postorius', 'hyperkitty', # Uncomment the next line to enable the admin: 'django.contrib.admin',
And I have the mailman_web/urls.py in the venv where mailman was installed.
On Sun, Aug 9, 2026 at 7:09 PM Torsten <torsten@bbadmin.de> wrote:
Am 2026-08-09 17:48, schrieb Mark Sapiro:
On 8/9/26 00:30, Torsten wrote:
the traceback is this:
Traceback (most recent call last): File
"/opt/mailman/web/venv/lib/python3.13/site-packages/django/core/handlers/wsgi.py",
line 124, in __call__ response = self.get_response(request) File
"/opt/mailman/web/venv/lib/python3.13/site-packages/django/core/handlers/base.py",
line 139, in get_response set_urlconf(settings.ROOT_URLCONF) ^^^^^^^^^^^^^^^^^^^^^ File
"/opt/mailman/web/venv/lib/python3.13/site-packages/django/conf/__init__.py",
line 104, in __getattr__ val = getattr(_wrapped, name) > Where should mailman_web.urls be located, also in /etc/mailman3 or rather in the venv of mailman_web in /opt/mailman...?
How did you install Mailman? If you followed <https://docs.mailman3.org/en/latest/install/virtualenv.html>, you should have /etc/mailmasn3/settings.py which is similar to < https://docs.mailman3.org/en/latest/install/virtualenv.html#initial-configur...>.
In particular, it should have near the beginning
from mailman_web.settings.base import * from mailman_web.settings.mailman import *The import from mailman_web.settings.base defines
ROOT_URLCONF = 'mailman_web.urls'which points to mailman_web/urls.py in the venv's site-packages directory.
In fact, my settings.py does contain these import lines:
import os 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',] INSTALLED_APPS = [ 'django_mailman3', 'postorius', 'hyperkitty', # Uncomment the next line to enable the admin: 'django.contrib.admin',
And I have the mailman_web/urls.py in the venv where mailman was installed.
Copy the settings.py from https://docs.mailman3.org/en/latest/install/virtualenv.html and customize it with your values at the right places.
-- Best regards, Odhiambo WASHINGTON, Nairobi,KE +254 7 3200 0004/+254 7 2274 3223 In an Internet failure case, the #1 suspect is a constant: DNS. "Oh, the cruft.", egrep -v '^$|^.*#' ¯\_(ツ)_/¯ :-) [How to ask smart questions: http://www.catb.org/~esr/faqs/smart-questions.html]
Am 2026-08-09 18:24, schrieb Washington Odhiambo:
On Sun, Aug 9, 2026 at 7:09 PM Torsten <torsten@bbadmin.de> wrote:
Am 2026-08-09 17:48, schrieb Mark Sapiro:
On 8/9/26 00:30, Torsten wrote:
the traceback is this:
Traceback (most recent call last): File
"/opt/mailman/web/venv/lib/python3.13/site-packages/django/core/handlers/wsgi.py",
line 124, in __call__ response = self.get_response(request) File
"/opt/mailman/web/venv/lib/python3.13/site-packages/django/core/handlers/base.py",
line 139, in get_response set_urlconf(settings.ROOT_URLCONF) ^^^^^^^^^^^^^^^^^^^^^ File
"/opt/mailman/web/venv/lib/python3.13/site-packages/django/conf/__init__.py",
line 104, in __getattr__ val = getattr(_wrapped, name) > Where should mailman_web.urls be located, also in /etc/mailman3 or rather in the venv of mailman_web in /opt/mailman...?
How did you install Mailman? If you followed <https://docs.mailman3.org/en/latest/install/virtualenv.html>, you
should have /etc/mailmasn3/settings.py which is similar to
<https://docs.mailman3.org/en/latest/install/virtualenv.html#initial-configur...>.
In particular, it should have near the beginning
from mailman_web.settings.base import * from mailman_web.settings.mailman import *The import from mailman_web.settings.base defines
ROOT_URLCONF = 'mailman_web.urls'which points to mailman_web/urls.py in the venv's site-packages directory.
In fact, my settings.py does contain these import lines:
import os 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',] INSTALLED_APPS = [ 'django_mailman3', 'postorius', 'hyperkitty', # Uncomment the next line to enable the admin: 'django.contrib.admin',
And I have the mailman_web/urls.py in the venv where mailman was installed.
Copy the settings.py from https://docs.mailman3.org/en/latest/install/virtualenv.html and customize it with your values at the right places.
Did that and changed a few value in that file. But after restarting the service(s) the error is still there.
--
Best regards, Odhiambo WASHINGTON, Nairobi,KE +254 7 3200 0004/+254 7 2274 3223 In an Internet failure case, the #1 suspect is a constant: DNS. "Oh, the cruft.", egrep -v '^$|^.*#' ¯\_(ツ)_/¯ :-) [How to ask smart questions: http://www.catb.org/~esr/faqs/smart-questions.html]
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.
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.
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')]
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 be chdir = "/etc/mailman3".
-- Mark Sapiro <mark@msapiro.net> The highway is for gamblers, San Francisco Bay Area, California better use your sense - B. Dylan
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)
Torsten writes:
I have just nearly finished the migration of Mailman 3 from Debian packages to venv and mailman (master and runner) is up and running and uwsgi is also up and running.
It looks like you are trying to use the configuration files from Debian with minimal or no changes.
If I were you I would
- rsync -av /etc/mailman3 /tmp/ # if you don't have rsync, "cp -r"
- purge (not just uninstall) all the Debian mailman packages this should delete a lot of the stuff you just copied to /tmp
- copy the configuration from Mailman's virtualenv install instructions into /etc/mailman3
- diff -r /etc/mailman3 /tmp/mailman3
- make only essential changes you see in that diff (eg, /opt/mailman/mm/var/web to /var/lib/mailman3/web), and see if things work better
- if things still don't work, make more adjustments.
Steve
-- GNU Mailman consultant (installation, migration, customization) Sirius Open Source https://www.siriusopensource.com/ Software systems consulting in Europe, North America, and Japan
Am 2026-08-10 15:13, schrieb Stephen J. Turnbull:
Torsten writes:
I have just nearly finished the migration of Mailman 3 from Debian packages to venv and mailman (master and runner) is up and running and uwsgi is also up and running.
It looks like you are trying to use the configuration files from Debian with minimal or no changes.
If I were you I would
- rsync -av /etc/mailman3 /tmp/ # if you don't have rsync, "cp -r"
- purge (not just uninstall) all the Debian mailman packages this should delete a lot of the stuff you just copied to /tmp
- copy the configuration from Mailman's virtualenv install instructions into /etc/mailman3
- diff -r /etc/mailman3 /tmp/mailman3
- make only essential changes you see in that diff (eg, /opt/mailman/mm/var/web to /var/lib/mailman3/web), and see if things work better
- if things still don't work, make more adjustments.
Steve
Yes, that was my intention. But now I started from scratch, following the documentation about Virtualenv installation at mailman3.org and also created the config files with the defaults shown there (with a few adjustments to match my installation).
Now, I have everything running as user mailman (had user list before for mailman-core and www-data for mailman-web).
And the tracebacks have changed:
mailman throws this one:
2026-08-10 16:11:20 [FALCON] [ERROR] GET /3.1/lists?advertised=true&count=0&page=1 => Traceback (most recent call last): File "/opt/mailman/venv/lib/python3.13/site-packages/falcon/app.py", line 476, in __call__ process_resource(req, resp, resource, params) ~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/opt/mailman/venv/lib/python3.13/site-packages/mailman/rest/wsgiapp.py", line 65, in process_resource raise HTTPUnauthorized( ~~~~~~~~~~~~~~~~^ '401 Unauthorized', ^^^^^^^^^^^^^^^^^^^ 'REST API authorization failed', ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ challenges=[realm]) ^^^^^^^^^^^^^^^^^^^ TypeError: HTTPUnauthorized.__init__() takes 1 positional argument but 3 positional arguments (and 1 keyword-only argument) were given
[10/Aug/2026:16:11:20 +0200] "GET /3.1/lists?advertised=true&count=0&page=1 HTTP/1.1" 500 38 "-" "GNU Mailman REST client v3.3.5"
and mailman-web this one:
ERROR 2026-08-10 14:11:20,011 1557501 postorius Un-handled exception: HTTP Error 500: {"title": "500 Internal Server Error"} Traceback (most recent call last): File "/opt/mailman/venv/lib/python3.13/site-packages/django/core/handlers/base.py", line 197, in _get_response response = wrapped_callback(request, *callback_args, **callback_kwargs) File "/opt/mailman/venv/lib/python3.13/site-packages/postorius/views/list.py", line 1141, in list_index lists = paginate( _get_list_page, ...<2 lines>... paginator_class=MailmanPaginator, ) File "/opt/mailman/venv/lib/python3.13/site-packages/django_mailman3/lib/paginator.py", line 71, in paginate objects = paginator.page(page_num) File "/opt/mailman/venv/lib/python3.13/site-packages/django_mailman3/lib/paginator.py", line 46, in page number = self.validate_number(number) File "/opt/mailman/venv/lib/python3.13/site-packages/django/core/paginator.py", line 53, in validate_number if number > self.num_pages: ^^^^^^^^^^^^^^ File "/opt/mailman/venv/lib/python3.13/site-packages/django/utils/functional.py", line 57, in __get__ res = instance.__dict__[self.name] = self.func(instance) ~~~~~~~~~^^^^^^^^^^ File "/opt/mailman/venv/lib/python3.13/site-packages/django/core/paginator.py", line 99, in num_pages if self.count == 0 and not self.allow_empty_first_page: ^^^^^^^^^^ File "/opt/mailman/venv/lib/python3.13/site-packages/django/utils/functional.py", line 57, in __get__ res = instance.__dict__[self.name] = self.func(instance) ~~~~~~~~~^^^^^^^^^^ File "/opt/mailman/venv/lib/python3.13/site-packages/django_mailman3/lib/paginator.py", line 56, in count return self.function(count=0, page=1).total_size ~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^ File "/opt/mailman/venv/lib/python3.13/site-packages/postorius/views/list.py", line 1137, in _get_list_page return client.get_list_page( ~~~~~~~~~~~~~~~~~~~~^ advertised=advertised, mail_host=mail_host, count=count, page=page ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ) ^ File "/opt/mailman/venv/lib/python3.13/site-packages/mailmanclient/client.py", line 211, in get_list_page return Page(self._connection, url, MailingList, count, page) File "/opt/mailman/venv/lib/python3.13/site-packages/mailmanclient/restbase/page.py", line 37, in __init__ self._create_page() ~~~~~~~~~~~~~~~~~^^ File "/opt/mailman/venv/lib/python3.13/site-packages/mailmanclient/restbase/page.py", line 62, in _create_page response, content = self._connection.call(self._build_url()) ~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^ File "/opt/mailman/venv/lib/python3.13/site-packages/mailmanclient/restbase/connection.py", line 160, in call raise HTTPError(params.get('url'), response.status_code, error_msg, response, None) urllib.error.HTTPError: HTTP Error 500: {"title": "500 Internal Server Error"} ERROR 2026-08-10 14:11:20,041 1557501 django.request Internal Server Error: /mailman3/lists/ ERROR 2026-08-10 14:11:20,041 1557501 django.request Internal Server Error: /mailman3/lists/
I have taken the old database from the Debian configuration and moved it to /opt/mailman... where it should belong (I hope).
On 8/10/26 07:15, Torsten wrote:
mailman throws this one:
2026-08-10 16:11:20 [FALCON] [ERROR] GET /3.1/lists?advertised=true&count=0&page=1 => Traceback (most recent call last): File "/opt/mailman/venv/lib/python3.13/site-packages/falcon/app.py", line 476, in __call__ process_resource(req, resp, resource, params) ~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/opt/mailman/venv/lib/python3.13/site-packages/mailman/rest/wsgiapp.py", line 65, in process_resource raise HTTPUnauthorized( ~~~~~~~~~~~~~~~~^ '401 Unauthorized', ^^^^^^^^^^^^^^^^^^^ 'REST API authorization failed', ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ challenges=[realm]) ^^^^^^^^^^^^^^^^^^^ TypeError: HTTPUnauthorized.__init__() takes 1 positional argument but 3 positional arguments (and 1 keyword-only argument) were given
This is from a Mailman core version < 3.3.10. It was fixed for Mailman
= 3.3.10 by <https://gitlab.com/mailman/mailman/-/merge_requests/1267>.
It appears that you don't have the latest Mailman core.
and mailman-web this one:
Which is a result of the one above.
I have taken the old database from the Debian configuration and moved it to /opt/mailman... where it should belong (I hope).
The database(s) should be in the location(s) pointed to by the [databases] section of mailman.cfg and the DATABASES attribute in settings.py. In an installation per https://docs.mailman3.org/en/latest/install/virtualenv.html these are postgresql databases accessed via the postgresql server.
-- Mark Sapiro <mark@msapiro.net> The highway is for gamblers, San Francisco Bay Area, California better use your sense - B. Dylan
Am 2026-08-11 21:30, schrieb Mark Sapiro:
On 8/10/26 07:15, Torsten wrote:
mailman throws this one:
2026-08-10 16:11:20 [FALCON] [ERROR] GET /3.1/lists?advertised=true&count=0&page=1 => Traceback (most recent call last): File "/opt/mailman/venv/lib/python3.13/site-packages/falcon/app.py", line 476, in __call__ process_resource(req, resp, resource, params) ~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/opt/mailman/venv/lib/python3.13/site-packages/mailman/rest/wsgiapp.py", line 65, in process_resource raise HTTPUnauthorized( ~~~~~~~~~~~~~~~~^ '401 Unauthorized', ^^^^^^^^^^^^^^^^^^^ 'REST API authorization failed', ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ challenges=[realm]) ^^^^^^^^^^^^^^^^^^^ TypeError: HTTPUnauthorized.__init__() takes 1 positional argument but 3 positional arguments (and 1 keyword-only argument) were given
This is from a Mailman core version < 3.3.10. It was fixed for Mailman
= 3.3.10 by <https://gitlab.com/mailman/mailman/-/merge_requests/1267>.
It appears that you don't have the latest Mailman core.
The question then would by why pip did not install mailman core 3.3.10 but 3.3.9
and mailman-web this one:
Which is a result of the one above.
I have taken the old database from the Debian configuration and moved it to /opt/mailman... where it should belong (I hope).
The database(s) should be in the location(s) pointed to by the [databases] section of mailman.cfg and the DATABASES attribute in settings.py. In an installation per https://docs.mailman3.org/en/latest/install/virtualenv.html these are postgresql databases accessed via the postgresql server.
My installation is rather small, therefore I am using SQLite here.
On 8/11/26 21:47, Torsten wrote:
The question then would by why pip did not install mailman core 3.3.10 but 3.3.9
Yes, that's the question. I don't know, but maybe you had an old version from your Debian package.
With your venv active, do
pip install --upgrade mailman
to get 3.3.10.
The database(s) should be in the location(s) pointed to by the [databases] section of mailman.cfg and the DATABASES attribute in settings.py. In an installation per https://docs.mailman3.org/en/latest/install/virtualenv.html these are postgresql databases accessed via the postgresql server.
My installation is rather small, therefore I am using SQLite here.
OK, but those settings should then point to the SQLite db(s)
-- Mark Sapiro <mark@msapiro.net> The highway is for gamblers, San Francisco Bay Area, California better use your sense - B. Dylan
Am 2026-08-12 07:09, schrieb Mark Sapiro:
On 8/11/26 21:47, Torsten wrote:
The question then would by why pip did not install mailman core 3.3.10 but 3.3.9
Yes, that's the question. I don't know, but maybe you had an old version from your Debian package.
With your venv active, do
pip install --upgrade mailmanto get 3.3.10.
Tried that already:
But it seems that 3.3.10 depends on nntplib >= 3.13 which could not be fetched via pip:
1 location(s) to search for versions of nntplib:
- https://pypi.org/simple/nntplib/ Fetching project page and analyzing links: https://pypi.org/simple/nntplib/ Getting page https://pypi.org/simple/nntplib/ Found index url https://pypi.org/simple/ https://pypi.org:443 "GET /simple/nntplib/ HTTP/1.1" 404 13 Could not fetch URL https://pypi.org/simple/nntplib/: 404 Client Error: Not Found for url: https://pypi.org/simple/nntplib/ - skipping Skipping link: not a file: https://pypi.org/simple/nntplib/ Given no hashes to check 0 links for project 'nntplib': discarding no candidates INFO: pip is looking at multiple versions of mailman to determine which version is compatible with other requirements. This could take a while. Will try a different candidate, due to conflict: mailman 3.3.10 depends on nntplib; python_version >= "3.13"
I have, nevertheless, standard-nntplib 3.13 already installed but there is no nntplib on Pypi.
The database(s) should be in the location(s) pointed to by the [databases] section of mailman.cfg and the DATABASES attribute in settings.py. In an installation per https://docs.mailman3.org/en/latest/install/virtualenv.html these are postgresql databases accessed via the postgresql server.
My installation is rather small, therefore I am using SQLite here.
OK, but those settings should then point to the SQLite db(s)
They do
On 8/11/26 22:46, Torsten wrote:
But it seems that 3.3.10 depends on nntplib >= 3.13 which could not be fetched via pip:
That's a bug. The requirement in Mailman 3.3.10's pyproject.toml is
'nntplib; python_version>="3.13"',
This is wrong. it should be
'standard-nntplib; python_version>="3.13"',
nntplib was dropped from the standard library in Python 3.13 and replaced by standard-nntplib from pip.
Because of the above error, a pip install of mailman 3.3.10 will not work with Python >= 3.13.
Also note that currently, Mailman core is not compatible with Python >= 3.14 because it depends on aiosmtpd which is not compatible with Python 3.14. The aiosmtpd incompatibility is fixed in GitHub but the fix is not yet released. The incompatibility is fixed by <https://github.com/aio-libs/aiosmtpd/pull/575> and <https://github.com/aio-libs/aiosmtpd/pull/595>
I have, nevertheless, standard-nntplib 3.13 already installed but there is no nntplib on Pypi.
I suggest the following depending on your Python version
For Python 3.13 or 3.14
pip install git+https://gitlab.com/mailman/mailman.git
and for Python 3.14
pip install git+https://github.com/aio-libs/aiosmtpd.git
Installing Mailman from GitLab with Python 3.13 should work fine. Both this list and the lists at mail.python.org run the latest GitLab version with no problems. The installation of aiosmtpd from GitHub is more of an unknown, but should be OK.
-- Mark Sapiro <mark@msapiro.net> The highway is for gamblers, San Francisco Bay Area, California better use your sense - B. Dylan
Hi Mark,
I had a very productive session with Odhiambo today and everything is now up and running. We installed everything with the commands you mention below and after some weird issue that mailman info first used /etc/mailman3/mailman.cfg but later switched to /opt/mailman/mm/var/etc/mailman.cfg (which only consisted of comments and no real configuration) things have settled and now my instance is up and running still containing the list and all members. The only thing I lost is the archive but that is probably gone for a while now and not worth getting back.
Thanks to everyone for their help, especially to Odhiambo.
Am 2026-08-12 18:30, schrieb Mark Sapiro:
On 8/11/26 22:46, Torsten wrote:
But it seems that 3.3.10 depends on nntplib >= 3.13 which could not be fetched via pip:
That's a bug. The requirement in Mailman 3.3.10's pyproject.toml is
'nntplib; python_version>="3.13"',This is wrong. it should be
'standard-nntplib; python_version>="3.13"',nntplib was dropped from the standard library in Python 3.13 and replaced by standard-nntplib from pip.
Because of the above error, a pip install of mailman 3.3.10 will not work with Python >= 3.13.
Also note that currently, Mailman core is not compatible with Python >= 3.14 because it depends on aiosmtpd which is not compatible with Python 3.14. The aiosmtpd incompatibility is fixed in GitHub but the fix is not yet released. The incompatibility is fixed by <https://github.com/aio-libs/aiosmtpd/pull/575> and <https://github.com/aio-libs/aiosmtpd/pull/595>
I have, nevertheless, standard-nntplib 3.13 already installed but there is no nntplib on Pypi.
I suggest the following depending on your Python version
For Python 3.13 or 3.14
pip install git+https://gitlab.com/mailman/mailman.gitand for Python 3.14
pip install git+https://github.com/aio-libs/aiosmtpd.gitInstalling Mailman from GitLab with Python 3.13 should work fine. Both this list and the lists at mail.python.org run the latest GitLab version with no problems. The installation of aiosmtpd from GitHub is more of an unknown, but should be OK.
participants (4)
-
Mark Sapiro -
Stephen J. Turnbull -
Torsten -
Washington Odhiambo