[Mailman-Users] Changing mailing list URLs
mark at msapiro.net
Fri Jun 4 04:23:46 CEST 2010
Eli Barzilay wrote:
>On Jun 3, Mark Sapiro wrote:
>> Eli Barzilay wrote:
>> >Is there a way to change mailing list URLs from
>> > ...something.../<verb>/<list>
>> > ...something.../<list>/<verb>
>> If you could figure out a way within Apache to redirect URLs of the form
>> without then turning around and redirecting the second back to the
>> first in an endless loop,
> ScriptAliasMatch "^/([a-z-]+/)([a-z]+)(/?.*)$" \
>Or replace that "[a-z]+" with "admin|admindb|confirm|...".
Yes, although I think that
ScriptAliasMatch "^/mailman/([a-z-]+/)([a-z]+)(/?.*)$" \
is probably a bit closer.
>> it would still only partially work because posting of forms would
>> not work because the form data would get lost in the redirect.
>> Perhaps this is what you meant by "in addition it seems that it
>> messes up the authentication somehow"
>I *think* that the main thing that gets lost in the process is mailman
>making its own assumptions about the shape of the URLs: that it
>basically gives me a cookie that is valid for for
>http://<server>/admindb/<list> so when I refresh the page at the
>different URL, it asks me again to authenticate since I don't have the
>cookie. This is, of course, related to the fact that generated pages
>still have the wrong URLs on them. If there was some single function
>somewhere that constructs these URLs I think that I could make it work
>-- but I don't want to risk changes for code that I have no clue
You are touching on the problem. The generated URLs including the POST
action URLs are generated as mailman/cgi_name/list_name... which
doesn't work because it gets mapped to
/usr/lib/mailman/cgi-bin/list_name/cgi_name... by the ScriptAliasMatch.
Changing the GetScriptURL method in Mailman/MailList.py to the following
def GetScriptURL(self, scriptname, absolute=0):
return re.sub('/([^/]*$)', '/' + self.internal_name() + r'/\1',
Utils.ScriptURL(scriptname, self.web_page_url, absolute))
Seems to work for the admin interface, and will work for more but I
won't guarantee it will work for everything.
>BTW, it just happens (really by accident) that someone pointed me at
>http://www.w3.org/Provider/Style/URI today -- it's a good summary of
>what bugs me with the default mailman url scheme: "pipermail" is
>related to the implementation of the archiver,
"pipermail" in public archive URLs exists only in the web server
Alias /pipermail/ /usr/local/mailman/archives/public/
and the Defaults.py setting
PUBLIC_ARCHIVE_URL = 'http://%(hostname)s/pipermail/%(listname)s'
It's easily changed to anything you like.
>and the <verb>/<list>
>thing is something that after 5 years of moderating about 10 lists I
>still can't remember. It's especially bad with links like:
>where the verb is on one side of the list name, and the arguments are
>on the other side. It seems much better to me to think about the
>interfaces as being part of the list. It would even work better with
Join the mailman-developers at python.org list; see the thread at
and join the discussion.
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