[Mailman-Users] help re: web_page_url and virtual hosts
Thomas C. Fischer
fischer at tcf.de
Fri Nov 14 17:39:59 CET 2003
On Fri, 14 Nov 2003, Richard Barrett wrote:
> On Friday, November 14, 2003, at 04:00 pm, Thomas C. Fischer wrote:
> > Hi Richard,
> > thanks for your answer! I appreciate talking to someone who apparently
> > knows what he is talking about! ;-)
> >>> Forgive me when I laugh... This FAQ entry is quoted every single time
> >>> someone asks about URLs in mailman. And I have never met anybody
> >>> whose
> >>> problem got solved through reading it...
> >> Well, you and anybody else who has the time and energy to do better is
> >> welcome to rewrite that FAQ or any another. It is Open Software and
> >> anybody can contribute ....
> > Didn't want to offend anybody - forgive me if this sounded slightly
> > sarcastic. I wish I could rewrite the FAQ - it's just that I simply
> > haven't understood how these parameters are working together...
> >> Have your read the output from $prefix/bin/newlist --help ? It says in
> >> part:
> >> <quote>
> >> You can specify the domain to create your new list in by spelling the
> >> listname
> >> like so:
> >> mylist at www.mydom.ain
> >> where `www.mydom.ain' should be the base hostname for the URL to this
> >> virtual
> >> hosts's lists. E.g. with is setting people will view the general list
> >> overviews at http://www.mydom.ain/mailman/listinfo. Also,
> >> www.mydom.ain
> >> should be a key in the VIRTUAL_HOSTS mapping in mm_cfg.py/Defaults.py.
> >> It
> >> will be looked up to give the email hostname. If this can't be found,
> >> then
> >> www.mydom.ain will be used for both the web interface and the email
> >> interface.
> >> </quote>
> > Yup! And the important part seems to be the "key in the VIRTUAL_HOSTS
> > mapping"-thingy... What mailman does in my case is that it uses
> > www.mydom.ain for both the web interface and the email interface,
> > although
> > I use the settings described below...
> >>> Look here:
> >>> DEFAULT_EMAIL_HOST = 'mailhost.name'
> >>> DEFAULT_URL_HOST = 'my.webhost.name'
> >>> DEFAULT_URL_PATTERN = 'https://%s/mailman/'
> >>> VIRTUAL_HOSTS.clear()
> >>> add_virtualhost(DEFAULT_URL_HOST, DEFAULT_EMAIL_HOST)
> >>> Now tell my why this doesn't do the trick?! The mail for the list
> >>> admin
> >>> still has the link
> >>> https://mailhost.name/mailman/admin/test
> >>> But instead of mailhost.name it should have my.webhost.name, don't
> >>> you
> >>> reckon?
> >> Only if the list was created after the assignments you cite above were
> >> extant when the list was created. Are you saying that if you now
> >> create
> >> another test list, you get the wrong results?
> > Yes, that's what I am saying. With the above settings I do a
> > bin/newlist test at mailhost.name
> But you should be doing:
> bin/newlist test at webhost.name
> Which is what the command usage is trying to tell you to do. Yes, it
> may be counter-intuitive but the --help output is quite clear if you
> actually read it carefully.
Gnaaaaahhh... yes, IF you read it carefully! It is counter-intuitive,
Well, now that I know this, I wonder if there is a way to solve my problem
Look: All the web-interfaces for all the mailing lists on my server should
be found on the same URL, say https://ssl.provider.com/mailman/... I do
that, because it's the only way to have a decent SSL security on the
configuration sites without playing SSL proxy games.
But of course, the lists should be run on the various virtual domains on
my server. For example list1 at maildomain1.com list2 at anotherdomain2.com etc.
Sounds like there is no way to do this easily, don't you think? There is
no way to do the mapping from this end, because all the maildomains got
the same webdomain...
Or do you have a clever hint?
> > And then it will use the mailhost.name in the webhost-corner!
> > It works fine as long as I simply say
> > bin/newlist test - without the mailhost.name thing...
> > But after all there are more virtual hosts on my machine...
> If you supply the web host domain in the newlist parameter, the code
> that does the setup of the new list's web_page_url and mail host_name
> attributes is as follows:
> host_name = None
> web_page_url = None
> if '@' in listname:
> listname, domain = listname.split('@', 1)
> host_name = mm_cfg.VIRTUAL_HOSTS.get(domain, domain)
> web_page_url = mm_cfg.DEFAULT_URL_PATTERN % domain
> It just does a simple dictionary lookup of the virtual hosts you have
> defined for your site. If the lookup fails then the domain on the
> command parameter is used for both mail and web hosts. There is not a
> whole lot to go wrong with this code.
> > Once again: Thanks for your ongoing help.
> > Regards,
> > Tom
More information about the Mailman-Users