Change list owners from command line

Asked by Dale Toney

We have over two hundred lists that need the domain of the list owners changed.
Is there a way to do this from command or do each list have to be individually edited and save?
I tried modifying the individual config.pck files for the lists, but ended up corrupting the files.

Thanks for any assistance or insight.


Question information

English Edit question
GNU Mailman Edit question
No assignee Edit question
Last query:
Last reply:
Revision history for this message
Mark Sapiro (msapiro) said :

If the owners are the same for all lists, see the FAQ at <>. If not, a withlist script is easiest. The indentation here is going to be munged, here's a 5-line script (4 lines if you omit moderator).

def change_owner(mlist):
    mlist.owner = [x.replace('', '') for x in mlist.owner]
    mlist.moderator = [x.replace('', '') for x in mlist.moderator]

The first line above is not indented and the second through fifth lines are indented 4 spaces. This can be saved in Mailman's bin/ directory with name and run by

bin/withlist -l -a -r change_owner

(note no .py extension in the withlist command line.) This will change '' to '' in all owner and moderator addresses in all lists. Replace those in the script with the actual old and new domains.

Can you help with this problem?

Provide an answer of your own, or ask Dale Toney for more information if necessary.

To post a message you must log in.