[Mailman-Users] Mailman web interface - specifydifferentIP:port?

Mark Sapiro mark at msapiro.net
Thu Dec 23 20:08:13 CET 2010

Tanstaafl wrote:
>I'm trying to get things working on a non-standard port along the lines
>of the How-To found here:
>(I know, I know, this is not ideal, but it does work well for all of the
>other sites I've set up, now I'd just like to transition my mailman
>install over to it as well)...
>> Also note that step 1 of FAQ 4.27 is only to get an initial access to
>> an http URL redirected to https. You still need to do steps 2 and 3 to
>> make the form action URLs go to the correct place without redirection
>> so as to not lose the form data.
>I did... I set:
>DEFAULT_URL_PATTERN = 'https://%s:#####/mailman/'
>Where ##### is the 5 digit port I set it to, then I ran:
> # ./withlist -l -a -r fix_url
>Importing fix_url...
>Running fix_url.fix_url()...
>Loading list listname (locked)
>Saving list
>... repeat for each list
> #
>Was that the correct output? Did I need to stop mailman before running
>that command?q

That is the expected output. You don't need to restart Mailman. If you
want more output, you can run

 ./withlist -l -a -r fix_url -v

and it will report what it is setting.

>I also added the redirect for the non-ssl host to the ssl host per the
>instructions at the above site:
>RewriteCond   %{HTTP_HOST}  ^lists\.example\.com
>RewriteRule ^(.*) https://lists.example.com:#####$1 [NC,R=301,L]
>(##### is a 5 digit valid port that is not in use)
>These two lines work fine for redirecting my other sites...

I'm surprised this works for anything because this says if the host is
lists.example.com, redirect the request to
https://lists.example.com:#####$1 where $1 is the path in the original

The problem is the redirected request also matches the host
lists.example.com, so it is redirected again in an endless loop.

The above two lines must either be in a VirtualHost block that applies
only to port 80 requests or at least not to port ##### requests
(perhaps that's why it works for the others) or it needs to be
augmented as in

RewriteCond   %{HTTP_HOST}  ^lists\.example\.com
RewriteCond   %{SERVER_PORT} !=#####
RewriteRule ^(.*) https://lists.example.com:#####$1 [NC,R=301,L]

so that it doesn't apply the rewrite if the port is already #####.

>I didn't add an actual vhost directive for mailman in apache because I
>never needed it before - I think that the settings in 50_mailman.conf
>take care of that part...?

Presumably they apply to all hosts which should be OK.

>Strangely, even though I did the above changes, if I remove the
>redirect, I can get to the lists on the non-ssl url, and it seems to
>work fine (shows the membership, etc)... ??? I haven't tried changing
>any settings yet though...

Without the rewrite, you should also be able to get there using the SSL

>Sorry, I'm not very good with this stuff...
>>> when I try to visit the correct URL, it tries to connect, but
>>> looks like some kind of looping going on, then I finally get a
>>> 'The connection was reset' error...
>> What is the "correct" URL? Note that the changes I suggest above
>> only affect what URLs are generated as links and for posting of
>> forms. They don't affect what happens when you go to one.
>The correct URL is what I'm trying to change...
>The old one - that still works when the redirect above is commented out
>- was:
>I'm trying to make it work on:

And that should work too with the redirect commented out.

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