Configuring mailing lists
A mailing list manager program is basically a local extension for a mail transport program (MTA) such as Sendmail. Basically, the MTA running on a system passes off a set of addresses to the control of the mailing list manager, and the mailing list manager modifies, processes, and perhaps re-mails the messages it receives. Some messages received by a mailing list manager are messages meant for distribution to the mailing list itself (perhaps needing to be verified for permission to distribute to the list(s). Other messages are control messages that change the status of the mailing list, such as the subscription options of a particular subscriber. A mailing list manager does not perform mail delivery itself, but passes that function to its supporting MTA.
As the introduction to this tutorial stated, Majordomo is not currently the state-of-the-art choice for mailing lists. Rather, the best choice for a new installation of a mailing list is probably Mailman. Majordomo, however, is still perfectly functional and is installed on many older systems which continue to operate without problem (sometimes supporting lists that have been operational for many years).
There is a wrinkle with Majordomo versions, however. Some years ago, a rewrite of the Majordomo 1.x series was started, called Majordomo2. Unfortunately, that rewrite fizzled out without ever reaching release status. While Majordomo2 (in a beta version) may be used in a very small number of systems, Majordomo 1.9.5 is the most recent stable version and is the version discussed in this tutorial.
You can obtain an archive of the Majordomo software at the Majordomo site (see Resources for a link).
After unpacking a file that will be named something like majordomo-1.94.5.tgz, be sure to read the INSTALL file carefully. You need to follow all the steps it describes for getting a working Majordomo system. Building the system uses the usual
make; make install steps of most source installs, as well as
make install-wrapper. The install can and should verify itself with a command like
cd /usr/local/majordomo-1.94.5; ./wrapper config-test (the
make install provides details in a message).
Before building, modify the Makefile and create and/or modify majordomo.cf. As a starting point, you can copy the latter file from sample.cf in the source distribution. In the Makefile, a number of environment variables are set, but the most critical and subtle of these is probably
W_GROUP. This is the numeric gid of the group Majordomo will run under, almost always the group "daemon." The gid for daemon is 1 on most systems, but be sure to check using the following:
$ id daemon
uid=1(daemon) gid=1(daemon) groups=1(daemon)
Other variables in Makefile include
PERL for the path to the interpreter, and
W_HOME for the location where Majordomo will be installed.
Your new majordomo.cf file also needs to be edited before the
make install. The Perl variables that need to be modified appear mainly near the top of the file. Definitely adjust
$homedir, and examine the others to make sure they are sensible.
The final step in installation is convincing Sendmail to talk with Majordomo. Within the /etc/sendmail.cf file, this involves a line like this:
If you use the M4 processor to generate Sendmail configuration files, you can use a line like this:
The sample majordomo.aliases contains some sample values:
Listing 1. Sample majordomo.aliases
majordomo: "|/usr/test/majordomo-1.94.5/wrapper majordomo" majordomo-owner: you owner-majordomo: you test: "|/usr/test/majordomo-1.94.5/wrapper resend -l test test-list" test-list: :include:/usr/test/majordomo-1.94.5/lists/test owner-test: you test-owner: you test-request: you
These, of course, need to be customized for your particular setup. In particular, "you" means the name of the list administrator (who is not necessarily the overall system administrator).
The sample setup given above created a list called "test," with addresses for "test-owner," "test-request," etc. for administering the list. In real use, you will probably want lists with other names. To accomplish that, do the following:
- Switch to the directory $listdir, as defined in majordomo.cf.
- Create files called my-list-name and my-list-name.info (adjust appropriately);
chmodthem to 664. The latter file contains an introduction to the list.
- Create several aliases in your majordomo.aliases file, following the pattern of the "test" examples -- for example, "foo-owner," "foo," "foo-request," and so on.
- Send requests to
signoff, and so on, for members of the list.
- Create an archive directory in the location specified by the
- Create a digest subdirectory under $digest_work_dir. Use the same name as the digest list (for example: test-digest).
- Make sure everything is owned by user majordomo, group majordomo, and is writeable by both owner and group (in other words, mode 664 for files and mode 775 for directories).
- Issue a
config <listname> <listname>admincommand to Majordomo. This will cause it to create a default configuration file for the list, and send it back to you.