[Mailman-Users] Private archive nightmare with vhosts

Mark Sapiro mark at msapiro.net
Mon Feb 1 01:12:28 CET 2010

UGSD wrote:
>After not being able to create a list, I had another issue (not seen in 2.1.7), where the alias file was created in the form of 
>lists.domain1.net=list-name-unsubscribe: "|/path/to/mailman unsubscribe lists.domain1.net=list-name"
>which mailman did not understand and complained that "lists.domain1.net=list-name" not found.

Alias creation works just fine for me with my original 2.1.13 patch at
<http://www.msapiro.net/mm/2.1.13_vhost.patch>. Lists in the
DEFAULT_URL_HOST domain get aliases like:

# STANZA START: mailman
# CREATED: Sun Jan 31 12:57:36 2010
mailman:      "|/usr/local/mailman/mail/mailman post mailman"
mailman-admin: "|/usr/local/mailman/mail/mailman admin mailman"
mailman-bounces: "|/usr/local/mailman/mail/mailman bounces mailman"

Lists in the virtual domains get aliases like

# STANZA START: test at lists.msapiro.net
# CREATED: Sun Jan 31 12:57:37 2010
lists.msapiro.net=test: "|/usr/local/mailman/mail/mailman post
test at lists.msapiro.net"
lists.msapiro.net=test-admin: "|/usr/local/mailman/mail/mailman admin
test at lists.msapiro.net"
lists.msapiro.net=test-bounces: "|/usr/local/mailman/mail/mailman
bounces test at lists.msapiro.net"

and entries in virtual-mailman like

# STANZA START: test at lists.msapiro.net
# CREATED: Sun Jan 31 12:57:37 2010
test at lists.msapiro.net               lists.msapiro.net=test
test-admin at lists.msapiro.net         lists.msapiro.net=test-admin
test-bounces at lists.msapiro.net       lists.msapiro.net=test-bounces

This is as it should be. The only requirement being that the virtual
domains (lists.msapiro.net in this example) be in the
POSTFIX_STYLE_VIRTUAL_DOMAINS list in mm_cfg.py as in:

POSTFIX_STYLE_VIRTUAL_DOMAINS = ['lists.msapiro.net']

>So i had to use my mod_rewrite trick, modify Mailman/Cgi/pryvate.py
>Now i was able to see the private archive table of contents, but none of the links were functional, so clicking on a link pointing to
>http://lists.domain1.net/private/list-name@lists.domain1.net/2010-January/thread.html reloads the page, adding another "2010-Janury" in the browser address bar
>and so on. Unfortunately i haven't been able to get around this issue yet.

I fixed the archiving for both private and public archives so no
rewriting is involved. private.py does the right thing with my
additional patches. I also patched the GetBaseArchiveURL() method to
include the virtual host directory in the public archive URL.

Finally, I had an issue which almost caused me to give up in disgust.
The original patch adds a _GetURLHost() function to Mailman.Utils.py
which gets the host name from the invoking URL. This got the name from
the SERVER_NAME environment variable which is not the preferred place
and is different from the URL host in my test environment. It should

The bottom line for me now is I can take a 2.1.13 base distribution,
patch it with the patch at
<http://www.msapiro.net/mm/2.1.13_vhost.patch> and patch that with the
vhost_extra_patch.txt patch attached to this post, and I think that
list creation and the web interface work. I haven't tested posting
because my testbed uses Exim, but I think it should work.

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

-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: vhost_extra_patch.txt
URL: <http://mail.python.org/pipermail/mailman-users/attachments/20100131/7744d7e9/attachment.txt>

More information about the Mailman-Users mailing list