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


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

                   'www.do.main.one': 'do.main.one',
                   'www.do.main.two': 'do.main.two',
                   ... }

to mm_cfg.py, but if you do this, for esoteric Python reasons you can't add additional entries with add_virtualhost().

In the first example above, 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 Why doesn't my public list appear on the listinfo overview page? aka Why can't I create a list from the web?

This is one of many Frequently Asked Questions.

MailmanWiki: DOC/4.36 Creating a new list from Web CGI result in "Error- Unknown virtual host" (last edited 2015-02-10 06:24:50 by JimTittsler)