Hi Mark, thanks for your inputs. I am making progress.
On January 2, 2023 9:15:59 PM GMT+01:00, Mark Sapiro <mark@msapiro.net> wrote:
On 1/2/23 11:56, Onyeibo wrote:
On Mon, 2 Jan 2023 09:57:45 -0800 Mark Sapiro <mark@msapiro.net> wrote:
curl -urestadmin:restpass http://localhost:8001/3.1/lists
It should return JSON with information about your lists.
I get the following: {"start": 0, "total_size": 0, "http_etag": "\"678678567346533573674563786538\""}
That is the expected response if you have no lists yet. So connection to Mailman's REST API works via curl, so why doesn't it work via mailmanclient? If Mailman core was running, it should work. I don't know why it doesn't. Perhaps you have some kind of firewall that's blocking it.
It turns out to be a fault from my settings. Postfix was not happy with the default email for the admin (<root@localhost>) since I had an operational virtual map for users. That connection error disappeared when I added a functioning admin email address.
There are other issues, however.
(1) Mailman refuses to resolve to a preferred subdomain. If the server's domain is "website.tld", I'd like mailman's homepage to be at "list.website.tld". Mailman insists that I add "website.tld" to the ALLOWED HOSTS, whereas "lists.website.tld" is already there as an ALLOWED HOST (same VPS/IP address nonetheless). The result is that the homepage ends up at "https://website.tld/mailman3/lists" when the desired url is "https://lists.website.tld/mailman3/lists". This is a conflict because the main domain is intended for another service. How do I approach this?
(2) See the traceback below: ERROR 2023-01-03 07:40:32,078 27926 django.request Internal Server Error: /mailman3/lists/ Traceback (most recent call last): File "/opt/mailman/venv/lib64/python3.10/site-packages/django/core/handlers/exception.py", line 55, in inner response = get_response(request) File "/opt/mailman/venv/lib64/python3.10/site-packages/django/core/handlers/base.py", line 197, in _get_response response = wrapped_callback(request, *callback_args, **callback_kwargs) File "/opt/mailman/venv/lib64/python3.10/site-packages/postorius/views/list.py", line 980, in list_index return render(request, template, File "/opt/mailman/venv/lib64/python3.10/site-packages/django/shortcuts.py", line 24, in render content = loader.render_to_string(template_name, context, request, using=using) File "/opt/mailman/venv/lib64/python3.10/site-packages/django/template/loader.py", line 62, in render_to_string return template.render(context, request) File "/opt/mailman/venv/lib64/python3.10/site-packages/django/template/backends/django.py", line 62, in render return self.template.render(context) File "/opt/mailman/venv/lib64/python3.10/site-packages/django/template/base.py", line 173, in render with context.bind_template(self): File "/usr/lib64/python3.10/contextlib.py", line 135, in enter return next(self.gen) File "/opt/mailman/venv/lib64/python3.10/site-packages/django/template/context.py", line 254, in bind_template updates.update(processor(self.request)) File "/opt/mailman/venv/lib64/python3.10/site-packages/django_mailman3/context_processors.py", line 32, in common context["site_name"] = get_current_site(request).name File "/opt/mailman/venv/lib64/python3.10/site-packages/django/contrib/sites/shortcuts.py", line 16, in get_current_site return Site.objects.get_current(request) File "/opt/mailman/venv/lib64/python3.10/site-packages/django/contrib/sites/models.py", line 59, in get_current return self._get_site_by_id(site_id) File "/opt/mailman/venv/lib64/python3.10/site-packages/django/contrib/sites/models.py", line 30, in _get_site_by_id site = self.get(pk=site_id) File "/opt/mailman/venv/lib64/python3.10/site-packages/django/db/models/manager.py", line 85, in manager_method return getattr(self.get_queryset(), name)(*args, **kwargs) File "/opt/mailman/venv/lib64/python3.10/site-packages/django/db/models/query.py", line 650, in get raise self.model.DoesNotExist( django.contrib.sites.models.Site.DoesNotExist: Site matching query does not exist.
It seems a migration is missing. How should I approach this?