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.
THANKS!
-- Joel Lord Web Administrator, Alpha Psi Omega Grand Cast etc... etc... etc...
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 Web Administrator, Alpha Psi Omega Grand Cast etc... etc... etc...
Mailman-users mailing list -- mailman-users@mailman3.org To unsubscribe send an email to mailman-users-leave@mailman3.org https://lists.mailman3.org/mailman3/lists/mailman-users.mailman3.org/
-- thanks, Abhilash Raj (maxking)
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
Hi Joel,
I'm sorry to hijack your thread. But which python module did you import for the commands like call_http and dump_json to work? I've been searching online for an hour and can't find anything.
Thank you!
Dianne
On 10/9/19 3:36 PM, dguevarra@unr.edu wrote:
I'm sorry to hijack your thread. But which python module did you import for the commands like call_http and dump_json to work? I've been searching online for an hour and can't find anything.
In 'mailman shell' you can do for example
from mailman.testing.documentation import call_http, dump_json
These are basically helpers used throughout the documentation. Unfortunately, that fact isn't well documented.
See <https://gitlab.com/mailman/mailman/blob/master/src/mailman/testing/documentation.py>.
-- Mark Sapiro <mark@msapiro.net> The highway is for gamblers, San Francisco Bay Area, California better use your sense - B. Dylan
Hi Joel, I know it's been a while since you found this solution but do you happen to remember the exact steps prior to the update SQL commands you provided? I am getting a syntax error on the first one and I have not been able to figure out how to move forward.
Thanks, Christina
participants (5)
-
Abhilash Raj
-
chilfer@unr.edu
-
dguevarra@unr.edu
-
Joel Lord
-
Mark Sapiro