Changing the URL of a Mailman list administrative web site

Posted on 2007-06-24 at 13:24

As I've mentioned in the past, I run several Mailman lists. On occasion, I have need to make changes, as since Mailman is a beast to configure (but powerful!) I try to keep my how-to's here for my own and others general reference.

Recently, my server IP address changed. Since my Mailman web admin site is tied to an IP and not a domain name, that means I had to regenerate the Mailman adminstrative web site so that it all pointed to the new location. Apparently, Mailman thinks it's a good idea to hardcode the full URL (with domain) in every link it creates. No relative paths here. :-\ Kind of a pain in the ass, but I'm sure there's some reason that makes sense that I can't see from my vantage point. anyway, in case you have to do the same, here is how you will regenerate the Mailman admin web site if it moves to a new web address:

  1. First I created a file called listconfig.txt.
    nano -w /path/to/listconfig.txt
    Inside that file I added one line of text:
    web_page_url = 'http://70.165.74.137/cgi-bin/mailman/'
    That is the new IP address I find myself on. If you are using a FQDN, you'd put that in the URL instead. In either case, make sure you type the full path al the way to the root of your mailman directory. It will not find it otherwise.
  2. Then I moved to the mailman bin directory.
    cd /usr/lib/mailman/bin
  3. Inside that directory, I run the config_list command and feed it my new config file.
    sudo config_list -i /path/to/listconfig.txt -v name_of_list_to_fix
    where the "name_of_list_to_fix" is whatever name you've given your email list inside Mailman.
  4. You must run this last comment once from each list on the box that you want moved to the new domain. You must also, of course, have moved the list to that domain otherwise the web site links will be broken...duh.

That should do it. Or, at least, that did it for me. Some notes: The config_list command will only update those properties of the list that you explicitly set in the config file to which you point. It will not affect the other list properties. If you want to see what other stuff you can change about your list via this method, try running sudo config_list -o /path/to/currentlistconfig.txt then open the created file and check out the current settings. Any of those settings can be added to the input file and updated through this command. Pretty straightforward once you are "in the know". Not so straightforward when you are hunting through mm_cfg.py files trying to figure out how to retroactively change list settings on stuff. Could be made more straightforward, but who am I to complain, It's open source and Free. I'm just glad someone is offering what I got at no charge. :) If I really don't like it, I could always submit code patches to fix things I hate or just write my own. Mailman is good enough for right now.

Make A Comment