On 10/25/21 9:16 AM, bob B wrote:
For my 2.0 environment, I have scripts to dump list info, but i can't find the equivalent in mailman 3, for some commands, for example I use:
/usr/lib/mailman/bin/list_lists which equates in mailman3 to "mailman lists" /usr/lib/mailman/bin/list_members which equates in mailman3 to "mailman members [listname]"
But I also use /usr/lib/mailman/bin/list_admins [listname] /usr/lib/mailman/bin/config_list [listname]
Are there equivalent command line commands to get this info in mailman3?
for list_admins you can use mailman members --role administrator [listspec]
. See mailman members --help
.
There is no mailman command equivalent to config_list at this time
The mailman3 "mailman withlist [listname]" takes me into an interactive prompt not sure where to go from there.
From there you enter Python statements to do what you want. e.g.
$ /opt/mailman/mm/bin/mailman withlist -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
>>>for property in dir(m):
... if not property.startswith('_'):
... print(f'{property}: {m.__getattribute__(property)}')
...
You can also create scripts to run with the --run option, See mailman withlist --details
.
I can use the API
curl --user [ADMIN]:[password] http://[IP]]/3.1/lists/[listname]/config | python3 -m json.tool
But just curious if there is a command line equivalent like in mailman2?
Not at this time.
-- Mark Sapiro <mark@msapiro.net> The highway is for gamblers, San Francisco Bay Area, California better use your sense - B. Dylan