Administering a Mailing List
Even though sendmail provides several flexible methods for aliasing addresses, many situations require additional functionality. Mailing list managers (or, more commonly, listservers) offer the ability to handle large distribution lists coupled with advanced features such as moderators, archives with file transfer, digests, automatic subscription, and automatic filtering of bad addresses.Listservers typically provide several options for how each list is configured (replies go to author, replies go to the list, anyone can post to the list, posts are restricted to subscribers, subscriptions are open to anyone, subscriptions must be confirmed, and so forth). They also provide options for how the messages are presented to the recipients (with custom headers and footers, subject prefixes, filtered text in the header or body, and so forth).This section briefly describes the majordomo mailing list manager. Majordomo is a free listserver written in Perl, with the exception of one wrapper program (which is not written in Perl) that allows switching to the majordomo user. The configuration files (for the listserver as well as each individual list) are in plain text and are simple to edit. Other available mailing list managers are listed in the accompanying sidebar.
Although the basic concept of a listserver is common to all mailing list managers, some packages offer radically different features and approach the task in a different manner. The following are some of the other listservers that are available for Linux:
Mailman GNU list manager — The Mailman list manager includes a Web interface for using and managing mailing lists. A home page can be customized for each mailing list and users can easily subscribe and unsubscribe using their Web browser. You can download and get further information related to Mailman from www.list.org.
CREN ListProc 9.0 — to This mailing list manager features Web-based administration, extensive logging capabilities, and automatic deletion of bad addresses. It has recently become a sourceforge project (sourceforge.net/projects/listproc).
L-Soft LISTSERV — In use for more than a dozen years (originally on IBM mainframe computers), this package features file transfer via e-mail, indexing, digests, and subscription flags. Details, pricing information, and a restricted free trial version can be downloaded from www.lsoft.com/listserv.stm.
Installing majordomo
Majordomo is available in RPM format from rpmfind.net, and the source distribution can be obtained from www.greatcircle.com/majordomo. The package can be installed with the following command (with the package in the current directory):
# rpm -Uhv majordomo*
Configuring majordomo
Several aliases should be added to the /etc/aliases file. These aliases allow mail-related accounts to be listed under different names:
# Majordomo Aliases
#
listserve: listserv
listserver: listserv
majordomo: listserv
listserv: "| /usr/lib/majordomo/wrapper majordomo"
majordomo-owner: owner-majordomo
owner-majordomo: owner-listserv
listserv-owner: owner-listserv
owner-listserv: mailserverguy@mybox.com
#
# List Aliases
# The BioChemistry List
#
biochem-request: "| /usr/lib/majordomo/wrapper request-answer biochem"
biochem-approval: biochem-owner
biochem-owner: owner-biochem
owner-biochem: emailguy@mybox.com
biochem: "| /usr/lib/majordomo/wrapper resend -l biochem -h
mail.mybox.com -R bi ochem-out"
biochem-out: :include:/var/lib/majordomo/lists/biochem,biochem-archival
biochem-archival: "| /usr/lib/majordomo/wrapper archive2.pl -a -M -f
/var/lib/ma jordomo/archives/biochem/biochem"
The first set of aliases establishes the individual who "owns" the listserver (or at least who receives its error messages) and the names by which majordomo will be known. It is most common to send requests to a "listserv" address, and this occasionally gets confused and translated into "listserve" or "listserver," so those are acceptable as well.The next block is for a biochemistry list. Like the listserver itself, each list has an owner who controls its configuration and is notified of errors. Messages to biochem@mail.mybox.com go to recipients in the /var/lib/majordomo/lists/biochem file. The message is also sent to the archive2.pl Perl script. Archived messages are stored in files such as /var/lib/majordomo/archives/biochem/biochem.200305 (May 2003 archive).
Running majordomo
Unfortunately, none of these wonderful features works quite yet. First, the alias database needs to be rebuilt, using the newaliases command or sendmail -bi. Next, because all mail delivered directly to a program is handled by the smrsh program, the smrsh program needs to be configured to allow majordomo's wrapper program to receive mail. To accomplish this, just create the appropriate symbolic link using the following command:
# ln -s /usr/lib/majordomo/wrapper /etc/smrsh/wrapper
I also recommend that you add the name majordomo to the /etc/mail/trusted-users file to avoid any extraneous X-Authentication-Warning header lines.Now the listserver can be tested. Run the following command:
# echo "help" | mail majordomo@mail.mybox.com
You should quickly receive majordomo's Help Document in your mailbox. The programs included with the majordomo distribution are summarized in Table 19-5.