[Mailman-Users] Domain problem in post action on admindb forms formulti-domain mailman

Mark Sapiro mark at msapiro.net
Mon Sep 5 19:22:38 CEST 2011


Martin Brampton wrote:

>I'm running Mailman 2.1.13 from the Debian Squeeze repositories (on 
>Debian Squeeze) to provide mailing lists across several domains.  The 
>domains that are not the primary mailing list domain have 301 redirects 
>of URLs such as .../listinfo/xxxx or .../admin/xxxx to the primary domain.


This is the root of your problem. The domains which are not primary
should be defined in the web server as virtual hosts in your web
server.


>In most cases this works, because the action in the form is relative, 
>and the page is showing on the primary domain on account of the 
>redirects.  When the form is submitted, the request therefore goes to 
>the primary mailman domain.  (Other domains are typically on different 
>servers from Mailman, and do not have Mailman installed at all).


Oh. So the other domain's A record points to a different box and it's
that box that redirects it to the Mailman box. Mailman is not designed
to work in that way.


>However, the .../admindb/xxxx pages seem to have a specific domain in 
>the action attribute of the form, and it is the actual domain of the 
>mailing list, not the primary domain.  Although the redirect sends the 
>post to the mailman server, redirecting a post request loses all the 
>data, so nothing happens.
>
>Is there something wrong with my setup?  Is there a way to resolve this 
>problem?


I suggest the following. Using say www.example.com as a domain hosted
on a foreign box, establish a new domain, say list.example.com with an
A record pointing to the Mailman box, and make list.example.com a
virtual host in the web server on the Mailman box.

If this won't work for some reason, or if you prefer, you could look at
Mailman/Cgi/admindb.py on the Mailman host. Find the line

        admindburl = mlist.GetScriptURL('admindb', absolute=1)

in the definition of the main() function. If you change that to

        admindburl = mlist.GetScriptURL('admindb')

it should make the action URL in the forms relative. There are other
occurrences of mlist.GetScriptURL('admin', absolute=1) in the module,
but they are for non-POST links.

-- 
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