fbpx

GNU Mailman is a free software for managing mailing lists. This article describes how to set up Mailman on Debian Lenny (Debian 5.0).

Install MTA

To operate mailing lists with Mailman you need an MTA (Mail Transfer Agent). In this example, we use Postfix. The next time you install Postfix, select Internet Site as ‘General type of mail configuration’.

For more information about installing Postfix, see Setting Up Postfix under Debian .

Install Mailman

Mailman install now via apt-get:

apt-get install mailman
lists:~# apt-get install mailman
Reading package lists... Done
Building dependency tree       
Reading state information... Done
The following extra packages will be installed:
  apache2 apache2-mpm-worker pwgen python-support ucf
Suggested packages:
  spamassassin lynx listadmin
The following NEW packages will be installed:
  apache2 apache2-mpm-worker mailman pwgen python-support ucf
0 upgraded, 6 newly installed, 0 to remove and 0 not upgraded.
Need to get 9965kB of archives.
After this operation, 45.7MB of additional disk space will be used.
Do you want to continue [Y/n]? y
Get:1 http://http.at.debian.org lenny/main python-support 0.8.4lenny1 [28.4kB]                     
Get:2 http://http.at.debian.org lenny/main ucf 3.0016 [64.4kB]                                     
Get:3 http://security.debian.org lenny/updates/main apache2-mpm-worker 2.2.9-10+lenny7 [242kB]
Get:4 http://http.at.debian.org lenny/main pwgen 2.06-1 [19.2kB]
Get:5 http://http.at.debian.org lenny/main mailman 1:2.1.11-11 [9566kB]
Get:6 http://security.debian.org lenny/updates/main apache2 2.2.9-10+lenny7 [45.4kB]
Fetched 9965kB in 1s (5665kB/s)                                
Preconfiguring packages ...

Package Configuration

supported languages

Configuring mailman: Languages to support

During the installation the query appears which languages should be supported:

Package configuration

 ┌────────────────────────────────────┤ Configuring mailman ├────────────────────────────────────┐
 │ For each supported language, Mailman stores default language specific texts in                │ 
 │ /etc/mailman/LANG/ giving them conffile like treatment with the help of ucf.  This means      │ 
 │ approximately 150kB for each supported language on the root file system.                      │ 
 │                                                                                               │ 
 │ If you need a different set of languages at a later time, just run dpkg-reconfigure mailman.  │ 
 │                                                                                               │ 
 │ NOTE: Languages enabled on existing mailing lists are forcibly re-enabled when deselected     │ 
 │ and mailman needs at least one language for displaying its messages.                          │ 
 │                                                                                               │ 
 │ Languages to support:                                                                         │ 
 │                                                                                               │ 
 │ [] ar (Arabic) │ 
 │ [] ca (Catalan) │ 
 │    [ ] cs (Czech)                                                                         ▒   │ 
 │ [] da (Danish) │ │ 
 │ [*] de (German) ▒ │ 
 │    [*] en (English)                                                                       ▒   │ 
 │    [ ] es (Spanish)                                                                       ▒   │ 
 │ [] and (Estonian) ▒ │ 
 Eu (Basque) 
 │                                                                                               │ 
 │                                                                                               │ 
 │                                            <Ok>                                               │ 
 │                                                                                               │ 
 └───────────────────────────────────────────────────────────────────────────────────────────────┘ 

Standard-Sprache

Configuring mailman: Default language for Mailman

If you have selected several languages, you can now specify the default language:

Package configuration

 ┌────────────────────────────────────┤ Configuring mailman ├────────────────────────────────────┐
 │ The web page will be shown in this language, and in general, Mailman will use this language   │ 
 │ to communicate with the user.                                                                 │ 
 │                                                                                               │ 
 │ Default language for Mailman:                                                                 │ 
 │                                                                                               │ 
 │ de (German) │ 
 │                                         en (English)                                          │ 
 │                                                                                               │ 
 │                                                                                               │ 
 │                                            <Ok>                                               │ 
 │                                                                                               │ 
 └───────────────────────────────────────────────────────────────────────────────────────────────┘ 

Note on further configuration steps

Configuring mailman: Missing site list

Finally, a note about further necessary configuration steps, which you perform manually after the installation:

Package configuration

 ┌────────────────────────────────────┤ Configuring mailman ├────────────────────────────────────┐
 │                                                                                               │ 
 │ Missing site list                                                                             │ 
 │                                                                                               │ 
 │ Mailman needs a so-called "site list", which is the list from which password reminders and    │ 
 │ such are sent out from.  This list needs to be created before mailman will start.             │ 
 │                                                                                               │ 
 │ To create the list, run "newlist mailman" and follow the instructions on-screen.  Note that   │ 
 │ you also need to start mailman after that, using /etc/init.d/mailman start.                   │ 
 │                                                                                               │ 
 │                                            <Ok>                                               │ 
 │                                                                                               │ 
 └───────────────────────────────────────────────────────────────────────────────────────────────┘ 

Completion of the installation

Selecting previously deselected package python-support.
(Reading database ... 21572 files and directories currently installed.)
Unpacking python-support (from .../python-support_0.8.4lenny1_all.deb) ...
Selecting previously deselected package apache2-mpm-worker.
Unpacking apache2-mpm-worker (from .../apache2-mpm-worker_2.2.9-10+lenny7_i386.deb) ...
Selecting previously deselected package apache2.
Unpacking apache2 (from .../apache2_2.2.9-10+lenny7_all.deb) ...
Selecting previously deselected package ucf.
Unpacking ucf (from .../archives/ucf_3.0016_all.deb) ...
Moving old data out of the way
Selecting previously deselected package pwgen.
Unpacking pwgen (from .../archives/pwgen_2.06-1_i386.deb) ...
Selecting previously deselected package mailman.
Unpacking mailman (from .../mailman_1%3a2.1.11-11_i386.deb) ...
Processing triggers for man-db ...
Setting up python-support (0.8.4lenny1) ...
Setting up apache2-mpm-worker (2.2.9-10+lenny7) ...
Starting web server: apache2.
Setting up apache2 (2.2.9-10+lenny7) ...
Setting up ucf (3.0016) ...
Setting up pwgen (2.06-1) ...
Setting up mailman (1:2.1.11-11) ...
Looking for enabled languages (this may take some time) ... done.
Installing site language en ............................................ done.
Configuring mailman for domain lists.wefi.net ...
Upgrading from version 0x0 to 0x2010bf0
getting rid of old source files
Site list for mailman missing (looking for list named 'mailman'). (warning).
Please create it; until then, mailman will refuse to start. (warning).
lists:~#  

Further configuration

Check configuration

Check the configuration file /etc/mailman/mm_cfg.py. Especially important are correct DEFAULT entries:

lists:~# grep DEFAULT /etc/mailman/mm_cfg.py 
DEFAULT_MSG_FOOTER for an example."""
DEFAULT_URL_PATTERN = 'http://%s/cgi-bin/mailman/'
DEFAULT_EMAIL_HOST = 'lists.wefi.net'
DEFAULT_URL_HOST   = 'lists.wefi.net'
add_virtualhost(DEFAULT_URL_HOST, DEFAULT_EMAIL_HOST)
DEFAULT_SERVER_LANGUAGE = 'en'
DEFAULT_SEND_REMINDERS = 0
lists:~# 

newlist mailman

through

newlist mailman

create the so-called ‘site list’. As an e-mail you enter an address of yours:

lists:~# newlist mailman
Enter the email of the person running the list: email@example.org
Initial mailman password: 
To finish creating your mailing list, you must edit your /etc/aliases (or
equivalent) file by adding the following lines, and possibly running the
`newaliases' program:

## mailman mailing list
mailman: "| / var / lib / mailman / mail / mailman post mailman"
mailman-admin: "/ var / lib / mailman / mail / mailman admin mailman"
mailman-bounces:      "|/var/lib/mailman/mail/mailman bounces mailman"
mailman-confirm:      "|/var/lib/mailman/mail/mailman confirm mailman"
mailman-join: "| / var / lib / mailman / mail / mailman join mailman"
mailman-leave:        "|/var/lib/mailman/mail/mailman leave mailman"
mailman-owner:        "|/var/lib/mailman/mail/mailman owner mailman"
mailman-request:      "|/var/lib/mailman/mail/mailman request mailman"
mailman-subscribe:    "|/var/lib/mailman/mail/mailman subscribe mailman"
mailman-unsubscribe:  "|/var/lib/mailman/mail/mailman unsubscribe mailman"

Hit enter to notify mailman owner...

lists:~# 

Note: The message to the specified email address will not be sent until you start Mailman later.

Now complete the entries in / etc / aliases and execute them postadmin /etc/aliases(if you use Postfix as in the example below):

lists:~# vi /etc/aliases
lists:~# cat /etc/aliases
# /etc/aliases
mailer-daemon: postmaster
postmaster: root
nobody: root
hostmaster: root
usenet: root
news: root
webmaster: root
www: root
ftp: root
abuse: root
noc: root
security: root

## mailman mailing list
mailman: "| / var / lib / mailman / mail / mailman post mailman"
mailman-admin: "/ var / lib / mailman / mail / mailman admin mailman"
mailman-bounces:      "|/var/lib/mailman/mail/mailman bounces mailman"
mailman-confirm:      "|/var/lib/mailman/mail/mailman confirm mailman"
mailman-join: "| / var / lib / mailman / mail / mailman join mailman"
mailman-leave:        "|/var/lib/mailman/mail/mailman leave mailman"
mailman-owner:        "|/var/lib/mailman/mail/mailman owner mailman"
mailman-request:      "|/var/lib/mailman/mail/mailman request mailman"
mailman-subscribe:    "|/var/lib/mailman/mail/mailman subscribe mailman"
mailman-unsubscribe:  "|/var/lib/mailman/mail/mailman unsubscribe mailman"

lists:~# postalias /etc/aliases
lists:~# 

Mailman starts

Now start Mailman:

/etc/init.d/mailman start
Categories: Tutorials

0 Comments

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.