<< Prev  |  TOC  |  Front Page  |  Talkback  |  FAQ  |  Next >>
LINUX GAZETTE
...making Linux just a little more fun!
Configuring Mailman on a Debian [Woody] system with Exim
By Rich Price

INTRODUCTION

This mini HOWTO is a product of my attempt to configure Mailman on a Debian [Woody] system that uses Exim as its MTA. I started taking notes when I realized that the information that I needed was scattered over a large number of FAQs and README files.

Please note that most of this material appears in the documentation that comes with the Mailman package. I have merely compiled it in a more coherent and readable form.

I assume at the start that both Apache and Exim are up and running. The Mailman package should be installed with "apt-get install mailman".

Debian mailman installs with the following directory structures:

/etc/mailman     is the location of the mailman config file [mm_cfg.py].
/var/lib/mailman is where the lists and archives will be created.
/usr/lib/mailman is where Mailman is installed.
/usr/doc/mailman is where the documentation can be found.

Note that for all installed files User is "root" and Group is "list".

THE EXIM CONFIGURATION FILE

First you should make the following changes to exim configuration file.

Insert this at end of main configuration settings section (Text Version):

# Mailman stuff
# home dir for mailman
MAILMAN_HOME=/var/lib/mailman
# wrapper script for mailman
MAILMAN_WRAP=MAILMAN_HOME/mail/wrapper
# user and group for mailman
MAILMAN_UID=list
MAILMAN_GID=daemon

Insert this at end of transports configuration section (Text Version):

# Mailman stuff
##
## Three transports for list mail, request mail and admin mail
## respectively
## Mailman is installed in MAILMAN_HOME
## Mailman is configured to be invoked as user exim
list_transport:
        driver = pipe
        command = MAILMAN_WRAP post ${lc:$local_part}
        current_directory = MAILMAN_HOME
        home_directory = MAILMAN_HOME
        user = MAILMAN_UID
        group = MAILMAN_GID                                                                                           
list_request_transport:
        driver = pipe
        command = MAILMAN_WRAP mailcmd ${lc:$local_part}
        current_directory = MAILMAN_HOME
        home_directory = MAILMAN_HOME
        user = MAILMAN_UID
        group = MAILMAN_GID           
list_admin_transport:
        driver = pipe
        command = MAILMAN_WRAP mailowner ${lc:$local_part}
        current_directory = MAILMAN_HOME
        home_directory = MAILMAN_HOME
        user = MAILMAN_UID
        group = MAILMAN_GID

In directors configuration section change system_aliases to look like this (Text Version):

system_aliases:
  driver = aliasfile
  file_transport = address_file
  pipe_transport = address_pipe
  file = /etc/aliases
  search_type = lsearch
  user = list

Insert this in directors configuration section just before the user mailbox part (Text Version):

# Mailman Stuff
## Directors section [this deals with local addresses]
##
## First 2 directors rewrite list-owner or owner-list to list-admin
## This is only done if the list exists.
## List existence checks are done by seeing if the file
## MAILMAN_HOME/lists//config.db exists.                                                                                            
list_owner_director:
   driver = smartuser
   require_files = MAILMAN_HOME/lists/${lc:$local_part}/config.db
   suffix = "-owner"
   new_address = "${lc:$local_part}-admin@${domain}"                                                                                       
owner_list_director:
   driver = smartuser
   require_files = MAILMAN_HOME/lists/${lc:$local_part}/config.db
   prefix = "owner-"
   new_address = "${lc:$local_part}-admin@${domain}"                                                                                 
## The next 3 directors direct admin, request and list mail to the 
## appropriate transport.  List existence is checked as above.                                                                                                            
list_admin_director:
   driver = smartuser
   suffix = -admin
   require_files = MAILMAN_HOME/lists/${lc:$local_part}/config.db
   transport = list_admin_transport
list_request_director:
   driver = smartuser
   suffix = -request
   require_files = MAILMAN_HOME/lists/${lc:$local_part}/config.db
   transport = list_request_transport                                                                                                       
list_director:
   driver = smartuser
   require_files = MAILMAN_HOME/lists/${lc:$local_part}/config.db
   transport = list_transport

THE APACHE CONFIGURATION FILE

Next you should make the following changes to the apache configuration file.

Add this to the 'Main' server configuration (Text Version):

ScriptAlias /mailman/ /usr/lib/mailman/cgi-bin/
<Directory /usr/lib/mailman/cgi-bin/>
    AllowOverride None
    Options ExecCGI
    Order allow,deny
    Allow from all
</Directory>
Alias /pipermail/ /var/lib/mailman/archives/public/
<Directory /var/lib/mailman/archives/public>
    Options Indexes MultiViews FollowSymLinks
    AllowOverride None
    Order allow,deny
    Allow from all
</Directory>
Alias /mmimages/ /usr/share/doc/mailman/images/
<Directory /usr/share/doc/mailman/images>
    Options Indexes MultiViews
    AllowOverride None
    Order allow,deny
    Allow from all
</Directory>

Then syntax check your changes with this command.

apache -k -f

If all is well you won't get any error messages.

THE MAILMAN CONFIGURATION FILE

Next make these changes to mailman configuration file [mm_cfg.py]. Remember, this is the file found at /etc/mailman.

Modify these two existing lines as shown:

DEFAULT_HOST_NAME	= '{mail.server}'
DEFAULT_URL      	= 'http://{web.server}/mailman/'

Where {web.server} is the fully qualified name of your server and {mail.server} is the non-local part of your email address.

For example, let's say that your server ralph in your domain bigboy.org has a DNS alias [c record] of www and an mx record for bigboy.org. In this case neither {web.server} nor {mail.server} would be ralph.bigboy.org. Your config would be:

DEFAULT_HOST_NAME	= 'bigboy.org'
DEFAULT_URL      	= 'http://www.bigboy.org/mailman/'

You should also add the following new line to mm_cfg.py:

IMAGE_LOGOS       = '/mmimages/'

ALIASES

Add the following lines to /etc/aliases:

mailman-owner:	mailman
mailman:       	postmaster

This assumes that you already have a postmaster alias.

SITE PASSWORD

Next create your site password with the command:

/usr/lib/mailman/bin/mmsitepass

Where is the Mailman master password which can be used anywhere that individual user or mailing list administrator passwords are required. This password gives the mailman site administrator the ability to adjust things when necessary.

TESTING

You are now ready to test Mailman. To do this, you should create a list named test. This list should be deleted after you are done using it. If you find problems while testing then fix them and then re do this test procedure from the start.

First run the job /usr/lib/mailman/bin/newlist and respond as follows to its prompts:

Enter the name of the list: test
Enter the email of the person running the list: {you@domain.name}
Initial test password:  {you-pick-it}
{Make note of the alias lines that are now printed.  See below.}
Hit enter to continue with test owner notification...{Enter}

Next add the lines specified by newlist to the alias file. They should look something like this:

## test mailing list
## created: 31-Mar-2003 root
test:            "|/var/lib/mailman/mail/wrapper post test"
test-admin:      "|/var/lib/mailman/mail/wrapper mailowner test"
test-request:    "|/var/lib/mailman/mail/wrapper mailcmd test"
test-owner:      test-admin

Wait for Mailman to send you [the list owner] an email. This email will start with something like the following text:

----- start of excerpt -----

The mailing list `test' has just been created for you. The following is some basic information about your mailing list.

Your mailing list password is:

{password}

You need this password to configure your mailing list. You also need it to handle administrative requests, such as approving mail if you choose to run a moderated list.

You can configure your mailing list at the following web page:

http://{your.web.server}/mailman/admin/test

The web page for users of your mailing list is:

http://{your.web.server}/mailman/listinfo/test

----- end of excerpt -----

After you receive this email, go to the web page "http://{your.web.server}/mailman/admin/test" and sign in with the supplied password. At this time, you might want to review the General Options section of this Administration web page. [The other sections of this web page are also worth a glance.] Add some text in the description sections to familiarize yourself with how updates are done. [It's all rather straightforward and self documenting.] When you are done, save your updates and logout.

Next go to the web page "http://{your.web.server}/mailman/listinfo/test" and review the page. Use this page to subscribe to the list.

You should soon get a confirmation request email. Follow the instructions on this email to confirm your subscription request.

Send an Email to the list. If you get it, the install was a success.

 

[BIO] Rich Price has been using computers for around 35 years and Linux for around 10 years. And he hasn't got tired of either quite yet.


Copyright © 2003, Rich Price. Copying license http://www.linuxgazette.net/copying.html
Published in Issue 91 of Linux Gazette, June 2003

<< Prev  |  TOC  |  Front Page  |  Talkback  |  FAQ  |  Next >>