Disabling the version disclosure.

Dear All,
Myself Ninad. 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.
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.
Thanking you,
Ninad.

On 3/25/25 1:39 PM, Ninad N. Shaha via Mailman-Users wrote:
Myself Ninad. 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.
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> The highway is for gamblers, San Francisco Bay Area, California better use your sense - B. Dylan

On 3/25/25 1:39 PM, Ninad N. Shaha via Mailman-Users wrote:
Myself Ninad. I recently installed Mailman3. I am new to MM3.
This list is for Mailman 2.1. For Mailman 3, please use https://lists.mailman3.org/mailman3/lists/mailman-users@mailman3.org/
-- Mark Sapiro <mark@msapiro.net> The highway is for gamblers, San Francisco Bay Area, California better use your sense - B. Dylan

Ninad N. Shaha via Mailman-Users writes:
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.
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

Hi Steve,
Thank you so much the solution.
1st method suggested by you worked.
copied the template files and configured the settings.py files as suggest worked without changing actual html files.
Thanks again.
Regards,
Ninad.
On 25-03-2025 17:56, Stephen J. Turnbull wrote:
Ninad N. Shaha via Mailman-Users writes:
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.
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
Mailman-Users mailing list -- mailman-users@python.org To unsubscribe send an email to mailman-users-leave@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: ninad@iitb.ac.in
participants (4)
-
Mark Sapiro
-
Ninad
-
Ninad N. Shaha
-
Stephen J. Turnbull