Mailman Behind HTTPS

Feb 2018

When Let's Encrypt became available, I moved most of the vHosts I run on this web server behind HTTPS. This included my Mailman web interface. However, this broke the admin interface for my mailing lists. Even though I changed the DEFAULT_URL_PATTERN in /etc/mailman/ to 'https://%s/', the submit button on the admin interface still took me to

I spent way too long debugging this, which is why I'm writing this post. It turns out that the InitVars() function in is only called once, when the list is created, and the resulting information is stored in the config.pck file for the list. Because I created the lists over HTTP, back in the day, the url in config.pck was still for all my old lists.

To fix this problem, I first wrote the correct url to a file:

echo "web_page_url = ''" > /tmp/newurl

I then ran the following little bash script to fix all my lists:

for i in $(list_lists -b); do config_list -i /tmp/newurl -v $i; done

Hopefully, if you're having the same problem as me (mailman's admin page still submits to HTTP instead of HTTPS), you might come across this page and save yourself some trouble!

Drop me a line! igor47@