[Mailman-Users] problem creating new list on the web - UnkownVirtual Host

Mark Sapiro msapiro at value.net
Wed Jun 20 02:56:57 CEST 2007


Christopher Adams wrote:

>When I create a list via the web, I get the dreaded 'Unknown Virtual
>Host mailinglists.state.or.us' message.
>
>I consulted the FAQ, but I couldn't see what was wrong:
>
>http://www.python.org/cgi-bin/faqw-mm.py?req=show&file=faq04.036.htp


Also see
<http://www.python.org/cgi-bin/faqw-mm.py?req=show&file=faq04.062.htp>
(now referenced from 4.36).


>I didn't configure the DEFAULT_EMAIL_HOST and DEFAULT_URL_HOST during
>the configuration of Mailman, so I added them to mm_cfg.py and
>restarted mailman. My entry looks like this:
>
>#Virtual Host and Email Host
>add_virtualhost(DEFAULT_URL_HOST, DEFAULT_EMAIL_HOST)
>DEFAULT_EMAIL_HOST = 'mailinglists.state.or.us'
>DEFAULT_URL_HOST = 'mailinglists.state.or.us'


Presumably the definitions of DEFAULT_EMAIL_HOST and DEFAULT_URL_HOST
in  Defaults.py are wrong since you didn't configure them and your
host is 'Unknown'. Therefore, there are two problems with the above.

The first problem is you want to remove the erroneous VIRTUAL_HOSTS
entry created in Defaults.py. This is not critical, but it is good
practice.

The main problem is you need to move the

add_virtualhost(DEFAULT_URL_HOST, DEFAULT_EMAIL_HOST)

directive to a point AFTER you have redefined DEFAULT_EMAIL_HOST and
DEFAULT_URL_HOST. Otherwise, you are just re-adding the erroneous
entry from Defaults.py.

So what you want is

VIRTUAL_HOSTS.clear()
DEFAULT_EMAIL_HOST = 'mailinglists.state.or.us'
DEFAULT_URL_HOST = 'mailinglists.state.or.us'
add_virtualhost(DEFAULT_URL_HOST, DEFAULT_EMAIL_HOST)

(the first 3 can be in any order, but the add_virtualhost() must be the
last of the 4.


>Other list admin functions from the web work and I can create lists
>from the command line.


You may need to run fix_url on the lists you created from the command
line. See the above referenced FAQ 4.62 and also 4.69.

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



More information about the Mailman-Users mailing list