I've installed the mailman3, mailman3-full, mailman3-web, and python3-django-mailman3 packages on Debian trixie. Everything is working - thank you developers!
However, I would like to modify how the web pages look (both postorius and hyperkitty). I noticed that the web interface on this server (lists.mailman3.org) looks much nicer than the one showing on my server. For one, on my installed instance, the left and right margins are not set, so content is flush with the edge of the screen.
What is the easiest/most maintainable way to add my own css code and/or files to adjust how the web interface is displayed? Is that possible?
Thank you! jamie
looks much nicer than the one showing on my server.
content is flush with the edge of the screen.
That description sounds like a mistake; we've installed mm3 and it matches this site (lists.mailman3.org). You should follow the venv installation method rather than the Debian packages.
jamie--- via Mailman-users writes:
I've installed the mailman3, mailman3-full, mailman3-web, and python3-django-mailman3 packages on Debian trixie. Everything is working - thank you developers!
You're welcome.
However, I would like to modify how the web pages look (both postorius and hyperkitty). I noticed that the web interface on this server (lists.mailman3.org) looks much nicer than the one showing on my server. For one, on my installed instance, the left and right margins are not set, so content is flush with the edge of the screen.
Most likely there's a problem accessing the CSS files for Postorius and/or HyperKitty.
What is the easiest/most maintainable way to add my own css code and/or files to adjust how the web interface is displayed? Is that possible?
It is possible (I've done it for some simple changes), but this is a Django question. You probably want to ask on the Django lists if you want to do something more extensive than change some of the text in the pages.
The easiest way in my experience is to find which of the directories on the path to the CSS mailman-web needs doesn't have at least search (o=x) set for both the 'mailman' user and the webserver user (typically 'www-data' on Debian family OSes), and fix that. Look in the error logs for both mailman-web and the webserver for "couldn't access something.css". That's partly a joke, I would think Debian would get this right. But I've run into that twice on systems for security-paranoid clients. Check it, you don't want to write it from scratch since you do like the default style pretty well.
If you get the default styles running, and nevertheless want to do more, Django has search paths for such files that you can add to in 'settings.py'. I recommend adding "/etc/mailman3/whatever" fvo whatever = templates, styles, etc. and putting your substitute files there. Debian won't touch those (except may if you purge the configs?)
Of course you'll have to deal with any changes in parent templates, but this is much more maintainable than changing the distribution templates and styles.
Steve
-- GNU Mailman consultant (installation, migration, customization) Sirius Open Source https://www.siriusopensource.com/ Software systems consulting in Europe, North America, and Japan
However, I would like to modify how the web pages look (both postorius and hyperkitty). I noticed that the web interface on this server (lists.mailman3.org) looks much nicer than the one showing on my server. For one, on my installed instance, the left and right margins are not set, so content is flush with the edge of the screen.
Most likely there's a problem accessing the CSS files for Postorius and/or HyperKitty.
Oh - if my default installation could look like the lists.mailman3.org then yes, I would be happy to have that and don't need to customize.
The easiest way in my experience is to find which of the directories on the path to the CSS mailman-web needs doesn't have at least search (o=x) set for both the 'mailman' user and the webserver user (typically 'www-data' on Debian family OSes), and fix that. Look in the error logs for both mailman-web and the webserver for "couldn't access something.css".
I didn't have any luck finding errors or any files with the wrong permissions.
But... your suggestion led me to /etc/mailman3/mailman-web.py and this setting:
COMPRESS_OFFLINE = True
Which led me to run:
mailman-web compress
which resolved a number of CSS problems. Thank you!
However, my archive page still doesn't look quite like the one on lists.mailman3.org. Specifically, I am not getting the nav bar with a blue background. The style setting the navbar background is present in the following file on my server:
/usr/share/python3-django-hyperkitty/static/hyperkitty/libs/hyperkitty.css
In the stanza:
nav#navbar-main { background-color: #086dd7; }
And, I can find that stanza in the output of the css file for lists.mailman3.org:
https://lists.mailman3.org/static/CACHE/css/output.ea180573a244.css
But I don't have it in the corresponding output of that file on my server.
Any suggestions for debugging that missing stanza? I also tried re-running maiman-web collectstatic.
And, maybe a more critical difference, is that on the lists.mailman3.org server, the output css file starts with:
/*!
- Bootstrap v5.1.3 (https://getbootstrap.com/)
Whereas on my server it starts with:
/*!
- Bootstrap v4.3.1 (https://getbootstrap.com/)
So maybe my remaining problems are due to a different version of Bootstrap being shipped in Debian Trixie?
Lastly, maybe just unrelated noise, but when I run mailman-web compress I get this error repeated a few times (with different templates):
Invalid template usersessions/usersession_list.html: 'humanize' is not a registered tag library.
Thanks again for your help getting my web interface looking better.
jamie
On 11/8/25 08:28, Jamie McClelland via Mailman-users wrote:
But... your suggestion led me to /etc/mailman3/mailman-web.py and this setting:
COMPRESS_OFFLINE = True
Which led me to run:
mailman-web compress
which resolved a number of CSS problems. Thank you!
However, my archive page still doesn't look quite like the one on lists.mailman3.org.
There are several issues and merged fixes about missing styling, which are probably not in even the latest Debian packages.
-- Mark Sapiro <mark@msapiro.net> The highway is for gamblers, San Francisco Bay Area, California better use your sense - B. Dylan
On 11/8/25 11:28 AM, Jamie McClelland wrote:
However, my archive page still doesn't look quite like the one on lists.mailman3.org. Specifically, I am not getting the nav bar with a blue background. The style setting the navbar background is present in the following file on my server:
/usr/share/python3-django-hyperkitty/static/hyperkitty/libs/hyperkitty.css
In the stanza:
nav#navbar-main { background-color: #086dd7; }
And, I can find that stanza in the output of the css file for lists.mailman3.org:
https://lists.mailman3.org/static/CACHE/css/output.ea180573a244.css
But I don't have it in the corresponding output of that file on my server.
Any suggestions for debugging that missing stanza?
I ran rm -rf /var/lib/mailman3/web/static/*
And then re-ran:
mailman-web collectstatic
And problem solved!
Lastly, maybe just unrelated noise, but when I run mailman-web compress I get this error repeated a few times (with different templates):
Invalid template usersessions/usersession_list.html: 'humanize' is not a registered tag library.
I added:
'django.contrib.humanize',
To INSTALLED_APPS in /etc/mailman3/mailman-web.py to make this error go away.
So, all problems solved! Thanks again for your help.
jamie
participants (5)
-
Jamie McClelland -
jamie@mayfirst.org -
Mark Sapiro -
Sam Darwin -
Stephen J. Turnbull