Section 36.3. Objective 1: Configuring Mailing Lists


36.3. Objective 1: Configuring Mailing Lists

As with MTAs, mailing list servers are a very large topic. Fortunately, the LPI focuses just on the Majordomo mailing list server, found at http://www.greatcircle.com/majordomo. Even more fortunate for us, the LPI assigns a relatively small value to this topic.

Still, it is essential for you to know how to install and configure the revised version of Majordomo, called Majordomo 2, for various reasons. First, mailing lists are still very popular and are expected in many environments. You should know how to provide them.

Majordomo is essentially an add-on application to an MTA. It can be used with any MTA (such as Sendmail or Qmail) to manage lists of email applications. You can configure Majordomo to receive commands from potential users, who then direct Majordomo to add them to a list or drop them from a list. Majordomo does not deliver mail; that's the job of the MTA. Majordomo essentially acts as a mediator between users, the MTA, and the MDA.

Users generate postings often based on a particular discussion, which is often called a thread. This thread can be made public or private, depending upon the wishes of the administrator. The Majordomo administrator can configure Majordomo using various means, including a command-line interface, a web interface, or even by sending email messages to the Majordomo server.

Majordomo servers often have a moderator. This person can be the same person as the administrator, but does not have to be. The moderator is responsible for determining the content posted on the site. The moderator can also add and remove users.

Majordomo provides the following services, if properly configured:


User addition and deletion

Users can petition to join a list simply by sending an email to the server. The user will be automatically added. The server will then send the user a confirmation message that the user must reply to in order to be added to the list. For more secure situations, Majordomo can be configured to defer the user request and forward the join message to the Majordomo administrator, who can decide whether to add that user.


List moderation

Many times, lists are completely open and unedited. Any user is welcome to post to it at any time. However, organizations and businesses might require moderated lists for various reasons. Messages, in these cases, are sent first to the moderator, who can then edit or drop various messages. The moderator can also drop users as necessary.


Message digests

Users often do not want to read each individual message on a thread. They would prefer receiving the entire thread after a period of time (e.g., a day or a week). Recipients will receive one large email, rather than a series of short emails.


Subscription confirmation

Whenever a user requests to be added to a list, a confirmation message is sent out to that user's email address. This step is necessary to avoid a malicious user subscribing a person to a list who does not want to belong to it. When a user unsubscribes from a list, a confirmation is also sent. The user will often have to confirm the unsubscribe request, to avoid a malicious user spoofing an unsubscribe command.


Instruction and reminder messages

Majordomo servers can be configured to send instruction messages to end users. Such messages can include instructions on how to unsubscribe. They can also include information concerning the expected content of messages sent to the Majordomo server. Also, Majordomo servers can be configured to send out reminder messages at specified times (usually the first day of the month) to remind users about their participation in the list.

36.3.1. Configuring Majordomo

The steps for configuring Majordomo are not particularly difficult. It is important, though, to understand Majordomo's essential components. Table 36-8 contains a list of essential Majordomo files.

Table 36-8. Majordomo configuration files, commands, and resources

Resource

Description

majordomo.cf

The Majordomo configuration file. Usually found in the /etc directory.

create

Used to create a list name.

Archive directory

Location where list server configuration files are kept.

List server file

A file with the same name as the list. This file contains configuration information for the specific mailing list group.


When using Majordomo, two types of passwords exist:


Administrative

Required of a user who has the privileges to change the characteristics of an entire group (e.g., to enable moderation or to enable user-based passwords for submissions).


User

A user might be required to issue a password in order to change preferences (e.g., to request summary messages of group postings, called digests).

It is important to not confuse these two passwords. Following are the steps to take when preparing Majordomo.

36.3.1.1. Preparing Sendmail

The first step to take when configuring Majordomo is to set an alias for the Majordomo administrator . To do this, edit the /etc/aliases file so that it has the following lines. This chapter assumes that you are using Sendmail, but you can use any MTA you wish:

 majordomo-owner: domo_admin_account_name owner-majordomo: domo_admin_account_name majordomo:       "|/usr/local/majordomo-1.94.5/wrapper majordomo" 

where domo_admin_account_name is the username of the person you wish to administer Majordomo. Now, when users send an email to the moderator account at majordomo-owner@yourdomain.com, those messages will go to the user account of the person administering the system. The third line has Sendmail use the Majordomo aliases file, to ensure proper routing of local messages.


Warning: Pay close attention to the aliases file. You will have to update it regularly to include additional entries specific to the names of the groups you wish to add.

The next step to take is to edit the sendmail.cf file (often located in the /etc/mail directory). This file needs to have the following changes made to it:

  1. Add the following line:

     OA/usr/local/majordomo-1.94.5/majordomo.aliases 

    This line creates a second alias file, which is necessary for Majordomo to process mail. Once you have done this, restart Sendmail.

  2. Configure Sendmail to make Majordomo a trusted user, by adding the following line to the sendmail.cf file:

     Tmajordomo 

    This line allows Majordomo to properly masquerade users as it resends files.

  3. Determine whether Sendmail is using the smrsh environment. If so, you have to create a symbolic link from the /etc/smrsh directory to the the Majordomo wrapper program (which often resides in the /usr/local/majordomo-1.94.5 directory). In this case, enter:

     ln -s /usr/local/majordomo-1.94.5/wrapper /etc/smrsh/wrapper 

  4. Verify that Sendmail security measures (those that concern forwarding and some spam-specific settings) do not conflict with Majordomo. If they do, you will experience possibly hours of frustration trying to figure out why a perfectly configured Majordomo list server isn't working.

36.3.1.2. Installing Majordomo

Once you have created the proper Sendmail environment, you can install Majordomo. You have various options available to you. Debian-based systems can use apt-get, dpkg, and Synaptic. Red Hat and other systems can use various RPM handlers, while Novell systems can use YaST or RPM. The source tarballs are available at http://www.greatcircle.com/majordomo.

Once you have installed Majordomo, you can begin configuring lists.

36.3.1.3. Creating Majordomo lists

To configure a Majordomo list, you simply need to create a new file that will be populated to specify users who wish to subscribe to the list. To create the file, issue the following command as root:

 touch /usr/local/majordomo-1.94.5/lists/telecaster 

Then, still as root, add the proper alias to /etc/aliases:

 owner-telecaster:    domo_admin_account_name telecaster-request:  "|/usr/local/majordomo-1.94.5/wrapper request-answer   telecaster" telecaster-approval: domo_admin_account_name 

You have just added a list. Users can now send messages to your list server to subscribe to the list. Notice that you had to add aliases for requests, approval, and the list owner. Failure to add these aliases will cause these group entries to behave improperly or not work at all.

36.3.1.3.1. Using the create command

Actually, you do not have to edit the files in the previous section manually. You can use the create command, which takes the following syntax:

 create listname password 

where password is the administrative password used to administer Majordomo. Thus, to add the group named telecaster, you would issue the following command:

 create telecaster password 

36.3.1.3.2. Customizing the list

Once a list has been created, you can view it using a command such as less or edit it using a text editor, using a web configuration interface, or via email messages. By editing the configuration file, you can do the following:

  • Enable or disable moderation

  • Require users to provide passwords for a moderated list

  • Set the administrator password for the moderator

  • Enable or disable message digesting

To add moderation to the Majordomo list, for example, add the following to the list's configuration file:

 moderate = yes 

Once you have enabled moderation in the configuration file, use the newconfig command to enable digesting for a particular list using the following syntax:

 newconfig list_name-digest password 

To create digests for the telecaster Majordomo group, you would issue the following command:

 newconfig telecaster-digest password 

End users can then ask for digests using the following syntax:

 subscribe [listname]-digest 

For example, if users wish to receive a digest for the telecaster list, they would place the following in the body of their email messages:

 subscribe telecaster-digest 

The LPI Objectives do not discuss further configuration of the Majordomo list server.

36.3.2. Testing the Implementation and Monitoring Problems

Just like with network troubleshooting, you should start small when testing your Majordomo implementation. First, see if the server is providing all of the lists you have configured. To do this, enter the following command:

 echo lists | mail majordomo 

This command should send a list of the server's working Majordomo lists to your email account. You can use a similar command to receive help messages from your Majordomo server:

 echo help | mail majordomo 

The preceding command helps you confirm that your Majordomo installation is working as expected.

You can subscribe yourself to the list by sending an email message to the Majordomo server with the following line in the body (not the subject line) of the message:

 subscribe telecaster 

Review the subscribe reply for any problems, and send another message to confirm that you have subscribed to this list.

Once you are fully subscribed, send a few test messages from separate user accounts and client systems to determine whether the server is processing messages from all subscribers and systems. You can then unsubscribe from the list by placing the following in the body of an email message:

 unsubscribe telecaster 

Review the unsubscribe reply for any problems, and confirm the fact that you have unsubscribed.

To test the contents of the information file you are using, send an email to the Majordomo server with the following contents in the body:

 info listname 

The server will then send you a copy of the list's information page. If you wish to obtain a list of current users of a list, place the following in the body of an email message and send it to the Majordomo server:

 who your_list_name 

where your_list_name is the name of the group (e.g., telecaster).

Finally, consider the following tips and tricks:

  • Check the configuration file for any potential problems. Several years ago, several RPM-based versions of Majordomo contained the following line in the majordomo.cf file:

     $whereami = 'hostname' 

  • The 'hostname' parameter stopped Majordomo from issuing messages. A simple change of the file to specify the correct hostname directly resolved the problem. This and other "problems" in the configuration file can cause an otherwise perfect server to fail.

  • Review the /var/log/messages file and any log files related to Majordomo that reside in the /var/log directory. You will find that Majordomo's messages are relatively clear.

  • Verify that permissions are correct. Many times, directories and files should be marked executable, but are not. Keep that in mind when reading Majordomo's error messages.

  • Check for problems in the alias file.

  • Review your MTA settings to ensure that they are not causing the problem.

  • Use the strace command when sending messages to the Majordomo server. It may help you understand why the problem is happening.

  • Check for firewall settings that may be blocking messages.




LPI Linux Certification in a Nutshell
LPI Linux Certification in a Nutshell (In a Nutshell (OReilly))
ISBN: 0596005288
EAN: 2147483647
Year: 2004
Pages: 257

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net