
On 2025-08-01 19:40, Mark Sapiro wrote:
Please confirm that the issue only occurs with the modified /opt/mailman/venv/lib/python3.11/site-packages/django_mailman3/views/user_adapter.py and does not occur with the original .../user_adapter.py.
Hi Mark,
In working through this I reverted the test server (which had the working "Disable") back to original, then re-applied the changes, and now I'm getting the same errors as on the Production server.
I think it might be me screwing up somewhere. It's doing my head in today so I'll sleep on it and have another crack at it tomorrow.
STEPS TAKEN
===========
- Reset the "Test" server back to original.
(a) I put the original "user_adapter.py" back in place. It contains: ... def is_open_for_signup(self, req): return False ...
(b) Ensured that "settings.py" had the following completely removed: ... ACCOUNT_ADAPTER = 'django_mailman3.views.user_adapter.DisableSignupAdapter' ...
(c) systemctl restart mailman3 systemctl restart mailmanweb
(d) Reloaded browser with "lists" page for each domain and clicked "SignUp" on each.
Result: As expected, both domains correctly displayed their SignUp pages.
- Made the following changes to the "Test" server.
(a) Edited /opt/mailman/venv/lib/python3.11/site-packages/django_mailman3/views/user_adapter.py
It now contains: ... # def is_open_for_signup(self, req): # return False
def is_open_for_signup(self, req):
if req.META['HTTP_HOST'] == 'lists.MYDOMAIN.COM':
return False
else:
return True
...
(b) Appended to - /etc/mailman3/settings.py - the following:
ACCOUNT_ADAPTER = 'django_mailman3.views.user_adapter.DisableSignupAdapter'
(c) systemctl restart mailman3 systemctl restart mailmanweb
Result: 502 Bad Gateway page and log shows ... raise self.model.DoesNotExist( django.contrib.sites.models.Site.DoesNotExist: Site matching query does not exist.
===========