I'm getting the error "Error: Unknown virtual host lists.mydomain.org" when creating a list through the web interface. I have located several FAQs on this problem but I have a question on syntax when entering a new line in mm_cfg.py.

Here's the background information: The CNAME for our list server is lists.mydomain.org but the actual servername is hamm.mydomain.org. All references to our list server should be using lists.mydomain.org both email and web URLs. We DO NOT use any URLs with www prepended to them. I have found and read several FAQs concerning this problem but the FAQs assume the web URLs have www prepended to them. One FAQ even states that when you run the add_virtualhost command it removes the first part of the domain name, the www part before saving the virtual domain name. We don't want that because we don't use www in our URLs to access the web interface. We only have one host, lists.mydomain.org, which I don't consider it to be a virtual host, it's just the main host, period. I've added these two lines to our mm_cfg.py so mailman will think it's lists.mydomain.org:

DEFAULT_URL_HOST = 'lists.mydomain.org'
DEFAULT_EMAIL_HOST = 'lists.mydomain.org'

I was going to add this line to mm_cfg.py to fix the "Virtual host" problem:

VIRTUAL_HOSTS = { 'lists.mydomain.org': 'lists.mydomain.org' }

This is a little different than the examples in the FAQs because the domain names for the URLs and the email should be the same in our case, we don't want to remove the "lists" part. Can someone tell me if this is the proper way to resolve our "Unknown virtual host" problem?



--
We've Got Your Name @ www.mail.com!!!
Get a FREE E-mail Account Today - Choose From 100+ Domains

Search Discussions

  • Runner at Sep 4, 2007 at 5:40 pm

    VIRTUAL_HOSTS = { 'lists.mydomain.org': 'lists.mydomain.org' }

    This is a little different than the examples in the FAQs because
    the domain names for the URLs and the email should be the same in
    our case, we don't want to remove the "lists" part. Can someone
    tell me if this is the proper way to resolve our "Unknown virtual
    host" problem?
    This worked... in cases like mine you have to be sure not to use the add_virtualhost command but instead edit the mm_cfg.py file by hand.



    --
    We've Got Your Name @ www.mail.com!!!
    Get a FREE E-mail Account Today - Choose From 100+ Domains
  • Mark Sapiro at Sep 4, 2007 at 11:31 pm
    runner at winning.com wrote:
    VIRTUAL_HOSTS = { 'lists.mydomain.org': 'lists.mydomain.org' }

    This is a little different than the examples in the FAQs because
    the domain names for the URLs and the email should be the same in
    our case, we don't want to remove the "lists" part. Can someone
    tell me if this is the proper way to resolve our "Unknown virtual
    host" problem?
    This worked... in cases like mine you have to be sure not to use the add_virtualhost command but instead edit the mm_cfg.py file by hand.

    Yes, it worked, but it is wrong.

    Since you already have (per your OP)

    DEFAULT_URL_HOST = 'lists.mydomain.org'
    DEFAULT_EMAIL_HOST = 'lists.mydomain.org'

    in mm_cfg.py, the proper way to do this is to add following those two
    lines

    VIRTUAL_HOSTS.clear()
    add_virtualhost(DEFAULT_URL_HOST, DEFAULT_EMAIL_HOST)

    or if you prefer

    VIRTUAL_HOSTS.clear()
    add_virtualhost('lists.mydomain.org', 'lists.mydomain.org')

    The VIRTUAL_HOSTS.clear() line is not really required, and it actually
    dilutes what I'm going to say next, but it may be desirable to remove
    the results of the add_virtualhost(DEFAULT_URL_HOST,
    DEFAULT_EMAIL_HOST)
    from Defaults.py.

    The reason the above is better than your

    VIRTUAL_HOSTS = { 'lists.mydomain.org': 'lists.mydomain.org' }

    or the equivalent

    VIRTUAL_HOSTS = { DEFAULT_URL_HOST: DEFAULT_EMAIL_HOST }

    is it will still work when we change the implementation of the
    VIRTUAL_HOSTS dictionary.


    Also note, add_virtualhost only removes the leftmost subdomain from the
    url host for the email host if it is not given a second argument for
    the email host.

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

Related Discussions

Discussion Navigation
viewthread | post
Discussion Overview
groupmailman-users @
categoriespython
postedSep 4, '07 at 3:25p
activeSep 4, '07 at 11:31p
posts3
users2
websitelist.org

2 users in discussion

Runner: 2 posts Mark Sapiro: 1 post

People

Translate

site design / logo © 2022 Grokbase