FAQ

Page Discussion History

Mailman

Revision as of 19:56, 16 January 2012 by MichaelLustfield (Talk | contribs)

Contents

Mailman

Mailman is free software for managing electronic mail discussion and e-newsletter lists. Mailman is integrated with the web, making it easy for users to manage their accounts and for list owners to administer their lists. Mailman supports built-in archiving, automatic bounce processing, content filtering, digest delivery, spam filters, and more.

Mailman is crazy. This page used to focus on giving you options to install, configure, and run it as you wish. Because of the crazy that is mailman, this will show you the most common and best supported way to set up Mailman software behind Nginx.

Installation

To install mailman from the Ubuntu repository:

aptitude install mailman thttpd

From here, it's best to just follow the Mailman website. Configuration of mailman itself is a massive topic beyond the scope of this page.

Nginx Config

If the above is how you installed then the below will be nearly a drop in working model.

Nginx Config:

server {
        listen XXX.XXX.XXX.XXX:80;
        server_name lists.DOMAIN.TLD;
        root /usr/lib;
 
        location = / {
                rewrite ^ /mailman/listinfo permanent;
        }
 
        location / {
                rewrite ^ /mailman$uri$args;
        }
 
        location = /mailman/ {
                include proxy_params;
                proxy_pass  http://127.0.0.1/listinfo;
                proxy_set_header Host lists.good-sam.com;
                proxy_set_header X-Real-IP $remote_addr;
        }
 
        location /mailman/ {
                include proxy_params;
                proxy_pass http://127.0.0.1/;
                proxy_set_header Host lists.good-sam.com;
                proxy_set_header X-Real-IP $remote_addr;
        }
 
        location /cgi-bin {
                rewrite ^/cgi-bin(.*)$ $1 permanent;
        }
 
        location /images/mailman {
                alias /var/lib/mailman/icons;
        }
 
        location /pipermail {
                alias /var/lib/mailman/archives/public;
                autoindex on;
        }
}

CGI

In order for this to work you will need to have CGI processing available. There are a few guides to this but I "hopefully" took the pain out of it.

Here, we're using thttpd. Edit the configuration file and make it match this exactly.

/etc/thttpd/thttpd.conf:

host=127.0.0.1
port=80
dir=/usr/lib/cgi-bin/mailman
nochroot
user=www-data
cgipat=/**
throttles=/etc/thttpd/throttle.conf
logfile=/var/log/thttpd.log

Removing /cgi-bin/ from URL

Edit /usr/lib/mailman/Mailman/mm_cfg.py and change the following parameters.

DEFAULT_URL_PATTERN = 'http://%s/mailman/'
PRIVATE_ARCHIVE_URL = '/mailman/private'

Sum It Up

There's a lot to making mailman work. It's definitely not a simple clickety click process. If you follow the above to the letter, there's no reason you shouldn't wind up with a fully functioning mailman installation.