Thursday, April 17, 2008

How to setup Mailman List Administration on a different Port

This is just a really quick set of commands that I needed to use in order to fix my mailman html administration to work on another port. My mailman installation is on ubuntu (debian), so your locations might be different.

I needed mine to work on port other than 80 so this is what I dug up after some research:
In your mailman config file (/etc/mailman/mm_cfg.py):
search and replace the port in the Default URL Pattern:


DEFAULT_URL_PATTERN = 'http://%s:8080/mailman/'
(the 8080 represents the port you would like to use,
so if you are using a different port, plug it in there)
Use a program like vi in your ssh connection or you use webmin, edit this file in the file editor.
I would also recommend checking these settings if they are not already there:
# Max recipients for each message
SMTP_MAX_RCPTS = 4
# Max messages sent in each SMTP connection
SMTP_MAX_SESSIONS_PER_CONNECTION = 30

I had to change these to work properly with my isp host as mailman was sending too many recipients per message and it ended up bouncing.

Ok, now save your file.

You will notice that this will not change any of your current administrative pages and it will unfortunately still end up giving you the old urls (without the port you need).

To fix this you can use this little session I saved to remind myself what I did (it took me a while to find the location, but)...
> cd /var/lib/mailman/bin
> /withlist -l -r fix_url mailman
bash: /withlist: No such file or directory
> ./withlist -l -r fix_url mailman
Importing fix_url...
Running fix_url.fix_url()...
Loading list mailman (locked)
Finalizing
Saving list
> /etc/init.d/mailman force-reload Mailman
* Restarting Mailman master qrunner mailmanctl
...done.
Voila! Now you should be able to reload those pages and see the changes: your urls should include the port that you need.

Labels: , , , , , , , , , , , , , , , , , , ,