Mailman-users search results for query "public lists per domain"
mailman-users@mailman3.org- 11 messages
Re: Can't add emails to accept_these_nonmembers
by Ibiam Chihurumnaya
Mark Sapiro wrote:
> On 2/26/26 13:20, Ibiam Chihurumnaya via Mailman-users wrote:
> > I'm doing it in mailman shell, list_name is a List object, and it seems to have a settings
> > attribute as list_name.settings returns
> > {'acceptable_aliases': [], ...}
> > I would really like to know what Mailman version this is, and how it was
> installed? In my case with Mailman core from the head of the GitLab branch:
> $ mailman shell -l list.example.com
> Welcome to the GNU Mailman shell
> Use commit() to commit changes.
> Use abort() to discard changes since the last commit.
> Exit with ctrl+D does an implicit commit() but exit() does not.
> The variable 'm' is the list.example.com mailing list
> >>> m.settings
> Traceback (most recent call last):
> File "<console>", line 1, in <module>
> AttributeError: 'MailingList' object has no attribute 'settings'
> >>> m.settings['accept_these_nonmembers']
> Traceback (most recent call last):
> File "<console>", line 1, in <module>
> AttributeError: 'MailingList' object has no attribute 'settings'
> >>>
Currently running Mailman 3.3.10 and I followed the instructions from https://docs.mailman3.org/en/latest/install/virtualenv.html# to install.
This is the output from mine, I get the same output as you do when I try exactly what you do;
mailman shell -l systems-logs(a)lists.sugarlabs.org
Welcome to the GNU Mailman shell
Use commit() to commit changes.
Use abort() to discard changes since the last commit.
Exit with ctrl+D does an implicit commit() but exit() does not.
The variable 'm' is the systems-logs(a)lists.sugarlabs.org mailing list
>>> m.settings
Traceback (most recent call last):
File "<console>", line 1, in <module>
AttributeError: 'MailingList' object has no attribute 'settings'
I get something else when I do it differently - how I've been doing it so far -.
mailman shell
Welcome to the GNU Mailman shell
Use commit() to commit changes.
Use abort() to discard changes since the last commit.
Exit with ctrl+D does an implicit commit() but exit() does not.
>>> from mailmanclient import Client
>>> from mailmanclient import Client
>>> client = Client('http://localhost:8001/3.1', '**', '**')
>>> sg = client.domains[0]
>>> sy = sg.get_lists()[-1]
>>> sy
<List 'systems-logs(a)lists.sugarlabs.org'>
>>> sy.settings
{'acceptable_aliases': [], 'accept_these_nonmembers': [], 'admin_immed_notify': True, 'admin_notify_mchanges': False, 'administrivia': True, 'advertised': False, 'allow_list_posts': True, 'anonymous_list': False, 'archive_policy': 'public', 'archive_rendering_mode': 'text', 'autorespond_owner': 'none', 'autorespond_postings': 'none', 'autorespond_requests': 'none', 'autoresponse_grace_period': '90d', 'autoresponse_owner_text': '', 'autoresponse_postings_text': '', 'autoresponse_request_text': '', 'bounces_address': 'systems-logs-bounces(a)lists.sugarlabs.org', 'bounce_info_stale_after': '7d', 'bounce_notify_owner_on_bounce_increment': False, 'bounce_notify_owner_on_disable': True, 'bounce_notify_owner_on_removal': True, 'bounce_score_threshold': 5, 'bounce_you_are_disabled_warnings': 3, 'bounce_you_are_disabled_warnings_interval': '7d', 'collapse_alternatives': True, 'convert_html_to_plaintext': False, 'created_at': '2026-02-04T21:53:10.928951', 'default_member_action': 'defer', 'default_nonmember_action': 'accept', 'description': '', 'digest_last_sent_at': '2026-02-27T11:24:11.916379', 'digest_send_periodic': True, 'digest_size_threshold': 30.0, 'digest_volume_frequency': 'monthly', 'digests_enabled': True, 'display_name': 'Systems-logs', 'discard_these_nonmembers': [], 'dmarc_mitigate_action': 'no_mitigation', 'dmarc_mitigate_unconditionally': False, 'dmarc_addresses': [], 'dmarc_moderation_notice': '', 'dmarc_wrapped_message_text': '', 'emergency': False, 'filter_action': 'discard', 'filter_content': False, 'filter_extensions': [], 'filter_types': [], 'first_strip_reply_to': False, 'forward_unrecognized_bounces_to': 'administrators', 'fqdn_listname': 'systems-logs(a)lists.sugarlabs.org', 'gateway_to_mail': False, 'gateway_to_news': False, 'hold_these_nonmembers': [], 'include_rfc2369_headers': True, 'info': '', 'join_address': 'systems-logs-join(a)lists.sugarlabs.org', 'last_post_at': '2026-02-27T11:32:51.317220', 'leave_address': 'systems-logs-leave(a)lists.sugarlabs.org', 'linked_newsgroup': '', 'list_name': 'systems-logs', 'mail_host': 'lists.sugarlabs.org', 'max_message_size': 40, 'max_num_recipients': 10, 'max_days_to_hold': 0, 'member_roster_visibility': 'moderators', 'moderator_password': None, 'newsgroup_moderation': 'none', 'next_digest_number': 60, 'nntp_prefix_subject_too': True, 'no_reply_address': 'noreply(a)lists.sugarlabs.org', 'owner_address': 'systems-logs-owner(a)lists.sugarlabs.org', 'pass_types': [], 'pass_extensions': [], 'personalize': 'none', 'post_id': 316, 'posting_address': 'systems-logs(a)lists.sugarlabs.org', 'posting_pipeline': 'default-posting-pipeline', 'preferred_language': 'en', 'process_bounces': True, 'reject_these_nonmembers': [], 'reply_goes_to_list': 'no_munging', 'reply_to_address': '', 'request_address': 'systems-logs-request(a)lists.sugarlabs.org', 'require_explicit_destination': True, 'respond_to_post_requests': True, 'send_goodbye_message': True, 'send_welcome_message': True, 'subject_prefix': '[Systems-logs] ', 'subscription_policy': 'confirm', 'unsubscription_policy': 'confirm', 'usenet_watermark': None, 'volume': 1}
>
> Presumably in your case, you could do
> list_name.settings['accept_these_nonmembers'].append('user(a)example.com')
>
> or
>
> list_name.settings['accept_these_nonmembers'].extend(['user1(a)example.com',
> 'user2(a)example.com', 'user3(a)example.com'])
>
> but as I've said previously, accept_these_nonmembers is not the
> preferred way to do this. Something like
> $ mailman addmembers --delivery disabled FILE LIST
>
Yes, I see now that it's not the preferred way to do it.
It's difficult to know that when looking at the documentation.
> where FILE contains the addresses to add, one per line and LIST is the
> list name would add the addresses as members with delivery disabled. To
> add them as nonmembers with moderation_action Defer:
> $ mailman shell -l list.example.com
> Welcome to the GNU Mailman shell
> Use commit() to commit changes.
> Use abort() to discard changes since the last commit.
> Exit with ctrl+D does an implicit commit() but exit() does not.
> The variable 'm' is the list.example.com mailing list
> >>> from mailman.app.membership import add_member
> >>> addresses = ('user1(a)example.com', 'user2(a)example.com',
> ... 'user3(a)example.com')
> >>> for addr in addresses:
> ... rr = RequestRecord(addr)
> ... nm = add_member(m, rr, role=MemberRole.nonmember)
> ... nm.moderation_action = Action.defer
> ...
> >>>commit()
Thank you!
>
> Of course, all of this can be done, perhaps more easily, using the
> Postorius web UI.
Yes, but like I've mentioned in another thread, I don't have access to the web UI because
I can't get a confirmation link.
> --
> Mark Sapiro <mark(a)msapiro.net> The highway is for gamblers,
> San Francisco Bay Area, California better use your sense - B. Dylan
2 weeks, 2 days