On 9/11/24 15:21, Dan Caballero wrote:
Mark,
Do you have any tips for scripting the setting changes via mailman shell -l somelist@caltech.edu or a python script to run. eg. mailman shell -r dmarcsettings.py?
We have a number of lists that email Gmail addresses either directly or via aliases and virtual email domains using Google Workspace.
If your Mailman version is >=3.3.9 you can add ^.*@gmail\.com
to each
list's dmarc_addresses
to apply dmarc_mitigate_action
to any mail
From: a @gmail.com
address. A mailman shell
interaction to do that
and set dmarc_mitigate_action
to munge_from for all lists is like
$ /opt/mailman/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):
... mlist.dmarc_addresses.append(r'^.*@gmail\.com')
... mlist.dmarc_mitigate_action = DMARCMitigateAction.munge_from
...
>>> commit()
If your Mailman is older than 3.3.9 or you don't want to use dmarc_addresses, replace the line
... m mlist.dmarc_addresses.append(r'^.*@gmail\.com')
with
... mlist.dmarc_mitigate_unconditionally = True
-- Mark Sapiro <mark@msapiro.net> The highway is for gamblers, San Francisco Bay Area, California better use your sense - B. Dylan