[Mailman-Users] static files not found in Mailman3 Web
ello, I have installed Mailman3 Core 3.3.8 + Mailman Web from AlmaLinux 9 distro. I have problems with static files in Mailman Web. After starting development server at http://127.0.0.1:8000/ DJANGO_SETTINGS_MODULE= settings MAILMAN_WEB_CONFIG= /etc/mailman3/settings.py PYTHONPATH= /etc/mailman3 I'm pointiong browser on http://127.0.0.1:8000/ address and getting intitial Mailman Web page like this: http://127.0.0.1:8000/mailman3/lists/ Mailman logo Postorius Lists Archives Login Sign Up Mailing Lists ... Instead of Postorius Logo I've got text "Mailman logo Postorius" on the page. "View Page Source" in browser shows: Mailman Web has the following configuration: /etc/mailman3/settings.py # Mailman Web configuration file. # /etc/mailman3/settings.py from mailman_web.settings.base import * from mailman_web.settings.mailman import * # 'collectstatic' command will copy all the static files here. # Alias this location from your webserver to `/static` STATIC_ROOT = '/opt/mailman/web/static' All static files are placed in /opt/mailman/web/static drwxr-xr-x. 5 mailman mailman 38 Sep 6 15:48 admin drwxr-xr-x. 4 mailman mailman 48 Sep 6 17:08 CACHE drwxr-xr-x. 2 mailman mailman 39 Sep 6 15:48 css drwxr-xr-x. 5 mailman mailman 38 Sep 6 15:48 django_extensions drwxr-xr-x. 5 mailman mailman 38 Sep 6 15:48 django-mailman3 drwxr-xr-x. 6 mailman mailman 51 Sep 6 15:48 hyperkitty drwxr-xr-x. 3 mailman mailman 128 Sep 6 15:48 img drwxr-xr-x. 2 mailman mailman 62 Sep 6 15:48 js drwxr-xr-x. 8 mailman mailman 98 Sep 6 15:48 libs drwxr-xr-x. 6 mailman mailman 50 Sep 6 15:48 postorius drwxr-xr-x. 7 mailman mailman 63 Sep 6 15:48 rest_framework /usr/lib/python3.9/site-packages/mailman_web/settings/base.py - #: The base directory for logs and database. BASE_DIR = Path('/opt/mailman/web') #: Enable Development Mode. DEBUG = False #: URL Configuration for Django ROOT_URLCONF = 'mailman_web.urls' #: Default path where static files will be placed. STATIC_ROOT = '/opt/mailman/web/static' #: URL prefix for static files. #: Example: "http://example.com/static/";, "http://static.example.com/"; STATIC_URL = '/static/' ... /usr/lib/python3.9/site-packages/mailman_web/settings/mailman.py BASE_DIR = Path('/opt/mailman/web') #: Mailman Core default API Path MAILMAN_REST_API_URL = 'http://localhost:8001' #: Base URL where Django/Mailman-web would be listening for requests. Used by #: Mailman Core for fetching templates. POSTORIUS_TEMPLATE_BASE_URL = 'http://localhost:8000' ... Why dont static files get found ? If I set Debug = True then static files are getting found. Why ? But in production mode Debug should be set False. How to solve static files problem in production ? -- Mailman-Users mailing list -- mailman-users@python.org To unsubscribe send an email to mailman-users-le...@python.org https://mail.python.org/mailman3/lists/mailman-users.python.org/ Mailman FAQ: http://wiki.list.org/x/AgA3 Security Policy: http://wiki.list.org/x/QIA9 Searchable Archives: https://www.mail-archive.com/mailman-users@python.org/ https://mail.python.org/archives/list/mailman-users@python.org/ Member address: arch...@mail-archive.com
[Mailman-Users] Re: static files not found in Mailman3 Web
On Mon, Sep 9, 2024 at 5:24 PM Anatoly Oreshkin wrote: > ello, > > I have installed Mailman3 Core 3.3.8 + Mailman Web from AlmaLinux 9 distro. > I have problems with static files in Mailman Web. > > After starting development server at http://127.0.0.1:8000/ > > DJANGO_SETTINGS_MODULE= settings > MAILMAN_WEB_CONFIG= /etc/mailman3/settings.py > PYTHONPATH= /etc/mailman3 > > I'm pointiong browser on http://127.0.0.1:8000/ address and getting > intitial Mailman Web page like this: > > http://127.0.0.1:8000/mailman3/lists/ > > Mailman logo Postorius > > Lists > Archives > > Login > Sign Up > > Mailing Lists > ... > > Instead of Postorius Logo I've got text "Mailman logo Postorius" on the > page. > "View Page Source" in browser shows: > > href="/static/postorius/libs/bootstrap/css/bootstrap.min.css"> > > > href="/static/postorius/libs/fonts/font-awesome/css/font-awesome.min.css" > type="text/css" media="all" /> > > Mailman Web has the following configuration: > > /etc/mailman3/settings.py > > # Mailman Web configuration file. > # /etc/mailman3/settings.py > > from mailman_web.settings.base import * > from mailman_web.settings.mailman import * > > # 'collectstatic' command will copy all the static files here. > # Alias this location from your webserver to `/static` > STATIC_ROOT = '/opt/mailman/web/static' > > All static files are placed in /opt/mailman/web/static > > drwxr-xr-x. 5 mailman mailman 38 Sep 6 15:48 admin > drwxr-xr-x. 4 mailman mailman 48 Sep 6 17:08 CACHE > drwxr-xr-x. 2 mailman mailman 39 Sep 6 15:48 css > drwxr-xr-x. 5 mailman mailman 38 Sep 6 15:48 django_extensions > drwxr-xr-x. 5 mailman mailman 38 Sep 6 15:48 django-mailman3 > drwxr-xr-x. 6 mailman mailman 51 Sep 6 15:48 hyperkitty > drwxr-xr-x. 3 mailman mailman 128 Sep 6 15:48 img > drwxr-xr-x. 2 mailman mailman 62 Sep 6 15:48 js > drwxr-xr-x. 8 mailman mailman 98 Sep 6 15:48 libs > drwxr-xr-x. 6 mailman mailman 50 Sep 6 15:48 postorius > drwxr-xr-x. 7 mailman mailman 63 Sep 6 15:48 rest_framework > > /usr/lib/python3.9/site-packages/mailman_web/settings/base.py > - > #: The base directory for logs and database. > BASE_DIR = Path('/opt/mailman/web') > > #: Enable Development Mode. > DEBUG = False > > #: URL Configuration for Django > ROOT_URLCONF = 'mailman_web.urls' > > #: Default path where static files will be placed. > STATIC_ROOT = '/opt/mailman/web/static' > #: URL prefix for static files. > #: Example: "http://example.com/static/";, "http://static.example.com/"; > STATIC_URL = '/static/' > > ... > > /usr/lib/python3.9/site-packages/mailman_web/settings/mailman.py > > > BASE_DIR = Path('/opt/mailman/web') > > #: Mailman Core default API Path > MAILMAN_REST_API_URL = 'http://localhost:8001' > > #: Base URL where Django/Mailman-web would be listening for requests. Used > by > #: Mailman Core for fetching templates. > POSTORIUS_TEMPLATE_BASE_URL = 'http://localhost:8000' > ... > > Why dont static files get found ? > If I set Debug = True then static files are getting found. Why ? > But in production mode Debug should be set False. > How to solve static files problem in production ? > If you installed Mailman3 using your Distros packages, then check this: https://wiki.list.org/x/12812344 Otherwise you could follow this HOWTO: https://docs.mailman3.org/en/latest/install/virtualenv.html and it may work easily. -- 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] -- Mailman-Users mailing list -- mailman-users@python.org To unsubscribe send an email to mailman-users-le...@python.org https://mail.python.org/mailman3/lists/mailman-users.python.org/ Mailman FAQ: http://wiki.list.org/x/AgA3 Security Policy: http://wiki.list.org/x/QIA9 Searchable Archives: https://www.mail-archive.com/mailman-users@python.org/ https://mail.python.org/archives/list/mailman-users@python.org/ Member address: arch...@mail-archive.com
[Mailman-Users] Re: Digests are not sent
On 9/8/24 20:56, Mark Sapiro wrote: Find the error and traceback in Mailman's `error` log. See https://wiki.list.org/DOC/Mailman%20and%20CPanel for more information. The log I received contains tracebacks like ``` admin(24054): Traceback (most recent call last): admin(24054): File "/usr/local/cpanel/base/3rdparty/mailman/scripts/driver", line 117, in run_main admin(24054): main() admin(24054): File "/usr/local/cpanel/3rdparty/mailman/Mailman/Cgi/admin.py", line 223, in main admin(24054): change_options(mlist, category, subcat, cgidata, doc) admin(24054): File "/usr/local/cpanel/3rdparty/mailman/Mailman/Cgi/admin.py", line 1474, in change_options admin(24054): gui.handleForm(mlist, category, subcat, cgidata, doc) admin(24054): File "/usr/local/cpanel/3rdparty/mailman/Mailman/Gui/GUIBase.py", line 181, in handleForm admin(24054): self._setValue(mlist, property, val, doc) admin(24054): File "/usr/local/cpanel/3rdparty/mailman/Mailman/Gui/Digest.py", line 148, in _setValue admin(24054): status = mlist.send_digest_now() admin(24054): File "/usr/local/cpanel/3rdparty/mailman/Mailman/Digester.py", line 60, in send_digest_now admin(24054): ToDigest.send_digests(self, mboxfp) admin(24054): File "/usr/local/cpanel/3rdparty/mailman/Mailman/Handlers/ToDigest.py", line 157, in send_digests admin(24054): send_i18n_digests(mlist, mboxfp) admin(24054): File "/usr/local/cpanel/3rdparty/mailman/Mailman/Handlers/ToDigest.py", line 258, in send_i18n_digests admin(24054): addresses = getaddresses([Utils.oneline(msg.get('from', ''), lcset)]) admin(24054): File "/usr/lib64/python2.7/email/utils.py", line 168, in getaddresses admin(24054): fieldvalues = [unicode(v) for v in fieldvalues] admin(24054): UnicodeDecodeError: 'ascii' codec can't decode byte 0xe4 in position 8: ordinal not in range(128) ``` The issue is this is an English language list with the list's charset = ascii and there is a message in the digest mbox with a non-ascii display name in its From: header. In cPanel the digest mbox is at /usr/local/cpanel/3rdparty/mailman/lists//digest.mbox - you need to edit that file and remove ant non-ascii from From: headers. -- Mark Sapiro The highway is for gamblers, San Francisco Bay Area, Californiabetter use your sense - B. Dylan -- Mailman-Users mailing list -- mailman-users@python.org To unsubscribe send an email to mailman-users-le...@python.org https://mail.python.org/mailman3/lists/mailman-users.python.org/ Mailman FAQ: http://wiki.list.org/x/AgA3 Security Policy: http://wiki.list.org/x/QIA9 Searchable Archives: https://www.mail-archive.com/mailman-users@python.org/ https://mail.python.org/archives/list/mailman-users@python.org/ Member address: arch...@mail-archive.com