Mailman on Ubuntu


  • Just want to install Mailman on Ubuntu
  • Proper installation by carefully reading the “manual”
  • Get frustrated


  • Ubuntu 14.04.3 LTS (Trusty Tahr)
  • Mailman 2.x


(Without Postfix or Exim4 configuration)

user@localhost:~$ sudo apt-get update
user@localhost:~$ sudo apt-get upgrade
user@localhost:~$ sudo apt-get install mailman
# Apache conf
user@localhost:~$ sudo cp /etc/mailman/apache.conf /etc/apache2/sites-available/mailman.conf
user@localhost:~$ sudo a2ensite mailman.conf
user@localhost:~$ sudo /etc/init.d/apache2 reload
# Default List
user@localhost:~$ sudo newlist mailman
user@localhost:~$ sudo /etc/init.d/mailman start


You don’t have permission to access /cgi-bin/mailman/admin on this server.


It doesn’t work. Turns out, the errors are not directly related to the mailman itself.

Permission denied
Surprisingly, the default /etc/apache2/sites-available/mailman.conf of the mailman is for the Apache 2.2 branch. The package manager installs 2.4. Thus, you have to change the /etc/apache2/sites-available/mailman.conf.

#Replace this
Order allow,deny
Allow from all
# with this
Require all granted

Afterwards, reload:

user@localhost:~$ sudo /etc/init.d/apache2 reload

Downloading binary – CGI not activated
After you got access to http://locahost/cgi-bin/mailman/admin the browser does not display a website, it downloads a binary file. If this happens, you have to activate CGI which is not done by the installer.

user@localhost:~$ sudo a2enmod cgi
user@localhost:~$ sudo service apache2 restart

ScriptAlias wrong
In the case you faced the previous errors, you may see a warning while restarting the Apache:

AH00671: The ScriptAlias directive in /etc/apache2/sites-enabled/mailman.conf at line 4 will probably never match because it overlaps an earlier ScriptAlias.

If you want to rid of this, you can simply follow the instructions in the mailman.conf:

# 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/ 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.

Its finally working.


Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s