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 [email protected]
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 [email protected] 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 '[email protected]'>
>>> 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': '[email protected]',
'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', 'defau
lt_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':
'[email protected]', 'gateway_to_mail': False,
'gateway_to_news': False, 'hold_these_nonmembers': [],
'include_rfc2369_headers': True, 'info': '', 'join_address':
'[email protected]', 'last_post_at':
'2026-02-27T11:32:51.317220', 'leave_address': '[email protected]
bs.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':
'[email protected]', 'owner_address':
'[email protected]', 'pass_types': [], 'pass_extensions':
[], 'personalize': 'none', 'post_id': 316, 'posting_address':
'[email protected]', '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':
'[email protected]', '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('[email protected]')
>
> or
>
> list_name.settings['accept_these_nonmembers'].extend(['[email protected]',
> '[email protected]', '[email protected]'])
>
> 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 = ('[email protected]', '[email protected]',
> ... '[email protected]')
> >>> 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 <[email protected]> The highway is for gamblers,
> San Francisco Bay Area, California better use your sense - B. Dylan
_______________________________________________
Mailman-users mailing list -- [email protected]
To unsubscribe send an email to [email protected]
https://lists.mailman3.org/mailman3/lists/mailman-users.mailman3.org/
Archived at:
https://lists.mailman3.org/archives/list/[email protected]/message/YG45GDR2NJIWCMTEINKCXFTVH2BFBWBD/
This message sent to [email protected]