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:
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:
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.
|
---|
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:
|
---|
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
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
LATEST COMMENTS
MC Press Online