[Mailman-Users] Why host_name and not domain?

Mark Sapiro mark at msapiro.net
Sat Feb 28 16:58:59 CET 2009


Oliver Glück wrote:
>
>it is terrible.
>And every pages are in English and my English is not good. :-(


I'm sorry, but it's much better than my German :(


>I can't understand about VIRTUAL_HOSTS and add_virtualhost.


I don't think you need to, but see below:


>Now, I can reach the listinfo-page, but I can't create a list, because I get 
>the
>error 'unknown virtual host: short-servername'


Did you run

bin/withlist -l -a -r fix_url

after changing mm_cfg.py?


>Hint: mailman installed with defaults: ./configure, make..
>
>In my mm_cfg.py now:
>---snip---
>MTA = 'Postfix'
>DEFAULT_URL_HOST = 'short-servername.intern.company.de'
>DEFAULT_EMAIL_HOST = 'company.com'
>VIRTUAL_HOSTS.clear ()


This clears the VIRTUAL_HOSTS dictionary.


>add_virtualhost(DEFAULT_URL_HOST , DEFAULT_EMAIL_HOST )


This adds an entry to the VIRTUAL_HOSTS dictionary with key = the value
of DEFAULT_URL_HOST and value = the value of DEFAULT_EMAIL_HOST. I.e.

{'short-servername.intern.company.de': 'company.com'}


>POSTFIX_STYLE_VIRTUAL_DOMAINS = ['company.com', 'company.de']


Since with the above settings, all lists will be created with email
host = 'company.com', the 'company.de' entry above is irrelevant.


>---snap---
>With this entries I can see the listinfo but not create -> unknown virtual 
>host...


That says the POST action URL on the create page doesn't have
'short-servername.intern.company.de' as it's host name, but if you
went to the listinfo page with this host name and saw the list, I
don't understand why.


>I have tried in mm.., added:
>VIRTUAL_HOSTS = { 'www.company.com': 'company.com', 'www.company.de': 
>'company.de' }
>But I get an syntax error, marker at '}'


I don't know why you get a syntax error unless there was something in
what you added that isn't above, BUT do not do this. If yopu want to
add additional entries to VIRTUAL_HOSTS, use add_virtualhost() as in

add_virtualhost('www.company.com', 'company.com')
add_virtualhost('www.company.de', 'company.de')


>How looks a functional configuration? With:
>Mailserver = mailmanserver :  name.intern.company.de
>Maildomain = company.com , company.de and the local domain intern.company.de 
>because the server is in
>this domain
>I don't need to reach the mailman-web from the internet! Only from the 
>intranet (LAN)


So your list members don't go to ther web user options page or to the
listinfo page?


>But mails from the mailman to members have to show 'list at company.com'  and 
>no other links,


So DEFAULT_EMAIL_HOST = 'company.com'


>because they don't have to reach the internal server from the internet. 
>(www.company.com/mailman/listinfo
>has not to work! It will not be forwarded!)


It seems like the following should work

MTA = 'Postfix'
DEFAULT_URL_HOST = 'short-servername.intern.company.de'
DEFAULT_EMAIL_HOST = 'company.com'
VIRTUAL_HOSTS.clear ()
add_virtualhost(DEFAULT_URL_HOST , DEFAULT_EMAIL_HOST )
POSTFIX_STYLE_VIRTUAL_DOMAINS = ['company.com']

as long as you always access the web interface via
http://short-servername.intern.company.de/... URLs, but these URLs
will also be visible in the headers of list posts unless you set
include_rfc2369_headers to No.


-- 
Mark Sapiro <mark at msapiro.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