|
Related YoLinux Tutorials:
°Web Site Configuration
°Linux Systems Administration
°Internet Security
°YoLinux Tutorials Index
Free Information Technology Magazine Subscriptions and Document Downloads
|
This installation assumes the use of the Apache web server, sendmail and
Python.
The simplest method for installing Mailman on a Red Hat based
server is by using an RPM. (Part of the regular distribution since RH
7.2. On Red Hat 7.1 the RPM can be found on the Powertools CD) install:
rpm -ivh mailman-2.0.8-1.i386.rpm
Download RPM:
Ubuntu (dapper 6.06) / Debian: apt-get install mailman
If building from source: (I never did it this way.)
-
./configure --prefix=/var/mailman make install
Note FC 3: RPM's use to (RH 9) install to /var/mailman.
This does not conform to the newer Filesystem Hierarchy Standard (FHS) used
by Fedora Core 3 and also conflicts with SELinux security.
Mailman now installs to /usr/lib/mailman/... and /usr/share/doc/mailman-*
Compile wrappers: mailman-2.0.8/src/alias-wrapper.c, cgi-wrapper.c, mail-wrapper.c
Mailman source is available from:
Red Hat/CentOS RPM package notes:
- The Red Hat RPM of Mailman integrates with the Red Hat sendmail RPM which
requires a wrapper to interface with it while it executes.
The smrsh (sendmail restricted shell) wrapper is installed by the RPM in:
- Fedora Core 3: /etc/smrsh/mailman (soft linked to
/usr/lib/mailman/mail/mailman)
Note: The directory /etc/smrsh is the location of the
restricted shell programs which are to interface with sendmail.
- Red Hat 9.0: /etc/smrsh/mailman (soft linked to
/var/mailman/mail/mailman)
Note: The directory /etc/smrsh is the location of the
restricted shell programs which are to interface with sendmail.
- Red Hat 7.1:
/etc/smrsh/wrapper (soft linked to /var/mailman/mail/wrapper)
- Debian restricted shell directory: /usr/admin/sm.bin
- Documentation will be installed in: (local system file)
- Icons for the web interface are placed in /var/www/icons/ (PythonPowered.png,gnu-head-tiny.jpg,mailman-large.jpg,mailman.jpg)
- RPM installs the rest of mailman in /var/mailman
Red Hat 9.0 / Mailman 2.1.1 introduces:
- a daemon init script: /etc/rc.d/init.d/mailman
- logrotate support: /etc/logrotate.d/mailman
- Apache 2.0 conf.d support: /etc/httpd/conf.d/mailman.conf
Fedora Core splits install to include: /usr/lib/mailman/...
for python scripts.
Ubuntu package notes:
Installs to:
- Installed software package: /usr/lib/mailman/
- CGI: /usr/lib/cgi-bin/mailman/
- Configuration documentation: /usr/share/doc/mailman/
- Log files: /usr/log/mailman/
- User data: /var/lib/mailman/
- Runtime lock file: /var/lock/mailman/
- Location of process id file: /var/run/mailman/
- Configuration files located in this directory: /etc/mailman/
- Start script: /etc/init.d/mailman
- Admin commands: /usr/sbin/
Check file and directory permissions of installation: /usr/sbin/check_perms
Use check_perms -f to fix permission problems.
Manual fix: chown -R list.list /var/lib/mailman/*
Configuration: (sendmail, Apache, cron)
- Change defaults file mm_cfg.py
- Fedora Core 3 / Mailman 2.1.5: /usr/lib/mailman/Mailman/mm_cfg.py
-
try: fqdn = getfqdn() except: fqdn = 'mm_cfg_has_unknown_host_domains'
DEFAULT_URL_HOST = fqdn DEFAULT_EMAIL_HOST = fqdn
|
- Red Hat 9.0 / Mailman 2.1.1: /var/mailman/Mailman/mm_cfg.py
-
DEFAULT_URL_HOST = 'mega-corp.com' DEFAULT_EMAIL_HOST = 'mega-corp.com'
|
- Red Hat 7.1 / Mailman 2.0.8: /var/mailman/Mailman/mm_cfg.py
-
DEFAULT_HOST_NAME = 'localhost' DEFAULT_URL = 'http://localhost/mailman/'
|
- Create a mailing list (example: test):
[root prompt]# cd /var/mailman [root prompt]# bin/newlist test - Creates a mailing list called test.
Enter the email address of the person running the list:
Initial test password: - Type it correctly. There is no verification!
- Configure sendmail: The newlist command will then print the entries to add to the file /etc/aliases.
Add (cut and paste) the entries to the file /etc/aliases:
- Fedora Core 3 / Mailman 2.1.5:
-
test: "|/usr/lib/mailman/mail/mailman post test" test-admin: "|/usr/lib/mailman/mail/mailman admin test" test-bounces: "|/usr/lib/mailman/mail/mailman bounces test" test-confirm: "|/usr/lib/mailman/mail/mailman confirm test" test-join: "|/usr/lib/mailman/mail/mailman join test" test-leave: "|/usr/lib/mailman/mail/mailman leave test" test-owner: "|/usr/lib/mailman/mail/mailman owner test" test-request: "|/usr/lib/mailman/mail/mailman request test" test-subscribe: "|/usr/lib/mailman/mail/mailman subscribe test" test-unsubscribe: "|/usr/livarb/mailman/mail/mailman unsubscribe test"
|
- Red Hat 9.0 / Mailman 2.1.1:
-
test: "|/var/mailman/mail/mailman post test" test-admin: "|/var/mailman/mail/mailman admin test" test-bounces: "|/var/mailman/mail/mailman bounces test" test-confirm: "|/var/mailman/mail/mailman confirm test" test-join: "|/var/mailman/mail/mailman join test" test-leave: "|/var/mailman/mail/mailman leave test" test-owner: "|/var/mailman/mail/mailman owner test" test-request: "|/var/mailman/mail/mailman request test" test-subscribe: "|/var/mailman/mail/mailman subscribe test" test-unsubscribe: "|/var/mailman/mail/mailman unsubscribe test"
|
- Red Hat 7.1 / Mailman 2.0.8:
-
test: "|/var/mailman/mail/wrapper post test" test-admin: "|/var/mailman/mail/wrapper mailowner test" test-request: "|/var/mailman/mail/wrapper mailcmd test" test-owner: test-admin
|
Once the new sendmail directives have been added to the aliases file, regenerate the aliases database with the command: /usr/bin/newaliases
Restart sendmail with the command: /etc/rc.d/init.d/sendmail restart
The newlist command creates the directory:
- Fedora Core 3: /usr/lib/mailman/lists/test/
- Red Hat 7.1-9.0: /var/mailman/lists/test/
and also creates the required files for the list.
Potential Pitfall: If this is not set-up properly you will probably get an email stating that the list was not found.
- Site Password:
- Fedora Core 3: Creat site admin password with the command /usr/lib/mailman/bin/mmsitepass (which creates the file /usr/lib/mailman/data/adm.pw) This is required or else the daemon started by the init script /etc/rc.d/init.d/mailman will not start.
- Red Hat 9.0: Creat site admin password with the command /var/mailman/bin/mmsitepass (which creates the file /var/mailman/data/adm.pw) This is required or else the daemon started by the init script /etc/rc.d/init.d/mailman will not start.
- Red Hat 7.1: Install notes suggested the creation of an admin password with the command /var/mailman/bin/mmsitepass (which creates the file /var/mailman/data/adm.pw) This did not seem necessary.
- Note mailman 2.1.1 (Red Hat 9.0, Fedora Core and later) uses a daemon,
qrunner, which must be started: (as root)
- chkconfig --level 35 mailman on
- service mailman start
- Point your browser to http://your-domain/mailman/admin/test/
(or http://your-domain/mailman/admin/)
From this administration interface, one will configure the security,
policies, users and presentation of the email list.
User should be pointed to: http://your-domain/mailman/listinfo/test
Here users may subscribe, unsubscribe configure their account.
User options (for their given email address) may be set by pointing the browser
to: http://your-domain/mailman/options/test/email-user%40your-isp.com
Once an email has been sent to the list, archives will be available from
http://your-domain/pipermail/test/
(Is http://localhost/mailman/private/test suppose to do something?? It didn't for me)
- Log files are available for reviewing errors etc.: /var/mailman/logs/...
Potential Pitfalls:
- If upgrading mailman, the command /var/mailman/bin/update
will update Mailman list files. The RPM install should do this for you.
- The easiest configuration is to run Mailman on the same computer
which is running your mail server (MTA). If not, and you are sharing
a filesystem, beware that the locking mechanism of NFS way thwart sucess.
See: Mailman/LockFile.py and the constant CLOCK_SLOP
to fix any potential problem with clock skew.
| Mailman administration commands: |
Mailman commands to view contents of data files:
-
| Command |
Description |
| dumpdb |
List contents.
dumpdb -p /var/mailman/list-name/config.pck > outfile |
Command Location:
- Ubuntu (dapper 6.06) / Debian: /var/mailman/bin/
| Transferring a Mailman repository from one server to another: |
The Mailman data files are stored in the following directories:
- Fedora Core/CentOS/Ubuntu:
- /var/lib/mailman/lists/list-name/...
- /var/lib/mailman/archives/private/list-name/...
/var/lib/mailman/archives/public/list-name/...
- /var/lib/mailman/data/...
- Red Hat 9.0
- /var/mailman/lists/list-name/...
- /var/mailman/archives/private/list-name/...
/var/mailman/archives/public/list-name/...
- /var/mailman/data/...
Simply tar the directories and transfer them to the new server:
-
cd /var/lib/mailman tar cf mailman-archive.tar lists archive data
Note:
- When I transferred a Mailman repository from a Red Hat
system to an Ubuntu system it required a soft link to maintain the CGI
in the Apache CGI script alias path.
ln -s /var/lib/mailman/cgi-bin /usr/lib/cgi-bin/mailman/
- Directory permissions must be set to the system user id used for Mailman:
(i.e. chown -R root:list)
- Red Hat/Fedora Core: root:mailman
- Ubuntu: root:list
This worked for me.
|