Thanks Stephen,
I see your point. I am aware of the limitations of the patched list.py, but it is documented for myself (and uses the bind volume mechanism to persist). I lack the time to develop a plugin for my purposes. I basically want to set defaults my lists and this mechanism is simple and works. I am not sure how such a new plugin should be combined with my stack, perhaps an additional docker package. Seems overkill. Kudos to the mailman community that this software is still maintained.
Best regards,
Wessel
-----Oorspronkelijk bericht----- Van: Stephen J. Turnbull <steve@turnbull.jp> Verzonden: zondag 12 april 2026 19:42 Aan: Wessel Kraaij <wessel.kraaij@outlook.com> CC: mailman-users@mailman3.org Onderwerp: [MM3-users] Re: Changing default language for lists
Wessel Kraaij writes:
I changed several defaults in mailman core (e.g. preferred > language).
Do you mean "default_language"? There is no default "preferred language"; that's a list-specific setting.
And what do you mean by "changed in mailman core"? Settings in mailman.cfg? Source patches?
However, Postorius (maxking version) initializes the defaults for > new lists and overrides the core defaults using a PATCH call on the > REST API.
I don't understand why that would happen. The core defaults are the source of the initial values in the create list form. Specifically, when Postorius creates a list, it initializes a proxy object in mailmanclient, which talks REST API to Mailman core, which creates an actual MailingList object. This uses the defaults from the system_defaults object or default style if one is defined. This is reflected in Postorius's proxy MailingList, which is used to initialize values in the form presented to the administrator. Then they can change various aspects of the list's identity including preferred language from that form.
So if you have set default_language in the [mailman] section of mailman.cfg, you should get the desired initial preferred language for your lists.
As far as I know, this hasn't been reported before. It's not happening to most installations (and many of them do specify default_language). It's true that docker-mailman is not the most common configuration, but it does use stock mailman and postorius from PyPI. So I really don't understand why you have a problem if you are creating mailman.cfg correctly.
With the aid of some gentle AI chatbot,
Heaven preserve us from *all* AI chatbots, gentle or violent. All are sources of bad advice and annoyance to volunteer software maintainers.
You absolutely should not need to patch any code to do what you want to do with preferred_language.
Here is the code snippet [added to list_new in > postorius/views/list.py] that solved my issue
This is a bad idea. You will have to remember to patch Postorius again if you ever update it. Also, if for some reason you ever create lists using the
mailman createutility,mailman shell, or a REST API client, these settings will not be applied to those lists.I added the following 'defaults' in my settings file: DEFAULT_LIST_SETTINGS = { 'preferred_language': 'nl', 'subscription_policy': 'confirm', 'default_member_action': 'defer', 'default_nonmember_action': 'hold', 'reply_goes_to_list': 'point_to_list', 'reply_to_address': '', 'max_message_size': 10240, 'anonymous_list': False, 'dmarc_mitigate_action': 'munge_from', 'collapse_alternatives': False, 'dmarc_mitigate_unconditionally': True, }
Most of the settings above cannot currently be changed in mailman.cfg. However, you can create a plugin to do this without patching any sources. The example plugin <https://emea01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgit lab.com%2Fmailman%2Fexample-mailman- plugin&data=05%7C02%7C%7C4de498f0fbc14109513f08de98bada66%7C8 4df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C639116125477808558 %7CUnknown%7CTWFpbGZsb3d8eyJFbXB0eU1hcGkiOnRydWUsIlYiOiIwLjAu MDAwMCIsIlAiOiJXaW4zMiIsIkFOIjoiTWFpbCIsIldUIjoyfQ%3D%3D%7C0%7C %7C%7C&sdata=qVKt2jUFxn7mHxRWi1%2FstTE18d6rbG4VNJPlPkYPP0I%3D &reserved=0> shows how to create a trivial style (as well as several components you don't need). See documentation in https://emea01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fdoc s.mailman3.org%2Fprojects%2Fmailman%2Fen%2Flatest%2Fsrc%2Fmailman %2Fplugins%2Fdocs%2Fintro.html&data=05%7C02%7C%7C4de498f0fbc141 09513f08de98bada66%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0 %7C639116125477828811%7CUnknown%7CTWFpbGZsb3d8eyJFbXB0eU1 hcGkiOnRydWUsIlYiOiIwLjAuMDAwMCIsIlAiOiJXaW4zMiIsIkFOIjoiTWFpbCIsIl dUIjoyfQ%3D%3D%7C0%7C%7C%7C&sdata=NUT4CJaIVuKuN08asfLm7Z6bn N7i0PI4TPOYccC5xgY%3D&reserved=0. For examples of styles, see mailman/styles/default.py. To change the default style, edit (or add) the "default" setting in the "[styles]" section of mailman.cfg.
Regards, Steve
-- GNU Mailman consultant (installation, migration, customization) Sirius Open Source https://emea01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fww w.siriusopensource.com%2F&data=05%7C02%7C%7C4de498f0fbc1410951 3f08de98bada66%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C6 39116125477844590%7CUnknown%7CTWFpbGZsb3d8eyJFbXB0eU1hcGki OnRydWUsIlYiOiIwLjAuMDAwMCIsIlAiOiJXaW4zMiIsIkFOIjoiTWFpbCIsIldUIjo yfQ%3D%3D%7C0%7C%7C%7C&sdata=WkOqcCK3aQR1pAc79rzJKQN4%2B MR%2B7DbAmnUIx3z%2FDA4%3D&reserved=0 Software systems consulting in Europe, North America, and Japan