Well, I've got a developer who has managed to figure out how to rename a list with a set of 3 SQL updates, then updating a few settings via the API. We've beaten the heck out of this at this point with a test list, I'm going to be actually renaming the lists in question tomorrow. Here's some kinda code-ish stuff that you can adapt, it's shell first, python, then more shell:
update mailinglist set list_name = '${newname}', list_id = '${newname }.${domain}' where list_id = '${oldname}.${domain}'; update member set list_id = '${newname}.${domain}' where list_id = '${oldname}.${domain}'; update address set email = '${newname}-owner@${domain}' w here email = '${oldname}-owner@${domain}';
settings = dict( acceptable_aliases=['%s@domain' % oldname], display_name="%s" % newname, reply_to_address="%s@domain" % newname, reply_goes_to_list="explicit_header", require_explicit_destination=True, subject_prefix="[%s]" % newname)
mv ${listsbase}/${oldname}.${domain} ${listsbase}/${newname}.${domain} mv ${templates}/${oldname}.${domain} ${templates}/${newname}.${domain} # rebuild aliases and virtual maps now
I'd been kind of hoping for at least a way to extract the entire list config and subscriber list, then stuff those back in to a different list after a bit of massaging to change the name. Beefing up the command line ecosystem would be extremely useful, particularly for those of us who have been using MM2 forever.
Also, just figuring out where things like call_http and dump_json were took my top developer over an hour and he had to resort to a bunch of 'grep -r's to do it. I'd tried and failed at that point, but I was figuring dump_json was some generic python module that we needed to install, rather than being part of MM3. So just adding the appropriate set of imports to the mailman shell documentation pages would really help and shouldn't be all that much of a time investment for anyone who actually knows the answers.
Thanks for keeping this project going. I'm horrified that I might some day have to move the lists that I manage out to something like Google Groups with Google's prediliction for deciding they know better than the RFCs.
On 10/5/2019 12:05 PM, Abhilash Raj wrote:
On Wed, Sep 25, 2019, at 9:04 AM, Joel Lord wrote:
I'm in an odd situation where I need to rename a bunch of lists. They were all created on mailman2 originally and migrated to mailman3 (very successfully, TYVM) but the names were all originally discuss-<foo>@domain and it's very confusing to be sure you're always sending to the correct <foo>. We want to completely rename the lists to <foo>-discuss@domain.
These lists do not keep archives, so if I have to resort to extracting the subscriber lists and the configs and building new lists, I'm completely fine with that. Problem is, I'm really used to MM2 and config_list and could do this without thinking using those tools... that I don't have.
Running MM3 3.2.2 trying to make this happen. Any assistance I could get will be greatly appreciated.
There isn't any way yet that allows renaming a list, not sure how hard would that be to achieve that.
In theory, it should be easy since most places should be using list-id (which wouldn't change if you were to rename a list, as the RFC2919 says), but there might be a few places which are still using the posting-address as the identifier and might need change.
I wouldn't mind a command or an API to modify the list's posting address.
THANKS!
-- Joel Lord