29
Fri, Nov
0 New Articles

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

  • SB Profound WC 5536 Have you been wondering about Node.js? Our free Node.js Webinar Series takes you from total beginner to creating a fully-functional IBM i Node.js business application. You can find Part 1 here. In Part 2 of our free Node.js Webinar Series, Brian May teaches you the different tooling options available for writing code, debugging, and using Git for version control. Brian will briefly discuss the different tools available, and demonstrate his preferred setup for Node development on IBM i or any platform. Attend this webinar to learn:

  • SB Profound WP 5539More than ever, there is a demand for IT to deliver innovation. Your IBM i has been an essential part of your business operations for years. However, your organization may struggle to maintain the current system and implement new projects. The thousands of customers we've worked with and surveyed state that expectations regarding the digital footprint and vision of the company are not aligned with the current IT environment.

  • SB HelpSystems ROBOT Generic IBM announced the E1080 servers using the latest Power10 processor in September 2021. The most powerful processor from IBM to date, Power10 is designed to handle the demands of doing business in today’s high-tech atmosphere, including running cloud applications, supporting big data, and managing AI workloads. But what does Power10 mean for your data center? In this recorded webinar, IBMers Dan Sundt and Dylan Boday join IBM Power Champion Tom Huntington for a discussion on why Power10 technology is the right strategic investment if you run IBM i, AIX, or Linux. In this action-packed hour, Tom will share trends from the IBM i and AIX user communities while Dan and Dylan dive into the tech specs for key hardware, including:

  • Magic MarkTRY the one package that solves all your document design and printing challenges on all your platforms. Produce bar code labels, electronic forms, ad hoc reports, and RFID tags – without programming! MarkMagic is the only document design and print solution that combines report writing, WYSIWYG label and forms design, and conditional printing in one integrated product. Make sure your data survives when catastrophe hits. Request your trial now!  Request Now.

  • SB HelpSystems ROBOT GenericForms of ransomware has been around for over 30 years, and with more and more organizations suffering attacks each year, it continues to endure. What has made ransomware such a durable threat and what is the best way to combat it? In order to prevent ransomware, organizations must first understand how it works.

  • SB HelpSystems ROBOT GenericIT security is a top priority for businesses around the world, but most IBM i pros don’t know where to begin—and most cybersecurity experts don’t know IBM i. In this session, Robin Tatam explores the business impact of lax IBM i security, the top vulnerabilities putting IBM i at risk, and the steps you can take to protect your organization. If you’re looking to avoid unexpected downtime or corrupted data, you don’t want to miss this session.

  • SB HelpSystems ROBOT GenericCan you trust all of your users all of the time? A typical end user receives 16 malicious emails each month, but only 17 percent of these phishing campaigns are reported to IT. Once an attack is underway, most organizations won’t discover the breach until six months later. A staggering amount of damage can occur in that time. Despite these risks, 93 percent of organizations are leaving their IBM i systems vulnerable to cybercrime. In this on-demand webinar, IBM i security experts Robin Tatam and Sandi Moore will reveal:

  • FORTRA Disaster protection is vital to every business. Yet, it often consists of patched together procedures that are prone to error. From automatic backups to data encryption to media management, Robot automates the routine (yet often complex) tasks of iSeries backup and recovery, saving you time and money and making the process safer and more reliable. Automate your backups with the Robot Backup and Recovery Solution. Key features include:

  • FORTRAManaging messages on your IBM i can be more than a full-time job if you have to do it manually. Messages need a response and resources must be monitored—often over multiple systems and across platforms. How can you be sure you won’t miss important system events? Automate your message center with the Robot Message Management Solution. Key features include:

  • FORTRAThe thought of printing, distributing, and storing iSeries reports manually may reduce you to tears. Paper and labor costs associated with report generation can spiral out of control. Mountains of paper threaten to swamp your files. Robot automates report bursting, distribution, bundling, and archiving, and offers secure, selective online report viewing. Manage your reports with the Robot Report Management Solution. Key features include:

  • FORTRAFor over 30 years, Robot has been a leader in systems management for IBM i. With batch job creation and scheduling at its core, the Robot Job Scheduling Solution reduces the opportunity for human error and helps you maintain service levels, automating even the biggest, most complex runbooks. Manage your job schedule with the Robot Job Scheduling Solution. Key features include:

  • 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.

  • LANSAWhen it comes to creating your business applications, there are hundreds of coding platforms and programming languages to choose from. These options range from very complex traditional programming languages to Low-Code platforms where sometimes no traditional coding experience is needed. Download our whitepaper, The Power of Writing Code in a Low-Code Solution, and:

  • LANSASupply Chain is becoming increasingly complex and unpredictable. From raw materials for manufacturing to food supply chains, the journey from source to production to delivery to consumers is marred with inefficiencies, manual processes, shortages, recalls, counterfeits, and scandals. In this webinar, we discuss how:

  • 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

  • Profound Logic Have you been wondering about Node.js? Our free Node.js Webinar Series takes you from total beginner to creating a fully-functional IBM i Node.js business application.

  • 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: