Change the default value for the General Archive Policy

Dear list,
currently, when I create a new mailing list with MM3 the value for "Archive policy" is always set to "Public archives". I'd like to change the default value for "Archive policy" to "Do not archive this list". How can I do this? In Debian 12 I find in </usr/lib/python3/dist-packages/postorius/forms/list_forms.py>:
mlist_properties = ['archivers']
archive_policy_choices = (
('public', _('Public archives')),
('private', _('Private archives')),
('never', _('Do not archive this list')),
)
archive_rendering_mode_choices = (
('text', _('Plain text')),
('markdown', _('Markdown text')),
)
archive_policy = forms.ChoiceField(
choices=archive_policy_choices,
widget=forms.RadioSelect,
label=_('Archive policy'),
help_text=_('Policy for archiving messages for this list'),
)
but have no idea how to change the settings here. Your help is very appreciated.
Best regards, Markus Grandpré
-- Markus Grandpré Universität Konstanz Kommunikations-, Informations- und Medienzentrum (KIM) Abteilung IT-Dienste Forschung, Lehre und Infrastruktur Sachgebiet Diensteadministration Tel: ++49 7531 88 4342

Dear list,
currently, when I create a new mailing list with MM3 the value for "Archive policy" is always set to "Public archives". I'd like to change the default value for "Archive policy" to "Do not archive this list". How can I do this? In Debian 12 I find in </usr/lib/python3/dist-packages/postorius/forms/list_forms.py>: ... but have no idea how to change the settings here. Your help is very appreciated. Are you creating the list in Postorius. If so, you have a choice for
On 6/23/25 08:03, Markus Grandpré wrote: list style. Currently those choices are: ``` Announce only mailing list style. Ordinary discussion mailing list style. Discussion mailing list style with private archives. ``` There is currently no style for a list without archives, but you can implement one. See the thread at https://lists.mailman3.org/archives/list/mailman-users@mailman3.org/thread/Q... for hints on how to do this with a plugin. Alternatively, you can do it with a patch like: ``` --- a/src/mailman/styles/default.py +++ b/src/mailman/styles/default.py @@ -18,6 +18,7 @@ """Application of list styles to new and existing lists.""" from mailman.core.i18n import _ +from mailman.interfaces.archiver import ArchivePolicy from mailman.interfaces.styles import IStyle from mailman.styles.base import ( Announcement, @@ -91,3 +92,25 @@ class PrivateDefaultStyle( Private.apply(self, mailing_list) Discussion.apply(self, mailing_list) Moderation.apply(self, mailing_list) + + +@public +@implementer(IStyle) +class PublicNoArchiveStyle( + + Identity, BasicOperation, Bounces, Public, Discussion, Moderation): + + """The legacy default style with no archives.""" + + name = 'legacy-default-no-archive' + description = _('Ordinary discussion mailing list style with no archive.') + + def apply(self, mailing_list): + """See `IStyle`.""" + Identity.apply(self, mailing_list) + BasicOperation.apply(self, mailing_list) + Bounces.apply(self, mailing_list) + Public.apply(self, mailing_list) + Discussion.apply(self, mailing_list) + Moderation.apply(self, mailing_list) + mailing_list.archive_policy = ArchivePolicy.never ``` If you are creating lists from the command line `mailman create`, there is a --style-name option to specify the style. -- Mark Sapiro <mark@msapiro.net> The highway is for gamblers, San Francisco Bay Area, California better use your sense - B. Dylan

Dear Mr Sapiro, many thanks for your reply. When I create a mailing list without an archive, I’ve noticed that the default value under "Settings > Archiving > Archive policy" is always set to "Public archives". I was wondering if it's possible to change the default to "Do not archive this list" instead. Additionally, in an earlier email, you mentioned that a more convenient way to set default values would be introduced in an upcoming version. Could you please let me know the current status of that development? Many thanks in advance. Best regards, Markus Am 6/23/25 um 19:53 schrieb Mark Sapiro:
On 6/23/25 08:03, Markus Grandpré wrote:
Dear list,
currently, when I create a new mailing list with MM3 the value for "Archive policy" is always set to "Public archives". I'd like to change the default value for "Archive policy" to "Do not archive this list". How can I do this? In Debian 12 I find in </usr/lib/python3/dist-packages/postorius/forms/list_forms.py>: ... but have no idea how to change the settings here. Your help is very appreciated. Are you creating the list in Postorius. If so, you have a choice for list style. Currently those choices are:
Announce only mailing list style. Ordinary discussion mailing list style. Discussion mailing list style with private archives.
There is currently no style for a list without archives, but you can implement one. See the thread at https:// lists.mailman3.org/archives/list/mailman-users@mailman3.org/thread/Q6QVDWCY3MXPGWEIDWZ277SS3FPJCUVT/ for hints on how to do this with a plugin.
Alternatively, you can do it with a patch like: ``` --- a/src/mailman/styles/default.py +++ b/src/mailman/styles/default.py @@ -18,6 +18,7 @@ """Application of list styles to new and existing lists."""
from mailman.core.i18n import _ +from mailman.interfaces.archiver import ArchivePolicy from mailman.interfaces.styles import IStyle from mailman.styles.base import ( Announcement, @@ -91,3 +92,25 @@ class PrivateDefaultStyle( Private.apply(self, mailing_list) Discussion.apply(self, mailing_list) Moderation.apply(self, mailing_list) + + +@public +@implementer(IStyle) +class PublicNoArchiveStyle( + + Identity, BasicOperation, Bounces, Public, Discussion, Moderation): + + """The legacy default style with no archives.""" + + name = 'legacy-default-no-archive' + description = _('Ordinary discussion mailing list style with no archive.') + + def apply(self, mailing_list): + """See `IStyle`.""" + Identity.apply(self, mailing_list) + BasicOperation.apply(self, mailing_list) + Bounces.apply(self, mailing_list) + Public.apply(self, mailing_list) + Discussion.apply(self, mailing_list) + Moderation.apply(self, mailing_list) + mailing_list.archive_policy = ArchivePolicy.never ``` If you are creating lists from the command line `mailman create`, there is a --style-name option to specify the style.
-- Markus Grandpré Universität Konstanz Kommunikations-, Informations- und Medienzentrum (KIM) Abteilung IT-Dienste Forschung, Lehre und Infrastruktur Sachgebiet Diensteadministration Tel: ++49 7531 88 4342

On 6/24/25 06:31, Markus Grandpré wrote:
Dear Mr Sapiro,
many thanks for your reply. When I create a mailing list without an archive, I’ve noticed that the default value under "Settings > Archiving
Archive policy" is always set to "Public archives". I was wondering if it's possible to change the default to "Do not archive this list" instead.
I don't understand. What do you mean by create a mailing list without an archive?
Do you mean that your mailman.cfg does not enable any archivers or something else?
-- Mark Sapiro <mark@msapiro.net> The highway is for gamblers, San Francisco Bay Area, California better use your sense - B. Dylan

Markus Grandpré writes:
many thanks for your reply. When I create a mailing list without an archive,
You cannot do that in Postorius. All of the "style" options provide for an archive. "Ordinary discussion" and "announce" have public archives, and the last option is "discussion with private archives". How are you doing this?
"Settings > Archiving > Archive policy" is always set to "Public archives". I was wondering if it's possible to change the default to "Do not archive this list" instead.
The choices for setting are defined at line 386 (or so) of postorius/forms/list_forms.py:
archive_policy_choices = (
('public', _('Public archives')),
('private', _('Private archives')),
('never', _('Do not archive this list')),
)
This is implemented as a line of radio buttons. There is no default for a *new* list, it's implied by the style choice. For an existing list you are shown the current setting -- there's no default to change to, you have to click on a button. If by "default" you mean "first in the list", you can patch the form in Postorius, but we're not going to change the order, since our primary audience is public discussion lists.
In theory we could provide a mechanism to configure the order, but I think that's very unlikely to happen -- Mailman isn't and doesn't want to be Emacs.
-- GNU Mailman consultant (installation, migration, customization) Sirius Open Source https://www.siriusopensource.com/ Software systems consulting in Europe, North America, and Japan

Markus Grandpré wrote:
currently, when I create a new mailing list with MM3 the value for "Archive policy" is always set to "Public archives". I'd like to change the default value for "Archive policy" to "Do not archive this list". How can I do this?
Perhaps <https://lists.mailman3.org/archives/list/mailman-users@mailman3.org/thread/7...> has some pointers how to accomplish that?
-thh

Dear Mr Hochstein,
Thank you very much for providing the link. I'm afraid the same misunderstanding as with Marc Sapiro has occurred here. I'm aware that there are three different styles to choose from when creating a mailing list. However, the setting "Settings > Archiving > Archive policy" can be configured independently of the list creation process.
Still, it would be beneficial if the default value after creating a list without an archive were not "Public archive", but rather "Do not archive this list". This would help prevent list administrators from being tempted to immediately enable a public archive when setting up an archive later—especially in cases where the list is intended to be private.
Kind regards, Markus Grandpré
Am 6/23/25 um 22:48 schrieb Thomas Hochstein:
Markus Grandpré wrote:
currently, when I create a new mailing list with MM3 the value for "Archive policy" is always set to "Public archives". I'd like to change the default value for "Archive policy" to "Do not archive this list". How can I do this?
Perhaps <https://lists.mailman3.org/archives/list/mailman-users@mailman3.org/thread/7...> has some pointers how to accomplish that?
-thh
Mailman-users mailing list -- mailman-users@mailman3.org To unsubscribe send an email to mailman-users-leave@mailman3.org https://lists.mailman3.org/mailman3/lists/mailman-users.mailman3.org/ Archived at: https://lists.mailman3.org/archives/list/mailman-users@mailman3.org/message/...
This message sent to markus.grandpre@uni-konstanz.de
-- Markus Grandpré Universität Konstanz Kommunikations-, Informations- und Medienzentrum (KIM) Abteilung IT-Dienste Forschung, Lehre und Infrastruktur Sachgebiet Diensteadministration Tel: ++49 7531 88 4342
participants (4)
-
Mark Sapiro
-
Markus Grandpré
-
Stephen J. Turnbull
-
Thomas Hochstein