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

===========
1. 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.

-----------

2. 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.

===========
_______________________________________________
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/HGT6QDFCHQTUQUBIY7V6UFDPAJFIH6O3/

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

Reply via email to