[Mailman-Users] Changing ports doesn't seem to work

Mark Sapiro mark at msapiro.net
Thu Oct 30 05:05:12 CET 2014

On 10/29/2014 10:32 AM, Brian Rudy wrote:
> Hello all,
> Due to changing ISP's I was forced to change my web port to something
> other than 80.  On port 80, everything was working well. I moved all of
> my web interfaces to port 8000.  I thought I followed the instructions
> correctly and did:
> bin/withlist -l -r fix_url <listname>

You don't say, but before running fix_url did you add

DEFAULT_URL_PATTERN = 'http://%s:8000/mailman/'

to mm_cfg.py?

> It seems to work fine using
> http://host.example.com:8000/mailman/admin/<listname> but any link I
> click on doesn't add in the port number (:8000) so by default, it's
> trying port 80.  Is there any way around that?  If I manually copy the
> link and paste it in the url of the browser and manually add in the
> :8000 the link works fine.  The problem then is when I try to submit
> something... It doesn't take.

If you added the port to DEFAULT_URL_PATTERN as above before running
fix_url, I can only guess that the issue has something to do with your
browser getting confused over relative URLs.

However, your comment above about copying/pasting the link and adding
the :8000 makes me think you didn't add the port to DEFAULT_URL_PATTERN
as above before running fix_url, although I suppose it could still be a
browser/relative URL issue.

View the source of the web page and look at the href= URLs. If they are
of form http://host.example.com/mailman/admin/<listname>... without the
:8000, then you need to be sure you have

DEFAULT_URL_PATTERN = 'http://%s:8000/mailman/'

in mm_cfg.py and run fix_url again.

If they are of form ../admin/<listname>... (i.e.relative) it is your
browser that's at fault, but this seems unlikely.

If it is the browser not handling relative URLs properly, the only way
to make Mailman generate absolute URLs is to edit Mailman/Utils.py and
change the line

def ScriptURL(target, web_page_url=None, absolute=False):


def ScriptURL(target, web_page_url=None, absolute=True):

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