From charlesreid1

Line 65: Line 65:
==Connecting Mailman with Web Server==
==Connecting Mailman with Web Server==


I'm using an Apache web server.  To get Mailman working with Apache, I had to add the following to the <code>httpd.conf</code> file:
I'm using an Apache web server.  To get Mailman working with Apache, I had to add the following to the <code>httpd.conf</code> file to allow the mailman program to run cgi scripts:


<syntaxhighlight lang="apache">
<syntaxhighlight lang="apache">
Line 78: Line 78:


</IfModule>
</IfModule>
</syntaxhighlight>
To add GNU icons, Python-Powered icons, and mailman icons, copy the mailman-provided icons into Apache's icons directory (usually in <code>/path/to/apache/icons</code>):
<pre>
$ cp /path/to/mailman/icons/*.{jpg,png} /path/to/apache/icons/.
</pre>
Then you can point to these in the Mailman config file:
<pre>
$ sudo vim /path/to/mailman/Mailman/mm_cfg.py
</pre>
by adding the following line:
<syntaxhighlight lang="python">
IMAGE_LOGOS = '/images/'
</syntaxhighlight>
(default values for most stuff is defined in Defaults.py).
==Setting Up Pipermail==
Pipermail is a feature of Mailman that archives all of the mailing list's activity and makes it available to users.  This is basically what's being put in <code>/var/mailman</code> (or, in case you used the <code>--with-var-prefix</code> configure option above, <code>/path/to/mailman/var</code>).
This can be set up to be accessed via the web:
<syntaxhighglight lang="apache">
<IfModule alias_module>
    [...]
    Alias  /pipermail/ "/path/to/mailman/var/archives/public/"
    [...]
</IfModule>
</syntaxhighlight>
And to properly display international characters, add this:
<syntaxhighlight lang="apache">
<Directory "/path/to/mailman/var/archives/public/">
    AddDefaultCharset Off
</Directory>
</syntaxhighlight>
</syntaxhighlight>

Revision as of 21:24, 7 April 2011

Installation

You can download mailman from here: http://www.gnu.org/software/mailman/download.html

To verify the download using the signature, add the public keys of the developers listed on the download page, and visit Verifying a File using a Detached Signature at my GnuPG page for the verification process.

Pre-Configure Process

You must first create a group named "mailman" on your system, and create a user named "mailman" in the group "mailman".

# groupadd mailman
# useradd --shell /no/shell --home-dir /no/home --gid mailman mailman

Configuration

For my configuration of mailman, I wanted to make a self-contained installation, including moving the /var/mailman directory (which contains mutable mailman data) into the mailman installation directory. This is the reason for the --with-var-prefix option.

#!/bin/sh

./configure \
    --prefix=${HOME}/pkg/mailman/2.1.14 \
    --with-var-prefix=${HOME}/pkg/mailman/var

Before I ran configure, I had to run

$ mkdir -p ${HOME}/pkg/mailman/var
$ /usr/bin/sudo chown mailman ${HOME}/pkg/mailman
$ /usr/bin/sudo chgrp mailman ${HOME}/pkg/mailman
$ /usr/bin/sudo chmod 02775 ${HOME}/pkg/mailman    # <-- the "02" sets UID and GID permissions

(for more info on setting UID and GID permissions, see http://en.wikipedia.org/wiki/Setuid)

Once you've created this directory with the correct permissions, do the usual thing:

$ ./runconfigure.sh
$ make -j2
$ /usr/bin/sudo -u mailman make install # <-- must be run as sudo because creating/modifying directories owned by "mailman" user

Checking/Fixing Permissions

It is likely you'll run into problems with the permissions, even if you're careful. However, this can be easily fixed using a mailman script:

# cd ${HOME}/pkg/mailman/2.1.14
# bin/check_perms

(any permissions problems will be displayed here)

# bin/check_perms -f

(any permissions problems will be fixed)

(note that this must be run as the superuser, hence the #'s).


Connecting Mailman with Web Server

I'm using an Apache web server. To get Mailman working with Apache, I had to add the following to the httpd.conf file to allow the mailman program to run cgi scripts:

<IfModule alias_module>

    [...]

    # Add a script alias for mailman to run required cgi-scripts
    ScriptAlias /mailman/ "/path/to/apache/cgi-bin/"

    [...]

</IfModule>

To add GNU icons, Python-Powered icons, and mailman icons, copy the mailman-provided icons into Apache's icons directory (usually in /path/to/apache/icons):

$ cp /path/to/mailman/icons/*.{jpg,png} /path/to/apache/icons/.

Then you can point to these in the Mailman config file:

$ sudo vim /path/to/mailman/Mailman/mm_cfg.py

by adding the following line:

IMAGE_LOGOS = '/images/'

(default values for most stuff is defined in Defaults.py).

Setting Up Pipermail

Pipermail is a feature of Mailman that archives all of the mailing list's activity and makes it available to users. This is basically what's being put in /var/mailman (or, in case you used the --with-var-prefix configure option above, /path/to/mailman/var).

This can be set up to be accessed via the web:

<syntaxhighglight lang="apache"> <IfModule alias_module>

   [...]
   Alias  /pipermail/ "/path/to/mailman/var/archives/public/"
   [...]

</IfModule> </syntaxhighlight>

And to properly display international characters, add this:

<Directory "/path/to/mailman/var/archives/public/">
    AddDefaultCharset Off
</Directory>