Disabling the version disclosure.

Dear All,
I recently installed Mailman3. I am new to MM3. As per my organization's policy, I need to turn off the version disclosure of Mailman Core, Postorius, and Hyperkitty. Specifically shown in the footer and in the system information page.
Please let me know if there are any settings that I can set. I don't want to change any html code for the same.
Please guide me in this regard.

On March 25, 2025 5:18:13 PM GMT+07:00, ninad--- via Mailman-users <mailman-users@mailman3.org> wrote:
Please let me know if there are any settings that I can set. I don't want to change any html code for the same.
There are no settings for this. To remove the version from Postorius footers you would need to edit postorius/templates/postorius/base.html and for Hyperkitty, hyperkitty/templates/hyperkitty/base.html
For Mailman core, where are you seeing the version exposed?
-- Mark Sapiro <mark@msapiro.net> Sent from my Not_an_iThing with standards compliant, open source software.

Thank you, Mark, for the response.
Sorry, it's my mistake. The mailman core version is only displayed on the system information page.

Steve from another mailman list suggested the below solutions. 1st method suggested worked. This is just for this group's information. Thank Steve for the solution. --------------------------------------- Suggested solution ------------------------------------------------------- It helps to explain why you don't want to change the HTML code, because there are several ways to do this, with different implications both for the page's appearance and for future maintenance. The visually cleanest way to do this is to copy the files
site-packages/postorius/templates/postorius/base.html site-packages/hyperkitty/templates/hyperkitty/base.html
to
/etc/mailman3/templates/postorius/base.html /etc/mailman3/templates/hyperkitty/base.html
search for '_VERSION' and delete or edit the version stanzas near the end of those files, add
TEMPLATES[0]['DIRS'].append('/etc/mailman3/templates') somewhere in /etc/mailman3/settings.py, and restart mailman-web (typically as root, using 'systemctl restart mailmanweb').
Alternatively and less visually appealing you can clear the version variable itself with a file 'site-packages/version_hack.py' containing the lines
def suppress_version(request): return {"HYPERKITTY_VERSION": "Wouldn't you like to know?", "POSTORIUS_VERSION": "Wouldn't you like to know?"}
... you probably want to change the strings to empty strings ... and add the lines
TEMPLATES[0]['OPTIONS']['context_processors'].append( 'version_hack.suppress_version' )
somewhere in /etc/mailman3/settings.py, and restart mailman-web. The former method of overriding the templates is a supported API, and very unlikely to be obsoleted any time soon. The latter method of patching the variables is something of a hack, and also leaves the tags like "Postorius version" visible in the page.
Steve
participants (2)
-
Mark Sapiro
-
ninad@iitb.ac.in