Mailman - Mailing List Manager

t

It’s been too long on my todo list: a mailing list manager for my mail server! Anyhow, it’s been quite simple to install. The following command installs the standard package from ubuntu:

sudo aptitude install mailman

Now, you need to tell postfix, that your mailman is installed. Therefore, add the following lines to your /etc/postfix/main.cf:

# added for mailman - taken from /etc/mailman/postfix-to-mailman.py
relay_domains = mailman.example.com
transport_maps = hash:/etc/postfix/transport
mailman_destination_recipient_limit = 1

Now, create the file /etc/postfix/transport with the following content:

mailman.example.com mailman:

And call the following command:

postmap /etc/postfix/transport

After that, you need to make sure, that postfix knows about the mailman service. Hence, add the following lines to your /etc/postfix/master.cf:

# added for mailman - taken from /etc/mailman/postfix-to-mailman.py
mailman unix - n n - - pipe
  flags=FR user=list
  argv=/var/lib/mailman/bin/postfix-to-mailman.py ${nexthop} ${mailbox}

After I added these lines, I found a quite similar one above. But as the service ran anyways, I did not spent time to check, whether my addition was really mandatory for mailman. If you try, please drop me a comment.

Before you create new mailman lists, you should edit the file /etc/mailman/mm_cfg.py. Here are my modifcations:

DEFAULT_URL_PATTERN = 'https://%s/cgi-bin/mailman/'

#-------------------------------------------------------------
# Default domain for email addresses of newly created MLs
DEFAULT_EMAIL_HOST = 'mailman.example.com'

#-------------------------------------------------------------
# Default host for web interface of newly created MLs
DEFAULT_URL_HOST = 'mailman.example.com'

# (see /usr/share/doc/mailman/README.Exim4.Debian)
MTA=None

# Misnomer, suppresses alias output on newlist
# alias for postmaster, abuse and mailer-daemon
DEB_LISTMASTER = 'server-amdin@example.com'

Reload your postfix mailserver using

sudo postfix reload

Now you can create new mailing lists (e. g. mymailinglist) using the following command. Note, that you will get aliases presented when calling the newlist command, but you can ignore them savely as we configured our postfix mailing system to detect mailing lists automagically.

sudo newlist mymailinglist

If you want to add the mailing list archive and the web front end for all, users, admins and moderators, you can add the following lines to your apache configuration file:

# We can find mailman here:
ScriptAlias /cgi-bin/mailman/ /usr/lib/cgi-bin/mailman/

# And the public archives:
Alias /pipermail/ /var/lib/mailman/archives/public/

# Logos:
Alias /images/mailman/ /usr/share/images/mailman/

# Use this if you don't want the "cgi-bin" component in your URL:
# In case you want to access mailman through a shorter URL you should enable
# this:
#ScriptAlias /mailman/ /usr/lib/cgi-bin/mailman/
# In this case you need to set the DEFAULT_URL_PATTERN in
# /etc/mailman/mm_cfg.py to http://%s/mailman/ for the cookie
# authentication code to work. Note that you need to change the base
# URL for all the already-created lists as well.

<directory cgi-bin="" lib="" mailman="" usr="">
  AllowOverride None
  Options ExecCGI
  AddHandler cgi-script .cgi
  Order allow,deny
  Allow from all
</directory>

<directory archives="" lib="" mailman="" public="" var="">
  Options Indexes FollowSymlinks
  AllowOverride None
  Order allow,deny
  Allow from all
</directory>

<directory images="" mailman="" share="" usr="">
  AllowOverride None
  Order allow,deny
  Allow from all
</directory>

If you added mailman to your apache installation, don’t forget to reload apache. Happy mailmaning, everybody
Cheers, iss

Flattr: