Running mailman's web interface through a ssh tunnel

by Sebastien Mirolo on Sun, 25 Jul 2010

I have setup mailman web interface to run on the private website, accessible at http://localhost:8000 after the ssh tunnel has been constructed with the following command.

[host]$ ssh -fN -i ~/.ssh/fortylines.com_rsa -L 8000:localhost:80 fortylines.com

The problem with this setup is that mailman web interface will sometimes refer to pages through absolute uri that contain the fortylines.com domain instead of the localhost:8000 domain. Of course it breaks.

As usual, after a few searches, I found a post related to my current issue. I tried, without success the following commands.

[host]$ sudo python ./lib/mailman/bin/fix_url.py --urlhost=localhost:8000 dev
[host]$ sudo /usr/sbin/withlist -l -r localhost:8000 dev

Since the fix_url.py script is written in python, I had a look through the code and noticed a few references to mlist.web_page_url. After a few more searches, I stumbled upon another interesting post and issued the following commands.

[host]$ echo "web_page_url = 'http://localhost:8000/cgi-bin/mailman/'" > dev.conf
[host]$ sudo /usr/sbin/config_list -i dev.conf dev

It fixed my issues with running mailman's web interface through a ssh tunnel.

by Sebastien Mirolo on Sun, 25 Jul 2010