Change config to create a new list with all archives off

Can archiving be changed anywhere in mailman3 configs, so then all new lists created do not archive by default?

On Mon, May 29, 2023 at 2:36 PM Tibor Molnar < tibor.molnar@waltoninstitute.ie> wrote:
Can archiving be changed anywhere in mailman3 configs, so then all new lists created do not archive by default?
Off the top of my head, I think the following can do it:
[archiver.hyperkitty] enable: no
[archiver.prototype] enable: no
I believe the 'enable: no' is the default. Without enabling any of the possible archivers, I believe there will be no archiving, but I could be wrong.

Hi Odhiambo,
I have tried that but the Archive policy stays public archives by default on freshly created lists still.

On Mon, May 29, 2023 at 4:21 PM Tibor Molnar < tibor.molnar@waltoninstitute.ie> wrote:
Hi Odhiambo,
I have tried that but the Archive policy stays public archives by default on freshly created lists still.
Are there any archives created at all? Are they accessible?

Well, there are no archives created after I change them settings but it is not what I'm looking for. If I do this all the lists will stop archiving. I was hoping that there was something already implemented or there is a config that I can change that allows newly created lists to be configured not to archive messages by default, or publicly archive by default....

Tibor Molnar writes:
Can archiving be changed anywhere in mailman3 configs, so then all new lists created do not archive by default?
Unfortunately, no. Once we get last year's GSoC merged, there will be, but that's going to have to wait a few weeks as it's not really ready and I don't have time for a while.
What you can do is create a style in Python and make that the default. In $SITE_PKGS/mailman/styles/default.py, append:
-------------------------------- cut here -------------------------------- from mailman.interfaces.archiver import ArchivePolicy
@public @implementer(IStyle) class ArchivesDefaultDisabledStyle(LegacyDefaultStyle):
"""The legacy default style with archiving disabled."""
name = 'archives-disabled'
description = _('Ordinary discussion mailing list style,'
' with archiving disabled')
def apply(self, mailing_list):
super().apply(self, mailing_list)
mlist.archive_policy = ArchivePolicy.never
-------------------------------- cut here --------------------------------
In mailman.cfg find and modify or create:
-------------------------------- cut here -------------------------------- [styles] default: archives-disabled -------------------------------- cut here --------------------------------
Untested, feel free to ask if it doesn't seem to work.
This really should be implemented as a plug-in so default.py being overwritten in an upgrade won't be a problem, but the plug-in API is annoyingly complicated and the example plug-in over-engineered, and I couldn't get it to work (and in the project where I learned to do this I am not being paid enough to care ;-). The approach above was straightforward.
Eventually I'll get around to doing the plug-in approach, and maybe in the meantime Mark or Abhilash will speak up. If Those Who Know don't show up soon, ask again in the medium term (but before you update Mailman and it gets overwritten :-).
Steve
participants (3)
-
Odhiambo Washington
-
Stephen J. Turnbull
-
Tibor Molnar