[Mailman-Developers] minor config issue: web_page_url is stored in list config

Barry A. Warsaw barry@zope.com
Mon, 18 Mar 2002 19:49:49 -0500


>>>>> "HK" == Harald Koch <chk@pobox.com> writes:

    HK> The value for 'web_page_url' is stored in each individual list
    HK> config file (config.db/config.pck), instead of always being
    HK> read from mm_cfg.py. However, that variable is not exported by
    HK> "config_list -o", so it took me a while to figure it out.

    HK> The workaround for me was to add "web_page_url =
    HK> 'http://www.cfrq.net/mm/' to my list config and ran
    HK> "config_list -i"; thankfully that worked.

    HK> Ideally, I would expect that this variable always be built
    HK> from mm_cfg; it's a property of the mailman install, not a
    HK> property of an individual list.

As others have pointed out, due to the support for virtual hosts,
web_page_url really needs to be a per-list configuration variable.

There's a script called "fix_url.py" in the bin directory, which will
adjust the web_page_url for any named list.  It gets these values from
mm_cfg.DEFAULT_URL_PATTERN and mm_cfg.DEFAULT_URL_HOST (aside: it
should probably calculate the right value from an inverted search of
mm_cfg.VIRTUAL_HOSTS based on the list's host_name attribute).

You run this like so (from $prefix directory):

    % bin/withlist -l -r fix_url mylist

Usually a bin/withlist script is much better to write than an input
file for bin/config_list, IMO.

Hope that helps,
-Barry