4.29. Where can I change a list or the default URL used for the web interface?
For MM 2.1.2:
These changes should be made $prefix/Mailman/mm_cfg.py. The applicable MM config variables are described in $prefix/Mailman/Defaults.py. Typically something like what follows, at the end of your mm_cfg.py, will do the trick:
DEFAULT_EMAIL_HOST = 'your.mailhostname.tld' DEFAULT_URL_HOST = 'your.webhostname.tld' VIRTUAL_HOSTS.clear() add_virtualhost(DEFAULT_URL_HOST, DEFAULT_EMAIL_HOST)
and some more add_virtualhost(URL_FQDN, EMAIL_FQDN) if you are using virtual hosts.
DEFAULT_URL_HOST should be a fully qualified host name, not an actual URL, e.g. mailman.example.com not http://mailman.example.com.
Virtual host issues
If you call the function add_virtualhost (which is defined in Defaults.py if you want to look at the code) with no EMAIL_FQDN then the function computes the email hosts from the url host by removing one leading element of the name of the url host. So for instance, calling the function like this:
is equivalent to:
VIRTUAL_HOSTS is a Python dictionary (equivalent to a Perl Hash) with URL_FQDNs as the keys and EMAIL_FQDNs as the values. Do ensure the different add_virtualhost() calls have unique values for their first parameter or you may get a surprise.
Non-standard web server ports
If your Apache server uses non-standard ports you may also want to assign, again in mm_cfg.py, different values for the DEFAULT_URL_PATTERN and PUBLIC_ARCHIVE_URL MM config variables. Insert the servers non-standard port number into the pattern.
Using Secure HTTP
If you want to use Secure HTTP instead of regular HTTP you may also want to assign, again in mm_cfg.py, different values for the DEFAULT_URL_PATTERN and PUBLIC_ARCHIVE_URL MM config variables.
Depending on how you want your site to operate you may change one or other or both of these patterns to use the 'https' scheme rether than the default 'http' scheme.
Check in Defaults.py for the description and current values of the variables. In this case you will also have to adjust your Apache setup to support SSL which is outside the scope of this FAQ but see <4.27 Securing Mailman's web GUI by using Secure HTTP-SSL>
Do not forget to restart mailmanctl
Then run 'mailmanctl restart'. (or the changes will not take hold).
Existing versus new lists
Changing these things in mm_cfg.py will now effect new lists.
If you want to update existing lists the $prefix/bin/withlist script $prefix/bin/fix_url.py is your friend for resetting things. Just run fix_url.py to get its usage.
Changing existing archives
If you are using the MM pipermail archiver with HTML archives, you might also need to run $prefix/bin/arch if there is archived email with attachments that have been extracted with links to the attachments left in the email. These links seem to use the web_page_url of the list concerned at the time the email was added to the archive. Running arch rebuilds these links using a list's current web_page_url. If you are rebuilding the archive with bin/arch, you probably want the --wipe option. See bin/arch --help. Also, it it a good idea to at least check the cumulative archives/private/listname.mbox/listname.mbox file with bin/cleanarch before rebuilding.
Converted from the Mailman FAQ Wizard
This is one of many Frequently Asked Questions.