The Linux Letter: Mailman! Special Delivery!

Typography
  • Smaller Small Medium Big Bigger
  • Default Helvetica Segoe Georgia Times

During my two decades plus as a computer professional, I have acquired subscriptions to innumerable mailing lists. I imagine that most of the readers of this column have as well.

Mailing lists are a wonderful means of participating in specialized discussions. They also are an excellent resource for researching solutions to vexing problems.

Recently, some members of an industry group asked me to provide a mailing list for their use. I readily agreed. Since I don't have a Microsoft Exchange or Lotus Domino server (nor a desire to get either), I naturally turned to the open-source community for software to provide this service.

The "M" Words

A quick search for the terms "mailing" and "list" on freshmeat.net (the site that should always be your first visit for open-source software) provided a list of 116 projects. A quick skim of the selections brought me to two conclusions: 1) that there are many options from which to choose and 2) that I should see what software is being used to manage the lists to which I'm currently subscribed to help narrow down the choices. (Actually, it wouldn't hurt to add additional search terms either.)

A little research showed that the vast majority of my mailing lists are managed by one of two packages: Majordomo or Mailman. The freshmeat.net description for each package showed that either would suit my needs. I gave the nod toward Mailman for one simple reason: Red Hat has it packaged as a Red Hat Package Manager (RPM). (See "The Linux Letter: Revving Up the RPMs.") I admit it--I've been spoiled by RPM. All other things being equal, the ability to install the software by simply issuing the command up2date -i mailman gets my vote. (Up2date contacts Red Hat's server to obtain the mailman RPM and any associated dependencies and then executes the RPM program to do the installation.)

Prerequisites

The Mailman project page describes the software as follows: "Mailman is free software for managing electronic mail discussion and e-newsletter lists. Mailman is integrated with the Web, making it easy for users to manage their accounts and for list owners to administer their lists. Mailman supports built-in archiving, automatic bounce processing, content filtering, digest delivery, spam filters, and more. See the features page for details."

Clearly, the phrase "Mailman is integrated with the Web" should clue you in to the fact that you'll need to load this software onto a machine running some sort of Web server (I'll assume Linux or Apache). Since the primary means of contact with a mailing list is email, your system will have to be able to send and receive email. Sendmail is the default Message Transfer Agent (MTA) for Red Hat systems. If you prefer (as I do) Postfix, it is packaged as an RPM by Red Hat and will function as a drop-in replacement for Sendmail. The installation and configuration of your Web server and MTA is beyond the scope of this article, but there is plenty of documentation available to you via the 'net, if you need help with those tasks.

Mailman is written in the Python language, so you will need to load this too onto your system. As it happens, Red Hat uses Python to write many of its own system applications, so you will undoubtedly find it already loaded on your Red Hat Linux system. Other Linux distros probably have it loaded or have it available as a loadable package. Consult your distro's documentation to learn how to verify the existence or availability of Python for your system.

Installation

As I mentioned, I use Red Hat's up2date command to install software on my Red Hat 9 system. By simply issuing the keyboard incantation up2date -i mailman, I was able to install Mailman Version 2.1. Besides installing the actual software, the RPM downloaded via up2date contains scripts to create the "mailman" user and the appropriate mail user aliases. As an alternative to up2date, you can use yum (described in "The Linux Letter: Revving Up the RPMs") to download the software and dependencies. If you don't like to use up2date or yum (or the other alternatives), you can, of course, install Mailman using the RPM already provided on your installation CD, but you'll have to resolve any dependencies yourself. And for those who turn their noses up at package managers, you can always retrieve the software and install Mailman in the traditional way--by hand.

Configuration

Once you have installed Mailman, you'll need to make some simple configuration changes. The changes to a Red Hat Linux installation are summarized in the RPM file. A quick rpm -qi mailman indicates these required changes:

  • Run /var/mailman/bin/mmsitepass to set the Mailman administrator password.
  • Edit /var/mailman/Mailman/mm_cfg.pyto customize Mailman's configuration for your site.
  • Modify the Sendmail configuration to ensure that it is running and accepting connections from the outside world. To ensure that it runs, set DAEMON=yes in /etc/sysconfig/sendmail. Ensuring that it accepts connections from the outside world may require modifying /etc/mail/sendmail.mc and regenerating sendmail.cf.
  • Add these lines to /etc/httpd/conf/httpd.conf to configure your Web server:
ScriptAlias /mailman/ /var/mailman/cgi-bin/
Alias /pipermail/ /var/mailman/archives/public/
<Directory /var/mailman/archives>
Options +FollowSymlinks

 


The section of the instructions that discusses Sendmail may vary slightly if you are running an MTA other than Sendmail. I will assume that you will know (or can research) what changes (if any) you'll need to make for your installed MTA.

As you can see, there isn't much you'll need to do to get your installation completed and configured. It took me less than one hour to get my installation up and running.

Using Mailman

Once you have Mailman running, you'll want to create your first list. In my case, I've created a list called "linuxletter," which I'll direct you to later in this article. The steps I took to create the list are shown below.

Take note of the lines that Mailman will call out for you to add to your /etc/aliases file. Normally, this file is used so that an email can be addressed using an alias to a real user. In the case shown below, the user "linuxletter-owner" is being aliased to "linuxletter-admin." But the other aliases demonstrate one of the slick uses of /etc/aliases. If email arrives at the server addressed to "linuxletter," "linuxletter-admin," or "linuxletter-request," then the MTA will pipe the message through the program shown at the right. The vertical bar (|) is the pipe symbol, and /var/mailman/mail/wrapper is the program that will process the file. The remaining two items are parameters to "wrapper"--a command to execute and the mailing list name on which to operate. (Mailman Version 2.1 has renamed "wrapper" as "mailman.")

 

1. [root@server mailman]# bin/newlist

2. Enter the name of the list: linuxletter

3. Enter the email of the person running the list: This email address is being protected from spambots. You need JavaScript enabled to view it.

4. Initial linuxletter password:

5. Entry for aliases file:

## linuxletter mailing list

## created: 19-Sep-2003 root

linuxletter: "|/var/mailman/mail/wrapper post linuxletter"

linuxletter-admin: "|/var/mailman/mail/wrapper mailowner linuxletter"

linuxletter-request: "|/var/mailman/mail/wrapper mailcmd linuxletter"

linuxletter-owner: linuxletter-admin

6. Hit Enter to continue with linuxletter owner notification.

 

If you use the default Sendmail MTA, then add those lines to /etc/aliases. Postfix's alias file is in /etc/postfix/aliases, so that's where I made my changes. In either case, be sure to issue the command newaliases to apply your changes.

Wanna Try It?

Before I begin this section, let me take a moment to state that I will not be collecting email addresses from anyone who subscribes to this list. Furthermore, I don't intend this list to be used for anything but a demonstration of Mailman, so I'll eventually be deleting the list. With that said, I invite you to try Mailman. Point your browser to my lists Web site and subscribe to the "Linuxletter" mailing list. You'll be sent an email confirming your request and, if you reply to that email, another message will appear, confirming your subscription, which is shown below.

Welcome to the This email address is being protected from spambots. You need JavaScript enabled to view it. mailing list!

To post to this list, send your email to:

  This email address is being protected from spambots. You need JavaScript enabled to view it.

General information about the mailing list is at:

  http://lists.blkline.com/mailman/listinfo/linuxletter

If you ever want to unsubscribe or change your options (e.g., switch to 

or from digest mode, change your password, etc.), visit your subscription 

page at:

  http://lists.blkline.com/mailman/options/linuxletter/This email address is being protected from spambots. You need JavaScript enabled to view it.

You can also make such adjustments via email by sending a message to

  This email address is being protected from spambots. You need JavaScript enabled to view it.

with the word "help" in the subject or body (don't include the quotes), and you

will get back a message with instructions.

You must know your password to change your options (including changing 

the password itself) or to unsubscribe. It is:

  xxxxxxxx

If you forget your password, don't worry; you will receive a monthly reminder 

telling you what all your blkline.com mailing list passwords are and how to 

unsubscribe or change your options. There is also a button on your options 

page that will email your current password to you.

You may also have your password mailed to you automatically off of the Web 

page noted above.

 

As you can see, the confirmation is chock full of information. Feel free to post to the list and to visit the URLs. This will give you a chance to test the software from the user's perspective. To test it from the administrator's perspective, I have created another dummy list. The confirmation email is shown below:

 

The mailing list 'admindemo' has just been created for you. The following is 

some basic information about your mailing list.

Your mailing list password is:

    mcpressonline

You need this password to configure your mailing list. You also need it to handle 

administrative requests, such as approving mail if you choose to run a 

moderated list.

You can configure your mailing list at the following Web page:

    http://lists.blkline.com/mailman/admin/admindemo

The Web page for users of your mailing list is: 

    http://lists.blkline.com/mailman/listinfo/admindemo

You can even customize these Web pages from the list configuration page. 

However, you do need to know HTML to be able to do this.

There is also an email-based interface for users (not administrators) of your list; 

you can get info about using it by sending a message with just the word "help" 

as subject or in the body to:

    This email address is being protected from spambots. You need JavaScript enabled to view it.

To unsubscribe a user: From the mailing list "listinfo" Web page, click on or 

enter the user's email address as if you were that user. Where that user would 

put in their password to unsubscribe, put in your admin password. You can also 

use your password to change member's options, including digestification, 

delivery disabling, etc.

Please address all questions to This email address is being protected from spambots. You need JavaScript enabled to view it..

 

You are welcome to visit the site and log on as administrator as instructed above. I would appreciate it if you would refrain from making any changes to the site (don't click on the "Submit Your Changes" button) so that everyone will be able to access the site and see the default settings. Anyone having trouble accessing the site may contact me at This email address is being protected from spambots. You need JavaScript enabled to view it..

What Next?

I encourage you to visit the Mailman Web site and look over the features page. You'll see that this open-source package is truly amazing in the features it provides. The resources it requires are extremely low, so one of those junk Pentium computers that you have lying around collecting dust would be an excellent platform on which to load Linux and Mailman. The price for this software is right, and your use of it would put you in good company, as you can see from the Mailman in Use link on the Mailman Web site.

Even if you don't plan on providing mailing lists for the Internet, Mailman would be of use on your company's intranet. Some of you may consider Mailman to be overkill, considering that you can send email to groups by creating mailing list groups via your email client. While that may be the case, Mailman can create an archive of all traffic. If you create mailing lists by department, or maybe by project, you'll have a central resource that you can refer to later when you're all arguing about who said what and what was agreed to by whom. Better still, when someone joins a department or project, they can access this archive to come up to speed quickly.


That's all for this edition. Please feel free to investigate Mailman at my site and give it a try! See you next month.

 

Barry L. Kline is a consultant and has been developing software on various DEC and IBM midrange platforms for over 20 years. Barry discovered Linux back in the days when it was necessary to download diskette images and source code from the Internet. Since then, he has installed Linux on hundreds of machines, where it functions as servers and workstations in iSeries and Windows networks. He recently co-authored the book Understanding Linux Web Hosting with Don Denoncourt. Barry can be reached at This email address is being protected from spambots. You need JavaScript enabled to view it..

 

 

Barry Kline 0

Barry L. Kline is a consultant and has been developing software on various DEC and IBM midrange platforms since the early 1980s. Barry discovered Linux back in the days when it was necessary to download diskette images and source code from the Internet. Since then, he has installed Linux on hundreds of machines, where it functions as servers and workstations in iSeries and Windows networks. He co-authored the book Understanding Web Hosting on Linux with Don Denoncourt. Barry can be reached at This email address is being protected from spambots. You need JavaScript enabled to view it.

BLOG COMMENTS POWERED BY DISQUS

LATEST COMMENTS

Support MC Press Online

$

Book Reviews

Resource Center

  •  

  • LANSA Business users want new applications now. Market and regulatory pressures require faster application updates and delivery into production. Your IBM i developers may be approaching retirement, and you see no sure way to fill their positions with experienced developers. In addition, you may be caught between maintaining your existing applications and the uncertainty of moving to something new.

  • The MC Resource Centers bring you the widest selection of white papers, trial software, and on-demand webcasts for you to choose from. >> Review the list of White Papers, Trial Software or On-Demand Webcast at the MC Press Resource Center. >> Add the items to yru Cart and complet he checkout process and submit

  • SB Profound WC 5536Join us for this hour-long webcast that will explore:

  • Fortra IT managers hoping to find new IBM i talent are discovering that the pool of experienced RPG programmers and operators or administrators with intimate knowledge of the operating system and the applications that run on it is small. This begs the question: How will you manage the platform that supports such a big part of your business? This guide offers strategies and software suggestions to help you plan IT staffing and resources and smooth the transition after your AS/400 talent retires. Read on to learn: