Hi Mark!
-----Original Message----- From: Mark Sapiro <mark@msapiro.net> Sent: Tuesday, November 22, 2022 12:19 PM To: mailman-users@mailman3.org Subject: [MM3-users] Re: Hyperkitty no longer archiving
First, my apologies for not taking note of your MAILMAN_ARCHIVER_FROM setting in your OP.
No worries. I tried to include everything that might be needed for you and the other frequent posters to be able to give me an answer, and all of you respond to a LOT of posts.
On 11/22/22 08:52, Hirayama, Pat wrote:
Steve wrote:
- Does settings.py have "from settings_local import *" in it?
Yes. I assume that overrides the MAILMAN_ARCHIVER_FROM and other related settings defined at the top of the settings.py file? Or should I update settings.py based on what is in settings_local.py?
Assuming the
from settings_local import *
is at the end of settings.py, anything defined in settings_local.py will override the definition in settings.py. There's no need to change settings.py.
This is the end of settings.py: # # HyperKitty-specific #
# Only display mailing-lists from the same virtual host as the webserver FILTER_VHOST = False
POSTORIUS_TEMPLATE_BASE_URL = 'http://localhost:8000'
try: from settings_local import * except ImportError: pass
I'm assuming that is close enough to the end?
<snip>
The
ERROR 2022-11-22 00:25:40,365 7 hyperkitty.views.mailman Access to the archiving API endpoint was forbidden from IP 172.31.0.1, your MAILMAN_ARCHIVER_FROM setting may be misconfigured
message comes from https://urldefense.com/v3/__https://gitlab.com/mailman/hyperkitty/- /blob/master/hyperkitty/views/mailman.py*L62__;Iw!!GuAItXPztq0!hLVF14 B0x45qVgO6PBHbLDw0TH9RiV8rrAVWDBuswab7QFb56LlCxdyihoc- 2F4ZHdqDTdXzj4YgcLM$ which only occurs if '172.31.0.1' is not in MAILMAN_ARCHIVER_FROM. Given that it is in MAILMAN_ARCHIVER_FROM as defined in settings_local.py, the only thing I can conclude is that the Django settings actually used is not the settings.py you think it is.
I don't know offhand even what wsgi service is used in the docker container or how it is configured, but it needs to set its working directory to the directory containing settings.py.
So, looking at the Django container, I see this process popping up periodically. I think that means that it is running from the directory specified by "--pythonpath"" (which is where settings.py and settings_local.py are located). I am further assuming that "--settings settings" is ok without a .py extension.
53972 mail 0:00 {django-admin} /usr/local/bin/python /usr/local/bin/django-admin runjobs quarter_hourly --pythonpath /opt/mailman/mailman-suite/mailman-suite_project/. --settings settings 53978 mail 0:00 {django-admin} /usr/local/bin/python /usr/local/bin/django-admin runjobs minutely --pythonpath /opt/mailman/mailman-suite/mailman-suite_project/. --settings settings
-- Mark Sapiro <mark@msapiro.net> The highway is for gamblers, San Francisco Bay Area, California better use your sense - B. Dylan