How To Install And Configure Mailman (With Postfix) On Debian Squeeze
How To Install And Configure Mailman (With Postfix) On Debian SqueezeVersion 1.0 Mailman is an open-source mailing list manager, i.e., it can be used to manage email discussions and newsletter lists. It is probably the most popular and widely used mailing list manager on the Internet. This tutorial explains how to install and configure Mailman on a Debian Squeeze server with a Postfix mail server. I do not issue any guarantee that this will work for you!
1 Preliminary NoteIn this tutorial I will configure a virtual host with the hostname lists.example.com where I will install Mailman. lists.example.com is also the right part of the mailing list email addresses that will be configured in Mailman, i.e., mails to a mailing list will have to be sent to the address <listname>@lists.example.com. As your hostname will be different, please adjust this tutorial accordingly. Also make sure that your hostname exists in DNS. Mailman can be used with many mail servers (e.g. Postfix, Exim, Sendmail, Qmail). I will use Postfix in this tutorial. Make sure you have a working Postfix installation, for example as shown in this tutorial: Virtual Users And Domains With Postfix, Courier, MySQL And SquirrelMail (Debian Squeeze)
2 Installing Mailman And ApacheAs Mailman comes with a web frontend, we need a web server in addition to Mailman. I choose Apache. Mailman and Apache can be installed as follows: apt-get install mailman apache2 You will see the following questions/messages: Languages to support: <-- en (English) Mailman comes with an Apache configuration file, /etc/mailman/apache.conf, which we copy to /etc/apache2/sites-available/mailman.conf: cp /etc/mailman/apache.conf /etc/apache2/sites-available/mailman.conf Open /etc/apache2/sites-available/mailman.conf... vi /etc/apache2/sites-available/mailman.conf ... and append the following vhost configuration to the file (there's already a vhost for lists.example.net in the file which is commmented out - please don't use that vhost as my vhost configuration differs a little bit although it looks quite similar):
The second to last line ScriptAlias / /usr/lib/cgi-bin/mailman/listinfo is optional; it makes that when you go to http://lists.example.com/, you will be redirected to http://lists.example.com/listinfo. This makes sense if you don't have any files to serve in the document root /var/www/lists. Next create the document root /var/www/lists, enable the lists.example.com vhost configuration and restart Apache: mkdir /var/www/lists Because we are using a vhost here (lists.example.com), we need to adjust the following variables in /etc/mailman/mm_cfg.py: vi /etc/mailman/mm_cfg.py
3 Configuring PostfixNow we need to configure Postfix. First run: postconf -e 'relay_domains = lists.example.com' Then open /etc/postfix/master.cf... vi /etc/postfix/master.cf ... and make sure you have the following lines in it (they should be there by default):
Next we must associate the lists.example.com domain to the mailman: transport. How you do this depends on your Postfix configuration. For example, if you have set up your server according to the Virtual Users And Domains With Postfix, Courier, MySQL And SquirrelMail (Debian Squeeze) tutorial, transports are stored in a MySQL database; in most other setups, the file /etc/postfix/transport is used for creating transports. I am going to describe both cases in chapters 3.1 and 3.2.
3.1 Transports In A MySQL DatabaseIf you have set up your server according to the Virtual Users And Domains With Postfix, Courier, MySQL And SquirrelMail (Debian Squeeze) tutorial, transports are stored in the transport table in the mail MySQL database. To create the necessary transport, log into MySQL... mysql -u root -p ... and run the following MySQL commands: USE mail; Restart Postfix afterwards: /etc/init.d/postfix restart
3.2 Transports In /etc/postfix/transportIf you don't have your transport in a MySQL database, you probably use the file /etc/postfix/transport. In this case you can set up the necessary transport as follows: postconf -e 'transport_maps = hash:/etc/postfix/transport' Open /etc/postfix/transport... vi /etc/postfix/transport ... and add the following line:
Run postmap -v /etc/postfix/transport afterwards and restart Postfix: /etc/init.d/postfix restart
4 Creating The mailman Mailing ListBefore we can start to use Mailman, we must create a mailing list called mailman; this is obligatory - without it Mailman won't start: newlist --urlhost=lists.example.com --emailhost=lists.example.com mailman In most cases the --urlhost and --emailhost switches are not necessary because our vhost is already named lists.example.com, and we also have it in /etc/mailman/mm_cfg.py (DEFAULT_EMAIL_HOST and DEFAULT_URL_HOST), but if you want to go sure that Mailman uses the correct hostname, use these switches. root@server1:~# newlist --urlhost=lists.example.com --emailhost=lists.example.com mailman Now open /etc/aliases and add the aliases that you see in the output of the newlist command (this has to be done manually for each new list that you create): vi /etc/aliases
Whenever you modify /etc/aliases, you need to run newaliases afterwards. Now we can finally start Mailman: /etc/init.d/mailman start root@server1:~# /etc/init.d/mailman start
|




Recent comments
2 hours 5 min ago
3 hours 5 min ago
6 hours 52 min ago
8 hours 6 min ago
11 hours 42 min ago
18 hours 57 min ago
1 day 3 hours ago
1 day 5 hours ago
1 day 20 hours ago
1 day 22 hours ago