On 3/31/22 04:39, bob B via Mailman-users wrote:
Thanks, that make sense, Also is there any way to turn that off via command line for a bunch of lists or just in the GUi, I looked at "'mailman shell --details:" but could not find a command to turn it off.
I had archives off on my lists in mailman 2, and when I import they stayed off, but the archiver is enabled.
The HyperKitty and Prototype archivers are enabled by default for new and imported lists. To change that, add
[archiver.hyperkitty]
enable: no
[archiver.prototype]
enable: no
to mailman.cfg.
I have a script that pulls all the list configs "curl --user *******:******* http://127.0.0.1:##/3.1/lists/"$i"/config | python3 -m json.tool >> ${OUTPUT_DATA_DIR}/listconfigs.txt
Then I look to see if any list has changed this setting "archive_policy": "never", so I know if any list admin has enabled archives...
But is there a setting in the config that shows if the archiver got turned on? I want to know if anyone turns it on after I turn it off
You can do the following in mailman shell
$ mm/bin/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.
>>>for mlist in getUtility(IListManager):
... print(mlist.display_name)
... print(f' ArchivePolicy was {mlist.archive_policy}')
... if mlist.archive_policy != ArchivePolicy.never:
... mlist.archive_policy = ArchivePolicy.never
... print(' set to ArchivePolicy.never')
... aset = IListArchiverSet(mlist)
... for ar in aset.archivers:
... if ar.is_enabled:
... ar.is_enabled = False
... print(f' Archiver {ar.name} was enabled; set disabled')
...
>>> commit()
-- Mark Sapiro <mark@msapiro.net> The highway is for gamblers, San Francisco Bay Area, California better use your sense - B. Dylan