You are on page 1of 4

A Quick Guide To Setting Up Mailman, The GNU Mailing List Manager On CentOS, An Enterprise-Class Linux Distribution

By Hanif Somani, Ph.D


All Rights Reserved, June 2013

This document is an extension of the article I have written for my website on List Building which you can see here: Online Income Sources -List Building. Mailman is a GNU mailing list manager which is free to download and use. It is compatible only with a Linux Operating System such as CentOS, Debian etc. Despite being a giveaway, Mailman is a match for any paid mailing list service: it is professional grade, powerful and highly configurable program written in Python. It is widely used in many respectable organisations such as Universities.

CentOS is an anagram of its tag line: the Community ENTerprise Operating System. CentOS, like vast majority of Linux operating systems is free to download and use. It is secure and powerful and used by many large organisations throughout the world. It is based on the successful commercial Linux distribution RedHat.

Furthermore, in order for GNU Mailman to function properly, you need to have an SMTP and an IMAP and POP3 Mail Servers Installed. I prefer Postfix and Dovecot. Postfix is an SMTP Mail Server that is designed to be fast, easy to administer and secure. Postfix has been written from "ground up" to overcome the pitfalls associated with Sendmail, the ubiquitous SMTP server running in Linux distributions. Some of the shortcomings of Sendmail have been reported to be associated with security and convoluted configuration. Perhaps the complications in configuring Sendmail leads to lack of security of the server. Postfix overcomes all these issues.

Dovecot is a secure POP3 and IMAP server for Linux distributions. It essentially works with Postfix to securely deliver emails to the recipients in the system.

I am assuming, in this documentation, that you have a running CentOS already installed. Proceed to install GNU Mailman: yum install mailman

Type the following command to switch on the GNU Mailman server if it was ever to reboot: chkconfig --level 345 mailman on Assuming you have Apache web server already installed on CentOS, locate the Mailman configuration file, mailman.conf, for Apache which may be installed here: /etc/httpd/conf.d/mailman.conf Uncomment the following line in the file: RedirectMatch ^/mailman[/]*$ /mailman/listinfo

Issue the following command: service mailman start Install Postfix and Dovecot before dealing with Mailman further: yum install postfix Make the following changes to the main.cf file of Postfix as follows: myhostname = [replace with your hostname and domain in the format host.domain.tld or virtual.domain.tld] mydomain = [myhostname without the host or virtual component] mydestination = $myhostname, localhost.$mydomain, localhost, $mydomain

mynetworks = 192.168.x.x 127.0.0.0/8 If you are planning to retrieve your emails through IMAP server: home_mailbox = Maildir/ smtpd_sasl_auth_enable = yes smtpd_sasl_security_options = noanonymous smtpd_sasl_local_domain = $myhostname smtpd_recipient_restrictions = permit_sasl_authenticated,permit_mynetworks, check_relay_domains broken_sasl_auth_clients = yes smtpd_sasl_type = dovecot smtpd_sasl_path = private/auth

chkconfig --level 345 postfix on service postfix start

Install Dovecot: yum install dovecot Then open the dovecot configuration file 10-master.conf located here: /etc/dovecot/conf.d/10master.conf and include the following lines:

# Postfix smtp-auth unix_listener /var/spool/postfix/private/auth { mode = 0666 user = postfix group = postfix }

chkconfig --level 345 dovecot on service dovecot start We need to create at least one generic Mailman mailing list before we can proceed to create other more specific ones. This mailing list is called mailman and you need to issue the following command: /usr/lib/mailman/bin/newlist mailman You then need to copy the "aliases" output to the aliases file located here: /etc/aliases ## mailman mailing list mailman: mailman-admin: mailman-bounces: mailman-confirm: mailman-join: mailman-leave: mailman-owner: mailman-request: mailman-subscribe: mailman-unsubscribe:

"|/usr/lib/mailman/mail/mailman post mailman" "|/usr/lib/mailman/mail/mailman admin mailman" "|/usr/lib/mailman/mail/mailman bounces mailman" "|/usr/lib/mailman/mail/mailman confirm mailman" "|/usr/lib/mailman/mail/mailman join mailman" "|/usr/lib/mailman/mail/mailman leave mailman" "|/usr/lib/mailman/mail/mailman owner mailman" "|/usr/lib/mailman/mail/mailman request mailman" "|/usr/lib/mailman/mail/mailman subscribe mailman" "|/usr/lib/mailman/mail/mailman unsubscribe mailman"

Issue the following command: newaliases postfix reload You should be set to go with this. However, if you need to discuss your particular set up with me, do not hesitate to send me an email here: Hanif To your success! Hanif Somani, Ph.D.