![]() |
By: Kurt Wall
Tested on: Slackware 8.1
The instructions for configuring and installing Mailman in this document make the following assumptions:
$, you're working as a mortal
user.
#, you're working as the
root user.
This is the process I used to install and configure Mailman at KurtWerks. As usual, your mileage may vary and if it breaks, you get to keep all three pieces. The process is somewhat involved, but I've tried to simplify it as much as possible and keep the discussion of theory to a minimum.
# groupadd mailman
# useradd -d /usr/local/mailman -g mailman mailman
I created the group first so that I could specify it using the
useradd's -g option when I created the user.
# mkdir /usr/local/mailman
# cd /usr/local/mailman
# chgrp mailman .
# chmod 2775 .
# ls -ld
drwxrwsr-x 2 root mailman 4096 Jan 3 08:47 ./
$ cd /tmp
$ gzip -cd mailman-2.1.tar.gz | tar -xf -
$ ./configure --with-cgi-gid=nobody \
--with-mail-gid=daemon \
--with-cgi-extension=".cgi"
[...]
configuration completed at Sat Jan 4 12:09:04 EST 2003
$ make
[...]
If you are running Apache, the group that runs CGI scripts and
which corresponds to the --with-cgi-gid option passed
to configure is specified by the Group
directive in the httpd.conf. I had some trouble
identifying the argument to pass to --with-mail-gid,
which specifies the group that should run Mailman's wrapper
scripts, but it turned out to be daemon.
# make install
[...]
# cd /usr/local/mailman
# bin/check_perms
No problems found
If the check_perms script reports errors, rerun it
using the -f option to fix the errors.
# bin/check_perms -f
If check_perms can't fix the errors, you'll have
to RTFM at the Mailman site or in the distribution tarball to
diagnose and solve them yourself.
ScriptAlias /mailman/ "/usr/local/mailman/cgi-bin/"
# cp $prefix/icons/*.{jpg,png} /var/www/icons
Edit /usr/local/mailman/Mailman/mm_cfg.py and add a line
that points the variable IMAGE_LOGOS points at the
proper base URL for the logos you've just copied into place. At
KurtWerks, the base URL is /icons/ under the document
root, so the value is:
IMAGE_LOGOS = '/icons/'
Alias /pipermail/ "/usr/local/mailman/archives/public/"
<Directory "/usr/local/mailman/archives/public">
Options FollowSymLinks
</Directory>
apachectl restart, which should
work for most Apache installations, but you might want to use the
appropriate init script.
# apachectl restart
/usr/sbin/apachectl restart: httpd restarted
# crontab /usr/local/mailman/cron/crontab.in -u mailman
# bin/mailmanctl start
Starting Mailman's master qrunner.
rc.local -- the Mailman INSTALL file lists
other means of integrating the script into system startup
scripts. Here are the lines I added to rc.local:
# Start Mailman
/usr/local/mailman/scripts/mailman start
Similarly, I wanted Mailman to stop automatically when the system
is shutdown, so I added the following lines to /etc/rc.K:
# Stop Mailman
if [ -x /usr/local/mailman/scripts/mailman ] ; then
/usr/local/mailman/scripts/mailman stop
fi
DEFAULT_EMAIL_HOST and
DEFAULT_URL_HOST in
/usr/local/mailman/Mailman/Defaults.py.
DEFAULT_EMAIL_HOST should contain the hostname
portion of email sent to your domain. So, if an email address is
you@some.where, DEFAULT_EMAIL_HOST should be
some.where. Similarly, if the URL people type to view
your Web pages is www.some.where/somepage.html, then
DEFAULT_URL_HOST would be
www.some.where. If you need to change either of these
values, change them in
/usr/local/mailman/Mailman/mm_cfg.py, and add the line
add_virtualhost(DEFAULT_URL_HOST, DEFAULT_EMAIL_HOST)
to the same file. At KurtWerks, for example, I made the following
changes to /usr/local/mailman/Mailman/mm_cfg.py:
DEFAULT_EMAIL_HOST = 'kurtwerks.com'
DEFAULT_URL_HOST = 'www.kurtwerks.com'
add_virtualhost(DEFAULT_URL_HOST, DEFAULT_EMAIL_HOST)
newlist script to create the mailman mailing
list. This list is the one from which password reminders will
appear to originate. Execute the command bin/newlist
mailman and follow the prompts:
# bin/newlist mailman
Enter the email of the person running the list: kwall@kurtwerks.com
Initial mailman password:
To finish creating your mailing list, you must edit your
/etc/mail/aliases (or equivalent) file by adding the
following lines, and possibly running the newaliases
program:
## mailman mailing list
mailman: "|/usr/local/mailman/mail/mailman post mailman"
mailman-admin: "|/usr/local/mailman/mail/mailman admin mailman"
mailman-bounces: "|/usr/local/mailman/mail/mailman bounces mailman"
mailman-confirm: "|/usr/local/mailman/mail/mailman confirm mailman"
mailman-join: "|/usr/local/mailman/mail/mailman join mailman"
mailman-leave: "|/usr/local/mailman/mail/mailman leave mailman"
mailman-owner: "|/usr/local/mailman/mail/mailman owner mailman"
mailman-request: "|/usr/local/mailman/mail/mailman request mailman"
mailman-subscribe: "|/usr/local/mailman/mail/mailman subscribe mailman"
mailman-unsubscribe: "|/usr/local/mailman/mail/mailman unsubscribe mailman"
Hit enter to notify mailman owner...
Be sure to add the listed aliases to
/etc/mail/aliases or wherever the aliases file lives
on your system, run Sendmail's newaliases command to
regenerate the aliases database (/etc/mail/aliases.db in
this example), and restart Sendmail so it picks up the new
aliases. After you create the list, subscribe yourself to the
newly-created list.
mmsitepass script:
# su - mailman
$ bin/mmsitepass newpass
Password changed.
Of course, replace newpass with the password you chose.
$Id: mailman.html,v 1.5 2003/01/25 05:21:58 kwall Exp kwall $