[Mailman-Users] Lists break when "host_name" is removed

Mark Sapiro mark at msapiro.net
Tue Jun 3 15:52:17 CEST 2008


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Sebastian Hagedorn wrote:
| Hi Mark,
|
| --On 2. Juni 2008 18:22:09 -0700 Mark Sapiro <mark at msapiro.net> wrote:
|
|> Sebastian Hagedorn wrote:
|> |
|> | every once in a while one of our list owners shoots themselves in the
|> | foot by deleting the value in "host_name". That breaks the list almost
|> | completely. Is there a way for us to override that setting, so that
|> list
|> | admins can't change it or the changed value isn't used?
|>
|> Probably the easiest way is to find the following lines in
|> Mailman/Gui/General.py and remove or comment them out.
|
| thanks, that did the trick. As a follow-up now I wonder how I can
| determine if that setting has been changed. The "config_list -o" command
| doesn't seem to print it!? I'm a bit worried that there may be time
| bombs, i.e. lists that have been misconfigured when that GUI option
| still existed. The way it is now I wouldn't even be able to confirm
| that, it seems.


config_list -o only outputs those list attributes which are in the GUI.
Since you removed host_name from the GUI, config_list -o no longer
prints it.

If you do not use virtual domains, the easiest thing is to run

bin/withlist -a -l -r fix_url -- -v

which will set host_name to the DEFAULT_URL_HOST value and web_page_url
to the value of DEFAULT_URL_PATTERN interpolated with the value of
DEFAULT_URL_HOST. The '-- -v' is optional and causes the command to
report the web_page_url and host_name settings for each list after they
are set.

If you have more than one domain, you need to do something like

#!/bin/sh
for list in lists_in_www.example.com_domain ; do
~  bin/withlist -l -r fix_url $list -u www.example.com -v
done

for each domain.

If you just want to see the host_names, you can copy the following to
bin/show_host_name.py

- --------------------cut here------------------
def show_host_name(mlist):
~    print 'list: %s, host_name: %s' % (mlist.real_name, mlist.host_name)
- --------------------cut here------------------

and run

bin/withlist -a -r show_host_name

- --
Mark Sapiro <mark at msapiro.net>        The highway is for gamblers,
San Francisco Bay Area, California    better use your sense - B. Dylan

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.7 (MingW32)

iD8DBQFIRUyRVVuXXpU7hpMRAt+CAJ9SID68b0Bz6ZUR/KQwM22B5LvzaACfdyS0
ynzMm8ZoVhZiXqtRURMRrdM=
=eQGX
-----END PGP SIGNATURE-----


More information about the Mailman-Users mailing list