Revision 2 as of 2008-07-31 14:00:39

Clear message

4.36. Creating a new list from Web CGI result in "Error: Unknown virtual host"

even if "newlist" from command line was successful.

Answer: Virtual domains appearing in URLs that are used to access the Mailman CGI have to be registered with Mailman. This is because Mailman can't know the corresponding mail virtual domain from looking at the URL alone.

Common example: URL to create list is

 http://www.do.main/mailman/create but

list mail for this list will go to

 listname@do.main.

In this case, you would have to register this domain by adding

 add_virtualhost( 'www.do.main', 'do.main' )

to mm_cfg.py.

Alternatively you can specify all such mappings in one go by adding

 VIRTUAL_HOSTS = { 'www.do.main.one': 'do.main.one',
                   'www.do.main.two': 'do.main.two',
                   ... }

to mm_cfg.py.

In the above example, it would even have been enough to just say

 add_virtualhost( 'www.do.main' )

and so on, because the add_virtualhost() helper function strips off the first part of the given domain name and uses the remainder as the mail domain name, if only one argument has been given.

See Defaults.py for more explanations and examples.

Also see FAQ 4.62 4.62 Why doesn't my public list appear on the listinfo overview page? aka Why can't I create a list from the web?

Last changed on Wed Jun 20 02:43:25 2007 by Mark Sapiro Converted from the Mailman FAQ Wizard

This is one of many Frequently Asked Questions.