Administering a Mailing List

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.

Installing majordomo

Majordomo is available in RPM format from, and the source distribution can be obtained from 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
#  List Aliases
#  The BioChemistry List
biochem-request: "| /usr/lib/majordomo/wrapper request-answer biochem"
biochem-approval: biochem-owner
biochem-owner: owner-biochem
biochem: "| /usr/lib/majordomo/wrapper resend -l biochem -h -R bi ochem-out"
biochem-out: :include:/var/lib/majordomo/lists/biochem,biochem-archival
biochem-archival: "| /usr/lib/majordomo/wrapper -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 go to recipients in the /var/lib/majordomo/lists/biochem file. The message is also sent to the 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

You should quickly receive majordomo's Help Document in your mailbox. The programs included with the majordomo distribution are summarized in Table 19-5.

Table 19-5: Programs Included with majordomo




Approves majordomo requests and handles bounce messages.

Archives messages for later retrieval.


Automatically removes an address (usually because of repeated delivery failures) from a list and subscribes that address to the "bounce" list (if it exists).


Sends a notice to subscribers of the "bounce" list, informing them that they have been removed from the list to which they were once subscribed.


Verifies the majordomo installation and points out current and potential problems.


Packages messages into digests, to be sent when a particular time limit or message size is reached.


Performs most tasks involved in managing the distribution lists.


Locks a majordomo file for editing and unlocks the file when the editing session is completed.


Retransmits outgoing messages to the distribution list.


Answers a subscription request and forwards it to the list owner.


Allows programs to run as the majordomo user and simplifies running under smrsh (only one link to place in /etc/smrsh).

Part IV: Red Hat Linux Network and Server Setup